The system vocabulary below is similar to other such languages. I won't cover the basics of stack based contaminative programming here. The built-in operations and core vocabulary are similar to it's older brother f-flat inspired by HP RPL, Forth, Joy, Factor, XY and others. These includes operations that extends the vocabulary of the language. Programming in f-flat-minor is done by pushing values onto the data stack and then calling an operation. Since the data stack consists of only big integers, each value can be both a number or a pointer to an operation (either system or user defined). Compiles to "bytecode" (actually base64 VLQ encoded big integers).Minimal set of system instructions, no scopes.One return stack (many implementations use the queue as a return stack).Even with that limitation the resulting language is very similar. In F♭m there is only one data type (big integer) and, therefore, all operators have one meaning. For example + operator is addition, concatenation, or logical OR depending on the data types. The main concept of F-flat is that all system defined words should apply logically to all data types. While F♭m code looks very similar to F-flat code they are almost opposite in their philosophy. Progress Languageį-flat-minor is a minimal implementation of f-flat. Each language should run the example above and pass the test suite possibly with the help of a preprocessor. Then, if satisfied, built a full fledged a compiler and runner within this repo. Each implementation should generate the same output.įor each target language first implement a proof-of-concept interpreter either in this repo of in an online code runner ( replit for example). Each implementation should generate and execute the same "bytecode".The stack should consist of only big integers.Parsing should be as simple as splitting on whitespace.Minimal dependencies (standard library for each language).The challenge is to implement f-flat-minor in as many languages as possible within the rules listed below. It is meant to be a tiny stack-oriented language used for learning new languages. F-flat-minor ( F♭m for short) is a tiny toy language and baby brother to f-flat.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |