Write Only Log for 22 Oct 2025 - osric.uk

Now I've got a html parser, I should be able to put together a template engine thing, either using processing instructions or <on-server> tags.

All I want is to be able to create new web pages through my website! Is that too much to ask! I miss the site I had in the early 00s that did exactly that with mod_perl; there was an editor page that copied itself into a textarea and saved changes over itself. (Yes, I bricked it quite a few times!)

I should be able to do something like that with ASP, except ASP is compiled at build time. (There is a live recompile package but it's very much intended not to be run in production) (Also, I'm a bit more paranoid than I used to be, so it works be nice to run pages in a very small sandbox).

Really, something like html with embedded lox should work. Parse the html, run the scripts, paste the output back into the html and ship it to the client. Give lox an API for storage (along the lines of local storage for browsers), and maybe the ability to make HTTPS requests from the server, and I can stay writing really simple tools without being too do that whole build/deploy dance.

Blah, blah, blah, security, but my current with system is good enough (and that's why I'm using a different language).

Keep pages in a database, and use the same db as a backing store for the storage API.

Maybe.

On the one hand I want to be able to play with the editor in the editor. On the other, I want to be able to roll back changes when I break the editor!

If the editor is an enhanced textarea then fall back is easy enough, add a query param to say either don't include JS, or load a specific version, but I'm not sure that textarea can give me enough control.

What do I want from an editor? Auto indent! Maybe vim controls. Indent looks fairly easy ("on a enter keystroke check how many spaces are at the start of the current line, and insert those"). Vim (modal) controls is probably going to be a grind more than anything else - each motion will be differently complicated, and same for verbs, but not that bad so long as I keep the two nice and sperate.

I wonder how hard it will be to get the cursor position in terms of character row/column.

Alright. First job is to get cursor movement working, then mode switch to insert, then delete.

To remember your current position in the blog, this page must store some data in this browser.

Are you OK with that?