Flower is a programming language

Humble beginnings

Where I started from

I was always sort of interested in trying to build a programming language, but - as usual with most of my projects - I always kinda just forgot about it and moved to the next project. I still do that a lot, and I always think each of my projects are under threat of getting forgotten. That said, I've been working on Flower for something like a year now and am confident enough that this maybe won't end up in the scrap pile without showing any results. That said, as it's a hobby language, I don't have endless hours to spend on it, which is why the development is a bit slow at times.

I don't have any formal CS education or training. I do however work in software industry, and I had contributed to various open source projects - including parts of LLVM. So I wasn't new to this world by a long shot. It's been kind of a lifelong hobby of mine.

I had gone through Kaleidoscope tutorial a couple of times with efforts like this, but never got much further since what I wanted to build was always so different from Kaleidoscope, and I felt like it was giving me a commented example of a small compiler frontend instead of teaching me how to do what I want. And I was kinda happy working with C++. It did most of the things I wanted, it didn't get in the way while doing it. Sure, I had to write a lot of library code, but much of that was reusable in my work, and I enjoyed making at least somewhat-well-thought implementations of basic features which were absent from C++ standard library. This peace lasted for a long time and I was content.

The end of an age

But as time passed, I found myself at the place where I followed C++ development pretty closely and compiled my own compilers. I also had found some new languages like Zig and Rust and started to follow some language development communities. (And made my own conlang, but not quite sure if that's relevant)

I decided to give writing my own language one more try, and finally got something running that was more to my liking.

And then I figured out that it was garbage.

I would have to scrap almost everything in order to get to the point I wanted to get to. But in the end, that garbage ended up being pretty good manure for the next iteration, which is basically what I'm working with now. It has gone through multiple rewrites too, though, but basically it's more like a Ship of Theseus now than something completely new.

When I finally got the new compiler to a stage where it could output, at least by some definition, a working program, I decided to do something new.

It's just this blog, sorry

I figured that even if I end up scrapping this project or can't get the language working like I want it to, I have been working on it and learnt plethora of lessons. So I at least think there's probably something valuable I can hopefully offer in the form of stories like this. They will probably end up a lot more technical than this introduction.

What I plan to discuss is a bit more practical story about how the language has changed during the first year of on-off-development, the development choices, the hurdles and broken exceptations that have come and gone while I have been working on the language, and maybe give some insight into compiler and language development at the same time. Some things I've tried didn't work out for me, but maybe they could work out, or just be interesting for you?

Posted 2022-09-18 in meta

nontechnical