BASIC On A Calculator Again

We are always amused that we can run emulations or virtual copies of yesterday’s computers on our modern computers. In fact, there is so much power at your command now that you can run, say, a DOS emulator on a Windows virtual machine under Linux, even though the resulting DOS prompt would probably still perform better than an old 4.77 MHz PC. Remember when you could get calculators that ran BASIC? Well, [Calculator Clique] shows off BASIC running on a decidedly modern HP Prime calculator. The trick? It’s running under Python. Check it out in the video below.

Think about it. The HP Prime has an ARM processor inside. In addition to its normal programming system, it has Micropython as an option. So that’s one interpreter. Then PyBasic has a nice classic Basic interpreter that runs on Python. We’ve even ported it to one or two of the Hackaday Superconference badges.

Continue reading “BASIC On A Calculator Again”

Arnis Brings The World To Minecraft: Bedrock Edition

A couple of years ago, we covered a project called Arnis, created by [Louis Erbkamm], which allowed you to generate any portion of Earth into Minecraft blocks and maps. It was already impressive, but since we last checked in the open source project has made some incredible progress.

When we first covered Arnis, it was stuck on the Java edition of Minecraft. But now the project has been updated to support the more modern Bedrock Edition, meaning you can put your home into any device’s version of Minecraft!

Beyond Bedrock version support, the actual tool has improved with proper elevation generation using data provided from NASA. This allows you to view the Alps or the Himalayas in all their voxel glory, or explore an entire map of the Moon. Perhaps what’s even more impressive is that the generation is accurate enough to be used in an actual research study involving flood mitigation education.

All of this has been made possible with help from a passionate community who have volunteered their time to assist [Louis] with the project — a testament to the power of open source.

What Happens When A Bug Rears Its Head At Mach Two?

While some may see amateur rocketry as little more than attaching fins to a motor and letting it fly, it is, in fact, rocket science. This fact became very clear to [BPS.space] when a parachute deployed on a rocket traveling at approximately Mach 1.8. 

The rocket design is rather simple — essentially just 3D printed fins glued onto a motor with a nose-cone for avionics. A single servo and trim tab provide a modicum of roll control, and a parachute is mounted in the nose along with a homing beacon for faster recovery. Seemingly, the only thing different about this flight is properly validated telemetry and GPS antennae.

After a final ground check of the telemetry and GPS signal quality, everything is ready for what seems like a routine launch. However, somewhere around Mach 1.8, the parachute prematurely deploys, ripping apart the Kevlar rope holding together the three rocket sections. Fortunately, the booster and avionics sections could be recovered from the desert.

Continue reading “What Happens When A Bug Rears Its Head At Mach Two?”

Windows? Linux? Browser? Same Executable

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.

Playing Factorio On A Floppy Disk Cluster

While a revolutionary storage system for their time, floppy disks are not terribly useful these days. Though high failure rates and slow speeds are an issue, for this project, the key issue is capacity. That’s because [DocJade’s] goal is playing the video game Factorio off floppy disks. 

Storing several gigabytes of data on floppy disks is a rather daunting challenge. But instead of using a RAID array, only a single reader and a custom file system is deployed in this setup. A single disk is dedicated to storing pool information allowing for caching of file locations, reducing disk swaps. The file system can also store single files across multiple disks for storage of larger files. Everything mounts in fuse and is loosely POSIX compliment, but lacks some features like permissions and links.

With the data stored across thousands of disks, the user is prompted to insert a new disk when needed. This ends up being the limiting factor in read and write speeds, rather than the famously slow speeds of floppies. In fact, it takes about a week to load all of Factorio in this manner, even after optimizations to reduce disk swaps. Factorio is also one of the few games that could be installed in this manner, as it loads most of the game into memory at launch. Many other games that dynamically load textures and world maps would simply crash when a chunk is not immediately available.

Not a Factorio fan? No worries, you could always install modern Linux on a floppy!

Continue reading “Playing Factorio On A Floppy Disk Cluster”

String art rendering of a face

BASIC Programming With No Strings Attached

Today in programming language hacks we have string art rendered in BASIC. String art — also known as pin and thread art, or filography — is an art form where images are invoked by thread woven between pins on the border of an image. In this case the thread and the pins are virtual and there is a simple 67 line BASIC program which generates and renders them.

Of course BASIC, the Beginner’s All-purpose Symbolic Instruction Code, isn’t just one thing and was a bit of a moving target over the years. Invented in 1964 at Dartmouth College by John Kemeny and Thomas Kurtz it turned into a family of languages as a dynamic array of implementations added, removed, and changed implementation details as the future unrolled.

We remember GW-BASIC and QuickBASIC, but the landscape was much broader than that. Implementations of QuickBASIC came with a “compiler”, qb45.exe, which worked by bundling the BASIC script as p-code into an executable along with the runtime binary, which we used back in the day to make “real applications”, not mere scripts.

Thanks to [Keith Olson] for writing in to let us know about this one. If you’re interested in seeing what the state of the art in string art is, be sure to check out String Art Build Uses CNC To Make Stringy Art and CNC Router Frame Repurposed For Colorful String Art Bot. The best string art is in the real world, not software!

Detail of Horus's face, from a statue of Horus and Set placing the crown of Upper Egypt on the head of Ramesses III. Twentieth Dynasty, early 12th century BC.

HORUS Framework: A Rust Robotics Library

[neos-builder] wrote in to let us know about their innovation: the HORUS Framework — Hybrid Optimized Robotics Unified System — a production-grade robotics framework built in Rust for real-time performance and memory safety.

This is a batteries included system which aims to have everything you might need available out of the box. [neos-builder] said their vision is to create a robotics framework that is “thick” as a whole (we can’t avoid this as the tools, drivers, etc. make it impossible to be slim and fit everyone’s needs), but modular by choice.

[neos-builder] goes on to say that HORUS aims to provide developers an interface where they can focus on writing algorithms and logic, not on setting up their environments and solving configuration issues and resolving DLL hell. With HORUS instead of writing one monolithic program, you build independent nodes, connected by topics, which are run by a scheduler. If you’d like to know more the documentation is extensive.

The list of features is far too long for us to repeat here, but one cool feature in addition to the real-time performance and modular design that jumped out at us was this system’s ability to process six million messages per second, sustained. That’s a lot of messages! Another neat feature is the system’s ability to “freeze” the environment, thereby assuring everyone on the team is using the same version of included components, no more “but it works on my machine!” And we should probably let you know that Python integration is a feature, connected by shared-memory inter-process communication (IPC).

If you’re interested in robotics and/or real-time systems you should definitely be aware of HORUS. Thanks to [neos-builder] for writing in about it. If you’re interested in real-time systems you might like to read Real-Time BART In A Box Smaller Than Your Coffee Mug and Real-Time Beamforming With Software-Defined Radio.