Live data from Hacker News

Choosing Nim out of a crowded market for systems programming languages

forum.nim-lang.org

111–120 of 271 posts

Re: Choosing Nim out of a crowded market for systems programming languages

#111
post #30

> [..] I decided that I need a safe, fast, and statically typed language that can be compiled and targeted to both mobile and desktop environments, as well as being made available to scripting languages via FFI. And you eliminated Rust because.. it’s too complicated? It meets these requirements to the letter! Since this is a greenfield effort, would it really be too expensive to invest some time to learn it? Anyways,…

> would it really be too expensive to invest some time to learn it? I guess it depends on who you are. I find the complexity of Rust, and the community's cultural acceptance of said complexity, oozes out into every library to make every new thing you try to do seem like another incredibly hard slog. I had one try at Rust a couple of years ago, and gave up. I had another one in the first half of this year, this time i…

Thanks for sharing your experience.

OP in particular seems like someone who is familiar with a variety of languages, hence my comment. In addition, given that their requirements lined up with what Rust is good at, the time investment would be worth it.

When it comes to learning Rust in general, I think the difficulty and amount of time required depends on one’s background and overall learning style. If you are the type of person who wants to fully understand why things are the way they are before moving on, the process may likely slow down further. I think Rust is the kind of language where accepting things as they are at first will help you learn quicker. You can always circle back to dig in later.

For me personally, it took a couple of tries to “get” Rust. It definitely wasn’t straightforward to learn, but it wasn’t insanely complex either. Again, I think background and learning style contribute here.

Best of luck on your learning journey!

Re: Choosing Nim out of a crowded market for systems programming languages

#112
post #94
post #41

I have done non-trivial things both in Rust and Nim. For big projects Rust seems a little more robust, but for medium and small projects Nim is an order of magnitude faster to develop for. There are still many rough edges, but it's exactly the tradeoffs I would personally pick for my one person small business making tools for artists. So far I have been using Rust and it's alright, but looking very much into Nim to s…

> looking very much into Nim to see if I can replace Rust because of the high cognitive load to keep all of the Rust stuff in my head, as I don't really need safety. Personally I find that Rust has less cognitive load, because so much of what you'd generally worry about in other languages is covered by language features in Rust: static typing, algebraic data types, etc

I agree but I tool functional programming course in college. It was hard! Someone who may not have invested enough in leaning basics of FP, I can totally see why Rust feels like a hard language. During the prototyping phase, I also avoid lifetimes and other esoteric features and often use unhealthy amount of Arc and Rc.

Nothing beats Cargo and company and loves compiler messages. Have used NIM as python replacement, and while language is great and nim batteries are decent, the ecosystem is not there. But who would use nim as python replacement!?

Re: Choosing Nim out of a crowded market for systems programming languages

#113
post #8

I'm choosing between learning Nim or Rust. Nim frankly looks like the nicer of the two, but also less marketable and with smaller community. Suck to say but it's true.

Nim is also easier to learn - if you know Python and any conventional statically typed language, it's a walk in the park. I was producing fast, working code in a couple of hours. Learn Rust for your job, Nim for your side projects.

> Nim is also easier to learn - if you know Python and any conventional statically typed language, it's a walk in the park. I

I kept hearing the comparisons to Python so I thought it'd be interesting to pick up but the syntax and naming was so counter to Python that that expectation made me immediately bounce off of it.

Re: Choosing Nim out of a crowded market for systems programming languages

#114

Nim desperately needs a real web framework (batteries included) and a proper ORM and it will take off like wildfire. Python on steroids.

Has anyone tried prologue? https://github.com/planety/prologue

Yup, but it's more similar to "express" in Node than to a full framework like Django. I have plans to build a library on top of prologue for the ORM and database interaction and other cool features of Django that prologue currently lacks.

Re: Choosing Nim out of a crowded market for systems programming languages

#115
> Rust: I'm not afraid to admit it - Rust is just too complicated for use as an aging and cranky solo developer.

...

> As someone who actually hates to code for coding's sake and wants to Get Sh!t Done, Rust is just antithetical to my relationship with computers. I don't want to have to think about the language, and that's all Rust wants you to think about.

My guess: the author hasn't even tried it other than a cursory glance. I don't feel at all the way the author does about Rust. I do somewhat about Haskell I admit, although I like it just fine, but Rust is very much a "get it done" language, not something for academics. The only exception to this is the borrow checker, which isn't near the impediment most people think it is, but it does take a little practice. I learned it at 45 without issue, just a little bit of time. At this point, I code Rust as fast as any other language (probably faster when including debugging time - I almost never have to debug my Rust code).

Re: Choosing Nim out of a crowded market for systems programming languages

#116
post #41

I have done non-trivial things both in Rust and Nim. For big projects Rust seems a little more robust, but for medium and small projects Nim is an order of magnitude faster to develop for. There are still many rough edges, but it's exactly the tradeoffs I would personally pick for my one person small business making tools for artists. So far I have been using Rust and it's alright, but looking very much into Nim to s…

I recently tried Nim for the first time, and although is simpler, the model with values vs refs was a little more complicated than needed imo, and the 'easy C interactivity' wasn't as simple as with, let's say, Zig, where you'd simply do `@cImport`.

It's still fun though, and I appreciate the minimal visual noise while writing it.

Re: Choosing Nim out of a crowded market for systems programming languages

#117

Earlier quoted context omitted.

Programming languages shouldn't even consider whitespace (except perhaps new lines) syntactically important at all, so the whole discussion is silly. Once you've decided whitespace is important you might as well make emoji part of the syntax.

Why not? Making identation part of the syntax allows more for less?

You cannot cut and paste freely when indentation matter

Re: Choosing Nim out of a crowded market for systems programming languages

#118

> Rust: I'm not afraid to admit it - Rust is just too complicated for use as an aging and cranky solo developer. I'm nearly 51 and currently learning Rust. The first 10 hours of it were horribly slow, but it isn't as steep of a learning curve as Optimal Control Theory.

Learning curve is straight up for many with the borrow checker, but once you are over that hump, and it comes pretty quick for most, Rust is no harder than any other language.

Re: Choosing Nim out of a crowded market for systems programming languages

#119

I really can’t understand where this idea that rust is ‘hard’ comes from. Everything that it formalizes is something that you should already be conscious of . If not, well… you have a different, bigger problem.

Not really. Plenty of languages are garbage collected so you don't need to consider the intricacies of memory management. That was one of the biggest issues I found when I first started writing Rust.

Re: Choosing Nim out of a crowded market for systems programming languages

#120

Earlier quoted context omitted.

Web apps are applications and are the opposite of systems software. Systems software would be the web server itself, or something that runs beneath the application layer. Yes definitions are sometimes nebulous but that doesn’t mean words should lose all meaning and we should stop trying. Systems programming is a useful label for the boot stack, kernel, protocol implementations etc. which support the application layer…

The "systems" label only means those languages can do a few more low-level things, nothing more. There's no reason not to use it for other things as well.

I know this is hammered to death on HN, but you could definitely argue memory safety is a reason not to use systems languages for anything else.

Granted though it means what you meant by "it". I read that as "a systems programming language", but if you specifically meant Nim then I think it can enable a GC.

Post reply on HN