Write Only Log for October 2026 - osric.uk

So. I've typed in (most of) another copy of clox from Crafting Interpreters (just need to do the optimisations). What's next?

  • Arrays/Lists (dynamic, numeric indexed). Can mostly fake it with objects, but language support would be nice.

  • Try/catch/throw, or some kind of runtime error handling.

  • Standard library. At least string functions (length, split, char at) and IO (both files and network). Exposing basic maths maybe. Graphics?

  • Language server, for format and syntax errors as mvp. Eventually self hosting, but vibe coding something that works in c# to start with.

  • Compiler, either a lox compiler or a C compiler. C compiler is bigger, but lox compiler needs a runtime (which I really don't want to write in assembler).

I think language server is fairly high priority, so I can start writing in Lox without going crazy. Which leads to the last point:

  • A project. The headline here is "browser", but that breaks down into a bunch of sub projects - fetch, html parse, css parse, JavaScript engine, DOM, document render, UI, text mode or gui.

Anyway.

Time for actual design!

I want calls like string.length and string.split(",") to work. This means handling the dot operator, or maybe updating OP_INVOKE.

Code like var x = string.split; x(","); should work, even if its a bit silly. That means updating OP_GET_PROPERTY.

Is length a field or a method? If it's a method, it will need brackets when called.

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

Are you OK with that?