Live data from Hacker News

Common *nix commands written in Rust

gcollazo.com

1–10 of 56 posts

Re: Common *nix commands written in Rust

#3

There are sometimes good reasons, usually related to features although sometimes related to performance, to prefer newer utilities like ripgrep over older ones like grep. Implementation language is not one of them.

I came here to ask, thought not outright say, what is it with all the "... in rust" stuff that keeps getting posted. It's starting to feel more like a marketing exercise than anything actually software related (happy to be corrected on this though).

Re: Common *nix commands written in Rust

#4

There are sometimes good reasons, usually related to features although sometimes related to performance, to prefer newer utilities like ripgrep over older ones like grep. Implementation language is not one of them.

I came here to ask, thought not outright say, what is it with all the "... in rust" stuff that keeps getting posted. It's starting to feel more like a marketing exercise than anything actually software related (happy to be corrected on this though).

I think it's just that Rust brings a fairly new set of semantics to system code (memory safe, but no GC), and people are pretty excited to rethink large parts of the software stack we all depend on.

Re: Common *nix commands written in Rust

#5

There are sometimes good reasons, usually related to features although sometimes related to performance, to prefer newer utilities like ripgrep over older ones like grep. Implementation language is not one of them.

I came here to ask, thought not outright say, what is it with all the "... in rust" stuff that keeps getting posted. It's starting to feel more like a marketing exercise than anything actually software related (happy to be corrected on this though).

“marketing” is probably not the right word since there is no money backing it, and it's not a concerted effort either. “Fashion” would fit better I think.

Rust has long been something intellectually interesting (solving memory issues found in C and C++, while keeping their low level and with equal performance is quite a feat), but it recently started to become affordable to use (libraries are maturing, there's tons of quality learning material, and even the language itself reached a level of polish that was simply not here before), then many people who have had it somewhere on their radar for a while took the leap, and now share their enthusiasm. And the interested ones who are still waiting for a good occasion to learn it upvote and then it ends up on the front page. And now, you get this kind of low-quality content, which is merely surfing on the trend to get some clicks.

This kind of things happened with Go a few years back, or with node before that, such is the fashion life of the programming world.

Re: Common *nix commands written in Rust

#6

There are sometimes good reasons, usually related to features although sometimes related to performance, to prefer newer utilities like ripgrep over older ones like grep. Implementation language is not one of them.

If the language is strongly typed and reduces opportunistic threats of mis-application or unexpected data, I'd consider that an upside.

If the compiler targets multi-cores and the language helps express implicit parallelism or asynchronous code possibilities which map to multi core, better than the original language, then thats net beneficial too.

If the language encourages coding patterns which are extensible or re-usable, then its possible the runtime code state gets smaller as increased use of shared code patterns leads in the longer term to more COW shared libraries.

Re: Common *nix commands written in Rust

#7
post #6

There are sometimes good reasons, usually related to features although sometimes related to performance, to prefer newer utilities like ripgrep over older ones like grep. Implementation language is not one of them.

If the language is strongly typed and reduces opportunistic threats of mis-application or unexpected data, I'd consider that an upside. If the compiler targets multi-cores and the language helps express implicit parallelism or asynchronous code possibilities which map to multi core, better than the original language, then thats net beneficial too. If the language encourages coding patterns which are extensible or re-…

Okay, so why not say "safer utilities" or "more performant utilities" rather than focusing on the implementation language? If I'm an end user of a safe and performant utility why should I care if it's written in Rust, Go, or OCaml?

Re: Common *nix commands written in Rust

#8
From the ls replacement: "Why spend your time squinting at black and white text?"

Uh, because squinting at blue-on-black text is much more difficult. Human eyes focus best at yellow-green, they see that as brightest, and they don't even have long-wavelength (blue) receptors in the fovea.

I also looked at the alternatives to ps, top, cat, find, and du.

My overall feeling is that these are really not like UNIX tools at all. They are not very scriptable. Output is full of Unicode, color, column dividers, headers, underlining, and pagination. Values are in so-called "human readable" form, like "1.4M" instead of 1474560 or whatever it may be, which is a real pain for scripting.

I also notice some features that seem out of place to me, a long-time UNIX user. The tools waste space on displaying things related to git, docker, and network connections. I would expect the proper tools to be more like "git ls", "docker ls", "docker ps", and "netstat -p". (for those ones that don't actually exist, take that as a suggestion for a coding project) Not all the world is devops on a web site.

Re: Common *nix commands written in Rust

#9
post #4

Earlier quoted context omitted.

I came here to ask, thought not outright say, what is it with all the "... in rust" stuff that keeps getting posted. It's starting to feel more like a marketing exercise than anything actually software related (happy to be corrected on this though).

I think it's just that Rust brings a fairly new set of semantics to system code (memory safe, but no GC), and people are pretty excited to rethink large parts of the software stack we all depend on.

That's but rust has been a known quantity for 5(?) years at least now?

Re: Common *nix commands written in Rust

#10
This isn’t too compelling a story on its own, I’m assuming this is someone who wrote a collection for themselves and made it public on their blog.

Glad they wrote their collection, but not something I’m excited about.

In general I’d love to hear “this was better in Rust because of X, Y and Z and the tradeoffs I had to make were A, B and C”.

But again, this isn’t on the author to do, I’m pretty sure I can find other articles on the internet that talk to that.

Edit: most of the READMEs of the projects look pretty good about that on a quick skim.

Post reply on HN