9 ms·
Not sure "written in Rust" is a headline thing that's worth mentioning anymore. Particularly amusing in this case when parts of Discord are written in Rust too.
by mathw 5y ago
Not sure "written in Rust" is a headline thing that's worth mentioning anymore. Particularly amusing in this case when parts of Discord are written in Rust too.
- drcongo 5y agoOn anything you can self-run it's a very useful qualifier. Personally I ignore anything that says "written in Node" because I don't want those headaches.
- Aeolun 5y agoThat’s a shame. Node is quite easy to run. Biggest problem is that installing any app includes a free black hole.
- vaughan 5y agoJS and Rust are best friends. Deno is written in Rust. And many Node native libs are being written in Rust.
- Popegaf 5y agoIt's not JS or node that's the problem, it's the JS ecosystem. Badly or too broadly defined dependencies can (and do) lead to pulling a new version of a dep that introduced a breaking API change and tada, you have to start hunting for the right version. Most projects don't define the node version that their project runs on either, so what ran in node 8 might not run in node 14 now. What's wonderful to run into is non-JS dependencies: node-gyp happens to be used here and there. Sometimes the native lib will be pulled, sometimes it will be built, who knows why. And node-gyp might then depend on python2 which might not even be present on newer distros anymore. And so on and so forth. If it doesn't come in an AppImage or docker image, there's no chance I'm getting myself into a node mess.
- vaughan 5y agoYep, I know the pain all too well. ESM is also currently a disaster as many popular packages migrate without transpiling to CJS and you cannot call ESM from CJS contexts. As you said, it's good to separate the ecosystem from the language/runtime. Things will improve over time, but everything has just been in transition for so long. I dream of the day that transpilers are no longer needed and TypeScript is baked in to all browsers. Until then it is a mess. > node-gyp might then depend on python2 `cmake-js` is the preferred option now. And Rust native deps don't have this issue.
- tluyben2 5y ago... if the application was written recently. Get something from last year on your 'now' computer and let the suffering begin. Without a docker setup, I really find node horrible vs let's say .NET Core, Java/Closure or Go. But ymmv. A project I inherited has node_modules of 780MB with 150k files with many deprecated and vulnerable ones in them pinned versions: I would not call that easy. I never had that with .net: usually you need a few nugets and if you update them, they still work. That I would call easy. I have used both (and java for over 20 years) for 10+ years, I just do not like the ecosystem (or language but that is ok with typescript and purescript and cljs): I have to anyway.
- vagrantJin 5y ago> includes a free black hole. This is gospel at this point. Npmming and yarning are giving me anxiety these days.
- zbrozek 5y agoDitto. It's a good indicator of being a sloppily-written pile of dependencies I don't want to touch. I also discriminate against Electron software, at least as much as I'm able.
- OJFord 5y agoIt's interesting, I suspect we all have our thing we avoid like that - for me it's Java stuff. I don't say that to 'defend' node, I'm no JS fan boy or particularly experienced with it, it just doesn't bother me the way Java stuff does - the dread I have for a Java stack trace appearing from something I'm trying to run is enough to make me see if there's an equivalent that ticks the same boxes in another language!
- brabel 5y agoThese days Java applications are supposed to embed the JVM using jlink images or even native installer (see jpackage). So you shouldn't even know if the app is written in Java when you run it.
- nick__m 5y agoAs someone who now does more operation than devloppement, I want my server side Java app to run on a full JVM, attaching jconsle or jstack to a running process is so usefull. No other runtime on Linux gives the observability you get by default when you run on a full JVM. On Windows that another story since you have ETW which is incredible and works with anything. But on Linux, if your application doesn't offer observability, you have to resort to strace and adhoc EBPF that you have to write, to diagnose a missbehaving application in production.
- vips7L 5y agoThe problem with jpackage/jlink is that most teams are stuck on an antiquated runtime and those tools didn’t ship until Java 14 (correct me if I’m wrong about the version). My own company is still making new projects on Java 8.
- brabel 5y agoAt work, we use some pretty complex stuff in our builds, including linking to C libs, Groovy testing, Kotlin modules, as well as the majority of the code in Java. It took quite a lot of effort, but we managed to move to Java 11 this year. It's great to be able to use new Java language/platform features. We're moving to Java 17 next year once the dust settles (it will be the first LTS release in 3 years and comes up this month - Sep 2021)... it will be a much easier migration as there's nothing like the big Java 9 barrier to cross. I can't understand why anyone would start something new in Java 8, all traditional Java tooling already works really well with Java 11 and even Java 17.
- RcouF1uZ4gsC 5y agoFor me I think “written in Rust”actually does add a lot. It is a signal that this will be easy to build, easy to deploy (because it is compiled into a single binary in general), memory safe, and likely to be written by a someone that cares about performance and efficiency. I think those are all valuable hints.
- spopejoy 5y ago> memory safe That's an incorrect assumption if you haven't audited the code. > likely to be written by a someone that cares about performance and efficiency Ah, the stamp of approval that comes from signalling to the "right people". Reminds me of the preamble to almost every C++ Boost library -- "written with performance in mind".
- adamnemecek 5y ago> That's an incorrect assumption if you haven't audited the code. Even without an audit, the odds of a Rust project being memory safe are so much higher than in comparable languages. Furthermore, Rust makes auditing so much easier by allowing you to concentrate on unsafe blocks.
- cjbprime 5y agoThat's a confusing statement -- JS/Node and Golang are comparable (memory safe) languages for API server backends.
- zozbot234 5y agoGolang is only memory safe if you're not using the concurrency features. It doesn't protect against data races which can break safety.
- spopejoy 5y agoRust hasn't magically solved concurrency safety either, as linearity is not enough. GC'd languages (Java, Go, Haskell etc) are safer than Rust by default, you just have the tradeoff of GC. Note that this isn't always a tradeoff as GCs can outperform static allocation in scenarios like large dynamic heaps. Haskell is the safest for concurrency because of the strictly typed functional semantics.
- onionisafruit 5y agoSimilarly I used to have an issue with the number of projects submitted to /r/golang that are “a whatever server written in go”. If I wanted to see a new whatever server I would be looking elsewhere and wouldn’t particularly care what language it’s implemented with. Nowadays I’ve come around to appreciating the opportunity to see what other gophers are doing. I usually skip over those posts but occasionally I look at the code and learn something new. Even when I’m dealing with compiles binaries, I slightly prefer something written in a language I’m familiar with just so there’s a better chance I will be able to diagnose any bugs I encounter.
- bachmeier 5y agoTotally agree. It's not good for HN to have this kind of repetitive language promotion on the front page. I could see if this was the first major project written in the language, which would make it noteworthy, but something like this needs to stand on its own without the upvotes of Rust fans.
- busterarm 5y agoIt bothers me that we don't view it as a problem on this board the fact that we have an entire upvote/downvote brigade that reacts purely on whether you're speaking good or ill about Rust. I'm not one to tell moderators what to do but on some boards people get told off severely for such behavior. "x in rust"[1] threads are so prevalent that they should get a ranking penalty. https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=%22in%20rust%22&sort=byPopularity&type=story https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
- sodality2 5y agoDisagree- three of the first six most recent submissions containing "in rust" are simply educational/about the rust language in general and not showing off a project (while using "rust" as a selling point). https://i.imgur.com/WCD7iem.png https://i.imgur.com/WCD7iem.png
- mbreese 5y agoThis is the way it’s always been though. First it was Java, then Ruby, then Clojure, then Go, then Node, and now Rust. As languages get popular, multiple projects get rewritten in them. At first it’s a novelty, but it is often useful to see what the strengths and weaknesses are of a language to implement an existing project. Eventually, it becomes annoying to have “written in X” attached to articles and links, but soon, that will diminish. The only time when I think it’s really appropriate for a mature language is when the language itself is a feature. But that is really rare for that to be the case. Other languages (eg Python, Haskell and Erlang) are in the mix too, but more evenly distributed and less fad-ish. This is just part of the hype cycle of languages. I’m not saying Rust is only a fad, but we are definitely in that part of the cycle for Rust.
- nabakin 5y agoYeah that makes sense. Revolt was posted to r/Rust yesterday so OP is probably a person who frequents r/Rust and thought it was notable.
- marsven_422 5y agoIt's good it say rust since I fail the "correct political opinion" test for using rust I will be unable to install it.
- axegon_ 5y agoExactly what I said yesterday in a different thread: > One thing that makes me appreciate it even more is the fact that it's written in rust without the authors trying to make it into a primary selling point, which is annoyingly common in these days("X written in rust").
- jedisct1 5y agoThis is getting very lousy.
- hestefisk 5y agoBut apart from the advertisement of language choice, an OSS alternative is quite good, no? I’d be keen to try it out.
- timdorr 5y agoAlso, only the backend is written in Rust. The desktop client is an Electron app: https://github.com/revoltchat/desktop https://github.com/revoltchat/desktop
- jstx1 5y agoNow I want to know if HN hates Electron more than it loves Rust. Or do they perfectly cancel out?
- DiabloD3 5y agoElectron is MAX_HATE, Rust is MAX_LOVE, but Discord is more Electron than it is anything. As in, I don't care if Rust runs on their servers if Electron runs on my desktop.
- jstx1 5y agoYeah, Electron feels more like a choice that matters.
- kingofclams 5y agoPersonally I see “Written in rust” as more of a meme, often using buzzwords like “blazing fast” and “memory safe.” Electron is definitely worse than rust is good.
- DennisP 5y agoIt makes sense to specify the language for open source software. A lot of us are devs who might actually fiddle with the source, if it's written in a language we like to fiddle with.
- CR007 5y agoPeople often use "written in" when they are targeting devs and contributors as no end-user cares about in which jargon we write stuff. In this case, I don't get why they brag as this definitely hits my spaghetti detector: https://github.com/revoltchat/delta/blob/master/src/database/migrations/scripts.rs https://github.com/revoltchat/delta/blob/master/src/database...
- deleted 5y ago[deleted]
- vlunkr 5y agoAlso, the backend of Discord is elixir/Erlang, which is a great fit for a messaging app. To me rust would be a step back.
- steveklabnik 5y ago(Discord also uses Rust NIFs with their Elixir)
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]