@neauoire

shorter string printing routine ^^ shaved 3 bytes @neauoire

@str/<print>/>loop ( str* x -- str* ) #18 DEO INC2 ( >> ) @str/<print> ( str* -- ) LDAk DUP ?/<print>/>loop POP POP2 JMP2r

trick is to remove the immediate jump back, and reuse the lambda instead
though this means that some of the loop body goes before the routine address
but this is only a problem if you're falling through directly


#uxn #uxntal #18

big plans this weekend ^^

gonna be making a multiplayer game in uxntal…

then I can finally share my network device to the mailing list :D

gimmie game ideas! preferably with synchronous & lossy networking (e.g. pong), because I wanna test UDP mode!


#uxn #uxntal #gamedev #netcode

I wrote a gopher web server in uxntal!
(disclaimer: run at your own risk, see below)

introducing… gopher-serv.tal :D

it's the bare minimum: no automatic directory listings, no error pages, and sandboxing is enforced by the emulator(!!)

but what it does have, is 201 bytes of gopher-serving goodness :D

src: https://codeberg.org/notchoc/gopher-serv.tal
emu: https://codeberg.org/notchoc/uxn2
run: uxn2 -N gopher-serv.rom ADDRESS

!!! DISCLAIMER: DO NOT EXPOSE THIS TO THE INTERNET !!! UXN2 DOES NOT HAVE SANDBOXING (YET) AND ALSO I DO NOT MAKE ANY GUARANTEES ABOUT SECURITY


#uxn #uxntal #gopher

implementing OOP inheritance in uxntal… has science gone too far?

( @|Entity base physical object ) @entity/__def__ %Entity/pos% { &pos/x* $2 &pos/y* $2 } %Entity/vel% { &vel/x* $2 &vel/y* $2 } %Entity/def% { Entity/pos% Entity/vel% } %Entity/methods% { |Entity/pos/get &pos/get |Entity/vel/get &vel/get } |0 /def% &def/__size__ |10 &__size__ |/__def__ &pos/get ( <@>* -- x* y* ) LDA2k SWP2 INC2 INC2 LDA2 JMP2r &vel/get ( <@>* -- xv* yv* ) INC2 INC2 LDA2k SWP2 INC2 INC2 LDA2 JMP2r ( @|Critter controllable entity ) @critter/__def__ %Critter/def% { Entity/def% &buttons $1 &health $1 &state $1 &target $2 } %Critter/methods% { Entity/methods% |Critter/buttons/get &buttons/get |Critter/health/get &health/get |Critter/state/get &state/get |Critter/target/get &target/get } Entity/methods% |0 /def% &def/__size__ |/__def__ &buttons/get ( <@>* -- buttons ) ;/buttons ADD2 LDA JMP2r &health/get ( <@>* -- health ) ;/health ADD2 LDA JMP2r &state/get ( <@>* -- state ) ;/state ADD2 LDA JMP2r &target/get ( <@>* -- target* ) ;/target ADD2 LDA2 JMP2r ( @|Player kijetesantakalu ) @player/__def__ %Player/def% { Critter/def% } Critter/methods% |0 /def% |/__def__ @player/draw ( <@>* -- ) /pos/get #41 ;Entity/kijetesantakalu.icn !Screen/draw-sprite
#uxn #uxntal #41

open-world^ scrolling sandbox! it's starting to feel like noita :D

^: 1024x1024 particles to be exact, but surely that should be big enough..?

P.S. the "worldgen" is actually taken from Worley.jpg! https://en.wikipedia.org/wiki/Worley_noise#/media/File:Worley.jpg


#uxn #uxntal #gamedev

@angelwood

finally got around to making my uxn contact card! thanks to @angelwood for the idea and inspiration ^^

source: https://codeberg.org/notchoc/card.tal
rom: https://codeberg.org/notchoc/card.tal/raw/branch/main/card.rom

hint: try running it and clicking anywhere :>


#uxn #uxntal #r

( 76543210 fedcba98 -- _____0__ _fe76dcb a9854321 ) sure be doin my head in

probably shouldn't be writing a bit-twiddling optimizer for just 39 bytes of opcode…


#uxn #uxntal

I was asked to send the event a "logo" of the #Uxntal programming language that read well in a small resolution.

The full Uxn mascot looked too busy, I thought about sending one of @rek's turnips that we use in the docs. But it didn't look too good next to the other fancy serious logos(unfortunately Go wasn't on the list to outderp it).

I sent this.
This is the one.

I'm working on a little #Uxntal optimisation algorithm that is fundamentally of little use, it's one of those "I can't help myself" things, but I think it is quite nice:

What it does is, where possible, eliminate stores and loads in an <addr> <store with keep> ... <load> sequence, regardless of the intervening sequence. So it disentangles the stack juggling needed to put the address at the top of the stack for the load from the other operations.

After that is done, I have another algorithm that can eliminate the store/load pairs altogether.

I'll explain more when I actually get it to work.

Programming at work -- which once was my favourite thing in the world -- has really been losing its shimmer for me lately.

It's not just the AI stuff -- it's the containers and tests and the CI and transpiling. It's having way more responsibility and deliverables and expectations. It's the legacy of massive projects that were so fun and interesting to build that are now peoples' full time jobs to use.

But this morning I drew a little pink square on a screen using #uxntal and that gave me little butterflies like the first time I figured out I could negative index arrays in python 1000 years ago.