Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Nim is not a Win32 runtime. It outputs strings to stdout. Any sane OS would do the right thing in 2017.


sort by: page size:

Cool. Read this with interest. I want to give Nim a shot. Is there a compiled Windows binary of your program I can try out?

I don't see how this solves anything, Nim's backend is C, which means it should suffer from the same pitfalls. They probably clean it up and eliminate UB, but it should still exist.

But Nim uses a C backend, right? So this should put it in a good position to compare well with C, I'd assume.

EDIT: Downvoters - is that not the case?


It's not really Nim's fault that cmd.exe has crap Unicode support.

Nim runs even on microcontrollers and produces tiny executables (few kilobytes).

I don't see a problem with that. Since Nim compiles to C, it's only natural for people to take advantage of existing C libraries.

While nice, one still has to manually declare a Nim proc and tell it whence it came from. That's not the same.

Thank you.

> I don't know Nim, but I believe it has a garbage collector so it could be tricky to use for kernel programming.

You're right. Still good for libraries though (or apps, but that may be outside of "system").


Yeah I was hoping Nim would be it but I don't like the syntax they use.

Oh please please no! Nim is almost impossible to debug at a low level and you have no fine-grained control over its performance or behavior. It's also far less well understood than C, which is more boring and the subject of decades of conservative development. I'm also not sure what kind of support nim has for freestanding programs.

Nim is compiled, so a dependency on a runtime or a VM is not an issue there, at least.

I have love-hate relationship with Nim. It's the best C alternative I can find for our high performance supercomputing needs, yet it breaks my code [0] (yes, it's broken with 0.16.0 now) every single new release for the past year.

[0] https://github.com/jxy/tpl


Nim is not memory safe and doesn't technically claim to be. What they claim is to provide memory safe features, but then so does C++ and a lot of other languages.

leaving (e.g.)runtime overflow checks turned on in the Nim code would not be a realistic comparison against C

Nim is compiling to C. It also supports scripting.

If you provide a C library then it'll be super easy to add Nim support!

Nim compiles to C, so it can be a drop in replacement.

FWIW one of the reasons that I have been heavily looking at Nim for the last few weeks is its ease of generating static binaries.

Oh, I've been writing software in Nim pretty happily for a months now. What problems am I blind to?
next

Legal | privacy