browser

The philosophy of axy

philosophy
calendarsave
I have always enjoyed creating programming languages. min was my first serious attempt, and probably the most practical (it also powers this site). hex followed as an experiment to reuse min syntax for something truly minimal, but still, not minimal enough (32-bit integers, support for over 4000 symbols, built-in external command execution, etc.). xyw then was born out of the admiration and awe I have for Uxn as a very minimalist, low level, and yet extremely practical system. Still, xyw is very similar to Uxn and can address the same amount of memory (64KiB), although is more minimalist in terms of syntax and exposes simpler devices. With axy, I wanted to create a system that was truly minimal and constrained, somewhat like the FALSE esolang, but also easy to learn and use. While experimenting with Uxn and xyw, I always craved the possibility of being able to address memory using only one byte. Sadly, that meant that the system would have been able to only access 256 bytes of memory, which is obviously not enough for creating anything meaningful. ...or is it? It turns out that 256 bytes is a decent amount to write some meaningful programs, especially if the language uses only one byte for addressing, one bytes for each opcode, and automatically pushes any byte that is less than 128 to the user stack without even specifying a literal opcode (see modes for more information). I also "cheated" a little bit by adopting a design similar to the Harvard Architecture: axy programs are loaded in 256 bytes of "rom" which cannot be modified (programs can only use the LPM instruction to read it), and they can use another 256 bytes of data ("ram"), accessible via the LDR and STR instructions. To further simplify things, the x and y register can reduce the friction common to forth and other stack-based/concatenative languages when it comes to managing state only through the stack. Also, unlike Uxn, axy only provides a very simple way to interact with the outside world, not via devices but via just the GET and PUT instructions, commonly mapped to standard I/O. Obviously, you cannot use axy to implement very complex programs. That is by design. Instead, it should help you answer the question "what program can I fit in 256 bytes?", and it should really make every single byte count. In a world where AI is quickly and inesorably taking over corporate programming at an unprecedented scale, axy aims to let you express yourself in code, one byte at a time, at your own pace.