Recent activity

Re: Raw Byte Rune 26 days ago

From Andrew Alderwick to ~rabbits/uxn

On Wed, Nov 09, 2022 at 08:58:53AM -0800, Devine Lu Linvega wrote:
>So I was thinking, what would you say if on top of : for raw label
>shorts, I added =label for raw shorts, and -label for raw bytes?
>Consider your macros that might begin with - or =.

I think it could be quite a rarely-used feature, and I had some
inspiration from Huffman coding…

What about a double rune?

We can keep the unadorned “:” for raw shorts, but we could also use “:;”
for the same thing. We can then use “:.” for raw zeropage bytes and even
“:,” for raw relative bytes.

Re: [PATCH uxn] 4 months ago

From Andrew Alderwick to ~rabbits/public-inbox

Hi Dave,

On Fri, Jul 08, 2022 at 11:30:26AM -0700, Dave VanEe wrote:
>This patch adds tests for most k (keep) variations of UXN
>instructions, based on the existing instruction tests.

Thanks very much for your work! I've added it to our main branch now.

There was a slight niggle with your patch, which was that you had 
converted tabs to spaces in your source file. If you're able to keep the 
tabs intact next time, that'll make it easier for us to work with :-)

Best wishes,

Re: File device and the debugger [was Re: Seeking the File device] 5 months ago

From Andrew Alderwick to ~rabbits/uxn

On Tue, Jun 21, 2022 at 07:43:10AM -0700, Hundred Rabbits wrote:
>Gotcha, thanks for the explanation :) I will merge the patch today and

I see the patch restricts File access to the current directory and 
below — well done!

I wonder what the appetite is to restrict it further so that if it's run 
in the home directory, it changes directory to e.g. ~/.config/uxn after 
reading the ROM. My threat model here is that running Uxn from inside 
~/uxn is safer, but when it's run directly in ${HOME} then it can 
read/delete my ~/.ssh/ private keys.

This is technically doable with little extra work, but I was interested

Re: File device and the debugger [was Re: Seeking the File device] 5 months ago

From Andrew Alderwick to ~rabbits/uxn

On Sun, Jun 19, 2022 at 04:28:35PM -0700, Hundred Rabbits wrote:
>Sounds like we're all onboard with this new File design.
>If we went this way, how would we read a file larger than 64kb, for
>example, I have a slideshow program, I use it a lot, which streams TGA
>files and draw them but does not cache them because they are larger
>than 64kb.
>I can imagine that we could have a seek address that is 2 shorts?

Yes, I think that keeping it to one short isn't that practical now we 
have rich applications like your slideshow program.

The snag then is that we don't have room for File/stat, File/delete and

Re: File device and the debugger [was Re: Seeking the File device] 5 months ago

From Andrew Alderwick to ~rabbits/uxn

On Mon, Jun 13, 2022 at 08:00:03AM -0700, Hundred Rabbits wrote:
>I've been thinking about this one and I was wondering, this file I/O
>stuff is quite unfamiliar territory to me, so bear with me ^^;
>I enjoy the current device because I can stream content from files
>without taking any space in the running program, for example, my wiki
>only reads 1 byte at a time, and so the buffer has a length of 1,
>which leaves me a lot of space to do other things with the program.
>If we were to go back to a simpler file device like we had, with the
>option of getting bytes at a specific address with a specific length,
>would I just have to increment an address in my uxntal program, and
>still read one byte at a time at that specific address, pretty much
>the same way I did? Would it be much slower since now it would

Re: "UF" Forth released 5 months ago

From Andrew Alderwick to ~rabbits/uxn

Hi Felix!

UF is indeed awesome, as Devine and Erik have said :-)

Just to note that in your README you say:

> SDL uxn added a timeout after which the VM aborts when no events
> are processed.

That restriction has been removed in SDL uxn. It may make it back in but 
it won't take action by default, so software such as yours shouldn't 
need this warning with an up-to-date uxnemu.

Thanks very much for sharing this with us!

Re: Execution timeouts [was Re: Error Code 4: Halting on non-empty stack] 5 months ago

From Andrew Alderwick to ~rabbits/uxn

On Sun, Jun 12, 2022 at 02:05:42PM -0700, Devine Lu Linvega wrote:
>> I mean the timeout caused by throwing an error when the event loop
>> has not been called inside a certain time limit:
>Oh! Yes, I think I'd like this removed too, I've never implemented it
>in uxn11, and on the raspberry pi it makes using uxn-sdl applications
>almost impossible since every little lag fills the stack is garbage.

I've been working on vsync support lately, but on reading this it's 
clear that the execution timeouts aren't working. I've disabled them 

File device and the debugger [was Re: Seeking the File device] 5 months ago

From Andrew Alderwick to ~rabbits/uxn

Hi all,

On Sat, Jun 04, 2022 at 02:21:48PM -0000, binarycat@envs.net wrote:
>Seeking within files is a very useful operation, especially in a 
>context where you can only have 2 files open at a time.
>The tricky part is trying to fit seeking operations into the existing 
>device.  we could use the unused file vector for this, but we could 
>also reuse `success` for this, as currently it is never written to.

As Devine said in their reply, we used to have a File device that was 
able to seek. Its ports were:

2 × vector (unused)

Re: Moving the order of stack operators 7 months ago

From Andrew Alderwick to ~rabbits/uxn

On Sun, Apr 17, 2022 at 01:13:59PM -0700, Devine Lu Linvega wrote:
>In any case, I find that this order of opcode is so
>beautiful, that I thought I should put it here while I toy around with
>it. Without changing the implementation details, it might be worth
>using this ordering of stack manipulating opcode.

The opcode shuffling has been added to main now:

The patch to uxnasm.c shows the changes most concisely:

- "LIT", "INC", "POP", "DUP", "NIP", "SWP", "OVR", "ROT"
+ "LIT", "INC", "POP", "NIP", "SWP", "ROT", "DUP", "OVR"

[PATCH dexe] Correct references to other projects in automated builds. 10 months ago

From Andrew Alderwick to ~rabbits/public-inbox

  README.md | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 0b6b8ce..ea062ae 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ You must have the [Uxn](https://git.sr.ht/~rabbits/uxn/) assembler and emulator.
 uxnasm src/main.tal bin/dexe.rom && uxnemu bin/dexe.rom
If do not wish to assemble it yourself, you can download [left.rom](https://rabbits.srht.site/left/left.rom).
If do not wish to assemble it yourself, you can download [dexe.rom](https://rabbits.srht.site/dexe/dexe.rom).
[message trimmed]