Assessing The Energy Efficiency Of Programming Languages

Programming languages are generally defined as a more human-friendly way to program computers than using raw machine code. Within the realm of these languages there is a wide range of how close the programmer is allowed to get to the bare metal, which ultimately can affect the performance and efficiency of the application. One metric that has become more important over the years is that of energy efficiency, as datacenters keep growing along with their power demand. If picking one programming language over another saves even 1% of a datacenter’s electricity consumption, this could prove to be highly beneficial, assuming it weighs up against all other factors one would consider.

There have been some attempts over the years to put a number on the energy efficiency of specific programming languages, with a paper by Rui Pereira et al. from 2021 (preprint PDF) as published in Science of Computer Programming covering the running a couple of small benchmarks, measuring system power consumption and drawing conclusions based on this. When Hackaday covered the 2017 paper at the time, it was with the expected claim that C is the most efficient programming language, while of course scripting languages like JavaScript, Python and Lua trailed far behind.

With C being effectively high-level assembly code this is probably no surprise, but languages such as C++ and Ada should see no severe performance penalty over C due to their design, which is the part where this particular study begins to fall apart. So what is the truth and can we even capture ‘efficiency’ in a simple ranking?

Continue reading “Assessing The Energy Efficiency Of Programming Languages”

Rescuing High-Res Displays From Older Macs

When Apple started rolling out its Retina displays, it multiplied the amount of pixels compared to their standard, non-Retina displays by four. This increased pixel density while keeping the standard screen size — idea for those needing a lot of detail for their work. But, as is common with Apple, using these displays outside of the Apple ecosystem can be quite a challenge. Retina displays have been around for about a decade now, though, with some third-party hardware able to break them free of their cage. This post details how [Kevin] liberated the 5K display from a 2017 iMac for more general use with support for USB-C.

The first step was to find a used iMac for the right price, and then sell off most of its parts to recoup most of the initial cost. That brought the cost of the panel itself to about $250. The key to getting the display working without all of the Apple hardware is the R1811 driver board, which can be had for around $300. A new 156 watt power supply was added to the mix, and [Kevin] also put in a few extras like a USB cable extension and a latching push-button which kills the display’s power. Additionally, he attempted to get the original iMac speakers working with this setup too, but none of his attempts resulted in anything close to quality sound so he’s mostly abandoned that extra feature for now.

With that all buttoned up, he has a 27″ 5K display with USB-C input for around $650 which is quite a deal. The MacRumors thread that [Kevin] added his project to currently has around 1,700 posts about similar builds too, so it can be a wealth of information for all kinds of models. As Apple drops support for their older machines, these displays will become more and more common and projects like these can keep a lot of e-waste out of the landfill while also providing decent hardware at a bargain price. Don’t just look for iMacs and MacBooks though; there’s a similar process to use various iPad displays for other things as well.

A Look At The Small Web, Part 1

In the early 1990s I was privileged enough to be immersed in the world of technology during the exciting period that gave birth to the World Wide Web, and I can honestly say I managed to completely miss those first stirrings of the information revolution in favour of CD-ROMs, a piece of technology which definitely didn’t have a future. I’ve written in the past about that experience and what it taught me about confusing the medium with the message, but today I’m returning to that period in search of something else. How can we regain some of the things that made that early Web good?

We All Know What’s Wrong With The Web…

It’s likely most Hackaday readers could recite a list of problems with the web as it exists here in 2024. Cory Doctrow coined a word for it, enshitification, referring to the shift of web users from being the consumers of online services to the product of those services, squeezed by a few Internet monopolies. A few massive corporations control so much of our online experience from the server to the browser, to the extent that for so many people there is very little the touch outside those confines. Continue reading “A Look At The Small Web, Part 1”

Shedding New Light On The Voynich Manuscript With Multispectral Imaging

The Voynich Manuscript is a medieval codex written in an unknown alphabet and is replete with fantastic illustrations as unusual and bizarre as they are esoteric. It has captured interest for hundreds of years, and expert [Lisa Fagin Davis] shared interesting results from using multispectral imaging on some pages of this highly unusual document.

