Live data from Hacker News

Nim 1.6

nim-lang.org

1–10 of 179 posts

Re: Nim 1.6

#2
I don’t know much about Nim, does it have a mandatory gc, like go? How good is Nim’s gc?

Those who have written some Go and Nim, home does the code look like vs go?

Re: Nim 1.6

#3
post #2

I don’t know much about Nim, does it have a mandatory gc, like go? How good is Nim’s gc? Those who have written some Go and Nim, home does the code look like vs go?

Nim is the most readable language I've ever seen. I've dabbled with Go, but Nim is almost like pseudocodes+types. Highly recommend you take a look and try it out! You can use libraries like https://github.com/planety/prologue or https://github.com/treeform/pixie to create something quickly and fun(compile times are faaasst!).

And Nim does not have a mandatory GC, you can go as low-level as you want, but in case you don't want that you can choose from several great GC's(a capable soft real-time GC and Boehm for example). Or you could combine the best of both worlds and take a look at the shiny fancy ARC/ORC deterministic memory management: https://nim-lang.org/blog/2020/10/15/introduction-to-arc-orc...

Re: Nim 1.6

#4
post #2

I don’t know much about Nim, does it have a mandatory gc, like go? How good is Nim’s gc? Those who have written some Go and Nim, home does the code look like vs go?

As a python dev, nim was much easier to get into than Go, Rust, or even Zig.

If you squint, it looks like a toddler Python with strong typing, compilation and a few different API, espacially for managing finalisation.

Re: Nim 1.6

#5
post #2

I don’t know much about Nim, does it have a mandatory gc, like go? How good is Nim’s gc? Those who have written some Go and Nim, home does the code look like vs go?

I have written a bit of both, recently re-wrote a command runner for a side-project https://gitlab.com/jarv/cmdchallenge in Nim and found it very pleasant and much less verbose, which was a nice change from GoLang while keeping type safety. A good example is parsing JSON https://nim-by-example.github.io/json/ as you can do a lot with fewer lines of code. I think the main disadvantage of Nim is that there is less out there in the ecosystem, libraries, and it's more likely you will run into quirks and bugs in the standard library.

Re: Nim 1.6

#7
post #6
post #2

I don’t know much about Nim, does it have a mandatory gc, like go? How good is Nim’s gc? Those who have written some Go and Nim, home does the code look like vs go?

Check out this Nim talk. Addresses some of your questions. https://www.youtube.com/watch?v=d2VRuZo2pdA

Thanks I’ll check it out.

Re: Nim 1.6

#8
post #5
post #2

I don’t know much about Nim, does it have a mandatory gc, like go? How good is Nim’s gc? Those who have written some Go and Nim, home does the code look like vs go?

I have written a bit of both, recently re-wrote a command runner for a side-project https://gitlab.com/jarv/cmdchallenge in Nim and found it very pleasant and much less verbose, which was a nice change from GoLang while keeping type safety. A good example is parsing JSON https://nim-by-example.github.io/json/ as you can do a lot with fewer lines of code. I think the main disadvantage of Nim is that there is less out…

I really like the look of Nim but every time I dig into it I find a really strange syntax decision. For example:

> The json module provides the %* operator which is used to create JSON objects

I'm curious what the benefits are here of an operator over some more readable syntax. I have a dislike of languages where ascii noise seems to be favoured over readable english tokens.

Re: Nim 1.6

#9
post #2

I don’t know much about Nim, does it have a mandatory gc, like go? How good is Nim’s gc? Those who have written some Go and Nim, home does the code look like vs go?

Nim is the most readable language I've ever seen. I've dabbled with Go, but Nim is almost like pseudocodes+types. Highly recommend you take a look and try it out! You can use libraries like https://github.com/planety/prologue or https://github.com/treeform/pixie to create something quickly and fun(compile times are faaasst!). And Nim does not have a mandatory GC, you can go as low-level as you want, but in case you d…

Looks like you know a bit of Nim. Apart from ecosystem and IDE what are the some of the disadvantages of Nim compared to Go?

Re: Nim 1.6

#10
post #9

Earlier quoted context omitted.

Nim is the most readable language I've ever seen. I've dabbled with Go, but Nim is almost like pseudocodes+types. Highly recommend you take a look and try it out! You can use libraries like https://github.com/planety/prologue or https://github.com/treeform/pixie to create something quickly and fun(compile times are faaasst!). And Nim does not have a mandatory GC, you can go as low-level as you want, but in case you d…

Looks like you know a bit of Nim. Apart from ecosystem and IDE what are the some of the disadvantages of Nim compared to Go?

I have not done a lot of Go, but I'm pretty sure Nim's concurrency story isn't up there with go, at least not yet.

Nim has other advantages, including great Interop with C or C++ as it compiles to these languages and allows low level, unsafe features like raw pointers when needed.

Post reply on HN