by gdrift on 11/18/21, 9:47 PM with 127 comments
by wfleming on 11/18/21, 10:59 PM
by scoofy on 11/18/21, 11:39 PM
We are in the midst of a serious crisis, we know the reasonable solutions we should be taking to avoid catastrophe, and we are collectively choosing to ignore them. It should be treated seriously. If we're going to joke about it, it should be dark comedy.
by Mikeb85 on 11/18/21, 11:25 PM
Can you create a web framework in C that has as many features as Rails or Django? And what's the power consumption of that?
Higher level languages do more stuff. It's not like Guido and Matz just woke up one day and were like "fuck your CPU".
Plus, compilation requires a decent amount of power, as shown in those graphs. Does every C/C++ project run perfectly with no bugs the first time?
by aejnsn on 11/18/21, 11:36 PM
by H8crilA on 11/18/21, 11:19 PM
by whateveracct on 11/18/21, 10:45 PM
by neuroscihacker on 11/18/21, 11:36 PM
https://towardsdatascience.com/high-performance-code-pays-di...
"The climate crisis threatens human civilization on a grand scale and electricity is frequently produced from fossil fuel. Electricity is then consumed by the operation of computer code. Google alone used 12.8 Terrawatt-hours in 2019 according to its 2020 environmental report, more than many countries and more than several US states. It seems intuitive that improving code efficiency should reduce environmental impact. Does it?
The answer is not at all clear and must be considered on a system by system basis. The main reason is induced demand.
...it will take a centrally coordinated process at both national and international levels that can allocate energy to different industrial and consumer sectors and manage the energy production mix on behalf of the whole of society. Only then we can solve this problem in a rational way that doesn’t depend on luck.
In fairness, software companies aren’t power companies, it’s a little ridiculous to expect them to build their own generation. What we can more expect from them is to pay taxes, divest from fossil fuel companies if they hold securities, and hold their total energy consumption under a ceiling set by a regulator while the society changes the energy mix as fast as possible."
by wheelerof4te on 11/18/21, 11:45 PM
Different languages were made with a reason, and they solve different problems. Even Python can be efficient when your largest bottleneck is network or disk IO.
Nowadays we have Rust, which is slowly catching up to C speed, and sometimes even surpasses it.
C is a beautiful language when used in embedded space, where memory allocations are minimal. Once you start throwing mallocs left and right, you lose that simple elegance.
by benibela on 11/19/21, 12:07 AM
From that paper, only C and Pascal, are optimal for energy and memory usage.
And Pascal has memory safe strings with reference counting. C is just too unsafe. 70% of all security issues are caused by C.
by megous on 11/19/21, 12:14 AM
by rodmena on 11/18/21, 10:50 PM
C or any "so called" efficient languages are wonderful for their use cases. Python or Erlang have other use cases. We have all of those languages for a reason.
by Zababa on 11/18/21, 11:17 PM
by jancsika on 11/18/21, 11:12 PM
Now I have proof it wasn't.
Thanks, C++.
by francisl on 11/19/21, 4:46 AM
That includes defects,
It's one of many reasons I like new compiled/vm languages like Go, Swift, Nim F#. You got the productivity of python, but near the performance of C. User wins, dev wins and planet wins.
by henning on 11/18/21, 11:33 PM
by synergy20 on 11/18/21, 11:10 PM
From the best analysis it does seem modern c++ could be the optimal performance/energy/speed/safety choice.
And yes I'm a proud c/c++ programmer.
by hmrr on 11/18/21, 11:26 PM
That stab is mostly aimed in the direction of C# and Java
by yayr on 11/18/21, 11:33 PM
one could argue, that programming languages that are more close to the mind are more efficient. At least when looking at 2nd to n-th order efficiency effects, not just pure runtime performance.
by ac42 on 11/19/21, 3:53 AM
by tomohawk on 11/18/21, 11:31 PM
Could it have been even better in C? Probably, but it was a lot easier to conceptualize and properly choose the architectural features that made the difference using ruby.
These days I would have done the rewrite in golang, and had the best of both worlds.
by mclightning on 11/19/21, 8:51 AM
by sn9 on 11/19/21, 2:10 AM
Could we get something as flexible and expressive and ergonomic as React or Vue with the performance of WASM?
by Tozen on 11/19/21, 4:43 PM
by anthk on 11/18/21, 11:31 PM
2) There is a gopher proxy for HN: gopher://gopherddit.com
3) Use CLI tools, avoid JS ridden apps. If so, download the video and use mpv offline. Many times less power wasting.
by smoldesu on 11/18/21, 9:52 PM
by tehsauce on 11/18/21, 11:27 PM
by uncomputation on 11/18/21, 11:19 PM
by mberning on 11/18/21, 11:01 PM
by ofou on 11/18/21, 11:44 PM
by Minor49er on 11/18/21, 10:45 PM
by alcover on 11/18/21, 11:29 PM
But this won't last. Many energy sources and metals are peaking and I can imagine a day when efficiency will count heavily.