Blog



Daily Post

I made a compiler recently as a proof of concept before I dove into a language idea that I had. It's a language that's essentially the same as *lang. But, I'm on the fence whether I want to actually make it. Mostly because, it's a bit pointless. The language isn't actually useful, it's more just a curiosity. I like it because it has weird constraints that arise from it's simple definition. One of the things that was also holding me back was that I don't know what kind of interface I want between the language and external (likely C) libraries. For example, how does the language handle a buffer? Writing this just now I think the way languages like Lisp handle it, where it is almost entirely abstracted away by more language-friendly concepts, could work. Another of the issues that I don't like is the main interesting emergent limitation of the language is that most complex data structures aren't possible. You can have lists, stacks, queues, but you can't have trees, deques, or lists of lists. My reservation is that you can fake it by using a large number of variables. It makes me doubt the point of exploring the language if the limitations have a straight-forward work around. What does still give me hope is the devil is likely in the detail, and it might not be a problem in practice.

As a different programming language thought experiment, I was thinking about quines as part of the execution loop again. If there is some loop that runs the program then compiles the output and runs that program. This allows having variables that are hard-coded to each individual program, but to the overarching structure can be updated every cycle. Then I was considering some system which accepts a zip file and repeatedly unzips the contents. As it is possible to create zip files which unzip to contain themselves, it might be possible to execute a program by choosing which zip files to open as you descend into the file tree.

I have also gotten thinking about the paint program again. I had a very quick look at some research and it seems like "vectorisation" is the relevant term. I also found "inverse rendering," but that seems more used for 3D geometry and light transport. I will have to write up what my vision for the paint program is at some later date, along with all the programming language shenanigans.