Live data from Hacker News

Nim 1.4

nim-lang.org

111–120 of 144 posts

Re: Nim 1.4

#111

Maybe my lack of lower level language knowledge will show here, but how does that compare to Rust? I keep seeing and hearing about these new-ish languages Rust, Nim, Zig, etc. that all claim to be C/C++ perf lvl but better developper experience. Any of these is preferred for API/Web development? Does it yield much advantage over something like Elixir that already provides significant perf increase over a Python(Djang…

In my mind, and be aware of my bias here, these languages split up into three different categories: * Has a GC, but you can remove it. This is Nim and D. * Relies on pervasive refcounting. This is Nim if you choose that implementation, Swift. * Has no GC. This is Zig and Rust. (Though obviously you can use refcounting in these languages, but it is as a library.) While this focuses on a specific aspect of these langau…

Nim doesn't require that you use a gc; one of its many gc options is `none`, which is, as it sounds, no garbage collector at all.

Re: Nim 1.4

#112

Earlier quoted context omitted.

In my mind, and be aware of my bias here, these languages split up into three different categories: * Has a GC, but you can remove it. This is Nim and D. * Relies on pervasive refcounting. This is Nim if you choose that implementation, Swift. * Has no GC. This is Zig and Rust. (Though obviously you can use refcounting in these languages, but it is as a library.) While this focuses on a specific aspect of these langau…

Nim doesn't require that you use a gc; one of its many gc options is `none`, which is, as it sounds, no garbage collector at all.

Right, that was the “you can remove it” part.

Re: Nim 1.4

#113
post #85

Nim or Julia?

As someone who doesn't do software development as part of routine day-to-day work but has played with both, I'd describe Julia as "Fortran for Python developers", while Nim feels like "C for Python developers".

My interest in scientific applications pushes me towards Julia, but the user experience has so far been strictly worse than than Python, so I just don't bother with it as much as I might like to.

On the other hand, I am drawn to experiment with Nim (and to some extent Rust as well) because they feel better constructed, having more professional feeling tools and approaches to packaging. The downside is that their core strengths are in use-cases which aren't so aligned with my interests.

The strength of the Python packaging ecosystem makes me doubtful of the impact Julia can have. Meanwhile for Nim, it feels to me like awareness and adoption suffer a fair bit from competing with Rust for mindshare.

Re: Nim 1.4

#114
post #96

Maybe my lack of lower level language knowledge will show here, but how does that compare to Rust? I keep seeing and hearing about these new-ish languages Rust, Nim, Zig, etc. that all claim to be C/C++ perf lvl but better developper experience. Any of these is preferred for API/Web development? Does it yield much advantage over something like Elixir that already provides significant perf increase over a Python(Djang…

> Any of these is preferred for API/Web development? I often wonder why anyone would use a language like Zig or Rust for Web development. I am very much biased in favour of Nim here, but to me in general a non-GC'd language seems like overkill for web development. So I would rule those languages out straight away. I can't speak to Elixir, likely the main difference will be the lack of a mature Django-like framework.…

Indeed Phoenix is a great web framework for Elixir. Idk that I'd be qualified to tackle something like building a web framework but I'd be curious enough to look into it :)

Re: Nim 1.4

#115
post #100

I'm going to do a little bit of a shameless plug as a way to show off just what Nim is capable of. If you've ever played one of the many IO games, it might seem familiar to you. Basically I have used Nim to create a multiplayer game that can be played in the browser[1]. I'm planning to write up a more detailed post outlining the architecture of this. But suffice it to say, Stardust is written 100% in Nim. Both the se…

This looks really amazing! Would love to read an architecture post for this. Adding this in your book would also be pretty cool

Re: Nim 1.4

#116
post #39
post #34

Earlier quoted context omitted.

> Obviously, just from Java occupying the top 2 or 3 spots for popularity over the last 15 years -- Java's approach must be doing something right. I'm not sure if this argument holds. Java's high memory usage is frequently cited as a downside of Java. GUI applications written in Java have a reputation of being memory-hungry, and I know plenty of people struggling with memory usage of server application (e.g. ElasticS…

> Java's high memory usage I would rather optimize for performance and energy use at the cost of higher memory use. See recent SN: https://news.ycombinator.com/item?id=24642134 https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sle... Memory is a one time capital cost and gets cheaper over time.

> Memory is a one time capital cost and gets cheaper over time.

Except if you're operating in the cloud.

Re: Nim 1.4

#117
post #3

There are a lot of gotchas with the new GC that make me nervous about this release: > As far as we know, ARC works with the complete standard library except for the current implementation of async... That's not a great endorsement... > If your code uses cyclic data structures, or if you’re not sure if your code produces cycles, you need to use --gc:orc and not --gc:arc. Seems like this is a big onus to put on the use…

At an ELI5 level, does anyone know why Swift can have ARC and async but Nim's ARC doesn't work with async? Is it just implementation details of Nim's async specifically instead of anything more fundamental to ARC? Just asking out of curiosity.

Swift doesn't claim hard realtime capabilities like Nim's ARC does.

Re: Nim 1.4

#118

Maybe my lack of lower level language knowledge will show here, but how does that compare to Rust? I keep seeing and hearing about these new-ish languages Rust, Nim, Zig, etc. that all claim to be C/C++ perf lvl but better developper experience. Any of these is preferred for API/Web development? Does it yield much advantage over something like Elixir that already provides significant perf increase over a Python(Djang…

In my mind, and be aware of my bias here, these languages split up into three different categories: * Has a GC, but you can remove it. This is Nim and D. * Relies on pervasive refcounting. This is Nim if you choose that implementation, Swift. * Has no GC. This is Zig and Rust. (Though obviously you can use refcounting in these languages, but it is as a library.) While this focuses on a specific aspect of these langau…

How many of those 48,197 have over 50 lines of code? How many of them have had changes in the last 1 or 3 years?

Same questions apply to Nim too of course, but I believe Rust's focus on newbies and pretty much trivial crates/cargo new pkg addition has led to a lot of cruft in there. Not to mention squatters (even if those are probably not a majority).

Also, I would challenge your classification of ARC being in the same category as Swift, memory-handling wise. Nim's ARC has hard realtime capabilities, would that be possible with pervasive RC?

Re: Nim 1.4

#119

Web development. I’ve said it before and I’ll say it again ... I wish more folks would use NIM for web development.

100% agree. I'm developing an ORM [1] in my spare time specifically with the vision to make it easier to create web apps with Nim. Created a PoC with Jester in backend, Karax on the front, and Norm for model definition, and it turns out to be very much usable, accessing the same models from backend and frontend and all that.

[1] https://norm.nim.town

Re: Nim 1.4

#120
post #98

I am using nim this week on a data file scraping project. If you can Google and write python you can just start with nim and learn as you go, very easy. I am super bummed that there is (effectively) no debugging. I am too lazy to mess with VS code to get gdb working, it should just work already. Someday, I guess. Maybe jetbrains will save us. With real IDE support nim would sweep the nations.

From my experience, there really is not that much need for debugging in the sense of adding breakpoints and attaching to a running process with Nim. Honestly, `debugEcho` suffices, give it a shot. I mean, you may need more debugging tools when your project gets large but since you're just starting with Nim, you can just relax and keep going.
Post reply on HN