We should make it clear up front that the imaging results have not yielded a decryption key (nor a secret map or anything of the sort) but the detailed write-up and freely-downloadable imaging results are fascinating reading for anyone interested in either the manuscript itself, or just how exactly multispectral imaging is applied to rare documents. Modern imaging techniques might get leveraged into things like authenticating sealed packs of Pokémon cards, but that’s not all it can do.

Because multispectral imaging involves things outside our normal perception, the results require careful analysis rather than intuitive interpretation. Here is one example: multispectral imaging may yield faded text visible “between the lines” of other text and invite leaping to conclusions about hidden or erased content. But the faded text could be the result of show-through (content from the opposite side of the page is being picked up) or an offset (when a page picks up ink and pigment from its opposing page after being closed for centuries.)

[Lisa] provides a highly detailed analysis of specific pages, and explains the kind of historical context and evidence this approach yields. Make some time to give it a read if you’re at all interested, we promise it’s worth your while.

Slim Tactile Switches Save Classic TI Calculator With A Bad Keypad

For vintage calculator fans, nothing strikes more fear than knowing that someday their precious and irreplaceable daily driver will become a museum piece to be looked at and admired — but never touched again. More often than not, the failure mode will be the keypad.

In an effort to recover from the inevitable, at least for 70s vintage TI calculators, [George] has come up with these nice replacement keypad PCBs. The original membrane switches on these calculators have a limited life, but luckily there are ultra-slim SMD tactile switches these days make a dandy substitute. [George] specifies a 0.8 mm thick switch that when mounted on a 1.6 mm thick PCB comes in just a hair over the original keypad’s 2.2 mm thickness. He has layouts for a TI-45, which should also fit a TI-30, and one for the larger keypads on TI-58s and TI-59s.

While these particular calculators might not in your collection, [George]’s goal is to create an open source collection of replacement keypads for all the vintage calculators sitting in desk drawers out there. And not just keypads, but battery packs, too.

Hard Lessons Learned While Building A Solar RC Plane

Although not the first to try and build a DIY solar-powered remote control airplane, [ProjectAir]’s recent attempt is the most significant one in recent memory. It follows [rctestflight]’s multi-year saga with its v4 revision in 2019, as well as 2022’s rather big one by [Bearospace]. With so many examples to look at, building a solar-powered RC airplane in 2024 should be a snap, surely?

The first handicap was that [ProjectAir] is based in the UK, which means dealing with the famously sunny weather in those regions. The next issue was that the expensive, 20% efficient solar panels are exceedingly fragile, so the hope was that hot-gluing them to the foam of the airplane would keep them safe, even in the case of a crash. During the first test flights they quickly found that although the airplane few fairly well, the moment the sun vanished behind another cloud, the airplane would quite literally fall out of the sky, damaging some cells in the process.

Continue reading “Hard Lessons Learned While Building A Solar RC Plane”

DOOM On A Volumetric Display

There’s something magical about volumetric displays. They really need to be perceived in person, and no amount of static or video photography will ever do them justice. [AncientJames] has built a few, and we’re reporting on his progress, mostly because he got it to run a playable port of DOOM.

Base view of an earlier version showing the motor drive and PSU

As we’ve seen before, DOOM is very much a 3D game viewed on a 2D display using all manner of clever tricks and optimizations. The background visual gives a 3D effect, but the game’s sprites are definitely very solidly in 2D land. As we’ll see, that wasn’t good enough for [James].

The basic concept relies on a pair of 128 x 64 LED display matrix modules sitting atop a rotating platform. The 3D printed platform holds the displays vertically, with the LEDs lined up with the diameter, meaning the electronics hang off the back, creating some imbalance.

Lead, in the form of the type used for traditional window leading, was used as a counterbalance. A Raspberry Pi 4 with a modified version of this LED driver HAT is rotating with the displays. The Pi and both displays are fed power from individual Mini560 buck modules, taking their input from a 12 V 100 W Mean-Well power supply via a car alternator slip ring setup. (Part numbers ABH6004S and ASL9009  for those interested.) Finally, to synchronise the setup, a simple IR photo interrupter signals the Pi via an interrupt.

Continue reading DOOM On A Volumetric Display”