Dec 24, 2022
luaML on an infinite surface

You can draw various graphics and edit text in arbitrary grid layouts, all on a pannable, zoomable infinite surface.

Repo

permalink

* *
Dec 19, 2022
Today I discovered "How many computers are in your computer?", which seems to have been started around 2010.

(I started Wart in 2010, Mu1 in 2014 and Mu in 2017.)

permalink

* *
Dec 17, 2022
Black triangles for the umpteenth time.

I reimplemented my little box model atop a foundation of an infinite 2D surface that can be panned and zoomed.

permalink

* *
Dec 14, 2022
The world is cranking through AoC and zooming toward a ChatGPT future, and I'm still here thinking about the right way to visualize past versions in a live-programming environment.

And my note-taking app. One thing I did recently: a move command that moves columns (analogous to browser tabs) to the left, while continually truncating columns on the right beyond some limit. The combination of these two has changed how I work, from messes all over the surface to much more localized access patterns where I live near the top left and move things over to it as I need them. (It's not a catastrophe if I lose a tab because on-disk search is working well.)

permalink

* *
Dec 2, 2022
“In general, the higher level your graphics API, the harder it is to get horizontal and vertical lines to draw on the physical pixels. At the frame buffer level it is trivial. Cocoa and UIKit it is possible with some effort. SwiftUI it is impossible. HTML is hopeless.

“When printing meant writing some Postscript it was a little work, but doable. Getting it onto a printer through a modern printer API is essentially impossible.”

a comment on Hacker News

permalink

* *
Nov 29, 2022
"Next call. Hi, welcome to Joys of Science! Please state your name and question."

"Hi, Creator here. Loved your previous episode, Beautiful Equations of Reality. Glad you like my game.

"I actually started out using lots of different equations. Regimes for small scales, large scales, Seattle, Wednesdays. But there were too many interactions and bugs. So we switched to a single set of equations. It's a little inefficient but reliable. Now all I do is say no to feature requests."

#microfiction

permalink

* *
Nov 27, 2022
A Lua-based Markup Language

Demo of a structured text editor where you can edit multiple buffers arranged in nested rows/columns.

Doesn't save what you type in yet. This is just a demo for playing with.

I have no idea what attributes to include besides fg/bg/margin. So get in touch if this sparks ideas/suggestions.

permalink

* *
Nov 23, 2022
I just sped up my note-taking app by.. reading more from disk.

:exploding_head:

A constant trickle of disk reads replaces an unbounded amount of stuff hanging around in memory.

This is a data-oriented solution in the footsteps of Mike Acton. I'm not removing fields from structs or switching to SoAs, but I am trying now to manage my caches.

GC is missold as "automatic memory management". All memory management is manual (you have to be careful about nulling references out); GC just simplifies freeing memory.

permalink

* *
Nov 19, 2022
Has anyone heard of stack people vs queue people? I don't know where I got it from, but it's been an enduring part of my self-image for a decade now that I'm a stack person.

When something new pops up, a queue continues what they were doing. A stack switches.

Obviously this is a spectrum, but I find it very easy to rationalize that the new tasks are "quick".

Anyway, being a stack is hard with a new project. Every 2 minutes I discover something broken, and now I have to resist working on it.


A minimalist DOM in 50 LoC

Notation:


A notation for a simple DOM

It's just a Lua literal, though the syntax highlighting is confusing.

Implementation:

First 2/3rds of code for rendering the DOM while saving coordinates of each rectangle.

Render:

Is there a better name for this than "DOM"? A notation for a tree of rectangles, often containing text, to be rendered to screen and united with mouse events.

Rects contain either text or rows/cols of other rects. Other attributes: fg, bg, margin. Margin is margin-top or margin-left depending on whether the rect contains rows or cols.

No inline styling yet (bold, span, etc.), that feels like a separate concern.


This is pretty surprising. (And pretty.) I'm trying to understand why my app goes unresponsive sometimes, so I added a debug dashboard. The top graph shows the memory footprint every second. The bottom shows memory footprint every 10s.


Two graphs with time on the x axis.

The top graph shows a sawtooth as the app uses more and more memory, until GC reclaims half of the peak.

The bottom graph shows a braid pattern where alternate samples (averages of 10 samples from the top graph) grow and shrink. At the extremes alternate samples seem to be off by 25% -- both before and after the GC.

Does it make sense why the top graph when averaged 10x yields the bottom?! Sure doesn't to me.

permalink

* *
Nov 11, 2022
I'm realizing Pensieve's surface doesn't actually give a good sense of space like say Capstone.

I just spent some time trying to add hyperlinks between a handful of pairs of notes. The notes are seldom next to each other for me to type the id of one into the other.

Then I realized I should just use regular links below notes. The grab mechanism works well. Links can't be inside notes like hyperlinks, but I can't linkify arbitrary text anyway. And I get automatic backlinks.

permalink

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