Email or username:

Password:

Forgot your password?
Devil Lu Linvega

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.
wiki.xxiivv.com/site/uxntal_im
:uxn:

2 comments
Potassium

@neauoire 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?

Devil Lu Linvega

@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

Go Up