Sep 22, 2024
I spent several hours trying to debug my notebook app last night, getting increasingly frustrated and demoralized. Eventually I realized there's a bug in my parser. It's a drag having to redo something I thought I was done with.

This morning I went back and built a debug UI for the parser, and now it shows the bug at a glance. The parse tree in the background is for the line the mouse pointer is hovering on.

A window showing some lines of text containing various text and math expressions. The top line shows the line `a = (3)`. The mouse is hovering on it. The background of the window shows a translucent parse tree for this line: an operator containing '=' with 'a' on the left. But then, where one expects to see the subtree for '(3)' one instead sees a subtree called 'nil', with a left hand side of a single space, and a right hand side corresponding to the subtree for '(3)'.

I need to learn to switch gears more quickly from:

"This should be easy, I suck."

to:

"I'm having trouble with this, it must be hard."


One fun thing is the couple of lines in the middle there. I reached for a notebook to scribble some equations for myself, but then realized all I wanted was to be able to draw the fraction line horizontally -- and I'm sitting in a tool that can do that. Using the tool to debug the tool :boom: (At least until I have no tools because I broke my tools using my tools.)

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.

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