A 1024 Byte Python Interpreter

Like many of us, [Austin] finds writing code satisfying — especially if it is challenging. His latest challenge: shoehorn something that looks like Python into 512 bytes. Ok, that didn’t work out, but would you believe 1024 bytes of source code?

The goal was to properly execute a fizzbuzz program using a decidedly Python-like syntax. Since he is only interpreting Python, some things were simplified. In addition, he tried hard to minimize things like whitespace and variable names. Still, there were other things to do, and he borrowed from tips for code golfing.

The resulting code is essentially illegible, but it handles integer variables and literals, assignment, arithmetic, many control structures, functions, and even print. Not bad for 1 K.

Despite being tiny, the parser does a lot, but it does cut corners. No bytecode, no syntax tree, and no error handling. Variables have to be a single lowercase letter. So, ok, it isn’t really Python. But it is something.

Naturally, this reminded us of the obfuscated C code contest. If you really want to go small, we appreciate small Forth.

Old IPad Keyboard Makes For A Modern Netbook

Netbooks were a class of tiny laptops which hit their peak over a decade ago, with the idea being that you could use the Internet and do your computing on the move with ease. Unfortunately manufacturers were scared of them eating their profits from bigger computers, and they were invariably built to a very disappointing spec. That doesn’t lessen the appeal of small form factor laptops though, and [bob-foss] is here with a simple hack to make one.

He’s taken a hinged keyboard case made for one of the previous generations of iPad Mini, and paired it with a high-end Lenovo gaming tablet by way of a 3D printed replacement for the original Apple-grabber. We said it was a simple hack and it is, but it’s no less elegant for that as the detail is what matters. This isn’t a mess-of-wires cyberdeck, instead it’s a machine you could pull out on a train and get some work done.

Meanwhile, if you’d like to take a wallow in what that netbook thing was all about, we took a look at the phenomenon back in 2020.