Live data from Hacker News

Ask HN: Why did Nim not catch on like Rust did?

news.ycombinator.com

121–130 of 139 posts

Re: Ask HN: Why did Nim not catch on like Rust did?

#121
post #109
post #104

Earlier quoted context omitted.

You can't grep for it, but you can grep `unsafe`

`ptr`, `addr` and `cast` are the only ways to introduce unsafety, as I understand it. You have to run three greps, but you can definitely grep.

The advantages of a language that uses words rather than random punctuation.

Re: Ask HN: Why did Nim not catch on like Rust did?

#122
post #89
post #61

Nim is too timid. Most languages are too timid. My context: I'm a maintainer of iNim, creator of the Rust channel, No Boilerplate, and a professional python web developer for 15 years. The features you are excited about in Nim are compromised for the sake of simplicity: - Macros can't change syntax, - There's a limit to how real-time the standard language is, - Compiling to javascript is a nice trick, but if it didn'…

The problem with WebAssembly isn't that Nim couldn't compile to it (which it can), but that WebAssembly can't do anything without JavaScript.

WebAssembly is not just for the web. Please take a look at wasmtime[1], wasmer[2]. It's the future of computing.

You might want to read this iconic tweet[3]

[1]: https://wasmtime.dev [2]: https://wasmer.io [3]: https://twitter.com/solomonstre/status/1111004913222324225

Re: Ask HN: Why did Nim not catch on like Rust did?

#123
post #9

Earlier quoted context omitted.

While I agree that corporate support plays a huge role with market share and acceptance, I disagree that Go would have been laughed out of the room. Very likely that a language made by Griesemer, Pike, and Thompson would have got lots of attention. Arguably enough to catch on anyway. These men are already famous, in programming circles. Case in point, look at Jai, with just the star power of Jonathan Blow and how wel…

For another voice in the room, I know who Jonathan Blow is, relatively familiar with his work, I think he's making a game engine? And know he does coding streams, and don't think I've heard of Jai. And I know plenty of software folks who wouldn't know who he is at all.

Jai is still in closed beta, it's not being promoted at all yet.

Re: Ask HN: Why did Nim not catch on like Rust did?

#124
post #95

Earlier quoted context omitted.

Popularity counts. Find all those languages in this graph, then find rust. https://redmonk.com/sogrady/2023/05/16/language-rankings-1-2...

If popularity is what counts, then Rust is only a revolution in marketing and evangelizing.

Linus Tovalds is not an easy man to please. You're saying he's been fooled by marketing?

Sometimes tech is really good, dude, it's ok, don't die on a weird hill, not everything is shit.

Re: Ask HN: Why did Nim not catch on like Rust did?

#125
it was not suitable for real-time systems few years ago, they undefaulted the gc few patches ago (in favor of orc), however even using the same rust's memory management, you're gonna have 100% of the heap objects to be traced; rust ownership model allows you to avoid tracing (such as arc) when they are not strictly necessary. that said i really don't like rust and all its approaches, i strictly recommend to have a look at nim;

Re: Ask HN: Why did Nim not catch on like Rust did?

#126
post #3

Rust had Mozilla's backing, and later other behemoths like Amazon and Microsoft jumped onto the bandwagon. Corporate support is absolutely essential for a new language to be taken seriously in the industry. If Go weren't associated with Google, people would have laughed that language out of the room long ago. Likewise, it's difficult to imagine TypeScript ever catching on if it didn't have Microsoft's might behind it…

Considering that the Zig Software Foundation not only doesn't have any big corporate backing, but also made an explicit point of always being fully independent, and the fact that we're overall doing fine, I beg to disagree. https://ziglang.org/zsf/ Big tech wants you to think that you're nothing without them, while in truth there are plenty of situations where small realities can absolutely out-compete them: https://…

he probably exaggerated saying that without money you are nothing, but it's (imo) pretty undeniable that money can be a great springboard for a project of that magnitude

Re: Ask HN: Why did Nim not catch on like Rust did?

#127
post #124

Earlier quoted context omitted.

If popularity is what counts, then Rust is only a revolution in marketing and evangelizing.

