Live data from Hacker News

Common *nix commands written in Rust

gcollazo.com

31–40 of 56 posts

Re: Common *nix commands written in Rust

#31
post #24

Earlier quoted context omitted.

Except Rust isn't a direct replacement for c. Rust's system requirements are perhaps acceptable for what'll be normal in computers five years from now. We don't need to re-stratify development so that only people with expensive computers with > 4 gigs of memory can compile what they run.

"expensive computers" "> 4 gigs of memory" https://www.ebay.com/sch/i.html?_fsrp=1&_nkw=computer&_sacat... by my standards, $5 is not an "expensive computer". and more to the point, the language has little to do with the compilation memory required. Firefox and Chrome require significantly more memory than that to compile nowadays; they passed the 4 GB mark that could be compiled on a 32-bit machine many years ago, a…

Used computers with 4GB of RAM are cheap, but not $5 cheap. The cheapest I saw at that link was $43 including shipping, for a 2008-era system. An Ivy Bridge SFF desktop with 8G RAM is $67 shipped (I have a couple, theyre nice little systems).

Re: Common *nix commands written in Rust

#32

Earlier quoted context omitted.

“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 o…

Rust solve memory issues of C/C++ at the cost of simplicity and with convoluted, complicated syntax. It will bring in new class of bugs when it becomes popular enough and when large parts of Firefox are rewritten in it. I am not sure why some programmers think, complex and convoluted the syntax, the better the language, especially taking rust as an example. Go has been successful in it’s niche as systems programming…

Zig and golang aren't solving the same problem as rust. Zig isn't memory safe, and golang achieves memory safety with the help of a GC.

Re: Common *nix commands written in Rust

#33

Earlier quoted context omitted.

Rust solve memory issues of C/C++ at the cost of simplicity and with convoluted, complicated syntax. It will bring in new class of bugs when it becomes popular enough and when large parts of Firefox are rewritten in it. I am not sure why some programmers think, complex and convoluted the syntax, the better the language, especially taking rust as an example. Go has been successful in it’s niche as systems programming…

Zig and golang aren't solving the same problem as rust. Zig isn't memory safe, and golang achieves memory safety with the help of a GC.

Go even with GC is very popular as systems programming language in its niche of writing network servers, can’t say the same about Rust except it’s in Fashion on HN, because it looks complex and difficult for programmers. Rust rely on underlying C library for doing anything useful today and still hasn’t demonstrated any real large benefits.

Zig helps programmer with tools to write memory safe programs by not shooting in foot with sane and easy syntax and memory allocator. Still like Rust it needs to prove, so time will tell whether marketing and fashion or simplicity and sanity wins. There are enough examples where fashion and marketing with minuscule benefits did win.

Re: Common *nix commands written in Rust

#34

Earlier quoted context omitted.

Zig and golang aren't solving the same problem as rust. Zig isn't memory safe, and golang achieves memory safety with the help of a GC.

Go even with GC is very popular as systems programming language in its niche of writing network servers, can’t say the same about Rust except it’s in Fashion on HN, because it looks complex and difficult for programmers. Rust rely on underlying C library for doing anything useful today and still hasn’t demonstrated any real large benefits. Zig helps programmer with tools to write memory safe programs by not shooting…

> Go even with GC is very popular as systems programming language in its niche of writing network servers

Nine times out of ten a network server isn't systems programming. And even at google, golang is starting to be banned for real systems use by some projects.

> Rust rely on underlying C library for doing anything useful today

Go relies on libraries everywhere except Linux too, because that's where the stable boundaries are.

And even in Linux it was a bad plan for them not to rely on the C lib, because they miss out on other system configuration stuff like locale information because of their choices there.

> Zig helps programmer with tools to write memory safe programs by not shooting in foot with sane and easy syntax and memory allocator.

So.. the same way C does?

Re: Common *nix commands written in Rust

#35
post #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…

I think you made a typo; long-wavelength is red, and blue is short wavelength.

Re: Common *nix commands written in Rust

#36

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.

The implementation language may be important if it promotes (and, with certain discipllne, guarantees) a lack of memory-access errors and a lack of data races.

This may be not as important in a replacement for `less` or `du` than in a HTTP or SMTP daemon, but still.

Re: Common *nix commands written in Rust

#38

Earlier quoted context omitted.

“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 o…

Rust solve memory issues of C/C++ at the cost of simplicity and with convoluted, complicated syntax. It will bring in new class of bugs when it becomes popular enough and when large parts of Firefox are rewritten in it. I am not sure why some programmers think, complex and convoluted the syntax, the better the language, especially taking rust as an example. Go has been successful in it’s niche as systems programming…

When it comes to syntax, it's always a personal feeling. For instance I always found Rust syntax much easier to work with than Go's (which looks really alien to me, with both var and :=, the type annotations which are C's but backwards, the syntax for structs methods, the several for syntax, the defer statement, etc.)

Actually I don't really understand why some people complain about Rust syntax. The only alien thing is the lifetime ('a) syntax, but you don't need it that often, and the concept behind it is way more difficult to learn than the syntax itself (and it's where Rust's breakthrough comes so you have to learn this concept anyway).

Re: Common *nix commands written in Rust

#39

Earlier quoted context omitted.

“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 o…

Rust solve memory issues of C/C++ at the cost of simplicity and with convoluted, complicated syntax. It will bring in new class of bugs when it becomes popular enough and when large parts of Firefox are rewritten in it. I am not sure why some programmers think, complex and convoluted the syntax, the better the language, especially taking rust as an example. Go has been successful in it’s niche as systems programming…

People who don't like Rust like to point at Zig as an alternative, but as long as it's developed by a single guy and there's a lot of breaking changes at each release, it isn't really an option. At this point this could still change a lot and even add a borrow checker! (Rust didn't start with it, it used to have a GC back in the 0.* releases)

Re: Common *nix commands written in Rust

#40

Earlier quoted context omitted.

Consider this. If a program is written in Python, and becomes popular, it is usually a matter of time before it gets rewritten in, and replaced by an implementation in a faster language. There are fast implementations (C) and there are somewhat safe implementations (Python, Java, ...). If I were to place Rust in this hierarcy - it is both fast AND safe, and there's rarely a good reason to replace it, so you've softwa…

Except Rust isn't a direct replacement for c. Rust's system requirements are perhaps acceptable for what'll be normal in computers five years from now. We don't need to re-stratify development so that only people with expensive computers with > 4 gigs of memory can compile what they run.

My laptop is a €500 bought in 2012 (it has 4Gb which is the minimum of every laptop since around 2010), and it runs rustc fine. Of course I'm not going to build a release version of any big project on it, but I won't be able to build Firefox or Chromium either on it.
Post reply on HN