TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tell HN: Rust is the superglue

31 pointsby itsmefazalmost 2 years ago
I am going through an existential crisis as a developer. I am looking to revamp my entire skillset to align more with where I believe the future of software engineering is heading.<p>And during this phase, I encountered Rust and loved it, but I couldn&#x27;t wrap my head around its existence. Rust has a good balance of low-level and high-level abstractions, but I didn&#x27;t know where to use them. For web and mobile, there is the JS ecosystem. For machine learning, we have the Py ecosystem. I see members of the Rust community thinking of Rust as a replacement for these languages, instead the right approach is to focus on enhancing these languages and becoming the backbone for this two ecosystems. Rust is the superglue we needed!

14 comments

constantcryingalmost 2 years ago
Rust seems monumentally unsuited as a glue language like Perl or Bash. It is statically typed, compiled, makes strong assumption about the code, is relatively hard to write&#x2F;learn and somewhat verbose.<p>Rusts reason for existence and main goal is replacing C++.<p>&gt;For machine learning, we have the Py ecosystem<p>A very bad state of affairs to be sure and also not really true as python is just a thin layer ontop of the actual code running the networks, which are written in C++ or loaded of to GPUs.
评论 #36736965 未加载
fxtentaclealmost 2 years ago
Just FYI, the market for C++ is excellent and has been for years, but I&#x27;ve yet to receive any well paid Rust project offer. My impression is that most people working with Rust are idealists (and not businesspeople) and the salaries reflect that.
评论 #36737341 未加载
评论 #36742966 未加载
sacnoradhqalmost 2 years ago
You maybe prematurely optimizing. The technological singularity will be realized when algorithms develop new programming languages, new hardware description languages, and so forth. We&#x27;re not quite there yet.<p>There is no universal answer or panacea tool. Evaluating which tool to use from the toolbox depends on a particular use and who else will be working with it. Being flexible and experimenting should, at a minimum, improve one&#x27;s engineering instincts even if a particular approach fails.<p>There won&#x27;t be many engineering jobs left once self-programming systems and AI become consolidated by megacorps. The remaining jobs will be the &quot;janitors&quot; and AI architects. We won&#x27;t need or be able to use 27 million software developers, perhaps only 10-100k in 20 years.<p>PS: In the meantime, run a model that can maintain and refactor COBOL. ;) Or, specialize somewhat to what&#x27;s hot right now without worrying too much about the distant future.
评论 #36736077 未加载
评论 #36734828 未加载
FrustratedMonkyalmost 2 years ago
First. I love F#. But it didn&#x27;t take off in the market, so I&#x27;m learning Rust.<p>What I tend to see is that Rust does have a higher learning curve, because you have to change your brain&#x27;s way of approaching problems. The &#x27;functional&#x27; way of viewing things. (plenty of past flame wars on functional programming, so not trying to start that here)<p>Once you do learn Rust (or functional), it is safer, better, faster. But if you just came in from C++, Java, C#, and try and force that way of thinking into it, then it is difficult and crappy and you wonder what the fuss is about.<p>For Python. I tend to think if it wasn&#x27;t for Machine Learning Libraries, it would have started to die off. It is super great as an ad-hoc, throw together some janky little script to tie some libraries together. It is very useful for new or non-programmers to just whip out something &#x27;close enough&#x27;. Or as another poster said, the REPL that is similar to MATLAB. BUT -&gt; Nobody builds big applications in MATLAB. So the use case is either, small janky scripts to do something small and useful, or as MATLAB with REPL which are also small scripts. Once a program gets to a certain size, it would be much better to graduate to something with at least type checking.<p>I do really hope that the giant ecosystem of Python does start to migrate to RUST. Ecosystems don&#x27;t turn on a dime, so it will be years. And who knows, Python is also improving, maybe it&#x27;s shortcomings will be fixed faster than the ecosystem migrates to RUST.
评论 #36737356 未加载
ojosilvaalmost 2 years ago
You can practice your Rust skills by writing performant and&#x2F;or gluey extensions for higher-level language such as NodeJS (checkout napi-rs) and Python or complementing JS in the browser if you target Webassembly.<p>For instance, checkout Llama-node <a href="https:&#x2F;&#x2F;github.com&#x2F;Atome-FE&#x2F;llama-node">https:&#x2F;&#x2F;github.com&#x2F;Atome-FE&#x2F;llama-node</a> for an involved Rust-based NodeJS extension. Python has PyO3, a Rust-Python extension toolset: <a href="https:&#x2F;&#x2F;github.com&#x2F;PyO3&#x2F;pyo3">https:&#x2F;&#x2F;github.com&#x2F;PyO3&#x2F;pyo3</a>.<p>They can help you leverage your Rust for writing cool new stuff.
ThePhysicistalmost 2 years ago
I think Python is probably way better suited to be the superglue you mention, and in many areas it already serves that function. Many Python libraries are high-level bindings for low-level C&#x2F;C++&#x2F;Fortran (or recently, Rust) libraries. Examples are numpy, scipy, tensorflow, PyQt, ....<p>Rust is great in the sense that it is very suitable for being embedded into other software as it doesn&#x27;t have a runtime system (like e.g. Golang) and can be compiled for almost any architecture. Rust&#x27;s usability for &quot;regular&quot; programmers and technical users is horrible in my opinion. I e.g. worked with scientists a lot (and was one myself) and in my lab everyone could wrap their head around Python in a couple of days and become productive very fast, whereas most people would throw in the towel when they had to write low-level code in C&#x2F;C++. In terms of learning curve and complexity I would put Rust somewhere in the same ballpark with C++. There are many differences and Rust has a much better developer experience as it has a modern package manager and the toolchain is much nicer, but it&#x27;s still a low-level language with many intricacies.
the__alchemistalmost 2 years ago
Rust can be used in a number of domains; from the use cases of programming languages I&#x27;ve encountered, its niche isn&#x27;t one of the things you mention, and it wouldn&#x27;t be my first choice. I think Rust&#x27;s strengths are in these domains:<p><pre><code> - Embedded devices - Standalone applications - Operating systems &#x2F; RTOSes etc - Performance-critical libraries</code></pre>
solomatovalmost 2 years ago
IMO, it&#x27;s a replacement for C&#x2F;C++ with higher safety guarantees. Of course it&#x27;s more suitable for ML, and Web, than C&#x2F;C++, but if there&#x27;re no hard perf requirements, there&#x27;re better options.
metroholografixalmost 2 years ago
Rust is a welcome addition to the global language toolbox but I feel is mostly a mirage in terms of future breakthroughs in the language &#x2F; programming space: It still falls under the &quot;formal methods &#x2F; program correctness&quot; paradigm which has led people astray for decades. Like Gerald Sussman proclaiming (talking about Haskell):<p>&quot;This is the most advanced of the obsolete languages!&quot;<p>Watch this talk: <a href="https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;We-Really-Dont-Know-How-To-Compute" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;We-Really-Dont-Know-How-...</a><p>Another great talk on the subject (also the biological model of dealing with complexity) is Alan Kay&#x27;s &quot;Programming and Scaling&quot;.
评论 #36736265 未加载
solarkraftalmost 2 years ago
The Element team is writing its next generation Matrix SDK in Rust, which means that it can be embedded in pretty much any language.
nonameiguessalmost 2 years ago
Most of the early intention and excitement was the potential to replace C++, and maybe even at least a little C, in systems-level and native code. Obviously, it was first created to replace the JavaScript engine in Firefox, which was C++, but I know a lot of people working on basic utilities and libraries found all over the core components of any normal Linux distro who had hope we might get something equally performant and expressive to C++, but with a far better developer experience and language-level support for the more modern features that C++ tends to get from something like boost. Or look at things like ripgrep and what not, just trying to replace some of the common GNU coreutils, POSIX command-line things you expect a system to have. It eventually made it into the kernel, even, though only for device drivers and that&#x27;s probably as far as it will get.<p>I would say this has so far not really panned out. Partly, this is because C++ remains and has always been good enough. Partly, because POSIX component replacements were not made as drop-in replacements, so you still need GNU coreutils and existing bash built-ins and what not if you want build scripts and system scripts to still work. Partly, because so much of the modern developer ecosystem is focused on web development rather than native system-level tooling and libraries that Rust has gravitated toward that because that is who is adopting it. Look at how, for instance, Rust versus Go has become so much more common of a question to see compared to Rust versus C++. It&#x27;s clearly more expressive and full of features than Go, but unless your system really depends on very predictable latency to the point that garbage collection can&#x27;t be tolerated, it&#x27;s not clear there&#x27;s any real value-add even if it&#x27;s a &quot;better&quot; language.<p>Rust also suffers a bit from a problem faced by any new language on the scene. If you work in older languages like C, C++, Java, you automatically and easily interoperate with some many existing deployed systems. There&#x27;s a tested, true, well-maintained library for just about anything you could ever want to do. You can start a project quite quickly by forking something similar that already exists. Languages that did well as up-and-comers had some compelling killer app they were connected to that gave them that ecosystem within some more narrow niche. JavaScript obviously runs in the browser and was the only option for a long-time if you want client-side code to execute in a user&#x27;s browser. This also proved to be useful for cross-platform desktop apps when computers became powerful enough and disk space plentiful enough that just shipping a browser runtime with every application became a feasible idea. Go had Kubernetes and Docker&#x27;s rewrite, so if you want to do anything related to container runtimes or orchestration, it&#x27;s the obvious place to turn. Python came to dominate machine learning because it has great interoperability with native code and it could easily wrap pre-existing Fortran and C++ to get a BLAS and higher-level numerical libaries in a dynamically-typed language with a REPL that was more or less perfect for exploratory, interactive work, and the dreaded operator overloading that developers hate proved to be a great feature for attracting scientists, because it allowed SciPy and NumPy to mimic the syntax of MATLAB, giving a free version with near parity of something that normally costs five grand for a single-user license and researchers were already familiar with using.<p>Rust unfortunately sits in this unholy middle ground for easy adoption. It comes with a very nice build tool and package manager built-in, but the ecosystem unfortunately took on the JavaScript &quot;bring in thousands of tiny libraries that each do one thing&quot; characteristic that is antithetical to C and C++ with gigantic libraries that do everything. The syntax is like 80&#x2F;20 ML&#x2F;Algol, so people coming from a functional background will see it and wonder why it&#x27;s so verbose and can&#x27;t do better type inference and needs brace-delimiting. People coming from an imperative background will translate the classic &quot;writing C in C++&quot; thing to &quot;writing C++ in Rust&quot; because they don&#x27;t fully grok the idioms.<p>The compile-time garbage collection thing is a great, very cool feature, not quite as good as something like Idris, but probably the best you&#x27;ll get out of any language anyone actually uses, but it still sits in this weird middle ground. People coming from C and C++ will get frustrated feeling the compiler doesn&#x27;t trust them but they&#x27;re pretty sure they know what they&#x27;re doing is correct. People coming from dynamically typed or garbage collected languages will just follow the suggestions coming from the rustc error messages until it finally compiles, but without really understanding what the hell the borrow checker is doing or why they need it.<p>If your idea is correct, then you&#x27;re talking about replacing C++, which is the current backbone for JavaScript and Python. But think about what this entails. You&#x27;re talking about rewriting the Chromium JavaScript engine on the one hand, and rewriting BLAS, LAPACK, Armadillo, TensorFlow on the other. Who is going to do this? You&#x27;re talking about low-level systems programmers on the one hand and scientists, applied mathematicians, and engineers on the other. But most actual uptake for Rust is application developers working on relatively greenfield projects.
评论 #36735600 未加载
评论 #36735643 未加载
0xfedbeealmost 2 years ago
This is not &#x2F;r&#x2F;rustjerk
bionhowardalmost 2 years ago
Rust is awesome and could replace both JS and PY at exactly what they’re supposedly good at. The main issue is compatibility and library availability.
评论 #36735827 未加载
评论 #36735700 未加载
andrewstuartalmost 2 years ago
Zig seems more interesting but it’s not mature enough yet.<p>I’ve been so spoilt with IDE support, documentation, massive community and ChatGPT for Python typescript and others that I really can’t pick up Zig yet.<p>One of the things I heard is that ChatGPT doesn’t actually “get” the hard parts of rust, and that’s a huge issue because the whole point of AI in programming is it’s meant to be able to lead and guide you in learning and understanding.<p>“Rust is so hard to learn that the AI doesn’t get it” is a bad place to be for rust.
评论 #36736871 未加载