Key Design Decisions
kddsThis page documents the key design decisions behind xyw, as well as the goals and direction of the project.
=== Simplicity
xyw is meant to be simple, both in terms of usage and implementation. It should be easy to learn to program in it, but also to implement it from scratch.
xyw does however lean more towards programming simplicity even if it has a cost in terms of implementation simplicity: for example, it does provide things like support for escape characters in strings, even if it complicates the code needed for parsing input a little bit.
=== Reduce cognitive load
xyw tries to reduce cognitive load as much as possible. Both in terms of its syntax, which only includes five types of tokens, and also by not relying exclusively on the stack for managing state.
=== Small binary size
The xyw assembler is able to generate small bytecode image files, that have no header and can be loaded into memory as-is. Additionally, you can also leverage a relocatable direct page (which is set by default to the device page) to enable single-byte addressing, and thus further reduce the emitted bytecode.
=== Easy to port to other systems
xyw should be easy to implement and port to many different operating systems and using different programming languages. At present, the canonical implementation is in C, with not many dependencies, but more implementations are encouraged and very welcome.
Although its source code may not be as elegant and concise as Uxn, what it lacks in succinctness and elegance should make up in code clarity, helpful comments, and documentation.
=== Solid bedrock for permacomputing
Like Uxn and Bedrock, xyw strives to follow the principles and the philosophy of permacomputing, aiming at defining a very simple specification that can be easily re-implemented and used to create simple, minimalist, but fully-functional computer programs.
=== Do more with less
One of the main problem with modern computing is that it often assumes that relatively large amounts of system resources are available and can be used freely without too much care. In 2025, it is often standard to download several hundred of MBs for mobile applications, even simple ones in many cases... people forget that in 1985, early computer programs were used to do anything from games to send space shuttles into space with a lot less memory and a lot less computing power, often several orders of magnitude less.
By learning to do more with less [resources], programmers learn how to create computer programs that play fair with our environments and are far more efficient than their larger and more bloated counterparts.
After all, the Uxn ecosystem proves that this is possible and easily achievable, with the proper tools at your disposal.
=== Terminal as the main display abstraction
Back in the early days, terminals like the VT100 and VT220 introduced a simple but very powerful abstraction: by supporting ANSI characters and escape codes, they did not expose raw pixel access to the programmer but focused on providing what they needed the most: a fast way to display text characters and automatically manage columns, rows, and scrolling. That's why xyw is currently only able to access a terminal device, and is not able to draw pixels on the screen -- although that could potentially change in the future, by implementing an appropriate device.
=== Learn about computing
Last but not least, xyw aims to be a teaching tool. Something anyone can use to learn more about computing, how to handle terminal input/audio, how to draw pixels on the screen, how to create audio sample. By deliberately not using many abstractions, it aims at teaching you how computers really work, not how to use the latest and coolest programming language or framework.