Hacker Newsnew | past | comments | ask | show | jobs | submit | miguel_martin's commentslogin

Not one mention of SSH or remote development. Life must be nice to do development on a single machine. Tramp on Emacs is not ideal.

You start an emacs server on each machine you might use. Then ssh and emacsclient -nw. You need a decent terminal but life is simple.

Not rust, but check out nimwave: https://github.com/ansiwave/nimwave

If your really want to use the keyword def instead of proc: you can do that with sed.

In all serious-ness, don't do that. I've used Python a lot, but Nim is a different language. Writing the proc keyword helps condition your brain to realize you are writing Nim, not Python.


Nim is indeed a different language, which was the point of my comment, for those who got past the first sentence. However, if folks are going to tout its “python-like” syntax as a selling point, it’s not really fair to then turn around and say, “no, it’s a different language”, when a Python programmer points out that it’s not really all that python-like after all, and maybe it could be more so.

If one is going to take pains to point out that there are good reasons why it is different from Python, then we can carry that as far as we like. There’s no particular reason to use indentation to denote blocks. BEGIN and END worked just fine, after all, and would be more true to Nim’s intellectual heritage. Or maybe just END, and continue to open the block with a colon.


> language like his personal compiler development playground

re personal compiler development playground: I don't see this for Nim 2. Nimony/Nim3 is more of a "playground", but rightfully so: he is creating a new major version of the language and aiming to improve the architecture of the compiler.

> He is also very difficult to work with and isn't very welcoming to newcomers

I don't have full context on the drama behind the fork, but I don't see Araq not being very "welcoming". Araq replies on the forums very consistently, replying to new-comer questions, which one might consider as "simple questions". Araq will state his personal & honest opinions, which may come off as abrasive or "un-welcoming" in your opinion. I don't agree with everything he says but that's OK.

From what I can tell the fork seems to be due to differences in direction of the language and w.r.t working together: differences in communication styles. But again, I don't know.

Personally, I see no reason to use the fork (Nimskull) over Nim, nor would I ever see any individual or company picking up Nimskull unless they were very deeply familiar with Nim (this is a small population of people). From a skim of the Nimskull repo, there is no website (there is a copy of the Nim manual), no forums (just some chatrooms), no clear documentation on the future direction, no documentation on differences for someone not familiar with Nim, etc. - why would anyone pick up Nimskull unless they knew Nim well? Please take this as constructive criticism. e.g. if any feature of the language/compiler/tooling is "better" or planned to be better: highlight it, summarize the long GitHub issue/projects discussions in a blog, etc.


> re personal compiler development playground: I don't see this for Nim 2. Nimony/Nim3 is more of a "playground", but rightfully so: he is creating a new major version of the language and aiming to improve the architecture of the compiler.

Araq likes to work on the shiny flashy things he finds fun / interesting to work on. I'm not going to fault him for that, but things like atomics on Windows are still broken. People have been complaining about the stdlib and documentation + lack of a formal specification for at least a decade.

> From what I can tell the fork seems to be due to differences in direction of the language and w.r.t working together: differences in communication styles. But again, I don't know.

There was quite a bit of drama that caused the hard fork to materialize. Differences in communication styles is definitely describing the drama that unfolded, extremely mildly. I don't work on the fork or use it, but some of the more talented compiler developers who were previously contributing to Nim, left Nim to go work on Nimskull.


> Araq will state his personal & honest opinions, which may come off as abrasive or "un-welcoming" in your opinion. I don't agree with everything he says but that's OK.

Nope. This is a sop, an equivalent to the non-apology "I'm sorry you took what I said so badly".

Aggression masquerading as "honesty" has no place in any organisation that wants to be taken seriously.

It's most certainly not "OK" when Andreas' personal opinions are expressed in ad-hominem attacks.

Nim unfortunately has a toxic Dictator at the top, and his subordinates defend his behaviours. While this continues nobody should take Nim seriously.


> Nim unfortunately has a toxic Dictator at the top

Araq has opinions that he defends, but you can and absolutely should try to sway or change them. I see this all the time on Discord and Forum. And I see people win over just as much as them losing.

I don't have a strong opinion if this is healthy or not, but it's probably why I would be a bad BDFL =). All in all, I don't think dictatorship is a right word here.


My conversation with Andreas on a public forum featured ad-hominem attacks from Andreas which continued in a private email exchange between us. The man is closed-minded and had zero interest in discussion beyond aggressive insults. You're welcome to contact me privately if you'd like to read the exchange.

