Skip to main content


Added a few notes to the #uxntal page on how to quote/unquote opcodes and functions. "Quoting" here means to defer an operation, as in in, evaluating it later. It's doubles as a little introduction to Uxn's self-modification patterns.
http://wiki.xxiivv.com/site/uxntal_immediate.html
:uxn:
in reply to Devine Lu Linvega

I'm learning uxntal on the weekends, and the new notes are helpful. Thanks!

I still don't quite understand the use-case of leaving unexecuted opcodes on the stack though. In your example you use use quoting to apply an operation recursively to an array, but I imagine that a method could be written which gives identical results but does not use quoting. If that's the case then what's the advantage of writing unexecuted opcodes to the stack? There must be a reason. What am I missing?
in reply to Potassium

You won't be needing this in the tutorials, although you might need to be familiar with the context of quoting/unquoting of subroutines.

This is just to illustrate the concept. In a calculator program for example, you might en up having to juggle the opcode literals on the stack.

Sometimes if I need to either do one of two things with a boolean, I might do:

( b -- res ) LIT2 ADD MUL ROT JMP SWP POP #00 STR $1

This entry was edited (1 year ago)

Lo, thar be cookies on this site to keep track of your login. By clicking 'okay', you are CONSENTING to this.