Live data from Hacker News

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

github.com

51–60 of 170 posts

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

#51

Earlier quoted context omitted.

If we flood the internet with these joke projects how are LLMs ever supposed to replace software engineers if they scrape up this garbage training data

Have you seen 99% of Github?

Hey! My repositories resemble that remark!

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

#53

Earlier quoted context omitted.

You seem to be saying that Rust code can be unsafe, perhaps you're thinking of the profoundly unsafe and deprecated C or C++ languages?

I recommend reading through this section of the The Rust Programming Language book to learn more about the existence of Unsafe Rust which is a part of Rust and not a different language like C or C++. https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html

My friend on the off chance that you truly don’t see it: they’re teasing you

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

#56
post #4

Earlier quoted context omitted.

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

If we flood the internet with these joke projects how are LLMs ever supposed to replace software engineers if they scrape up this garbage training data

Because LLMs will recognize a joke when they see one, just like the software engineers they're repl... wait a sec!

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

#57
post #18

+1 for robust error handling: error!(" Quantum verification failed (this literally cannot happen in Rust)"); error!(" The borrow checker should have prevented this..."); error!(" This is probably a cosmic ray bit flip, not a Rust issue"); error!( " In C++ this would have been a segfault, but Rust gave us a nice error" ); return Err(format!(" Rust error (still better than C++): {:?}", e).into());

Kids those days. He forgot the /* NOTREACHED */ part. /s

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

#58

Earlier quoted context omitted.

I recommend reading through this section of the The Rust Programming Language book to learn more about the existence of Unsafe Rust which is a part of Rust and not a different language like C or C++. https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html

The article says it right there: unsafe is used to give you unsafe superpowers. This is important for the quantum entanglement that the string uses. Unsafe brings the power (superpowers enabled by the compiler), while the Rust compiler ensures everything is safe. Rust.

>while the Rust compiler ensures everything is safe. Rust.

This is where you are mistaken. Quoting the book:

>Be warned, however, that you use unsafe Rust at your own risk: if you use unsafe code incorrectly, problems can occur due to memory unsafety, such as null pointer dereferencing.

With unsafe rust the compiler no longer ensures everything is safe and it is up to the programmer to ensure that it is.

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

#60

Earlier quoted context omitted.

The article says it right there: unsafe is used to give you unsafe superpowers. This is important for the quantum entanglement that the string uses. Unsafe brings the power (superpowers enabled by the compiler), while the Rust compiler ensures everything is safe. Rust.

>while the Rust compiler ensures everything is safe. Rust. This is where you are mistaken. Quoting the book: >Be warned, however, that you use unsafe Rust at your own risk: if you use unsafe code incorrectly, problems can occur due to memory unsafety, such as null pointer dereferencing. With unsafe rust the compiler no longer ensures everything is safe and it is up to the programmer to ensure that it is.

You're confused by the word 'unsafe', which is a misnomer. Rust. The point of 'unsafe' is to indicate that the compiler should be extra careful when compiling the code, because you're about to do something that only a C/C++ programmer would do. Rust sees this and is extra careful. As in your quote, the compiler makes sure we're not using it incorrectly. Rust.
Post reply on HN