A VM In An AI

AI knoweth everything, and as each new model breaks upon the world, it attracts a new crowd of experimenters. The new hotness is ChatGPT, and [Jonas Degrave] has turned his attention to it. By asking it to act as a Linux terminal, he discovered that he could gain access to a complete Linux virtual machine within the model’s synthetic imagination.

The AI’s first response was a prompt, so he of course first tried to list the files. Up came a list of directories, so the next step was to create a file and put some text in it. All of this resulted in a readable file, so there was some promise in this unexpected computing resource. But can it run code? Continue reading “A VM In An AI”

Lisp Runs This Microcontroller Pendant

As a programming language, Lisp has been around longer than any other active language except for Fortran. To anyone who regularly uses it, it’s easy to see why: the language allows for new syntax and macros to be created fluidly, which makes it easy to adapt it to new situations, like running it on a modern Atmel microcontroller to control the LEDs on this star pendant.

The pendant has simple enough hardware — six LEDs arranged around the points of the star, all being driven by a small ATtiny3227 operating from a coin cell battery. This isn’t especially spectacular on it’s own, but this particular microcontroller is running an integer version of a custom-built Lisp interpreter called uLisp. The project’s creator did this simply because of the whimsy involved in running a high-level programming language on one of the smallest microcontrollers around that would actually support the limited functionality of this version of Lisp. This implementation does stretch the memory and processing capabilities of the microcontroller quite a bit, but with some concessions, it’s able to run everything without issue.

As far as this project goes, it’s impressive if for nothing other than the ‘I climbed the mountain because it was there’ attitude. We appreciate all kinds of projects in that same vein, like this Arduino competitor which supports a programming language with only eight commands, or this drone which can carry a human.

Gaze Upon The Swimming Mechanical Stingray, Made With LEGO

Stingrays have an elegant, undulating swimming motion that can be hypnotic. [Vimal Patel] re-created this harmony with his fantastic mechanical mechanical stingray using LEGO pieces and a LEGO Technics Power Functions motor. The motor is set in a clever arrangement that drives the motion remotely, so that it and electrical elements can stay dry.

The mechanical stingray sits at the end of a sort of rigid umbilical shaft. This shaft connects the moving parts to the electrical elements, which float safely on the surface. This leaves only the stingray itself with its complex linkages free to move in the water, while everything else stays above the waterline.

We’ve seen some impressive LEGO creations before, like this race car simulator and pneumatic engine, and the mechanical action in this stingray is no exception. Interested in making your own? The part list and build directions are available online, and you can see it in action in the video embedded below.

Continue reading “Gaze Upon The Swimming Mechanical Stingray, Made With LEGO”

An alarm clock with a Nixie tube display

Retro Alarm Clock With Nixies Is Thoroughly Modern Inside

We feature a lot of clocks here at Hackaday, but alarm clocks seem to be less popular for some reason. Maybe that’s because no-one enjoys being woken up in the morning, or simply because everyone uses their smartphone for that purpose already. In any case, we’re delighted to bring you [Manuel Tosone]’s beautiful Nixie tube alarm clock that cleverly combines modern and classic technologies in a single package.

An alarm clock with a Nixie tube display, openedThe clock and alarm functionalities are implemented by a PIC24 microcontroller on a custom mainboard. It keeps track of time through its real-time clock with battery backup, and plays a song from an SD card when it’s time to wake up. A 2 x 3 W class D audio amplifier plus a pair of stereo speakers should be able to wake even the heaviest sleepers.

Of course, the real party piece is the clock’s display: four IN-4 Nixie tubes show the time, with neon tubes indicating the day of the week. The 180 V needed for the Nixies is generated by an MC34063A-based boost converter, which also powers the neon tubes.

Instead of using the standard current-limiting resistor for each Nixie tube, [Manuel] designed an array of transistor-based current sources: this enables linear control of the tubes’ brightness, and should keep the amount of light constant even as the tubes age. The individual segments are switched by SN75468 Darlington arrays, with no need for those hard-to-find SN74141 drivers.

The mainboard and the display are housed inside a 3D-printed case that mimics the style of 1980s digital alarm clocks, but with a nice 1970s twist courtesy of those Nixie tubes. [Manuel]’s GitHub page has all the schematics as well as extensive documentation describing the circuit’s operation — an excellent resource if you’re planning to build a Nixie project yourself. If Nixies aren’t your thing, you can also make an alarm clock with a VFD tube, or even roll your own luminous analog dial.

