Dec 29, 2022
A year of freewheeling apps

Over the course of 2022, I've found myself gradually programming in a certain way that has been working really well. Here, let me show you a few examples, see if you can spot the pattern:

  1. A plain-text editor where you can also draw line drawings.

    Screenshot showing text interspersed with a line drawing covering the
whole window width (48KB)

    Minimal dependencies, easy to build, runs anywhere you can install apps without asking permission, thoroughly tested, designed above all to reward curiosity about its internals.

  2. A different way to draw polygons. Old way:

    Drawing a square by specifying two points and one side of the resulting
line (200KB)

    New way:

    Drawing a square by specifying a centroid and vertex (200KB)

    First of a sprawling family tree of over a dozen forks of the original editor.

    Family tree of 9 forks, showing relative complexity of each along the x
axis (32KB)

    (Image drawn using itself, of course.)

  3. The Pong fork. Baking the editing environment into other apps for a self-contained curiosity-rewarding/forking experience.

    (Notice the extensible graphical logs. It takes very little code to augment debug-by-print. This work stemmed from the Handmade Network Wheel Reinvention Jam)

  4. Using the editing environment to debug the editing environment. (More tools should support a command palette; it's the best of commandline and GUI worlds.)

    Another graphical log, this time for the editing environment itself,
showing the command palette state changing in response to keystrokes (200KB)

  5. Pivot: making changes to programs as they run. They maintain state even after a crash (the red error on the left).

  6. LuaML, a box model over an infinite 2D surface that you can pan and zoom without restriction. Built in the live style, of course.

    (You can edit each text widget, and scrolling within a widget pans the whole surface. This took me a couple of tries to boil down to a reasonably elegant implementation.)

  7. Pulling LuaML “into the left window,” the editing environment.

I've found myself calling these freewheeling apps to myself. They're freewheeling in two ways. First, they're easy to get started with so you can be off doing your thing. Second, they stay freewheeling over time. They don't cramp your style with constraints after you've gotten suckered into adopting them.

“You want me to trust your binaries? I'm just not ready for that commitment man. Do you have a rock-solid build process that's guaranteed to work on my machine? I'd like the option to look at what you're up to when I feel like it.”

“It autoupdates twice a week? I'd rather not spend time tracking down what change broke my habits, thanks.”

“1GB install? What if I'm in, you know, the other 95% of the planet?”

“You have a PR submission process? How lovely for you. Hey, how about I just publish a fork, and you take what you want. (I love getting comments, though.)”

“I don't want to remember a bunch of idiosyncracies about your language and app. Can you just give me good error messages when I mess up? Just don't harsh my buzz about portability, compatibility constraints and whatnot.”

Replace “I” with yourself, dear reader. These apps should work anywhere (except mobile platforms), be easy to try out, easy to edit in place, and easy to subvert if you dislike a design choice. I'm going to continue improving the hacking experience, and I want to support forks in staying up to date with my changes. Unfortunately they require a little bit of programming experience for now (particularly git), but it should all seem pretty familiar regardless of what languages and tools you've used in the past. And if they don't, feel free to reach out. I welcome questions.


A lot of the bang here comes from the stack I'm using: the Lua programming language and the LÖVE game engine for Lua. You don't have to use Lua and LÖVE to be freewheeling, I think, any parsimonious stack designed to be portable and easy to build will do. But if you have another candidate that meets those criteria, I'd like to see it.

Comments gratefully appreciated. Please send them to me by any method of your choice.

RSS (?)
twtxt (?)
Station (?)