Live data from Hacker News

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

news.ycombinator.com

111–120 of 139 posts

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

#111
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.

`grep -w 'pointer|ptr|addr|cast'` would do it in one.. (One can surely do a shell alias called `find-unsafe`..).

Finding unsafe constructs in Nim code is not that hard, at least at the same level of accuracy as `grep unsafe *.rs` (e.g. inside comments & strings, etc.).

To evaluate the power of this general line of argument, consider -- if Nim shipped with a `find-unsafe` source-level search utility, how much would this change your mind?

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

#112
post #101
post #97

Earlier quoted context omitted.

We're not talking about hypotheticals. Rust wasm is used in production now. https://developers.cloudflare.com/workers/tutorials/hello-wo... Emscripten and experimental backends hardly count as support for Nim. Python can run in webassembly by the same token, but no one would . The standard rust compiler compiles directly to webassembly, natively, with the stable toolchain. In other languages, yes, the js bridge is a…

Doesn't Rust with WebAssembly require any JavaScript to run? If not, can you show me a webpage that uses WebAssembly and doesn't contain any JavaScript? If yes, what is the advantage over just compiling to JavaScript? > However, not only will this be fixed in browsers at some point, This has been promised for several years, and is still nowhere to be seen. > yew.rs, a mature wasm framework, is faster than react. Bein…

My apologies, it's faster than svelte, not just react: https://www.youtube.com/watch?v=4KtotxNAwME

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

#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.com/c-blake/bu, many of which do something novel rather than just "re-doing ls/find/cat with a twist". While they are really more "ls/ps construction toolkits" with some default configs to get people going, I think https://github.com/c-blake/lc and https://github.com/c-blake/procs are nicer than Rust alternatives. I mention these since you seem interested in such tools.

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

#114

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. Community building and governance is also critical. Nim has a fork called Nimskull that was created because of disagreements…

> 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 better community building and with a big community and a decent governance someone good enough at marketing would be able to figure out a way to put in the additional effort. But hey guys, where can you find a tech community in which we are all pretty bad at marketing and very bad at evangelizing? I think it is a nice value proposition for those who like to build stuff… ;)

I think contributors should focus first on building compelling cases of using Nim in specific niches (like jmgomez is doing for unreal engine) and we should at some point try to meet and start working on the governance issues. It will take some time but I am still confident. The language is such a joy and the community - albeit small - is full of outstanding people.

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.

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

#116
post #95
post #79

Earlier quoted context omitted.

Rust people talking about 'revolutions' love to ignore that memory safe languages without garbage collectors have been around for years. Ada+Spark, Cyclone, even D all made large steps forward in this area long before Rust was ever a thing.

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.

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

#117
post #105

Earlier quoted context omitted.

What that even means? Just random words. unsafe block is just an illusion and doesn't prevent any bugs. Don't get me started on the cult that shames repos that use it.

Sure, but upon review it was found some of the code was using unsafe without reason, and people submitted pull requests which made the code better. It's better because you are sure it doesn't have a memory unsafety bug, even if the code "looked" right before.

Given how Actix was used for benchmarking, I'd imagine that there was a reason the original developer wanted to use unsafe a lot. Nginx was written in pure C, and that is an act of wizardry. I can't imagine wanting to do any work for a language with a 'community' full of people eager to flame or do worse things to developers who don't meet their pompous definition of safety.

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

#118
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…

If you use any language with garbage collection then you won't have memory safety problems (barring unusual corner cases). That is an actual guarantee of memory safety.

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

#119

Earlier quoted context omitted.

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://…

" 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 " Zig has a VP of Community and it's important how the role promotes and evangelize the language for developers. Another example: Crystal appointment a new Community Manager recently, and now have developer "ambassadors" - to promotion the Crystal language.…

That also ties into governance. The VP of Community position exists because the creator of the Zig programming language decided to create a non-profit corporation for the language as soon as he went full time with it, and then made the VP of Community position be the first hire.

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

#120

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. Community building and governance is also critical. Nim has a fork called Nimskull that was created because of disagreements…

> 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.

Thanks! Having the communities be decentralized was a deliberate decision from early on. Andrew wanted to go in that direction and to me made perfect sense so we never even stopped to talk about it much.

In practice there are two simple considerations that make it a no brainer for us:

- eventually your communities will be decentralized / independent whether you like it or not (eg today there are plenty of python sub-communities depending on whether you use python for webdev, data science, devops, etc)

- a central community hub means that you need to spend money and communication budget on a team of moderators. given how the ZSF financial strategy, we have to stay small if we want to succeed, so that means giving up things like having a moderation team.

Post reply on HN