Continue reading “Retro Alarm Clock With Nixies Is Thoroughly Modern Inside”

Old-School Video Switching Levels Up With Modern USB Control

Video effects and mixing are done digitally today, but it wasn’t always so. When analog ruled the video world, a big switch panel was key to effective results.

VIdeo like this was the result of combining different analog feeds with different effects. The better the hardware, the more was possible.

Devices like [Glen]’s Grass Valley Series 300 Crosspoint Switch Panel were an important part of that world. With tools like that, a human operator could set up a composited preview feed in true WYSIWYG style, and switch to live on cue. All done with relatively simple CMOS ICs and buttons. Lots and lots of buttons.

[Glen] reverse engineers the panel to show how it works, and most of the heavy lifting is done by the MC14051B analog multiplexer/demultiplexer, and the MC14532B 8-bit priority encoder. Once that’s figured out, the door is open to modernizing things a little by using a microcontroller to drive the device, turning it into a USB peripheral.

With a little design work, [Glen] builds a PCB around the EFM8UB2 8-bit microcontroller to act as a USB peripheral and control the switch panel, taking care of things like key scanning and lamp control. The last step: a GUI application for monitoring and controlling the panel over USB.

This isn’t [Glen]’s first time interfacing to vintage video mixing and switching, and as many of us know it’s sometimes tricky work to interface to existing hardware. We covered his earlier video switcher project using hardware that was not nearly as easy to work with as this one.

Fossil Files: My .Emacs

Last week, I wrote about cargo culting in a much more general context, so this week I’m going to come clean. The file that had me thinking about the topic was the worst case you’ve probably ever seen: I have a .emacs file kicking around that I haven’t really understood since I copied it from someone else – probably Ben Scarlet whose name is enshrined therein – in the computer lab in 1994! Yes, my .emacs file is nearly 30, and I still don’t really understand it, not exactly.

Now in my defence, I switched up to vim as my main editor a few years ago, but this one file has seen duty on Pentiums running pre-1.0 versions of Linux, on IBM RS/6000 machines in the aforementioned computer lab, and on a series of laptops and desktops that I’ve owned over the years. It got me through undergrad, grad school, and a decade of work. It has served me well. And if I fired up emacs right now, it would still be here.

For those of you out there who don’t use emacs, the .emacs file is a configuration file. It says how to interpret different files based on their extensions, defines some special key combos, and perhaps most importantly, defines how code syntax highlighting works. It’s basically all of the idiosyncratic look-and-feel stuff in emacs, and it’s what makes my emacs mine. But I don’t understand it.

Why? Because it’s written in LISP, for GNU’s sake, and because it references all manner of cryptic internal variables that emacs uses under the hood. I’m absolutely not saying that I haven’t tweaked some of the colors around, or monkey-patched something in here or there, but the extent is always limited to whatever I can get away with, without having to really learn LISP.

This ancient fossil of a file is testament to two things. The emacs codebase has been stable enough that it still works after all this time, but also that emacs is so damn complicated and written in an obscure enough language that I have never put the time in to really grok it – the barriers are too high and the payoff for the effort too low. I have no doubt that I could figure it out for real, but I just haven’t.

So I just schlep this file around, from computer to computer, without understanding it and without particularly wanting to. Except now that I write this. Damnit.

Featured image: “A Dusty Old Book” by Marco Verch Professional.

Flipper Zero Hacker Tool Gets UI Editor For Custom Apps

[Mikhail] released a handy GUI editor/generator tool for the Flipper Zero multipurpose hacker tool, making layouts and UI elements much easier and more intuitive to craft up.

Those who decide to delve into rolling their own applications or add-ons will find this a handy resource, especially as it generates the necessary code for the visual elements. It’s not limited to placing icons, either. Boxes, lines, dots, text, and more can be freely laid out to get things looking just right.

To use it, simply drag and drop icons of various sizes into the screen area. Non-icon UI elements like frames, lines, text, and others can be placed with a click using the buttons. To move elements around, click the SELECT button first, then drag things as needed. To fine-tune positioning (or change the text of a string) a selected element’s properties can be accessed and modified to the right of the simulated screen. When things look good, switch to the CODE tab and copy away to use it in your Flipper application.

Unfamiliar with the Flipper Zero? It’s a kind of wireless multitool; a deeply interesting device intended to make wireless exploration and experimentation as accessible as its dolphin mascot is adorable.