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:
Implementation:
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.
Does it make sense why the top graph when averaged 10x yields the bottom?! Sure doesn't to me.
This post is part of my Freewheeling Apps Devlog.
Comments gratefully appreciated. Please send them to me by any method of your choice and I'll include them here.