Live data from Hacker News

Show HN: “Nim in Action” is now available

nim-lang.org

21–30 of 139 posts

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

#21
post #16

Earlier quoted context omitted.

Rust has extremely good FFI to C as well, if you were using that as a differentiation. No memory layout issues, etc like Go's issues. (Nothing against Nim, I haven't worked with it yet)

Rust FFI is not nearly as simple as Nim's interface to C where you pretty much just call C functions.

That's exactly Rust's FFI.

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

#22
post #5

Earlier quoted context omitted.

> 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.

I replaced PHP with Rust and very happy about it.

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

#23
post #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…

Insulting people before they even had chance to say something, is very rude.

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

#24

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 chara…

I guess you are not a great fan of Python. C was my first language, so I had the "significant white space" prejudice. The first time I tried it, I was hooked - because I hate code improperly indented. Yes, you can go the gofmt route in order to eliminate indentation wars, but I love languages where the syntax enforce it: it is a very pragmatic design (no need for explicit start/end of blocks, no ";" to mark the end o…

I'd be violently allergic to the case insensitivity in a dynamically typed language where you could declare a variable with something like "foo = 1" but I'm fine with it in Nim.

EDIT: s/sensitivity/insensitivity/

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

#26
post #17
post #6

Earlier quoted context omitted.

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…

> And before pcwalton drops in with his endless spamming about Nim not being safe, Nim being undefined Well, it is, isn't it? Is he wrong about Nim not being safe when not using Boehm GC? Does it not segfault when sending GC pointers between threads? He only jumps in, when someone claims Nim is safe or the sweet spot, or something equally wrong. Nim's pretty syntax comes with a price, just like Rust's safety comes wi…

About safe/undefined etc I think it has been answered before (there are probably more places): https://news.ycombinator.com/item?id=9643690

Personally I am quite sick and tired of that particular "take" on Nim - why not for once criticize other parts of the language? :)

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

#27
post #6

Earlier quoted context omitted.

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…

Insulting people before they even had chance to say something, is very rude.

Sure, and I can apologize for my wording in advance too! But I do stand by my opinion that he doesn't have to drop that in every single time Nim is mentioned. Evidently Go-people feel the same I noticed.

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

#28

Earlier quoted context omitted.

I guess you are not a great fan of Python. C was my first language, so I had the "significant white space" prejudice. The first time I tried it, I was hooked - because I hate code improperly indented. Yes, you can go the gofmt route in order to eliminate indentation wars, but I love languages where the syntax enforce it: it is a very pragmatic design (no need for explicit start/end of blocks, no ";" to mark the end o…

I'd be violently allergic to the case insensitivity in a dynamically typed language where you could declare a variable with something like "foo = 1" but I'm fine with it in Nim. EDIT: s/sensitivity/insensitivity/

> I'd be violently allergic to the case sensitivity in a dynamically typed language where you could declare a variable with something like "foo = 1" but I'm fine with it in Nim.

Do you mean "case insensivity"? AFAIK dynamic languages where you can do that are very much case-sensitive, Python and Ruby certainly are.

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

#29
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-...

Seems good!

One small note, since I know that this book is getting started: Rust does have some amount of CTFE available in nightly (const fn), and it and/or compiler plugins may very well be stable by the time this book is released. So you might want to make a note to double-check the state of that when you're closer to a final draft.

Congrats and good luck! Writing a book is so rewarding, but so draining.

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

#30
post #27

Earlier quoted context omitted.

Insulting people before they even had chance to say something, is very rude.

Sure, and I can apologize for my wording in advance too! But I do stand by my opinion that he doesn't have to drop that in every single time Nim is mentioned. Evidently Go-people feel the same I noticed.

[deleted]
Post reply on HN