Live data from Hacker News

Tell HN: Rust is the superglue

news.ycombinator.com

21–30 of 38 posts

Re: Tell HN: Rust is the superglue

#21

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 perform…

Maybe it hasn't "really panned out" because you're making up your own stories. For example: > 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. This is just not true. I never made ripgrep to replace grep. And you acting like it not being a drop-in replacement being a mistake suggests you're totally missing the p…

Ripgrep puts the code search in my JetBrains ide to shame.

Ripgrep is so fast that it instantly returned results and I had to check it was actually doing anything.

I felt I wanted ripgrep built into a whole bunch of other things.

Re: Tell HN: Rust is the superglue

#22

Earlier quoted context omitted.

Another niche: Many banks in Europe still use M4, but the existing maintainers are growing old and retiring.

m4 the macro language?

Yes. I heard about it being used for email automation and reporting.

Unrelated talk about the M4 language that I'm referring to: https://m.youtube.com/watch?v=ULZxHSPWn98

Re: Tell HN: Rust is the superglue

#23
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/learn and somewhat verbose.

Rusts reason for existence and main goal is replacing C++.

>For machine learning, we have the Py ecosystem

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.

Re: Tell HN: Rust is the superglue

#25

Zig seems more interesting but it’s not mature enough yet. 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. 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…

>"Rust is so hard to learn that the AI doesn’t get it" is a bad place to be for rust.

I don't think this is really a big point against Rust; in my experience, ChatGPT doesn't write good code in general.

To be honest, I think Rust's borrow checker won't seem very hard if you've used C++ smart pointers before, which are like Rust's references/Boxs, but there's no borrow checker. The borrow checker just formalizes and enforces existing good practice for using pointers in C and C++, and makes sure they're followed 100% of the time unless specifically opted out of.

What actually seems more interesting to me than Rust is the ATS language. Rather than a borrow checker, you have proof objects that you pass around with pointers (and these proof objects exist only at compile time), which prove to the compiler that the pointer has a valid address. What's cool is that you can do things like pointer arithmetic in a type safe way. The downside is that it's more verbose than either C or Rust. I'm still trying to learn it.

Re: Tell HN: Rust is the superglue

#26

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 perform…

nah man, the reason python projects take longer than expected is usually the crappy dynamic type system. If you use Rust, then your tests run instantly (yes, instantly) and you can immediately see the issues in your code highlighted by e.g. rust-analyzer. In comparison, python you gotta run your code and wait. Yeah, you can use Nodemon to run it automatically but it’s still waiting around for bugs and crashes. Just d…

Typescript is way, way, way better than Pythons types. I would argue it's one of the best type systems and I've used a lot.

Re: Tell HN: Rust is the superglue

#27

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/learn and somewhat verbose. Rusts reason for existence and main goal is replacing C++. >For machine learning, we have the Py ecosystem A very bad state of affairs to be sure and also not really true as python is just a thin layer ontop of the actu…

>python is just a thin layer ontop of the actual code running the networks, which are written in C++ or loaded of to GPUs.

Or Rust which is under libraries such as Polars. In other words: python is the glue in the data science world.

Re: Tell HN: Rust is the superglue

#28

Earlier quoted context omitted.

nah man, the reason python projects take longer than expected is usually the crappy dynamic type system. If you use Rust, then your tests run instantly (yes, instantly) and you can immediately see the issues in your code highlighted by e.g. rust-analyzer. In comparison, python you gotta run your code and wait. Yeah, you can use Nodemon to run it automatically but it’s still waiting around for bugs and crashes. Just d…

Typescript is way, way, way better than Pythons types. I would argue it's one of the best type systems and I've used a lot.

The only bad part about typescript is that it still only transpire into JS. I wish they forked it to compile into MSIL or whatnot.

Re: Tell HN: Rust is the superglue

#29
You can practice your Rust skills by writing performant and/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.

For instance, checkout Llama-node https://github.com/Atome-FE/llama-node for an involved Rust-based NodeJS extension. Python has PyO3, a Rust-Python extension toolset: https://github.com/PyO3/pyo3.

They can help you leverage your Rust for writing cool new stuff.

Re: Tell HN: Rust is the superglue

#30

Just FYI, the market for C++ is excellent and has been for years, but I'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.

Rust is pretty popular among crypto trading firms and those tend to pay very well.
Post reply on HN