>Nim unfortunately has a toxic Dictator at the top, and his subordinates defend his behaviours. While this continues nobody should take Nim seriously.

I can mention just exactly the same pattern with one widespreaded OS that anyone is taking seriously.

And I know one very popular and often mentioned systems programming language with "community" driven design process with inclusive and stuff which is in some kind of stagnation without BDFL (async fragmented ecosystem without C++ burden of 40 years of legacy).

Why do you think that "welcoming" is a must for successful IT projeсt?


Do you think aggression is a must for any successful project? Or can you entertain the possibility that projects might progress even further and faster without it?

You point to Linux but assume that Linus' infamous foul behaviour has been beneficial. This is a very basic confusion of correlation and causation.

You suggest that being "welcoming" is antithetical to "success" without defining "success".

Also, note what the "B" stands for in BDFL.


This is incredible.


The way to enable C++ code calling Nim is via exportc or exportcpp and by writing a head file with the declarations you are exporting

This will require manual work, but you can use macros or a code generation script to help if your api is large.


To be clear, you can compile to WASM with emscripten. However, if you want to call JavaScript code, e.g. to interact with the DOM from WASM in browser, then the bindings that are declared in the standard library will not work.

Instead, you will need to write your own bindings. Here's an example repository of mine using emscripten with Nim: https://github.com/miguelmartin75/nim-wasm-experiments and here are bindings to emscripten's C API for websockets: https://github.com/miguelmartin75/nim-wasm-experiments/blob/...

With emscripten, you can create bindings to JavaScript using EM_JS macros, which you can emit in Nim. Here is an example of how to do so: https://github.com/treeform/windy/blob/bc98d4642c700f0277551...


I actually prefer atlas (see: https://github.com/nim-lang/atlas) to nimble now, it clones dependencies to to a local `deps/` folder relative to the project. It also supports adding local folders to the nimble path for management (via `atlas link` - see docs here: https://github.com/nim-lang/atlas/blob/master/doc/atlas.md#l...), i.e. you can clone your dependencies yourself via git submodule or a manual git clone

To solve your woes, fork and patch the code you need to in order to support pragmas for MSVC. And in atlas, use your fork's git path and if you choose to: submit a PR to the project. You can edit the project locally until something works.


This is a bit controversial, but in my opinion, just manually write bindings for the API surface you care about. There are tools to help automate the process ([c2nim](https://github.com/nim-lang/c2nim), [futhark](https://github.com/PMunch/futhark)), but these tools are mostly for C.

Theoretically if you want to import a large C++ API (e.g. if you were importing Google's C++ codebase*), you could do so with libclang. I was working on an alternative to c2nim that supported Objective-c and C++, which used libclang, but it's currently in my project graveyard. If you're expecting a @cImport from Zig, then the closest you have to that is tools mentioned above to help with the process.

* to be clear, I understand why Google does not want to use Nim instead of creating a new language (Carbon). i.e. readable code output, full control of the compiler and language design, etc.

The amount of manual work to write bindings is minimal, i.e. you can do so simply by declaring a prototype for a procedure and then appending `{.importcpp, header: "<path>".}`, the same for types. And then compile with `nim cpp`.

Compare the way you wrap libraries in Python, Nim requires so much less work - and yet the Python community wraps every C/C++ library you can think of. Again, in my opinion, if you really want a library: wrap it yourself (ideally the subset you need) or rewrite it in Nim.

Also, most of the libraries you have listed have bindings already:

- Qt: https://github.com/jerous86/nimqt or [seaqt](https://forum.nim-lang.org/t/12709)

- ImGUI: https://github.com/nimgl/imgui

- SFML: https://github.com/oprypin/nim-csfml

- SDL: https://github.com/nim-lang/sdl2

- sokol: https://github.com/floooh/sokol-nim

If there's a popular enough C or C++ library, it's probably already wrapped, especially within the gamedev community.


And there is support for unicode operators: https://nim-lang.org/docs/manual.html#lexical-analysis-unico... :)


Also, very cool. For example, https://github.com/SciNim/Measuremancer has Nim make the utf8 ± character be an operator that constructs an uncertain number with which to do error propagation arithmetic upon. So, you can, e.g. say (50±2)*(25±3) in the code and that will give 1250 ± 158 as an answer and if you use the cligen/strUt.formatUncertain that will even get correctly rounded to 1250 ± 160 (2 digits in the uncertainty place { configurable to 1 or 3 or whatnot or even parens notation like 1.25(16)e3 a la The Particle Data Group notation. }).


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: