From Devine Lu Linvega to ~rabbits/public-inbox
Thanks :)
From Devine Lu Linvega to ~rabbits/uxn
Hi all! I've been working on this Uxntal operating system for the better part of the past few days, and I started noticing that things were kind of weird, and that building without tail-call optimisations resolved the issue, the project is massive and I couldn't for the life of me, figure out where the optimisation issue was occurring. https://git.sr.ht/~rabbits/potato/commit/8323c42390821050418503bfd823aba17dd821b4 So yeah, be careful out there, I'll try to weed out the bug and figure out which part fails. Just a head's up :) Have a good rest of summer
From Devine Lu Linvega to ~rabbits/uxn
This is specifically for Felix, but I'd like to make this conversation available to all, in case anyone has ideas. In UF, when uxncli under/overflows, it breaks the repl. It'd be nice to agree on a way to handle this stuff by using this as a usecase. The way I would handle this is to set a System/vector and clean up the stack in that vector, and throw a custom error. Do you think that would work for you? We could make that behaviour standard across emulators if that would do it? What would be the ideal UX to handle that?
From Devine Lu Linvega to ~rabbits/uxn
I've implemented a simple check using a device support bitmask at the emulator level, it'll catch 90% of the incompatibility issues which will likely be folks trying to run graphical roms with uxncli. The report came from someone using uxn11 on BSD, but this should probably be added to uxnsdl as well. https://git.sr.ht/~rabbits/uxn11/commit/5d837313e56d19cd6ecfa2ad9746edca20afb5f6
From Devine Lu Linvega to ~rabbits/uxn
Found an exception. The file device is a bit tricky I suppose, for example, noodle doesn't assign a File/name until it tries to save, but the device does have a vector, although it is unused. Maybe applications should still test available devices on reset, I could set a #0000 to File/vector on reset to make sure that it is available. If all else fails, a bit mask in a byte might work, but let's try to see if we can do without first.
From Devine Lu Linvega to ~rabbits/uxn
I've considered this but I couldn't find any example where the errors didn't fire, for example, the moment you try to set a vector for mouse or controller devices, the error fires. The reset vector will invariably set some sort of vector or something that will trigger the errors, there might be a way to skip the check somehow that I haven't conceived of yet.
From Devine Lu Linvega to ~rabbits/uxn
Someone asked me if we could add a way to detect if a device is a missing, the usecase is like, trying to load noodle, with uxncli, should say "Device is missing", something like this. We could do it in emu-space, like: when a read/write happens on a missing device, it prints a warning saying that the device is missing. We could do it in uxn-space, maybe: if after setting a vector, the vector is still #0000, then that means the device is missing? It would work for most devices that disambiguates uxnemu/uxncli, but datetime has no vector(yet). Let me know what you think, in the meantime, I'll add warnings to uxncli when a DEI/DEO occurs on a missing device.
From Devine Lu Linvega to ~rabbits/uxn
Since, it turns there is an actual use to keep stacks across vectors like you demonstrated, and also Claude contacted me about this off-list to tell me they also used it, then forget about error4 altogether, there's nothing stopping you to just lead things in the stacks :) I found a way that I liked to work around this as well, the reason why I was even considering error4 was that I tend to rely on this to tell me if I have leaks. Without having to change much at all, I figured that if I don't print the stack content when they are empty, and leave a #01 .System/debug DEO at the end of each vector in the programs I'm writing, the effect is the same.
From Devine Lu Linvega to ~rabbits/uxn
I've noodled around with this this afternoon and catching busy stacks on break in userspace/per-application is pretty cumbersome and invasive. So what I did was this, a typical debug query: #02 .System/debug DEO And thereafter, the uxn11 emulator is printing a warning(not errorring), when it is breaking on non-empty stack. It's non-intrusive, varvara-space defined and straight-forward. I've grown used to this little safeguard and I'd like to keep it in, this might be the way. I'll spend a few more days with this to test it out :)
From Devine Lu Linvega to ~rabbits/uxn
I've done a bit of a revamp to the Uxntal documentation based on some feedback I've received today with the hopes of approaching something like a freeze of the uxn core specs. This doesn't cover anything Varvara related but I figured I should probably say a few words about vectors and events. This is aimed at someone who might be implementing an emulator, or someone wanting to learn how to write uxntal programs, but it is not a tutorial, just a reference of the behaviors of the uxn vm. I've tried to have valuable examples to most opcodes. I hope you like it! I'd love to know if you think, let me know if I've missed something.