1
4
uxn manual : uxntal cheatsheet (tocano.codeberg.page)

Hello. I am writting a manual based on my personal experience on uxn. I will be updating it as I develop on my own while taking in some knowledge from already existing libraries.

The objective of learning more about the uxn ecosystem is not to create something "new" and "better", but to learn more about PDA and associated algorithms. This will train my brain to think outside the box because of the restrictions on the way uxn works.

2
8

uxntal is the programming language for the uxn virtual machine.

uxntal is a concatenative language, which works like a pipeline of functions which take the result from the previous function, apply a transformation, and return the value to the next operation. "[T]here are no precedence rules, the calculations are merely performed in the sequence in which they are presented".

In concatenative languages the block mul(add(x, y), z) could be written as z x y add mul. Each function takes its parameters from a common data structure, which in this case is a stack, and data types are dynamic, but may be infered with dev tools.

A stack is a data structure where values are "pushed" / added on top of the stack and "popped" / removed from the stack. Operations will always be applyed on the top element(s).

In uxntal you work with bytes (8 bits) and shorts (16 bits), usually in hex notation, and you have some basic stack operators.

  • LIT, push a value to the stack
  • POP, pop a value from the stack
  • DUP, copy a value from the stack
(so the program)  
LIT 00 DUP  

(would end up with a stack)  
00 00  

(and adding a POP)  
LIT 00 DUP POP  

(would remove the last element)  
00  
3
2
What is uxn ? (wiki.xxiivv.com)

uxn is a virtual machine that runs programs written in uxntal and assembled into bytecode.

It works in a similar way to how Java ecosystem work: (1) you write Java code, (2) compile the code into bytecode, (3) which will be executed by JVM. In this way, you write code targetting the JVM and not the actual hardware, reducing the work for developers. The JVM may be implemented for a variety of machines, and if specifications are carefully followed, any program written should work for all implemented machines.

In the uxn ecosystem, uxn is the JVM and uxntal is Java.

uxn computing

43 readers
4 users here now

uxn is a virtual machine, programmable in the language uxntal. It is a portability layer for personal computing that is capable of hosting a variety of small interactive graphical software.

https://wiki.xxiivv.com/site/uxn.html

founded 1 week ago
MODERATORS