Nov 23, 2023
Lua Carousel: A lightweight programming environment for desktop and mobile devices

I just published this thing on itch.io.

source code

permalink

* *
Nov 22, 2023
This responsive layout for my toolbar is the Sultan of Jank.

Lots of progress today. Remaining issues:

  • That question of how many colors to permit customizing.
  • UI for loading/saving files.

permalink

* *
Nov 21, 2023

Screenshot of the Carousel Shell (see previous alt texts in this thread) containing sliders for font size and foreground/background colors.

Remaining issues with the toolbar:

  • Actually persisting settings across restart.
  • Still not responsive. But I have a plan for this.
  • Every color I use in the editor needs more sliders to customize :grimace: Right now there are 3 other colors: comments, scrollbars and those borders around the editor. Maybe I need a dropdown :grimace: Or just punt.

permalink

* *
Nov 19, 2023
Progress on a lightweight programming environment for both computers and mobile devices. Modifiable live while it runs (though not on mobile devices).

The seed design constraint here was to structurally prevent the pop-up keyboard on a touchscreen from ever blocking my typing. That led to a multi-line commandline editor in the top half, fixing the non-editable output buffer in the bottom half. Independent commands/scripts then expanded in the only other direction available: left/right.

permalink

* *
Nov 18, 2023
Finally starting to take on scrollbars.


  As shown in this screenshot, my recent projects all have this bullet under "Known issues":

  "No scrollbars yet. That stuff is hard."

permalink

* *
Nov 16, 2023
Another satisfying session of visual debugging.

I created a little app for first-graders to practice addition. They seem to enjoy these sudoku-like puzzles, and we ran out of them in the workbook.

Generating gets a little subtle. I thought I was done, but the totals were >10. Trying to fix that generated invalid puzzles, and I had to ping-pong a bit between the two.

All through, it was nice to try out different straight-line solutions and animate them as I tested.

Detail of the code for this app as seen inside driver.love. Uncommenting the 'loiter()' lines slows things down while generating a new puzzle, so that I can keep up with what the computer is doing.

permalink

* *
Nov 15, 2023
I seem to have renewed my collaboration for a tablet-friendly programming environment. For the current version, my partner led and pushed for preserving LÖVE primitives. For example, the LÖVE event loop calls functions you define called love.draw, love.keypressed, etc., and it seems desirable to continue to support those for familiarity's sake. This can seem impossible if the environment is also built in LÖVE and uses those same functions for providing its infrastructure, but since Lua is a dynamic environment there are tricks to make it work reasonably nicely.

Lately I've been taking the lead on a riff of that project, and I find I'm advocating strongly to not do this. I want to define new handlers like shell.draw and shell.keypressed that programs within my environment will have to call. And I finally figured out why I feel so strongly about this:

  1. LÖVE has a function to return the bounds of the device/window. You typically can draw between x coordinates 0 and some width. And this information is often used to draw UI elements near the edges and corners. So should we now override functions like line to adjust coordinates and keep them in the client area? There's a lot of surface area to cover here. Bugs will inevitably happen, and when they do our attempts to create a seamless abstraction will cause more confusion.
  2. Ranting more broadly, the desire for a "seamless experience" is a disease. The provider wants to "own the customer relationship," so that the user can forget there's anything in the universe but themselves and the app. Just like a casino. I'd rather not pretend we can wish the universe away with its possibility of errors. Let's me and the user treat each other as grown-ups, and not hide irreducible complexity in our supply chains. Here are the functions I provide, here are the functions LÖVE provides. I recommend you use my stuff where possible, but you don't have to. Yes, it's confusing. Welcome.

permalink

* *
Nov 11, 2023
Making space for debug infrastructure on the work surface. 
Screenshot of the work surface shown by driver.love for live-editing Freewheeling Apps. It's very zoomed out to take in the big picture. You'll usually work much more zoomed-in so you can read your work.

<p>
<a href='https://git.sr.ht/~akkartik/driver.love'>This is driver.love, the live-editing environment I've been using lately.</a>

There's a menu up top showing available hotkeys, that can also expand to show a command palette.

There's latitude/longitude tick marks all along the border.

The picture is annotated with some default conventions for organizing the surface. Along the top is an area for data structures. Freewheeling docs to consult go on the left, freewheeling infrastructure you might want to tweak go on the right. In the middle is the area where I tend to spend most of my time.

More on my Freewheeling Apps.

permalink

* *
Nov 8, 2023
Now that I've started inserting coroutines into my apps to make them more debuggable, I'm starting to find and plug gaps in error recovery:

  • I have to be careful to check the results of coroutine operations, because the underlying coroutine might have thrown an error.
  • Errors in Lua include a call stack, but errors within coroutines don't return the stack by default.
  • If I create a higher-order helper to abstract away the coroutine munging just to smear a computation across frames, does that impact the quality of debug information in the call stack? (Answer: no it doesn't in Lua, but it wasn't obvious.)
  • Call stacks returned by LÖVE aren't quite as clean as plain Lua.

permalink

* *
Nov 4, 2023
I spent some time today playing with Poisson Disk Sampling (image 1), and I tried hard to avoid using any `print`s to the terminal, which forced me to create some nice debugging UI (image 2 and 3).

permalink

* *
archive
projects
writings
videos
subscribe
Mastodon
RSS (?)
twtxt (?)
Station (?)