Bell is a work in progress programming language that compiles to MCfunction (Minecraft's language for creating datapacks).
It provides a higher level, smarter workflow for developers writing MCfunction so they can write more code faster, better and in less space. To be able to reason about your code and make changes easily. No more manically going around the datapack updating scoreboard player names or spending a full day translating a complex formula into MCfunction code.
Progress
Bell has finished it's first release. The goal of this release was to provide a simplistic, working version of Bell, to get something out there. There are some parts I am really proud of, others less.
I've learned a lot while developing this release. And there are so many parts I'd like to work on now. Bell will be getting a rewrite in the near future so that it has more features, better and original syntax and produces more optimized code.
Known bugs
It is possible for condition branches to effect other ones. I.E:
if x == 3 {
println(x);
x = x + 1;
} else if x == 5 {
println(x);
} else if x == 4 {
println(x);
}
will print:
3
4
This is actually a common bug in many compilers like this (such as Debris and WASMcraft).
A fix will arrive once I redo Bell's MIR. The gist of the fix is to lower if-else-if-else
into if-else
like so:
if x == 2 {
// Snip!
} else {
if x == 3 {
// Snip!
} else {
// Snip!
}
}
In more detail, the actual fix involves tracking which branch was taken using a special variable.