News for hackers. Stuff that matters.
Re:Nim in 2020: A Short Recap by Rompect on Thursday December 31, 2020 @08:51AM (#25592658)
For normal purposes, dealing with Rust's lifetimes will be easier than spending some time "learning to use the GC correctly"
Re:Nim in 2020: A Short Recap by nikki93 on Thursday December 31, 2020 @02:41PM (#25596285)
Nim's ARC thing is pretty different from blackbox GCs you have to poke with a stick like Go's or JVM's. It's pretty deterministic where additional calls are inserted by the compiler, and you can use --expandArc or look at the generated C.

As a single anecdote -- I've studied Rust before and it's been a while. Pretty familiar with C++ move semantics stuff. I decided to read the Rust book again while also learning Nim simultaneously; and I had an entt wrapper and graphics rendering in Nim without GC before I finished getting through the borrow checking chapter in the Rust book.

Re:Nim in 2020: A Short Recap by moldavi on Thursday December 31, 2020 @02:02PM (#25595875)
What's involved in learning to use the GC correctly? I'm very experienced in Rust, and so skeptical when anyone says Rust is easier than something.
Re:Nim in 2020: A Short Recap by Symmetry on Thursday December 31, 2020 @11:23AM (#25594042)
It really depends on what you're doing. If you've developing an OS or web browser or game engine you're going to be having to think about memory management very carefully in any event and dealing with Rust's lifetimes is just formalizing the work you'd be doing anyways. But most applications aren't optimized that heavily and as long as you don't have a memory leak or an algorithmic pessimization you don't have to worry about performance in most cases and having a garbage collector is saving you a lot of work.
Re:Nim in 2020: A Short Recap by cb321 on Thursday December 31, 2020 @11:49AM (#25594292)
People do game engines in Nim. ReelValley was even a commercial effort. (This is only to supplement the parent comment, not contradict.)

Your mileage may vary, but several times I've tried some single threaded thing in both Rust, C++ and Nim and the Nim came out faster (e.g. [1] had final Nim version 5.0 ms, C++ 27 ms, Rust 42 ms), not putting much effort into any, and is likely more readable to someone brand new to the language. Writing generic data structures & algos in Nim is also a true breeze/pleasure. Anyway, they are all "fast and maybe-safe by default" and all respond similarly to optimization care. There is no obvious performance disadvantage (and compiling times are much better in Nim, yielding scripting language-like code iteration).

[1] https://news.ycombinator.com/item?id=24817594

Re:Nim in 2020: A Short Recap by planetis on Thursday December 31, 2020 @11:39AM (#25594204)
Rust algorithm is only one way to do automatic memory management. And regarded as being very restrictive. The scheme Nim implements (ORC), which is innovative as well, is more permissive and unobtrusive. I hope in the next year it becomes the default.
Re:Nim in 2020: A Short Recap by pjmlp on Thursday December 31, 2020 @09:37AM (#25593008)
Not writing GUIs in Rust are we?
Re:Nim in 2020: A Short Recap by k__ on Thursday December 31, 2020 @10:58AM (#25593815)
High level Rust libraries like Yew are pretty straight forward to use.
Re:Nim in 2020: A Short Recap by pjmlp on Thursday December 31, 2020 @11:21AM (#25594015)
When the GUI is actually the browser in HTML DOM and JS, with GC.
Re:Nim in 2020: A Short Recap by k__ on Thursday December 31, 2020 @11:26AM (#25594076)
Fair point, haha.
Re:Nim in 2020: A Short Recap by dom96 on Thursday December 31, 2020 @09:52AM (#25593154)
What do you consider "normal" and "non-normal"?