Earlier quoted context omitted.
Thank you for the kind words! I'm happy that you can see the positives in Nim even though you dislike one of its most prominent features. Personally I love significant whitespace and have started using Nim because of this feature, basically back in the day I just wanted a Python alternative that was compiled. If you really dislike it that much, you may be able to convince Araq to bring back his old time idea of allow…
What is `nim pretty`? I tried it, but it does not exist in current devel
Show HN: “Nim in Action” is now available
51–60 of 139 posts
Re: Show HN: “Nim in Action” is now available
#52Earlier quoted context omitted.
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/
You are technically correct - the best kind of correct. I agree, but my concern is not correctness, it is aesthetics. Why? Reading a computer program is often harder than writing it from scratch, so I like when languages enforce (or at least encourage) a name convention - just to keep it easier to read. Does Nim have something like PEP-8?
https://github.com/nim-lang/Nim/wiki/Style-Guide-for-Nim-Cod...
Re: Show HN: “Nim in Action” is now available
#53Author 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-...
this will encourage students and casuals to look into nim
Re: Show HN: “Nim in Action” is now available
#54Re: Show HN: “Nim in Action” is now available
#55Earlier quoted context omitted.
> 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? :)
Because I'm not interested in criticizing languages as a whole—that would be language warring for no reason. Claims of memory safety are what are important to me, just as, for example, claims of correct crypto constructions are important to crypto people.
Anyway, I see no reason to go further here, given that nobody has claimed anything is memory safe.
Re: Show HN: “Nim in Action” is now available
#56Great 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…
Thank you for the kind words! I'm happy that you can see the positives in Nim even though you dislike one of its most prominent features. Personally I love significant whitespace and have started using Nim because of this feature, basically back in the day I just wanted a Python alternative that was compiled. If you really dislike it that much, you may be able to convince Araq to bring back his old time idea of allow…
I don't think it is possibly to cleanly implement a epoll/kqueue-backed multi-threaded (web)server/reactor without it.
Re: Show HN: “Nim in Action” is now available
#57Earlier quoted context omitted.
That's exactly Rust's FFI.
In its most basic form, yes, but because of Rust's safety guarantees it's not quite that simple. C functions can only be called from unsafe blocks and there is a lot to be desired when you have to pass strings back and forth (I don't know how well Nim handles this). It's also a bit harder to debug an FFI wrapper in Rust when you tell the compiler your code is safe but then make a mistake in how you use the unsafe C a…
Can you elaborate on to how not having to type unsafe makes debugging of this easier?
Re: Show HN: “Nim in Action” is now available
#58Great 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…
Thank you for the kind words! I'm happy that you can see the positives in Nim even though you dislike one of its most prominent features. Personally I love significant whitespace and have started using Nim because of this feature, basically back in the day I just wanted a Python alternative that was compiled. If you really dislike it that much, you may be able to convince Araq to bring back his old time idea of allow…
I certainly understand the appeal of whitespace if you're coming from Python or Haskell etc. just wanted to point out that it might not be for everybody.
As for the web development focus, I would certainly understand not wanting to discuss topics in the book that you yourself are not that confident about.
Good luck with Nim going forward.
Re: Show HN: “Nim in Action” is now available
#59Earlier quoted context omitted.
Thank you for the kind words! I'm happy that you can see the positives in Nim even though you dislike one of its most prominent features. Personally I love significant whitespace and have started using Nim because of this feature, basically back in the day I just wanted a Python alternative that was compiled. If you really dislike it that much, you may be able to convince Araq to bring back his old time idea of allow…
Does nim have a cross-thread, single shared heap or thread-ownership-assignment of memory yet? I don't think it is possibly to cleanly implement a epoll/kqueue-backed multi-threaded (web)server/reactor without it.
Currently you have to use allocShared, allocShared0 etc to use shared memory. You must then manage the memory yourself.
Re: Show HN: “Nim in Action” is now available
#60Earlier quoted context omitted.
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.
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)