Live data from Hacker News

Rav1e: An experimental AV1 video encoder, designed to be fast and safe

github.com

51–60 of 76 posts

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#51
post #47
post #29

Earlier quoted context omitted.

> I always wondered if in practice it really checks out, is rust code really safer? Did the bugs just shift to different ones? Bugs don't magically "shift". If you eliminate a class of bugs, it's gone (e.g. memory bugs). Whether you can still have other bugs (e.g. logic bugs) that's irrelevant, you could still have those in C as well.

>Bugs don't magically "shift". It depends... You can’t have dangling pointers in Java - instead, you can “leak” memory by holding onto your objects even when they’re not needed anymore.

I don't think you are using "instead" correctly in that sentence.

You are implying that not being able to have dangling pointers in Java (and thus eliminating an entire category of bugs) inevitably leads to the new category of bugs of leaking memory by holding on to references. But that is the case in any language that allows dynamic memory allocation. You can leak memory in Rust, C++ and VB if you don't dealloc.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#52
post #48
post #33

Earlier quoted context omitted.

I bet Unisys MCP deployments still matter to more than 5 people. Plus the point was to talk about safe systems programming languages in general. Or should we ignore history just because UNIX won on the server?

What’s this “UNIX”? A Linux distribution?

I know you are trolling, but there you go.

https://en.wikipedia.org/wiki/History_of_Unix

https://en.wikipedia.org/wiki/Unix

https://en.wikipedia.org/wiki/POSIX

http://www.opengroup.org/standards/unix

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#53
post #13

Earlier quoted context omitted.

"Written in Rust"

I'm trying to get my insurance discounted on my car. I should slap a "written in Rust" sticker on it. Safe driver discount?

Given that automotive control software is apparently a huge mess right now, and a rapidly growing attack surface, a more disciplined rewrite in Rust might actually be enough for an insurance company to consider...

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#54
post #52
post #48

Earlier quoted context omitted.

What’s this “UNIX”? A Linux distribution?

I know you are trolling, but there you go. https://en.wikipedia.org/wiki/History_of_Unix https://en.wikipedia.org/wiki/Unix https://en.wikipedia.org/wiki/POSIX http://www.opengroup.org/standards/unix

His point is probably UNIX didn't won -- Linux did.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#55
post #47
post #29

Earlier quoted context omitted.

> I always wondered if in practice it really checks out, is rust code really safer? Did the bugs just shift to different ones? Bugs don't magically "shift". If you eliminate a class of bugs, it's gone (e.g. memory bugs). Whether you can still have other bugs (e.g. logic bugs) that's irrelevant, you could still have those in C as well.

>Bugs don't magically "shift". It depends... You can’t have dangling pointers in Java - instead, you can “leak” memory by holding onto your objects even when they’re not needed anymore.

Part of my point would be that you can have that in C as well.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#56
post #54
post #52

Earlier quoted context omitted.

I know you are trolling, but there you go. https://en.wikipedia.org/wiki/History_of_Unix https://en.wikipedia.org/wiki/Unix https://en.wikipedia.org/wiki/POSIX http://www.opengroup.org/standards/unix

His point is probably UNIX didn't won -- Linux did.

Linux is non-certified copy of UNIX, without POSIX it wouldn't matter in the marketplace, ergo UNIX won.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#57
post #7
post #6

Earlier quoted context omitted.

I always wondered if in practice it really checks out, is rust code really safer? Did the bugs just shift to different ones? Is there anyone who wrote about that already?

It's probably not quite equivalent but I believe Frederico & al found & fixed a number of issues when they converted librsvg to rust. You may want to check the archives on their blogs (IIRC it's split between Frederico's own and the librsvg one) for more, or specifics. But "safe" rust at least intrinsically protects from use-after-free, double free, dangling pointers, null-pointer dereferences, out-of-bounds accesses…

While I do believe that rust will prevent many memory safety issues. I think you would probably catch a bunch of safety issues rewriting any code.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#58
post #7
post #6

Earlier quoted context omitted.

I always wondered if in practice it really checks out, is rust code really safer? Did the bugs just shift to different ones? Is there anyone who wrote about that already?

It's probably not quite equivalent but I believe Frederico & al found & fixed a number of issues when they converted librsvg to rust. You may want to check the archives on their blogs (IIRC it's split between Frederico's own and the librsvg one) for more, or specifics. But "safe" rust at least intrinsically protects from use-after-free, double free, dangling pointers, null-pointer dereferences, out-of-bounds accesses…

All of the pointer issues you mentioned have already been solved in C++ by unique_ptr.

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#59
post #53
post #13

Earlier quoted context omitted.

I'm trying to get my insurance discounted on my car. I should slap a "written in Rust" sticker on it. Safe driver discount?

Given that automotive control software is apparently a huge mess right now, and a rapidly growing attack surface, a more disciplined rewrite in Rust might actually be enough for an insurance company to consider...

PDXRust just had a related talk, "Writing Software That's Safe Enough To Drive A Car": https://www.meetup.com/PDXRust/events/252160920/

Re: Rav1e: An experimental AV1 video encoder, designed to be fast and safe

#60
post #7

Earlier quoted context omitted.

It's probably not quite equivalent but I believe Frederico & al found & fixed a number of issues when they converted librsvg to rust. You may want to check the archives on their blogs (IIRC it's split between Frederico's own and the librsvg one) for more, or specifics. But "safe" rust at least intrinsically protects from use-after-free, double free, dangling pointers, null-pointer dereferences, out-of-bounds accesses…

All of the pointer issues you mentioned have already been solved in C++ by unique_ptr.

Good, now try to enforce developers to actually use it on their code and all third party libraries they link to.

Ah, and not passing it around by address or reference, instead of actually moving ownership.

C++17 is a great improvement, but for it to work out in this context, developers need to actually write C++ instead of "C with C++ compiler".

Post reply on HN