News for hackers. Stuff that matters.
Re:The Resurgence of C Programming by Manishearth on Tuesday December 27, 2016 @02:38PM (#13265592)
> I really don't see what the fuss is about about 'replacing' it really. It's a sharp tool, requiring care and attention.

I really like the take on the "sharp tools" analogy here: https://www.schneems.com/2016/08/16/sharp-tools.html . Your tool might be sharp, but that doesn't mean that you can't make it safer to use.

Re:The Resurgence of C Programming by Sanddancer on Tuesday December 27, 2016 @04:15PM (#13266245)
The C/C++ toolchain has been working to add guards and guides to their sharp tools. Things like the various sanitizers in the llvm toolset have already meant that a lot of bugs that would have been released are instead fixed beforehand. You also have things like OpenBSD's implementation of malloc which also helps in the software feedback loop in finding logic errors that allow for things like use after free errors. C still requires attention, but there are a lot of places where it's harder to cut yourself.
Re:The Resurgence of C Programming by buserror on Tuesday December 27, 2016 @04:27PM (#13266348)
I personally use libtalloc [0] for my allocations in C. Small footprint, excellent feature set, and it has heap checks, reference counting and all the gizmos you'd like in an allocation library. It's actually awesome, I highly recommend it.

For C 'gotcha' cleanups, you can use cppcheck of course (highly recommended) but there's also 'scan-build' the static analyzed from clang.

[0]: https://talloc.samba.org/talloc/doc/html/index.html

Re:The Resurgence of C Programming by RustyRussell on Tuesday December 27, 2016 @05:31PM (#13266784)
Love talloc: just taking the opportunity to plug ccan/tal which I wrote after hacking on talloc for a bit:

http://ccodearchive.net/info/tal.html

Re:The Resurgence of C Programming by buserror on Tuesday December 27, 2016 @05:40PM (#13266861)
Cool, why the parallel project, if I may ask? What did you find you needed 'better' than talloc? :-)
Re:The Resurgence of C Programming by nickpsecurity on Tuesday December 27, 2016 @04:51PM (#13266507)
Case in point:

https://www.youtube.com/watch?v=eiYoBbEZwlk

Maybe we need to use your sharp tools point with that video. It drives the point home with even experienced people losing fingers to their tools followed by tech modified to prevent it. The demo also never gets old. Just too badass.

Re:The Resurgence of C Programming by PavlovsCat on Tuesday December 27, 2016 @03:55PM (#13266105)
That thing looks like it could kill a man if dropped from sufficient height. On the other hand, if I envision it without a case, I'm still not seeing a terribly dangerous object.

> This design is an evolution of planes over centuries of use

How did early ones look like then? Was getting hurt by them a problem, at all?

I'm not debating that main point, that in many cases, safety and usefulness are orthogonal. But that example is kind of worse than none.