4 ms·
Ask HN: Why are hacker news readers so obsessed with Rust?
Currently, 5 out of 30 posts on the hackernews homepage contain the word "Rust"
could anyone explain why? is there a bias?
- deleted 5y ago[deleted]
- schoen 5y ago(This might not answer your question about people's social behavior.) I'm interested in Rust because it's a C-like language with similar use cases to C, with elaborate attention paid to making it easier to write correct programs and making it harder (sometimes impossible) to write large classes of bugs. It's giving a lot of programmers the experience of getting genuinely useful warnings and errors from the typechecker and other static analysis features in the compiler. I'm not sufficiently proficient in Rust to fully appreciate these things yet, but it's also supposed to be nice for programming ergonomics and tooling.
- bestinterest 5y agoPersonal opinions inbound... I agree with this but I really would have 0 use cases for Rust. I am not a systems programmer or really want to be. I prefer product focus and user interfaces. I would not want to do typical web back end programming with Rust. I think Rust is perfect for the hard work of lower level things but I'm a crazy sucker for a fast feedback cycle loop. What I personally really want is faster Python/Ruby (Nim/Julia/Crystal) and they should be languages that allow for great interop with the newer lower level languages like Rust and Zig for when the 1% of speed matters.
- schoen 5y ago> What I personally really want is faster Python/Ruby By the way, have you tried PyPy? It's an alternative Python interpreter with a JIT (so compiling in-memory to native code) that is much faster than the standard CPython for many Python tasks, especially those that are particularly compute-bound. https://www.pypy.org/ https://www.pypy.org/ I was impressed at how fast some math-oriented Python programs that I wrote ran in PyPy. There are some extensive technical limitations, but it works out-of-the-box for many codebases.
- steveklabnik 5y agoWhile your opinion will probably remain the same overall, speed isn't the only benefit. Memory usage is a lot lower too. We've seen folks save a lot of money because their CPU and memory requirements go down dramatically. Of course, everything is tradeoffs.
- raihansaputra 5y agoYeah same as you. There's some projects working on Python <-> Rust interconnects. I'm personally following that instead of Rust as a whole.
- jokethrowaway 5y agoI generally agree with your reasoning but not with your premises: Rust doesn't feel like a low level language. It's an expressive, typed language with a powerful package manager. Yes, you lose prototyping speed by thinking about memory and safety but the development experience is pretty neat. I'm using it for writing web servers mainly because of the rich type system. The speed and low memory usage is a nice bonus.
- solmag 5y agoThere's always bias. And it's a nice language.
- infamouscow 5y agoThis community is as susceptible to fashion trends as any other.
- iExploder 5y agothe real question is, why are they not obsessed with Zig
- BoysenberryPi 5y agoThis is diverging from what the thread is about but what has been made in Zig that is worth talking about? Zig has no killer app so to speak. For Rust that was Servo. Rust has gone far beyond Servo and Mozilla at this point but Servo was the first real project that made people go "oh this is not just a toy this is real." I don't think Zig has anything like that. I see a lot of talk about Zig but no major projects.
- dcminter 5y agoAn earlier discussion (4 months ago) in much the same vein: https://news.ycombinator.com/item?id=25742928 https://news.ycombinator.com/item?id=25742928
- dyingkneepad 5y agoAnd you just bumped it to 6 out of 30 :) Why are you so obsessed with Rust?
- davidkunz 5y agoI think Rust is popular because the end product is nice: It's usually fast and safe. However, I'm not sure if it's reasonable to pick Rust for programs which contain a lot of 'business logic' compromised of complicated domain models. It's just really hard to model it with the enforcements of the borrow checker, even a doubly linked list is hard. I wish more people would consider languages like Nim instead. Having tried both, Nim is just more pleasant to write and read as you can capture the intent without polluting your code base with technical artifacts like Box, Rc, Arc, .... When I write Rust, a week later I don't understand my code anymore. Without the (very helpful) error messages from the compiler, I couldn't write Rust without compile-time errors, ergo I've got a hard time understanding already written code. Give me two programs in Rust and Nim and I will be able to understand the Nim code in a fraction of the time... and I learned Rust for several months and Nim only for a week. And Rust is also very inflexible, library authors must take great care in designing their APIs as the degree of freedom is quite high and can quicky diminish certain use cases. Nim on the other hand is pretty straight forward, not many ways to shoot yourself in the foot. And the final product is so similar in performance that it really doesn't matter for many use cases. So I cannot explain the bias. Try Nim: https://nim-lang.org/ https://nim-lang.org/
- jokethrowaway 5y agoYou're buying safety with those "technical artifacts". Also, not having GC. I find Rust code pretty easy to read, but writing it is a compiler driven process. It's similar to how I work with Haskell and I like that process: you write your intention, make it compile (and catch a few bugs and typos) and often times things work as expected. Zig is another language to consider if you like Nim; still the community in Rust is pretty rad and it will take time for those languages to catch up in terms of ecosystem.
- ArtWomb 5y ago* Rust is 2x faster, but uses only 1% of memory of Java * 25x faster than Python on ML tasks * Rust and WebAssembly can be 15x faster than compiled Scala Source: https://www.secondstate.io/articles/performance-rust-wasm/ https://www.secondstate.io/articles/performance-rust-wasm/ I think the last one (rust-wasm) is crucial. It's supported by Cloudflare Workers. Seems to be the platform of choice for many new Web3 projects ;)
- bjourne 5y agoMy theory is that HN readers are obsessed with solutions. Good at identifying good solutions but oblivious to whether something is a good problem. Rust is a good solution to how to write software that is somewhat safer than C but rivals it in performance and doesn't require you to learn C++. But the problem itself is not something most programmers struggle with and hence Rust won't go anywhere (unless it gets the same kind of enterprise support Java has/had). Node.js is a good solution to how to write single-threaded asynchronous programs in a scripting language. Not a problem most of us struggles with. Erlang is a good solution to how to simulate thousands of message-passing processes. Also not a good problem. MongoDB is (purportedly) a good solution to how to scale a database to tens of thousands of requests per second. A problem affecting perhaps 0.001% of all database developers. For the rest of us PostgreSQL works fine. 2^10 Javascript frameworks solves the problem on how to make web pages behave like desktop apps. Turns out users hate that. Sooner or later, someone will release a database/web framework/programming language/whatever designed to be perfect for programmers working in the low-gravity environment on Mars. It will be hyped up as the best invention since sliced bread.
- quickthrower2 5y agoMeanwhile millions of companies will plod along with Java and C# and Python and ruby and php and get stuff done!
- tcbasche 5y agoThe "get stuff done" factor is why I moved away from bothering to learn Rust a while ago
- UK-Al05 5y agoIt already has success.
- lostdog 5y agoI work in a domain that requires C++-like performance, but I'd really like to stop hitting all the usual issues with C++. Rust can free me from difficult std::move rules, no global build and packaging system, incoherent error checking, and ridiculous templating error messages. I would love to switch to a language with a clear type system and tooling. Unfortunately, Rust suffers from the same long build times as C++, so it's no longer as glamorous to me.
- the__alchemist 5y agoHi - this is a diverse group, so I suspect you'll find it's an averaging phenomenon vice a specific use. My background: Military. No coding classes or jobs. Have worked mainly on projects myself (scheduling tools for work etc), or open source. Have used Python, Javascript/Typescript, Julia, a bit of C, and Rust. Rust is just... a very nice language. It's versatile, has outstanding official tooling, is one of only a few choices for bare metal, and it's easy to find help from enthusiasts. I'm using Rust mainly in embedded now (Cortex-M)- where, I believe, it's objectively the best language available. You can apply Rust to other domains (eg web servers) where it'll work, but I think it really shines for bare-metal programming. This is both due to the well-known memory safety advantages, and the overall tooling and language features. I'm designing commercial projects. The firmware is in Rust, but the website is in Python and JS... It's about choosing the right tool for the job.