4 ms·
Recent resurgence of tools going native is really interesting. For years (at least last decade) I've heard mantra that JIT/interpreters are getting so good that
by wiseowise 1y ago
Recent resurgence of tools going native is really interesting. For years (at least last decade) I've heard mantra that JIT/interpreters are getting so good that you don't need to bother with native languages anymore, clients can be written in Python/Ruby, because it's a one-off operation anyway, etc., etc.
And now everyone is rewriting everything in Go/Rust left and right.
- gschier 1y agoYou really notice the startup delay with a large CLI written in something like NodeJS. Going from >100ms to ~0ms is a huge QoL improvement.
- rane 1y agoIt largely depends on how often you have to run the command.
- pjmlp 1y agoAnd then they ship an Electron based GUI on top. Note that most of these rewrites wouldn't be needed if the JIT language would be Java, C#, Common Lisp, Dart, Scheme, Raket. And all of that list also have AOT compilers, and JIT cache tooling.
- NitpickLawyer 1y ago> And then they ship an Electron based GUI on top. If this catches on, and more tools get the "chatgpt, translate this into rust, make it go brrr" treatment, hopefully someone puts in the time & money to take tauri that extra 10-20% left to make it an universal electron replacement. Tauri is great, but still has some pain points here and there.
- diggan 1y ago> And now everyone is rewriting everything in Go/Rust left and right. Especially interesting for software that are 99.9% of the time waiting for inference to come back to you. Sure, makes sense to rewrite something that is heavily relying on the CPU, or where you want an easier time to deal with concurrency, but I feel like that's not what makes Codex takes long time to finish a prompt. With that said, I also rewrote my local LLM agent software to Rust, as it's easier to deal with concurrency compared to my initial Python prototype. That it compiles into a neat binary is an additional benefit, but could have as easily gone with Go instead of Rust.
- gwynforthewyn 1y ago> Especially interesting for software that are 99.9% of the time waiting for inference to come back to you. In a different domain, I’ve seen a cli tool that requests an oauth token in Python be rewritten to rust and have a huge performance boost. The rust version had requested a token and presented it back to the app in a few milliseconds, but it took Python about five seconds just to load the modules the oauth vendor recommends. That’s a huge performance boost, never mind how much simpler it is to distribute a compiled binary.
- teaearlgraycold 1y agoPackaging Python apps is pure hell. npm gets a lot of shit, but Python deserves as much if not more.
- dayjah 1y agoI know far too much about python packaging while only knowing a little about it. I agree it’s hell. But I’ve not found many comprehensive packaging solutions that aren’t gnarly in some way. IMHO the Python Packaging community have done an excellent job of producing tools to make packaging easy for folks, especially if you’re using GitHub actions. Check out: https://github.com/pypa/cibuildwheel https://github.com/pypa/cibuildwheel Pypa have an extensive list of GitHub actions for various use cases. I think most of us end up in the “pure hell” because we read the docs on how to build a package instead of using the tools the experts created to hide the chaos. A bit like building a deb by hand is a lot harder than using the tools which do it for you.
- teaearlgraycold 1y agoThat’s fair. I’m also thinking about the sheer size of Python apps that make use of the GPU. I have to imagine a C++ app performing neural network shenanigans would’t be >1GB before downloading weights.
- 1y ago
- dweekly 1y agoEverything follows a cycle. Client/server, flat/skeuomorphic, compiled/interpreted, cloud/colo, colorful/minimalist, microservices/monolithic, standards-driven/vendor-driven, open/proprietary, CPU/xPU. There is a natural tension in the technical universe that pushes progress in one direction that loads the spring in the other direction. Over time you'll see the cycles rhyme.
- BrouteMinou 1y agoI can't wait for the "rewritten in Rust" era to end!
- apwell23 1y agocrazy how fast "rewritten in Go" ended . now suddenly all those native go projects are uncool again.
- jeremyloy_wt 1y agoThe official Typescript compiler is being rewritten in Go as we speak.
- apwell23 1y agoah intersting "The existing code base makes certain assumptions -- specifically, it assumes that there is automatic garbage collection -- and that pretty much limited our choices."
- tonyhart7 1y agowait until Zig(and ecosystem) got mature first this is next Trends
- mbb70 1y agoFeels like the big shift is Rust hitting critical mass mindshare and LLM assisted translation making these rewrites viable. Rust is a very vibable language. An announcement of Codex CLI being rewritten in C++ would be met with confusion and derision.
- energy123 1y ago> Rust is a very vibable language. Why would you say this for Rust in particular?
- falcor84 1y agoOnce a Rust program finally compiles it's much likelier that it's correct, in comparison to other languages, at least in the sense of avoiding unexpected runtime behavior.
- wrsh07 1y agoGood error messages which are great for humans but also great for LLMs that are trying to debug their initial attempt
- energy123 1y agoWhat about this which says the opposite: https://news.ycombinator.com/item?id=44149809 https://news.ycombinator.com/item?id=44149809
- koakuma-chan 1y agoThe comment you replied to is talking about Rust compiler's errors. The comment you linked is talking about unspecified application's runtime errors.
- csomar 1y agoIf you properly structure your types and document them well, you can speed run lots of code generation.
- ralusek 1y agoSpeaking for myself: one reason would be because it's one of the things LLMs/tools like Codex are the most useful for. When I have a smallish application, with tests, written in one language, letting an LLM convert those files into another language is the single task I'm most comfortable handing over almost entirely. Especially when I review the tests and all tests in the new language are passing.
- miki123211 1y agoCLIs are different than other software, as they're launched and killed often.
- cameronh90 1y agoIt really comes down to the Go and Rust ecosystems being easy to work with. A decade or two ago, writing a native app meant setting up an automake/autoconf Rube Goldberg machine - especially difficult if you needed to build for multiple architectures. I'd argue Rust and Go are even easier to work with than Python/JS/TS. The package management is better, and static linked native binaries eliminate so many deployment headaches.
- fragmede 1y agocross compiling to Mac from Linux, cross-architecture used to be an impossible bitbake adventure to go on. in go, it's just two env vars!
- metaltyphoon 1y agoWith a big footnote: Until you need CGO
- fragmede 1y agofair.
- supriyo-biswas 1y agoHaving recently done some investigation along the same lines for a side project that I did not continue to work on: is it not just a matter of passing CGO_LDFLAGS=—static and building on musl?
- saagarjha 1y agoI don't think you can do this when targeting macOS
- metaltyphoon 1y agoor FreeBSD
- 1y ago
- h1fra 1y agoFor cli I'm sure the biggest drawback of node is the lack of portability and very large footprint of the "executables".
- CSMastermind 1y agoIf only we could shift off of React Native as well.
- lmm 1y agoI suspect it's accidents of history that those are "native". Go's advantage is in its Google backing, and Rust is just a good language design that's managed to hit on the right kind of community. As far as I can see all the reasons that native was unnecessary are still valid.
- amazingamazing 1y ago> And now everyone is rewriting everything in Go/Rust left and right. Seems like confirmation bias.
- gofreddygo 1y agoI'm interested in the business angle on this decision. How do you convince your boss hierarchy to throw hundreds of (wo)man hours on rewriting python/typescript/whatever in rust/go ? What could it be that drives the ROI ?