Forma
A dead language about metaprogramming.
About Forma
Forma is a programming language a friend and I started working on in 2016, based on the principle that all programming languages suck.
So your solution is to make yet another language?
Kind of, but at the same time we thought it was a pretty cool idea for a project, and I've had lots of fun working on it, so it's a half-toy language.
The philosophy behind Forma is based on a few principles:
- Programming languages with a fixed syntax will inevitably have a weak point.
- Concise code is good code.
- The syntax of a language should be as simple as possible.
We decided that a good way to address these principles is to design a language where the syntax is completely configurable. To do this, Forma has a companion language, Præforma, that is run at compile-time to define and process syntax extensions for Forma, thus forming the syntax of Forma itself.
This seems needlessly complex.
To some extent, it may be. However, because it's definitely impractical to have to design the syntax of your language every time you start a new codebase, we plan to introduce the ability to create "dialects" out of collections of syntax extensions. This way, you can simply choose which dialect of Forma you want to work with when starting a new project, and extend it as necessary later on.
That's a lot of big talk, got any demos?
Well...uh...that's an excellent question, but...no, not right now. Despite having worked on this for about two years at the time of writing this, I made some bad design decisions early on that ended up snowballing, and as of this commit, I've had to backtrack a fair amount on a compiler that was already less than half finished. Currently the project is stalled because I don't want to make the same mistakes, so I need some time to reconsider some of the implementation details.
FormaB
The bootstrap Forma compiler
FormaB is a non-self-hosted compiler for the Forma language. I do have plans to write a self-hosted compiler, but...well...I have to be able to compile Forma first.
The code for FormaB is currently written in C++ (with a healthy serving of Ruby to help with generating Flex- and Bison-related files), although I'm considering switching to a different language like Rust due to the amount of time I've spent dealing with C++-specific issues.