Mmm… Obfuscated Shell Donuts

In case you grow tired of clear-written, understandable code, obfuscation contests provide a nice change of scenery, and trying to make sense of their entries can be a fun-time activity and an interesting alternative to the usual brainteasers. If we ever happen to see a Simpsons episode on the subject, [Andy Sloane] has the obvious candidate for a [Hackerman Homer] entry: a rotating ASCII art donut, formatted as donut-shaped C code.

The code itself actually dates back to 2006, but has recently resurfaced on Reddit after [Lex Fridman] posted a video about it on YouTube, so we figured we take that chance to give some further attention to this nifty piece of art. [Andy]’s blog article goes in all the details of the rotation math, and how he simply uses ASCII characters with different pixel amounts to emulate the illumination. For those who prefer C over mathematical notation, we added a reformatted version after the break.

Sure, the code’s donut shape is mainly owed to the added filler comments, but let’s face it, the donut shape is just a neat little addition, and the code wouldn’t be any less impressive squeezed all in one line — or multiple lines of appropriate lengths. However, for the actual 2006 IOCCC, [Andy] took it a serious step further with his entry, and you should definitely give that one a try. For some more obfuscated shell animations, check out the fluid dynamics simulator from a few years back, and for a more recent entry, have a look at the printf Tic Tac Toe we covered last month.

Continue reading “Mmm… Obfuscated Shell Donuts”

Raspberry Pi Serves Up 24 Hour Simpsons Channel

Commercial-free video on demand was every couch potato’s dream for decades, and now we’ve got it. But nostalgia has a funny way of making some folks miss the old days, even if we know it’s technically be a step backwards. Wanting to recreate the TV watching experience circa 1998, [probnot] has come up with a way to run his very own television channel.

With the Raspberry Pi and a digital modulator, he’s got the only house on the block that’s wired to show The Simpsons all day. He has absolutely no control over which episode plays next, he can’t pause it, and its in presented in standard definition (a nightmare for anyone who grew up in the Netflix era) but a familiar viewing experience for the rest of us.

Where we’re going, we don’t need HDMI.

The key to this project is the Channel Plus Model 3025 modulator. It takes the feed from the antenna and mixes in two composite video sources on user-defined channels. All [probnot] had to do was find a channel that wouldn’t interfere with any of the over-the-air stations. The modulator has been spliced into the house’s coax wiring, so any TV connected to the wall can get in on the action. There’s no special setup required: when he wants to watch The Simpsons he just tunes the nearest TV to the appropriate channel.

Providing the video for the modulator is a Raspberry Pi, specifically, the original model that featured composite video output. While the first generation Pi is a bit long in the tooth these days, playing standard definition video is certainly within its capabilities. With a USB flash drive filled with a few hundred episodes and a bit of scripting it’s able to deliver a never-ending stream direct from Springfield. There’s still that second channel available on the modulator as well, which we’re thinking could be perfect for Seinfeld or maybe The X-Files.

Interestingly, this isn’t the first time we’ve seen a Raspberry Pi used to provide a never-ending stream of The Simpsons. But compared to previous attempts which had to be directly connected to the TV, we like the idea of using the modulator and creating a more authentic experience.

Continue reading “Raspberry Pi Serves Up 24 Hour Simpsons Channel”

Stephen Hawking’s Legacy Includes Making His Work Widely Approachable

We are saddened by the passing of physicist Stephen Hawking. One of the great minds of our time, Hawking’s work to apply quantum theory to black holes launched his career and led to his best known theoretical discovery that black holes emit radiation, aptly known as Hawking radiation.

Thinking back on Stephen Hawking’s contributions to humanity, it strikes us that one of his most important is his embrace of pop culture. While his scientific discoveries and writings are what will stand the test of time, in our own age it is remarkable that Stephen Hawking is a household name around the world.

Hawking’s first book, A Brief History of Time, has sold more than 10 million copies and for many readers was their introduction into the way physicists view space and time. It was written for general consumption and not reserved for those who were already bathed in the jargon of theoretical physics. It sent the message that contemplating science is something that is fun to do in your spare time. This work continued with his more recent mini-series Into the Universe with Stephen Hawking created for the Discovery Channel.

A fan of the series, Hawking appeared in an episode of Star Trek: The Next Generation in 1993 and made subsequent, often repeat, appearances on The SimpsonsFuturama, and The Big Bang Theory. This was great fun for all science geeks who knew of his work, but it has a far more profound effect of normalizing interaction with a world-class scientist. Appearing on these shows told the story that the pursuit of knowledge is cool.

Having scientists in the public light is crucial to research and advancement. It lets the general public know what kind of frontiers are being pursued, and why that matters. This trickles both up and down, inspiring the next generation of scientists by introducing deep topics at an early age, and ensuring funding and opportunities for this upcoming wave of researchers has widespread support.

Stephen Hawking showed us some incredibly complicated secrets of the cosmos both through his discovery, and through his ambassadorship of scientific knowledge. He will be greatly missed but leaves behind an admirable legacy which we can all strive to live up to.

[Main image by Martin Pope via The Telegraph]

Hackaday Links: January 25, 2015

Misumi is doing something pretty interesting with their huge catalog of aluminum extrusions, rods, bolts, and nuts. They’re putting up BOMs for 3D printers. If you’ve ever built a printer with instructions you’ve somehow found on the RepRap wiki, you know how much of a pain it is to go through McMaster or Misumi to find the right parts. Right now they have three builds, one with linear guides, one with a linear shaft, and one with V-wheels.

So you’re finally looking at those fancy SLA or powder printers. If you’re printing an objet d’arte like the Stanford bunny or the Utah teapot and don’t want to waste material, you’re obviously going to print a thin shell of material. That thin shell isn’t very strong, so how do you infill it? Spheres, of course. By importing an object into Meshmixer, you can build a 3D honeycomb inside a printed object. Just be sure to put a hole in the bottom to let the extra resin or powder out.

Remember that episode of The Simpsons where Homer invented an automatic hammer? It’s been reinvented using a custom aluminum linkage, a freaking huge battery, and a solenoid. Next up is the makeup shotgun, and a reclining toilet.

[Jan] built a digitally controlled analog synth. We’ve seen a few of his FM synths VA synths built from an LPC-810 ARM chip before, but this is the first one that could reasonably be called an analog synth. He’s using a digital filter based on the Cypress PSoC-4.

The hip thing to do with 3D printers is low-poly Pokemon. I don’t know how it started, it’s just what the kids are doing these days. Those of us who were around for Gen 1 the first time it was released should notice a huge oversight by the entire 3D printing and Pokemon communities when it comes to low-poly Pokemon. I have corrected this oversight. I’ll work on a pure OpenSCAD model (thus ‘made completely out of programming code’) when I’m sufficiently bored.

*cough**bullshit* A camera that can see through walls *cough**bullshit* Seriously, what do you make of this?