It is nice with a lot of innovation now in the ahead-of-time compiled languages camp. What worries me is the fragmentation, and the fact that no one language seems to check all of the (subjective set of) boxes for a general purpose high-speed, ahead-of-time compiled language [0]. E.g, Crystal seems to be the only one supporting a modern concurrency story (similar to Go), but has a huge problem with compile times. Nim…
https://news.ycombinator.com/item?id=9640384
Nim 1.4
91–100 of 144 posts
Re: Nim 1.4
#92An economic argument for GC instead of ARC/ORC. Commercial web application in Java. Java GC is concurrent, on other cpu cores than the cores processing customer requests. Modern GCs such as Red Hat's Shenandoah or Oracle's ZGC have 1 ms or lower pause times on heap sizes of terabytes (TB). Java 15 increased max heap size from 4 TB to 16 TB of memory. Now the argument. A thread running on a cpu core which processes an…
Reference-counting strategies are much easier to optimize; so if you have fewer resources available to throw at your compiler it's the way to go.
Re: Nim 1.4
#93There 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.
Re: Nim 1.4
#94Maybe 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…
- Nim and rust have macros.
- D has very high-quality metaprogramming (probably better than any other language without macros).
- (Afaik swift and zig have fairly normal templates. I don't know as much about those.)
- D and zig have compile-time function execution (think c++ constexpr on steroids on steroids).
- Swift is likely to be the slowest of the bunch; like go, though it's technically compiled to native code, its performance profile is closer to that of a managed language. The others should be generally on par with each other and with c.
Re: Nim 1.4
#95Earlier quoted context omitted.
https://news.ycombinator.com/item?id=9640384
Thanks! This is interesting, although I'd be worried about how stable this is for the long term. Would be happy to have my worries annihilated of course :)
Re: Nim 1.4
#96Maybe 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…
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. I'm assuming that Elixir has one, whereas Nim doesn't. If you're looking for a fun project, I would love to see that made for Nim and happy to give pointers if you need them :)
Re: Nim 1.4
#97Maybe 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…
Sibling talks about memory management. Some other notes: - Nim and rust have macros. - D has very high-quality metaprogramming (probably better than any other language without macros). - (Afaik swift and zig have fairly normal templates. I don't know as much about those.) - D and zig have compile-time function execution (think c++ constexpr on steroids on steroids). - Swift is likely to be the slowest of the bunch; l…
Re: Nim 1.4
#98I 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.
Re: Nim 1.4
#99Great! Where's the announcement on https://twitter.com/nim_lang so I can retweet it?
Re: Nim 1.4
#100I'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 servers and the client running in your browser is written in Nim. The client uses Nim's JS backend and the server Nim's C backend. The two share code to ensure the game simulation is the same across both. Communication happens over websockets.
It's been a lot of fun working on this and I cannot imagine another language being as flexible as Nim to make something like this possible. I already have an Android client up and running too, it also is built from the same code and I plan to release it soon.