OpenAI-powered Linux shell uses AI to Do What You Mean

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

It’s like Alexa/Siri/Cortana for your terminal!

This is a basic Python shell (really, it’s a fancy wrapper over the system shell) that takes a task and asks OpenAI for what Linux bash command to run based on your description. For safety reasons, you can look at the command and cancel before actually running it.

Of all the stupid uses of OpenAI’s GPT-3, this might be the most-amusing. It’s really interesting to see how close – sometimes spot-on – the algorithm comes to writing the right command when you “say what you mean”. Also, how terribly, terribly ill-advised it would be to actually use this for real.

Why GNU grep is fast

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

I am the original author of GNU grep.  I am also a FreeBSD user,
although I live on -stable (and older) and rarely pay attention
to -current.

However, while searching the -current mailing list for an unrelated
reason, I stumbled across some flamage regarding BSD grep vs GNU grep
performance.  You may have noticed that discussion too...

Fun With A Nintendo DS

This post starts very geeky, but becomes about computer games later on. Feel free to scroll down three paragraphs if you like computer games but don’t like computer hardware hacking.
My M3 Perfect and some related hardware arrived today. Basically, it’s a SD card reader that plugs into a Game Boy Advance slot (which are found on not only the Game Boy Advance series but also the Nintendo DS). By itself, it allows a Nintendo DS (or a DS Lite, as my new toy is) to play music, videos, etc. But combined with an Passcard (also arrived this morning), it allows backup games and homebrew software to be easily loaded onto the device.

Within minutes, I had DSLinux, a Linux distribution for the Nintendo DS, working. It felt immensely cool to be typing at a Bash shell using my DS stylus. I couldn’t get the wireless internet connection working, though – the drivers kept failing to load, which is probably either a result of (a) the DS Lite possibly having different firmware for interfacing with the network subsystem or (b) the M3 Perfect I got is the SD card edition, rather than the CF edition, which is better supported by DSLinux. I chose the SD card edition despite it being a few pounds more expensive because it’s slightly smaller (and therefore doesn’t stick out of the side of my handheld in such an unslightly way as the CF one would have) and because I can potentially fit more onto a SD card (although the only SD card I own is 1Gb, the same size as the largest CF card the M3 can take). In any case, both possibilities sound equally unlikely: further investigation will ensure.

The ultimate aim of this little project is to get a graphical VNC client for the DS (take a look at that screenshot!) running, or some other remote control, so I can take full control of my desktop PC, wirelessly, from, like, my bed. Or from the couch. Or from and wireless internet hotspot anywhere that somebody hasn’t secured properly. Toy.

But the other benefit of this little purchase is the ability to, how shall we say, “try before I buy” Nintendo DS games. I’ve spent quite some time today playing the stunning Trauma Center: Under The Knife. It hasn’t been since Half-Life 2 that I’ve played a computer game that genuinely made me jump with fright.

This isn’t Theme Hospital. This is Life and Death (for those of you too young to remember, this was a stunning late-80s  “Sim Surgeon”). Starting as a junior surgeon, you’ll remove benign tumours, treat laceration injuries, and laser off polyps. The whole things starts with a very “hold your hand” approach, but the learning curve is steep. Within 25 minutes of play you’ll be performing surgery within the chest cavity of car crash victims when something goes wrong (their heart stops, or their symptoms severely exacerbate, or it turns out there’s something more seriously wrong with them) and you’ve got nobody there to help you: you have to work alone.

It’s dark and cold and hard. Very hard. I struggled to keep up with the pace and had to re-attempt some of the levels (such as the brutal on early in the second chapter in which I had to remove aneurisms from the arteries of the intestines, and they just kept exploding on me, showering blood everywhere and destabilising the patient’s condition) several times. Nonetheless, I had great fun watching Claire replay those levels, on the edge of my seat whenever I knew something was about to go terribly wrong. Contrary to the image Nintendo sometimes convey: this is not a game for kids.
Another game I’ve enjoyed trying out is Mario & Luigi: Partners In Time, which plays a lot like Paper Mario: The Thousand-Year Door, but with semi-independent simultaneous control over up to four (Mario, Luigi, Mario’s younger self, Luigi’s younger self) different characters. Yes, at the same time. Yes, that fucks with your head. Quite quickly.

Then there’s Super Princess Peach, a platform game in which Peach uses the power of mood swings (I kid you not – she fluctuates between singing, crying, and breathing fire, just like a real woman) in order to get her way. And Super Monkey Ball Touch & Roll, more stupid puzzle game fun…
It’s not all piracy (although at least a little bit ethically – we’ll buy legitimate copies of the good stuff, almost certainly including Trauma Center) of stuff I could have bought at my local Game: I’ve also had a great deal of fun with Electroplankton, for which a release outside of Japan is still promised, but sadly absent. Electroplankton is a software toy in the truest sense of the word. The player manipulates the movement of musical plankton in order to generate what can just about be described as music. I came home and hooked it up to the stereo and Claire and I had great fun for some time, playing with the different plankton and trying to discover how they all “worked”. And I’m also looking forward to giving some of the Naruto games (which’ll probably never be released outside of Japan) a go.

Back From Lancashire

Spent the last four days in Lancashire and elsewhere in the North of England, visiting my folks (among other things). Details follow…

Thursday 26th June 2003
Linux Expo 2003, Birmingham
Sorted out Claire’s bank, packed bags, and set off for Birmingham to the last day of Linux Expo 2003 at the National Exhibition Centre, to meet up with Gareth and some other geeks to talk about a project on which my input could be valuable. Gareth is going to come over to Aberystwyth next weekend and we’ll knock together a prototype of the system we’ve suggested.

Claire got scared by the vast numbers of stereotypical geeks (and the distinct overdose of testosterone in the air – she was one of only three women in the whole place), and by the fact that, unlike normal, she couldn’t understand one in three words spoken. I smiled. She’s got a little way to go to earn her geek stripes, yet.

Bon Jovi, Manchester
Arrived late at Old Trafford – missed the support group, but in time to try to find standing room before Bon Jovi came on-stage. All-in-all, a good concert: Claire was a little short for standing on the pitch to have been a good idea, and the sound quality was a little below-par owing to a lack of adequate repeater speakers, and the only beer available was Budweiser and Boddingtons, but it was still a pretty good gig. Went to a Manchester pub afterwards before catching a really, really late train home. Got to bed sometime after 3am.

More to follow…