Live data from Hacker News

Show HN: “Nim in Action” is now available

nim-lang.org

1–10 of 139 posts

Re: Show HN: “Nim in Action” is now available

#2
Author here!

Even if you don't intend to purchase the book I would love to hear feedback from you about the first chapter (which is free!)[1]. Really excited about this book and am looking forward to any feedback at all from the HN community.

1 - https://manning-content.s3.amazonaws.com/download/6/df42fc6-...

Re: Show HN: “Nim in Action” is now available

#3
Based on my surface-level understanding of Nim, Go is much more comparable to Nim than it is Rust. I never understood the Rust-Go comparisons, since Rust is a serious systems programming language. I would never use Go or Nim to replace C or C++ usage as I would Rust, but I might use Nim in place of Go or Java.

Does anyone with significant Nim experience care to lend some opinions? I don't want to start a flame war--I'm genuinely curious.

Re: Show HN: “Nim in Action” is now available

#4
post #3

Based on my surface-level understanding of Nim, Go is much more comparable to Nim than it is Rust. I never understood the Rust-Go comparisons, since Rust is a serious systems programming language. I would never use Go or Nim to replace C or C++ usage as I would Rust, but I might use Nim in place of Go or Java. Does anyone with significant Nim experience care to lend some opinions? I don't want to start a flame war--I…

> Rust is a serious systems programming language

I assume the distinction you are making about "serious" is around manual memory management and the GC?

In which case, I think you are probably right in your bias. That said and while i have no experience with it, Nim claims to have a real-time GC mechanism builtin. That is they support a max pause time parameter. There have been other real-time GC systems out there before and they tend to work well for other definitions of "serious".

Re: Show HN: “Nim in Action” is now available

#5
post #3

Based on my surface-level understanding of Nim, Go is much more comparable to Nim than it is Rust. I never understood the Rust-Go comparisons, since Rust is a serious systems programming language. I would never use Go or Nim to replace C or C++ usage as I would Rust, but I might use Nim in place of Go or Java. Does anyone with significant Nim experience care to lend some opinions? I don't want to start a flame war--I…

> Rust is a serious systems programming language I assume the distinction you are making about "serious" is around manual memory management and the GC? In which case, I think you are probably right in your bias. That said and while i have no experience with it, Nim claims to have a real-time GC mechanism builtin. That is they support a max pause time parameter. There have been other real-time GC systems out there bef…

I have the feeling, that "in the wild" most people replace JavaScript (Node.js), Python and Ruby with Go. Rust seems to be more of a C/C++ replacement.

Re: Show HN: “Nim in Action” is now available

#6
post #3

Based on my surface-level understanding of Nim, Go is much more comparable to Nim than it is Rust. I never understood the Rust-Go comparisons, since Rust is a serious systems programming language. I would never use Go or Nim to replace C or C++ usage as I would Rust, but I might use Nim in place of Go or Java. Does anyone with significant Nim experience care to lend some opinions? I don't want to start a flame war--I…

Nim compiles to very efficient C or C++ (or js) and most benchmarks shows Nim programs performance being almost the exact same as C/C++ - and often better than Rust.

So... why not using it to replace C and C++? Since I have worked with Nim (and I use it to implement my own language) I would say "hell yes"! It is such an immensely better language and it integrates perfectly with those eco systems. The GC is a good one (or well, there are 5 to choose from) and it is for many, many applications not an issue.

And before pcwalton drops in with his endless spamming about Nim not being safe, Nim being undefined etc etc (it's getting quite annoying), please spare us this time.

Re: Show HN: “Nim in Action” is now available

#7
post #2

Author here! Even if you don't intend to purchase the book I would love to hear feedback from you about the first chapter (which is free!)[1]. Really excited about this book and am looking forward to any feedback at all from the HN community. 1 - https://manning-content.s3.amazonaws.com/download/6/df42fc6-...

Great work man! I will get one for sure.

Re: Show HN: “Nim in Action” is now available

#8
Great to see Nim getting an official book, (Dominick is almost like a co-author of Nim at this point :-).

My impression of Nim is that it is what Go should have been, if language developments of the past 40 years were taken into account, so if you like the simplicity of Go's syntax, but want modern features, seriously consider Nim.

I personally couldn't get over the significant whitespace, (relying on invisible characters doesn't sit well with me) [1], but apart from that I like the language a lot!

@dom96 Do you think that the focus on web development is good to have? I realise that it is what a ton of people do these days, but since web developers already have so many technologies to pick from, perhaps selling the book as aimed more at system/game even native desktop developers could spring up more interest.

Also, how exactly is the garbage collector tied to the standard library and the language itself? For example, if I opt out of the GC completely, would I end up in a situation similar to D, where I'm not using GC but everything around me still is, so I have to carefully program around it, or is it handled differently? (And can you possibly compare Nim and D as the languages seem to be covering similar territory.)

Lastly, what major work still needs to be done before we see a 1.0 release and how best can we help Nim to move towards that goal right now?

Thanks, back to the book now...

1 - Maybe a gofmt style tool would help somewhat.

Re: Show HN: “Nim in Action” is now available

#9
post #3

Based on my surface-level understanding of Nim, Go is much more comparable to Nim than it is Rust. I never understood the Rust-Go comparisons, since Rust is a serious systems programming language. I would never use Go or Nim to replace C or C++ usage as I would Rust, but I might use Nim in place of Go or Java. Does anyone with significant Nim experience care to lend some opinions? I don't want to start a flame war--I…

But... generally, I would say all these languages can replace each other (well, ok, perhaps not C) given the right circumstances. Nim has one nice thing going for it - and that is very good C/C++ integration. Rust has it's safety focus and novel memory model. Go has simplicity and tooling, and popularity. Java has enterprise-focus. All have good performance.

Re: Show HN: “Nim in Action” is now available

#10
post #3

Based on my surface-level understanding of Nim, Go is much more comparable to Nim than it is Rust. I never understood the Rust-Go comparisons, since Rust is a serious systems programming language. I would never use Go or Nim to replace C or C++ usage as I would Rust, but I might use Nim in place of Go or Java. Does anyone with significant Nim experience care to lend some opinions? I don't want to start a flame war--I…

> I never understood the Rust-Go comparisons

Historical accident: they started surfacing around the same time, Go was originally described as a systems language (which it never was according to the usual meaning of the term) and Rust had more application-level features (built-in "GC pointer", green threads). As incorrect as it was, the initial… impression? — it's probably the wrong term but I don't have a better one — remained.

Probably doesn't help that Rust also has a number of features Go is criticised for lacking (generics, non-nullable references, immutability support, …)

Post reply on HN