Title is a bit clickbaity, but the authror has a point. We're doing the same things as before but wasting huge amounts of computer power.<p>Been my position for quite some time. But you can imagine it doesn't go down well on HN. Here latest language/machine/etc is of great interest, and keeping-up-with-the-xxxs is normally seen as vital :(
mmm... the assertion that C is subject to bit-rot because it's maintainers keep adding fancy new features doesn't seem to be supported by the factual record. I wonder what compiler they're using that makes them think the language changes so often that you have to keep coming back to the source every couple years to repair it. Rust and Python have that problem, of course, but there's code I wrote in 1982 that still compiles with gcc and clang (and seems to do the same thing it did when compiled with whatever compiler was on 3B2's in the 80s.)
> Why are modern technologies so energy inefficient?<p>First off, framing this as "inefficiency" seems inappropriate because we are not doing comparison of identical things.<p>If the output of each language was identical and one spent less energy than the other to produce it, we could frame it this way successfully.<p>Next, this question isn't unlike asking: "why is my bicycle more efficient than my car?"<p>Well, once again, it's not a 1-1 comparison. The car is doing more work, able to carry more weight further. It is using more energy but it is quite likely more efficient than your bicycle. Plus, it allows you to accomplish things your bike never could.<p>Similarly C is doing the least work (hence seemingly more efficient) while JS is doing the most. Sure not all that work JS is doing is "useful" work but Rust version for example is likely more secure, so it is still "better" and possibly more efficient than the C version. All the work that C is not doing, like checking for buffer overflows, makes it look like it is more efficient but that's not the kind of efficiency we really want.<p>There is real inefficiency in using existing libraries (in any language) rather than tailoring every method to the application at hand. That's an economic trade off as mentioned by others and has nothing to do with energy efficiency
My C is rusty, but what happens if "handle_request" gets a request that's BUFFER_SIZE+1 "A"s?<p>Seems to me like "read" will read exactly BUFFER_SIZE "A"s and no null-terminator, causing the subsequent "strsep" to find the first \n... someplace in memory (after the buffer) and overwrite it with a null-terminator.