Live data from Hacker News

Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command

github.com

1–10 of 170 posts

Re: Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command

#4
post #2

Lines of Code yes (GNU) 50 Yes-rs 1,302 (26x more) The cost benefit analysis on this will be interesting given this is 26X more code to manage, and could also introduce a whole new toolchain to build base.

yes-rs is a joke, not a serious project.

Re: Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command

#5
post #2

Lines of Code yes (GNU) 50 Yes-rs 1,302 (26x more) The cost benefit analysis on this will be interesting given this is 26X more code to manage, and could also introduce a whole new toolchain to build base.

I'd recommend peeking at the single source file in the repo, lol

Re: Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command

#6

The source is worth a look too: https://github.com/jedisct1/yes-rs/blob/main/src/main.rs

Until I actually went to read the code, I thought this was just a kinda lame overplayed joke, but the number of lines they listed made me really curious: how did they manage to beef up the SLOC that much? After reading a bit of the source code, I take it back. That's definitely venturing into the territory of art.

Re: Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command

#7
I feel like the safe equivalent of this is not to have it at all. You know when something FEELS wrong?

Like using selenium to automate a web task? Or like using javascript on the kernel? Or using C# on linux?

It just doesn't feel right to write an application whose mode of operation is unsafe (sending a string over IO) whose raison d'etre is unsafe (saying yes to everything without reading it), and to write it in a memory safe way.

It's like using a seatbelt when driving at 100mph, switching lanes in the highway, and drinking rum n coke(but with diet coke).

Re: Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command

#8
post #4
post #2

Lines of Code yes (GNU) 50 Yes-rs 1,302 (26x more) The cost benefit analysis on this will be interesting given this is 26X more code to manage, and could also introduce a whole new toolchain to build base.

yes-rs is a joke, not a serious project.

I agree that it's not a serious project, but I wouldn't call it a joke. Jokes are funny.

Re: Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command

#9
post #2

Lines of Code yes (GNU) 50 Yes-rs 1,302 (26x more) The cost benefit analysis on this will be interesting given this is 26X more code to manage, and could also introduce a whole new toolchain to build base.

If you are looking for a non-joke implementation[0]. Excluding the test code at the bottom, the Rust version is a bit less than 120 lines.

[0] https://github.com/uutils/coreutils/blob/main/src/uu/yes/src...

Re: Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command

#10
post #4

Earlier quoted context omitted.

yes-rs is a joke, not a serious project.

I agree that it's not a serious project, but I wouldn't call it a joke. Jokes are funny.

The README was meh but skimming the source code was amusing. If nothing else, they certainly committed to the bit.
Post reply on HN