News for hackers. Stuff that matters.
Re:Memory Safe Languages in Android 13 by yosefk on Thursday December 01, 2022 @04:35PM (#33823159)
Everybody who works with Maya, Flash (now Adobe Animate) etc. knows that they crash all the time, and often corrupt files so you back them up every hour or so. Carmack insists, in a gaming context, to run heavyweight, high-false-positive-rate static analyzers because users don't like crashes.

When C++ dies (which in 20 years it will, and I wasn't that hopeful 20 years ago), people will look in the same bewilderment at excuses made for its insane behavior as they look now at mid-20th-century arguments against high-level languages (and assemblers before them - like Mel said, "you never know where it will put things so you'd have to use separate constants.")

Re:Memory Safe Languages in Android 13 by Taywee on Thursday December 01, 2022 @04:41PM (#33823247)
> which in 20 years it will, and I wasn't that hopeful 20 years ago

That's too optimistic. C++ would easily die in 20 years if it didn't already have 30+ years of still-active legacy that can't easily be converted or rewritten.

I've recently even had to start new projects in C++ because platforms I depend on demand it or because I have to interface with existing code and libraries that still only exist as C++. I'm not a fan of the language by any means, but I'll eat my shoe if it's "dead" in 20 years for anything except maybe greenfield development.

Re:Memory Safe Languages in Android 13 by yosefk on Thursday December 01, 2022 @04:44PM (#33823290)
Dead - no, dying COBOL-style - quite possibly.
Re:Memory Safe Languages in Android 13 by humanrebar on Friday December 02, 2022 @08:22AM (#33830102)
How much C and C++ do we have now? How much COBOL did we have at it's peak? I'm not sure the analogy holds for that reason alone.

What if the better analogy is updating building codes in Manhattan?

Re:Memory Safe Languages in Android 13 by berkut on Thursday December 01, 2022 @04:47PM (#33823338)
At least in VFX, at the high-end Maya's only really used for modelling/UVing/layout now, other apps have taken over the rendering/lighting side of things...

But anyway, in my experience a lot of the crashes are often due to quickly hacked together plugins for the various DCCs written for artists, that don't have good error checking or testing, and it's not completely clear to me how that situation's going to improve that much with something like Rust, if the same programmer time constraints are going to exist in writing them: i.e. I think it's very likely people will just unwrap() their way to getting things to compile instead of correctly handling errors, so it will be the same situation from the artists' perspective: technically it may be a panic rather than a segfault, but from the artists' perspective, it will likely be identical and take the DCC down.

Re:Memory Safe Languages in Android 13 by estebank on Thursday December 01, 2022 @05:13PM (#33823692)
panics can be caught and the presence of those unwraps come with enough data that filing a bug report upstream is helpful enough to fix the bug.
Re:Memory Safe Languages in Android 13 by berkut on Thursday December 01, 2022 @05:20PM (#33823787)
Sure, but that (we do it) happens currently with C/C++ and signal handler traps which gather the callstack and collate them: the issue isn't usually that we don't know the crashes aren't happening or having the call stacks - the issue is hacky code that was written for one purpose is now being used for other things it wasn't designed for (because it is useful to artists, despite its limitations), and there isn't the time to go back and write it properly for the new expanded use-case. That's my point: a new safer language isn't going to improve much in this area without more development time provided to write better code, given the time constraints are going to be the same as they are currently.
Re:Memory Safe Languages in Android 13 by estebank on Thursday December 01, 2022 @05:44PM (#33824047)
It does change the situation if the plugin throws an exception on errors instead of causing a segfault that brings down the parent application.
Re:Memory Safe Languages in Android 13 by ilyt on Friday December 02, 2022 @07:04AM (#33829440)
I kinda hate .unwrap() even exists, it leads to excessively shitty error messages with no good context