MoreRSS

site iconHackadayModify

Hackaday serves up Fresh Hacks Every Day from around the Internet. Our playful posts are the gold-standard in entertainment for engineers and engineering enthusiasts.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of Hackaday

Windows? Linux? Browser? Same Executable

2026-01-15 17:00:30

We’ve been aware of projects like Cosmopolitan that allow you to crank out a single executable that will run on different operating systems. [Kamila] noticed that the idea was sound, but that the executables were large and there were some limitations. So she produced a 13K file that will run under Windows, Linux, or even in a Web browser. The program itself is a simple snake game.

There seems to be little sharing between the three versions. Instead, each version is compressed and stitched together so that each platform sees what it wants to see. To accommodate Windows, the file has to start with a PE header. However, there is enough flexibility in the header that part of the stub forms a valid shell script that skips over the Windows code when running under Linux.

So, essentially, Windows skips the “garbage” in the header, which is the part that makes Linux skip the “garbage” in the front of the file.

That leaves the browser. Browsers will throw away everything before an <HTML> tag, so that’s the easy part.

Should you do this? Probably not. But if you needed to make this happen, this is a clear template for how to do it. If you want to go back to [Kamila’s] inspiration, we’ve covered Cosmopolitan and its APE format before.

Philips Kid’s Kit Revisited

2026-01-15 14:00:04

[Anthony Francis-Jones], like us, has a soft spot for the educational electronic kits from days gone by. In a recent video you can see below, he shows the insides of a Philips EE08 two-transistor radio kit. This is the same kit he built a few months ago (see the second video, below).

Electronics sure look different these days. No surface mount here or even printed circuit boards. The kit had paper cards to guide the construction since the kit could be made into different circuits.

The first few minutes of the video recap how AM modulation works. If you skip to about the ten-minute mark, you can see the classic instruction books for the EE08 and EE20 kits (download a copy in your favorite language), which were very educational.

There were several radios in the manual, but the one [Anthony] covers is the two-transistor version with a PNP transistor as a reflex receiver with a diode detector with a second transistor as an audio power amplifier.

We covered [Anthony’s] original build a few months ago, but we liked the deep dive into how it works. We miss kits like these. And P-Boxes, too.

Making Code a Hundred Times Slower With False Sharing

2026-01-15 11:00:44

The cache hierarchy of the 2008 Intel Nehalem x86 architecture. (Source: Intel)
The cache hierarchy of the 2008 Intel Nehalem x86 architecture. (Source: Intel)

Writing good, performant code depends strongly on an understanding of the underlying hardware. This is especially the case in scenarios like those involving embarrassingly parallel processing, which at first glance ought to be a cakewalk. With multiple threads doing their own thing without having to nag the other threads about anything it seems highly doubtful that even a novice could screw this up. Yet as [Keifer] details in a recent video on so-called false sharing, this is actually very easy, for a variety of reasons.

With a multi-core and/or multi-processor system each core has its own local cache that contains a reflection of the current values in system RAM. If any core modifies its cached data, this automatically invalidates the other cache lines, resulting a cache miss for those cores and forcing a refresh from system RAM. This is the case even if the accessed data isn’t one that another core was going to use, with an obvious impact on performance. As cache lines are a contiguous block of data with a size and source alignment of 64 bytes on x86, it’s easy enough to get some kind of overlap here.

The worst case scenario as detailed and demonstrated using the Google Benchmark sample projects, involves a shared global data structure, with a recorded hundred times reduction in performance. Also noticeable is the impact on scaling performance, with the cache misses becoming more severe with more threads running.

A less obvious cause of performance loss here is due to memory alignment and how data fits in the cache lines. Making sure that your data is aligned in e.g. data structures can prevent more unwanted cache invalidation events. With most applications being multi-threaded these days, it’s a good thing to not only know how to diagnose false sharing issues, but also how to prevent them.

Dad Makes Kid’s Balance Bike Into Electric Snow Trike Like a Boss

2026-01-15 08:00:47

The balance bikes toddlers are rocking these days look like great fun, but not so great in the snow. Rather than see his kid’s favourite toy relegated to shed until spring, [John Boss] added electric power, and an extra wheel to make one fun-looking snow trike. Like a boss, you might say.

Physically, the trike is a delta configuration: two rear wheels and one front, though as you can see the front wheel has been turned into a ski. That’s not the most stable configuration, but by shifting the foot pegs to the front wheel and keeping the electronics down low, [John] is able to maintain a safe center of gravity. He’s also limiting the throttle so kiddo can’t go dangerously fast– indeed, the throttle control is in the rear electronics component. The kid just has a big green “go” button.

Bit-banging the throttle, combined with the weight of the kiddo up front, creates a strong tendency towards wheel-spin, but [John] fixes that with a some cleverly printed TPU paddles zip-tied to the harbor-freight wheels and tires he’s hacked into use. Those wheels are fixed to a solid axle that’s mounted to flat plate [John] had made up to attach to the bike frame. It’s all surprisingly solid, given that [John] is able to demonstrate the safety factor by going for a spin of his own. We would have done the same.

We particularly like the use of a tool battery for hot-swappable power. This isn’t the first time we’ve seen a kid’s toy get the tool battery treatment, but you aren’t limited to mobile uses. We’ve seen the ubiquitous 18V power packs in everything from fume extractors to a portable powerpack that can even charge a Tesla.

A New Life For An Old Amplifier

2026-01-15 05:00:28

An audio amplifier was once a fairly simple analogue device, but in recent decades a typical home entertainment amplifier will have expanded to include many digital functions. When these break they are often proprietary and not easy to repair, as was the case with a broken Pioneer surround-sound device given to [Boz]. It sat on the shelf for a few years until he had the idea of a jukebox for his ripped CDs, and his returning it to life with a new main board is something to behold.

Internally it’s a surprisingly modular design, meaning that the front panel with its VFD display and driver were intact and working, as were the class AB amplifier and its power supply. He had the service manual so reverse engineering was straightforward, thus out came the main board in favor of a replacement. He took the original connectors and a few other components, then designed a PCB to take them and a Raspberry Pi Pico and DAC. With appropriate MMBASIC firmware it looks as though it was originally made this way, a sense heightened by a look at the motherboard inside (ignoring a couple of bodges).

We like seeing projects like this one which revive broken devices, and this one is particularly special quality wise. We’re more used to seeing it with gaming hardware though.

FLOSS Weekly Episode 860: Elixir Origin Story

2026-01-15 03:30:18

This week Jonathan and Randal chat with Jose Valim about Elixir! What led Jose to create this unique programming language? What do we mean that it’s a functional language with immutability?

Did you know you can watch the live recording of the show right on our YouTube Channel? Have someone you’d like us to interview? Let us know, or have the guest contact us! Take a look at the schedule here.

Direct Download in DRM-free MP3.

If you’d rather read along, here’s the transcript for this week’s episode.

Places to follow the FLOSS Weekly Podcast:


Theme music: “Newer Wave” Kevin MacLeod (incompetech.com)

Licensed under Creative Commons: By Attribution 4.0 License