Linus Tovalds is not an easy man to please. You're saying he's been fooled by marketing? Sometimes tech is really good, dude, it's ok, don't die on a weird hill, not everything is shit.

I don't think Linus was pleased or fooled. I think that there hasn't been a bunch of eager beavers trying to write Linux drivers in other languages until Rust.

Re: Ask HN: Why did Nim not catch on like Rust did?

#128
post #113
post #50

In answering this, I'd look beyond just the language features and look at the background of how it caught on. What apps were built first. When did the "Rewrite it in rust" mantra take hold. What impact did but with colors / nice cli / sensible defaults have on things (e.g. fd / exa / lsd / bat / ...)? What libraries being available made it easy (clap / argh)? Then look at how the community was built (e.g. Mozilla / c…

I don't know about all your other questions, and I realize your post was more about "why Rust?" rather than "why not Nim?", but that said the https://github.com/c-blake/cligen Nim CLI framework seems much lower effort / ceremony than even Rust's `argh` and is just about as old as `clap` (both cligen & clap started 8 years ago in 2015 - Rust argh is much newer). There are over 50 CLI utilities in Nim at https://github…

It's more that those tools were what come to mind when I specifically think of my exposure to the existence of rust. Its perhaps not that the tools were there, but that they were well known (and known for being written in rust).

Anecdatapoint - I've never heard of literally a single one of the utilities listed on the bu page.

Regarding cligen, right from the start clap wins on producing idiomatic output. Compare: https://github.com/c-blake/cligen#cligen-a-native-api-inferr...

    Usage:
      fun [optional-params] [args: string...]
    An API call doc comment
    Options:
      -h, --help                    print this cligen-erated help
      --help-syntax                 advanced: prepend,plurals,..
      -f=, --foo=    int     1      set foo
      -b=, --bar=    float   2.0    set bar
      --baz=         string  "x"    set baz
      -v, --verb     bool    false  set verb
With: https://docs.rs/clap/4.3.8/clap/#example

    $ demo --help
    A simple to use, efficient, and full-featured Command Line Argument Parser

    Usage: demo[EXE] [OPTIONS] --name 

    Options:
      -n, --name     Name of the person to greet
      -c, --count   Number of times to greet [default: 1]
      -h, --help           Print help
      -V, --version        Print version

    $ demo --name Me
    Hello Me!
Aesthetics matter, and I know which one I prefer by a long shot. Things like that leak through into every "rewrite it in rust" cli. There's a lot of rust things that just seem to make good decisions like this easy.

Re: Ask HN: Why did Nim not catch on like Rust did?

#129

Earlier quoted context omitted.

> The answer probably lies in non-technical things, like marketing, community building and governance. > The language not having one clear thing it excels at, surely makes marketing it more difficult, so Nim would have needed more effort than normal to properly explain its philosophy to the market. Agree on both points! And I am starting to realize that governance is the key element. A better governance would enable…

> Btw, you have done outstanding work on zig, congratulations to you, Andrew and the rest of the community, it is inspiring to see! I find very interesting how you decentralize community management empowering people to build their own communities. At least that is what I gather from following from far, I might be off. Would love to know more if that was an explicit goal or the result of some happy coincidences. Thank…

Very clear and a smart decision that paid off!

Re: Ask HN: Why did Nim not catch on like Rust did?

#130
post #106
post #76

Earlier quoted context omitted.

Rust doesn't guarantee memory safety. I think anything that can generate a trivial hello world program that doesn't leak memory is better than V.

If you don't use `unsafe` then it guarantees it barring compiler mistakes. The compiler has had issues with memory safety before, they were found, and they were fixed. There might be some left lurking, but they are extremely unlikely since people are using it in production and haven't seen anything weird. If you use `unsafe` you have to make sure of it yourself, but you can easily grep for this keyword and see where…

The issue is that any Rust code is going to be targeted at performance processing (since otherwise you would write it in a higher level language). And for performance processing, you need to use unsafe (because at some point, the most efficient thing is getting or setting data at a certain memory address without anything extra). Look at any big Rust project, like Amazon Firecracker, and its littered with unsafes.
Post reply on HN