News for hackers. Stuff that matters.
Re:Tales of the M1 GPU by tomjakubowski on Tuesday November 29, 2022 @09:00PM (#33795998)
I agree that Rust is the better language because it gives you the safe tools by default.

Smart pointers are no panacea for memory safety in C++ though: even if you use them fastidiously, avoiding raw pointer access, iterator invalidation or OOB access will come for you. The minute you allocate and have to resize, you're exposed.

Re:Tales of the M1 GPU by dagmx on Tuesday November 29, 2022 @11:31PM (#33797050)
Yeah that’s definitely true. Anytime I use any C++ api that I did not write or analyze at my best is a shotgun waiting to go off. Hell, even then, that assumes I know enough to catch everything. I’ve recently been doing security analysis of some very popular repos and C++ is terrifying at times.

Rust isn’t perfect but it gives me so much more trust in everything I do.