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.
Ask HN: Why did Nim not catch on like Rust did?
121–130 of 139 posts
Re: Ask HN: Why did Nim not catch on like Rust did?
#122Nim 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.
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?
#123Earlier 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.
Re: Ask HN: Why did Nim not catch on like Rust did?
#124Earlier 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.
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?
#125Re: Ask HN: Why did Nim not catch on like Rust did?
#126Rust 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://…
Re: Ask HN: Why did Nim not catch on like Rust did?
#127Earlier 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.
Re: Ask HN: Why did Nim not catch on like Rust did?
#128In 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…
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?
#129Earlier 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…
Re: Ask HN: Why did Nim not catch on like Rust did?
#130Earlier 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…