It’s All In The Libs – Building A Plugin System Using Dynamic Loading

Shared libraries are our best friends to extend the functionality of C programs without reinventing the wheel. They offer a collection of exported functions, variables, and other symbols that we can use inside our own program as if the content of the shared library was a direct part of our code. The usual way to use such libraries is to simply link against them at compile time, and let the linker resolve all external symbols and make sure everything is in place when creating our executable file. Whenever we then run our executable, the loader, a part of the operating system, will try to resolve again all the symbols, and load every required library into memory, along with our executable itself.

But what if we didn’t want to add libraries at compile time, but instead load them ourselves as needed during runtime? Instead of a predefined dependency on a library, we could make its presence optional and adjust our program’s functionality accordingly. Well, we can do just that with the concept of dynamic loading. In this article, we will look into dynamic loading, how to use it, and what to do with it — including building our own plugin system. But first, we will have a closer look at shared libraries and create one ourselves.

Continue reading “It’s All In The Libs – Building A Plugin System Using Dynamic Loading”

You Can Now Buy A Practical Gauss Gun

Occasionally we come across a piece of information which reminds us that, while flying cars are still nowhere to be found, we’re definitely living in the future. Usually it’s about some new application of artificial intelligence, or maybe another success in the rapidly developing field of private spaceflight. But sometimes it’s when you look at a website and say to yourself: “Oh cool, they have 1.5kW electromagnetic accelerators in stock.”

Arcflash Labs, a partnership between [David Wirth] and [Jason Murray], have put their EMG-01A Gauss gun up for sale for anyone who’s brave enough and willing to put down $1,000 USD on what’s essentially a high-tech BB gun. The creators claim it obtains an efficiency of 6.5% out of its RC-style 6S LiPo battery pack, which allows it to fire over 100 rounds before needing to be recharged. Firing 4.6g steel projectiles at a rather leisurely 45 m/s, this futuristic weapon would be more of a match for tin cans than invading alien forces, but at least you’ll be blasting those cans from a position of supreme technical superiority.

The EMG-01A builds on the work of the team’s previous experiments, such as the semi-automatic railgun we covered last year. They’ve made the device much smaller and lighter than their previous guns, as well as worked on making them safer and more reliable. That said, the page for the EMG-01A has a number of warnings and caveats that you won’t see on the back of a Red Ryder BB gun box; it’s certainly not a toy, and anyone who takes ownership of one needs to be respectful of the responsibility they’re taking on.

Speaking of which, who can actually buy one of these things? The Arcflash Labs site makes it clear they will only ship to the United States, and further gives a list of states and cities were they can’t send a completed gun. Essentially they are following the same laws and guidelines used for shipping air guns within the US, as they believe that’s a fair classification for their electromagnetic guns. Whether or not the ATF feels the same way is unclear, and it should be interesting to see what kind of legal response there may be if Arcflash Labs starts moving enough units.

If you’d like to wage warfare on your recyclables without spending quite so much cash, you can always build your own for less. Or nearly nothing, if you want to go the full MacGyver route.

Continue reading “You Can Now Buy A Practical Gauss Gun”

Old Laptop? Mobile X86 Game System!

Between smartphones and tablets, computing is becoming increasingly mobile in nature. It used to be that everyone had a desktop computer, then laptops became the norm, and now many people don’t have anything beyond their mobile device. Unless you’re the kind of person who actually needs the power and versatility offered by a “real” computer, mobile devices are simply a more convenient option to browse the web and consume content.

But what if your needs are somewhere in the middle? You want an x86 computer and full operating system, but you also want something that’s more mobile than a tablet? If you’re like [mnt], you take an old Atom laptop that’s on its last legs and rebuild it as the Hacktop.

[mnt] describes the Hacktop as an “Emergency Gaming/Hacking Station”, and says he uses it everywhere he goes. Inspired by his Nintendo DSi, gaming controls are front-and-center on the Hacktop and he uses the machine to play everything from Half-Life to classic emulators.

But the Hacktop is capable of more than just playing Amiga games. The hand-soldered QWERTZ keyboard can be used with his thumbs, and the D-Pad doubles as the cursor keys. There’s a laptop touch pad on the back of the case, and the ten-inch LCD display is a touch screen as well. Definitely no shortage of input devices on this thing. It’s also packing some interesting special features, such as integrated RTL-SDR and LIRC hardware for mobile exploration and experimentation. [mnt] says the nine-cell battery should keep it alive and kicking for twelve hours or so, but it of course depends on what kind of stuff he gets into while out and about.

Hackers have been building their own mobile devices for a long time, and we’re always struck by the creative approaches individuals take compared to the rather cookie-cutter world of mobile consumer technology.