Programmers must love syntax errors, since we make them all the time! How can we make even more things have the goodness of syntax errors?
Are spelling/typo detectors a sort of syntax error?
If you want syntax errors, you first need syntax. A simple way to force anything you like to have syntax is to represent it as text, in a terminal. Then you just make the editor notice things like “[[]” is an error, or “you can’t put the box after the task you square”.
Okay, but what about GUIs? Wha- people still use those? Gosh…
With a GUI, a to-do list’s syntax errors are detected by the user, who says things like “wha- the box has dissappeared” or “why is the box over there” and so on. Most users are pretty error tolerant though, more so than most computers, so they might not mind if some long text means the description goes below rather than alongside the box. Unless you’re Donald Knuth.
Could we describe this syntax to a computer? Could we get a computer to parse it? If we’re not interested in using text, we need a sort of “graphical grammar”.
Then the author describes one such grammar for to-do lists. It’s a fun exercise in abstraction and simplification.
Then they wrote a little implementation of this, where you click on boxes to add text and checks, and drag them around. If you don’t have a title, or don’t have a checkbox or description &c., there’s a red pop-up going “syntax error!” it’s pretty funny.
my takeaways:
- this was really fun!
- i liked the exercise of coming up with a graphical grammar for something you wouldn’t usually think of as having syntax.
- a todo-list was a really good example.
- what else could you do? obviously i think of reading lists…
- desktops? ooo yeah that’d be cool.
- the demo being so functional was very fun. interactive. :))