Meow5: The Conclusion

submited by
Style Pass
2023-11-21 21:30:05

Meow5 is a programming language experiment written in assembly targeting i386 (32-bit) under Linux, and the second "season" of Assembly Nights.

In the usual sense, it means that programs are composed by stringing functions sequentially and then passing values from one to the next (like Forth, Joy, Factor, or Unix pipes).

Machine code concatenation is also known as "inlining". Instead of calling a function from a "call site" and returning after the function is done, the raw CPU instructions for that function are written (you could say "expanded") at the call site. When you run the program, the final effect is the same.

It turns out that as a side effect, this makes Meow5 an interactive just-in-time compiler. Meow5 programs can be run in the interpreter interactively, or they can be written to disk as tiny stand-alone Linux ELF executables. We’ll dive into this in a moment.

This tiny example shows the concatenative data flow - the "Meow!\n" string comes before print. The function expects to find the string to print already on "the stack", waiting for it.

Leave a Comment