News for hackers. Stuff that matters.
Re:The Resurgence of C Programming by jstewartmobile on Tuesday December 27, 2016 @01:02PM (#13264722)
Given that clock speeds are pooping out, this makes total sense. Things already seem to be moving to an even lower level when performance really matters (shaders, FPGAs, etc). C looks fairly forgiving after implementing things in verilog.

For the "why not X" crowd, the problem is that there are very few Xs out there with 30+ years of code to build off of. That, and it's almost a psychosis among us CS grads to overestimate the magic that "better" languages are capable of.

Re:The Resurgence of C Programming by nine_k on Tuesday December 27, 2016 @01:29PM (#13264932)
I don't hear much about performance problems causing major trouble in popular software and making everyone patch things in haste.

For unsafe memory management errors leading to RCEs it's a different story. Guess what language are the patches usually in.

Re:The Resurgence of C Programming by jstewartmobile on Tuesday December 27, 2016 @01:39PM (#13265004)
Not everyone has the same usage case. For general user applications, yeah, performance isn't that big of a deal. That's not the entirety of computing though.

Some people do things where performance is crucial. This is probably why Intel is moving into the FPGA space and Google is making their own accelerators for machine learning.

Re:The Resurgence of C Programming by nine_k on Tuesday December 27, 2016 @01:56PM (#13265178)
Absolutely. People who write games or audio / video software sometimes even do hand-written assembly fragments.

The very high-performance things are a relatively narrow area, and an area where C can easily lose to e.g. Fortran.

Also, for ML stuff you likely don't have a huge entrenched C codebase yet. You are freer to choose a more expressive language, and only hand-optimize / rewrite in C a small amount of hot paths.

Re:The Resurgence of C Programming by shepardrtc on Tuesday December 27, 2016 @02:23PM (#13265448)
Regardless of what glue language you use to write ML stuff, if you follow it down to its core, most of it is going to use a BLAS library to do matrix multiplication. That's where the heavy lifting is. And BLAS libraries are in C/C++ or Fortran. For example, OpenBLAS or Intel MKL.
Re:The Resurgence of C Programming by nine_k on Tuesday December 27, 2016 @02:53PM (#13265709)
BLAS Level 1 was released in 1979, thirty seven years ago.

There was no other comparable language to implement it in besides Fortran. C was a newcomer at the time, like Rust currently is.

The amount of optimization and edge-case handling work that went into BLAS since then is enormous.

BTW, Fortran, being mostly aliasing-free, is a safer language than C, and more optimizaton-friendly.

Re:The Resurgence of C Programming by Gracana on Tuesday December 27, 2016 @03:23PM (#13265911)
I thought Fortran's aliasing-free rule was just an assumption of the compiler, not something that it actually enforced.. so you could very easily write code that contained aliasing bugs.
Re:The Resurgence of C Programming by lgeek on Tuesday December 27, 2016 @02:13PM (#13265356)
> For general user applications, yeah, performance isn't that big of a deal.

Maybe if you use recent, powerful machines and don't particularly care about energy efficiency. In my experience with less powerful machines, the applications which tend to be noticeably slow are exactly the widely used 'general user applications': of the ones I use, Firefox, Chromium, LibreOffice and Thunderbird.

Re:The Resurgence of C Programming by sdegutis on Tuesday December 27, 2016 @01:52PM (#13265135)
In fact, C (with SDL2) seems perfect for writing a retro video game. Memory leaks aren't usually a concern, because most memory is allocated up-front to save time and give very predictable and consistent performance. And most video game logic is very simple to do using simple functions, pointers, and structs, without the need for higher-level constructs like closures and GC which make a lot more sense for a mobile TODO-list app than for a video game. At least that's my experience, but obligatory disclaimer: I've never finished writing a video game (yet!) :D
Re:The Resurgence of C Programming by blub on Wednesday December 28, 2016 @06:19AM (#13269840)
You don't hear about it because one can't "patch things in haste" to fix performance issues caused by choosing the wrong programming language for the problem at hand.

Instead one hears complaints about Python's GIL, hears about people moving to golang, about this new thing called Rust, about a C and C++ resurgence and so on.

Re:The Resurgence of C Programming by pekk on Tuesday December 27, 2016 @04:51PM (#13266513)
"Guess what language are the patches usually in." Patches are most likely to be in the languages used most in the most popular projects. That's just the rational prior.
Re:The Resurgence of C Programming by steveklabnik on Tuesday December 27, 2016 @05:13PM (#13266657)
This assumes that all languages have an equal propensity for vulnerabilities. Many people would challenge this assumption.
Re:The Resurgence of C Programming by dispose13432 on Tuesday December 27, 2016 @08:58PM (#13267879)
>I don't hear much about performance problems causing major trouble in popular software and making everyone patch things in haste.

How did nginx unseat apache?