home.social

#uxntal — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #uxntal, aggregated by home.social.

fetched live
  1. CW: long code snippet, not screen-reader friendly

    @snufkin_vc

    using my fork of drifblim, OOP and inheritance looks like this:

    @animal
    
    ( | type enum )
    >{ |0 &+ |}
    
    ( | dispatch tables )
    @/[]eat   &+ $10 @/
    @/[]speak &+ $10 @/
    @/[]move  &+ $10 @/
    
    &default-eat ( self* -- )
        { "... 00 } STH2r str/print
        POP2 JMP2r
    
    &default-speak ( self* -- )
        { "... 00 } STH2r str/print
        POP2 JMP2r
    
    &default-move ( self* -- )
        { "... 00 } STH2r str/print
        POP2 JMP2r
    
    ( | init defaults )
    %/Def{ {
        >{
            |&[]eat/+   =&default-eat
            |&[]speak/+ =&default-speak
            |&[]move/+  =&default-move
            |&+
    }
    
    ( | bump pointers )
    %/Def} {
            |&+ $1 &+
            |&[]eat/+   $2 &[]eat/+
            |&[]speak/+ $2 &[]speak/+
            |&[]move/+  $2 &[]move/+
        |}
    }
    
    (
    @|Cat )
    /Def{ &Cat
        |&[]speak/+ =&Cat/speak
    /Def}
    
    @/Cat
        &speak ( self* -- )
            { "meow! 00 } STH2r str/print
            POP2 JMP2r
    @/
    
    (
    @|Dog )
    /Def{ &Dog
        |&[]speak/+ =&Dog/speak
    /Def}
    
    @/Dog
        &speak ( self* -- )
            { "woof! 00 } STH2r str/print
            POP2 JMP2r
    @/
    
    (
    @|Flying )
    %/Flying/Def{ { /Def{
        |&[]move/+ =&Flying/move
        |&+
    }
    
    %/Flying/Def} {
        /Def}
    }
    
    @/Flying
        &move ( self* -- )
            { "swoosh... 00 } STH2r str/print
            POP2 JMP2r
    @/
    
    (
    @|Bird )
    /Flying/Def{ &Bird
        |&[]speak/+ =&Bird/speak
    /Flying/Def}
    
    @/Bird
        &speak ( self* -- )
            { "chirp! 00 } STH2r str/print
            POP2 JMP2r
    @/
    
    (
    @|Bat )
    /Flying/Def{ &Bat
        |&[]speak/+ =&Bat/speak
    /Flying/Def}
    
    @/Bat
        &speak ( self* -- )
            { "eep! 00 } STH2r str/print
            POP2 JMP2r
    @/
    

    #uxn #uxntal
  2. Ported the uxntal.vim syntax highlighting plugin over to Lua for Neovim.

    Adds :checkhealth functionality, matchpairs support (so % jumps between pairs), and vimdocs (:h uxntal).

    github.com/edmondburnett/uxnta

    #uxn #uxntal #neovim

  3. Ported the uxntal.vim syntax highlighting plugin over to Lua for Neovim.

    Adds :checkhealth functionality, matchpairs support (so % jumps between pairs), and vimdocs (:h uxntal).

    github.com/edmondburnett/uxnta

    #uxn #uxntal #neovim

  4. I'm starting a blog today at Uxnomicon so I dont flood the #uxn #uxntal and #varvara or the irc channel lol

    Sorry about that, sometimes I feel to exited and start talking to myself, but I don't want to spam anyone.

    If you are a Uxner, feel free to use Uxnomicon for your dev blog (about uxn related) or for your uxn projects documentation, you don't even need to register to contribute to this uxn wiki.

    uxnomicon.miraheze.org/wiki/Sn

  5. Uxntal scripting unlocked!

    paste.sr.ht/~ismael-vc/88d172d

    Paired with uxncli11 subproccess API, I can actually run my own build chain in uxntal alone.

    I'm calling it bake, first to be used in the uxntal koans:

    git.sr.ht/~ismael-vc/uxntal-ko

    I am currently using a wrapper in gforth, but now that I can use shebangs for uxn I don't think I need that anymore! <3

    #uxn #uxntal #varvara

  6. yeyyy we have assert-mem with colors! 🎨

    Do you think it is readable? the test source and the output?

    The implementation just give me time to make it better, but I'm glad this works now.

    Now I only have to fix the stack checking assertion and I think it is complete, and ready fro the uxntal koans. ✅

    I'll have to provide my own copy of drifblim with coloring, because the first exercise will be to fix the syntax of a broken test suite, then to actually fix the tests!

    #uxn #uxntal #varvara

  7. Just finished the stream!

    I implemented some debugging routines inspired by @ show macro in julia, I defined @ show/byte and @ show/short
    ie:

    ( introspection )
    { "@ foo } ;foo show/byte
    { "@ bar } ;bar show/short

    BRK

    ( variables )
    |1335 @ foo [ 42 ]
    |1337 @ bar [ 1337 ]

    ~src/zen.tal

    it get printed like (with colors if enabled)

    |04f8 @ foo 42 ( B )
    |04f9 @ bar 1337 ( .7 )

    #uxn #uxntal #varvara

  8. I made some progress on the "Uxntal Koans":

    git.sr.ht/~ismael-vc/uxntal-ko

    Since this is for the #catjam, I decided to manage my own build tool in Tal with a thin wrapper in Forth, so I just call:

    $ ./bake
    $ ./bake clean

    Instead of:

    $ bin/uxncli bin/bakefile.rom clean

    And the setup has to be done either way outside uxntal; make sure bin dir exists, compile uxncli with subprocess support and assemble the bakefile.tal.

    Once that is done, the rest will be handled 100% by uxn!

    #uxn #uxntal #varvara

  9. Zental testing framework in 1 KiB for Uxntal, version 1.0.0!

    Code:
    git.sr.ht/~ismael-vc/zental

    Docs and examples:
    uxnomicon.miraheze.org/wiki/Ze

    I still have one month before the #catjam ends in which I'll try to implement "Uxntal Koans". 📜

    Inspired by the original "Ruby Koans", an introductory tutorial to the language as a series of test cases the learner has to fix in order to reach enlightenment! 🧘

    I intended to make a TUI game at first but I like the idea of koans better. :P

    #uxn #uxntal #varvara

  10. I spent the night fixing my zen #uxntal testing lib, the documentation is updated:

    uxnomicon.miraheze.org/wiki/Ze

    Added:
    * ValueError if expression is not reduced to 00 or 01.
    * ArityError (OverLeak and UnderLeak) if wst is not in an expected state before running a test and halt immediately.
    * early toggle to exit on the first failed test (default is to keep going).

    With this I think I can start implementing uxntal koans. :)

    200 lines of code, 1042 bytes gotta shave 18 bytes at least.

    almost done!

  11. CW: cursed code, not screen-reader friendly

    in vanilla uxntal this would look like

    @type
    &Frob $1
    &Knob $1
    &Smob $1
    
    ...
    
    &vtable
    =&frobnicate
    =&knobnicate
    =&smobnicate
    

    much simpler, yes!

    but now the definitions are spread across multiple places, forget splitting entities into their own files…


    #uxntal #uxn
  12. CW: cursed code, not screen-reader friendly

    hacked modifiable labels into uxntal, for spooky action at a distance :P

    |0 @type/Ptr+
    
    ...
    
    @type
    %/[ { >{  ( } ) |&Ptr+ }
    %/] { &Ptr+ |}_ } 
    
    &vtable &vtable/Ptr+
    %/{ { >{ ( } ) |&vtable/Ptr+ }
    %/} { &vtable/Ptr+ |}_ }
    
    &dispatch ( type -- )
      #0018 SFT2 ;&vtable ADD2 LDA2 JMP2
    
    ~frob.tal
    ~knob.tal
    ~smob.tal
    
    ( | frob.tal )
    /[ &Frob $1 /]
    /{ =&frobnicate /}
    &frobnicate ( -- ) JMP2r
    

    makes organizing OOP stuff a lot easier!


    #uxntal #uxn #0018 #0018
  13. Take a seat aboard the Lepore Express, listen to a bit of music, play games, look outside, kickback, try to meet with everyone.

    This is @rek and I's humble submission to #Catjam 2026, this rom features a ton of cameos from all sorts of projects we've released over the past 10 years, how many can you recognize? It's written in #Uxntal, a concatenative assembly language.

    play/download: hundredrabbits.itch.io/lepore-
    source: wiki.xxiivv.com/etc/flick.tal.

  14. Take a seat aboard the Lepore Express, listen to a bit of music, play games, look outside, kickback, try to meet with everyone.

    This is @rek and I's humble submission to #Catjam 2026, this rom features a ton of cameos from all sorts of projects we've released over the past 10 years, how many can you recognize? It's written in #Uxntal, a concatenative assembly language.

    play/download: hundredrabbits.itch.io/lepore-
    source: wiki.xxiivv.com/etc/flick.tal.

  15. hexdump -C needed a spa day, so I gave it a massage:

    paste.sr.ht/~ismael-vc/a074bf4

    :3 #uxn #uxntal #varvara

    Though I'm making my hexdump a tool that can be passed a ROM file as an argument (it was inspired by hexdump -C), it is nice to see that with a little effort is doable as well with the existing tools.

    I also bought the awk pocket reference, so useful.

    (If there is a better way to do this with awk, I'd love to learn!)

  16. I made an article at #Uxnomicon documenting the API of Zen, my tny #Uxntal testing framework:

    uxnomicon.miraheze.org/wiki/Ze

    I hope it might be helpful for others as it has been to me!

    : )

    #uxn #varvara #TDD

  17. #Uxntal #testing #framework in 760 bytes.

    paste.sr.ht/~ismael-vc/2f2d41f

    I have called it Zental, in the images you can see it testing itself (the failed tests are expected).

    Usage: paste.sr.ht/~ismael-vc/82d44be

    Just create a routine under the @ test scope, ie:

    @ test/foo ( -> )
    /verbose
    { "some 20 "set } /set
    { "some 20 "subset } /subset
    #01 #0101 EQU /assert
    /end-subset
    /end-set
    /summary
    BRK

    ~zen.tal

    I'll put it in a repo soon. :3

    #uxn #varvara #TDD

  18. Today I have implemented malloc in 76 bytes in #Uxntal .

    paste.sr.ht/~ismael-vc/21de76c

    After fiddling with this all afternoon, I finally have implemented a malloc other than the simple "bump pointer allocator" I was using.

    I'll work on mfree, but that will be for tomorrow.

    I changed the unit size to byte instead of 64 bytes because there is no MMU expecting it in 64 bytes in #Uxn as it was in the PDP, so it makes no sense in Uxn? might bite me later.

    Catmon was indispensable.

    #varvara #unix #pdp

  19. Today I have implemented malloc in 76 bytes in #Uxntal .

    paste.sr.ht/~ismael-vc/21de76c

    After fiddling with this all afternoon, I finally have implemented a malloc other than the simple "bump pointer allocator" I was using.

    I'll work on mfree, but that will be for tomorrow.

    I changed the unit size to byte instead of 64 bytes because there is no MMU expecting it in 64 bytes in #Uxn as it was in the PDP, so it makes no sense in Uxn? might bite me later.

    Catmon was indispensable.

    #varvara #unix #pdp

  20. Every byte counts!

    I just learned this in a video about making a 3.5 KiB notepad exe.

    #uxntal flag terminated strings:

    paste.sr.ht/~ismael-vc/a53a443

    It keeps strings readable and saves bytes, without being just a compressed raw blob. It is easy to calculate the value of the terminator char, I think it is a nice thouch :D

  21. @emilio conoces el lenguaje de programación Julia?

    Me parece esta comparación es mejor para principiantes ya que Julia tiene GOTO:

    paste.sr.ht/~ismael-vc/fd6ebeb

    También he estado pensando en usar un pseudocódigo procedural y ser consistente en los ejemplos que lo usen, algo así:

    paste.sr.ht/~ismael-vc/04e9022

    La idea es explicar la semántica del algoritmo para que sea mas fácil asimilar la sintaxis de #Uxntal (en realidad es muy poca ya que es un lenguaje minimalista, pero que da mucha libertad).

    : )

  22. Uxnomicon now has support for the Monotal (Monokai for Uxntal) light and dark themes!

    - git.sr.ht/~ismael-vc/monotal
    - uxnomicon.miraheze.org/wiki/Me
    - uxnomicon.miraheze.org/wiki/Me

    The site will respond to your user preferences, if set to auto it changes theme according to your OS theme, else you can manually toggle it using the eye glasses icon (appearance).

    Syntax test page: uxnomicon.miraheze.org/wiki/Ac

    #uxn #uxntal #varvara #monokai #wikimedia

  23. Light and Dark Monokai Theme for #Uxntal in SourceHut.

    It uses one user script and one user css style sheet.

    I like the Terminus font, but you can change it for your favorite, and of course the colors, font size and line spacing as well.

    git.sr.ht/~ismael-vc/monotal/t

    This is running in Linux, Firefox using the Stylus and ViolentMonkey plugins. I'll make a setup guide shortly.

    It will automatically update the theme as I change the OS wide theme.

    Still doing some last tweaks : )

    #uxn #varvara

  24. I found the way to get an absolute reference out of a relative one the other day in #uxn , but what happens if the byte offset is to far away?

    _foo $100 @ foo

    Error: foo too far!

    The following 4 bytes do the trick this time

    %:patch ( [JSI] -- [LIT2] ) { [ LIT2 LIT2 00 ] STR }

    :patch foo ( rel* )

    This in combo with the previous setup allows more room to make relocatable AOT assembled libraries that are easy to include or copy paste.

    Sorry for abusing the < > overload. :P

    #uxntal #varvara

  25. I worked today in #uxn syntax files and I got a consistent style across the micro editor, sublime text and pygments!

    git.sr.ht/~ismael-vc/monotal

    There are instructions on how to use them in the readme.

    Pink: Opcodes
    Orange: % ~ (bold, italic)
    Yellow: | $
    Green: # "
    Cyan: @ & (bold)
    Purple: . , ; - _ =
    Gray: ( ) [ ] (italic)
    White/Black: { } foo /foo !foo ?foo 00
    Cream/Dark Grey: background
    Light Grey: highlight

    Monotal is just how each uxntal token is mapped to a Monokai color.

    #uxntal #varvara

  26. I have updated my #Uxntal syntax definitions for #micro and #subl Sublime Text, as well as #Python #Pygments

    git.sr.ht/~ismael-vc/monotal

    What I want is consistency in the coloring of the uxntal tokens, this is not about the color palette precisely.

    I'm making a book using Pygments and #Sphinx that will use these.

    Sublime Text and Pygments are using the Monokai Pro theme colors.

    Micro is using it's default Monokai theme.

    But you can see all tokens are consistently themed.

    : )

    #uxn #varvara

  27. If you ever need a relocatable #Uxntal routine's byte code (not the source but the ASCII hexdump), yet your code needs to embed an absolute address, ie. in system expansion commands or device vectors.

    This will do the trick

    %:PC ( -- pc+3* ) { [ LITr 00 JSRr ] }
    |9 @ offset2>>
    %<< ( -- offset* 0 ) { :PC ;offset2>> ADD2 #00 }
    %>> ( offset* 0 rel -- abs* ) { ADD2 }

    [
    @ foo ( -- )
    ( ... )
    << ,on-console >> .Console/vector DEO2
    ( ... )
    JMP2r

    @ on-console ( -> )
    ( ... )
    BRK
    ]

    #uxn #varvara 3 : )

  28. If you ever need a relocatable #Uxntal routine's byte code (not the source but the ASCII hexdump), yet your code needs to embed an absolute address, ie. in system expansion commands or device vectors.

    This will do the trick

    %:PC ( -- pc+3* ) { [ LITr 00 JSRr ] }
    |9 @ offset2>>
    %<< ( -- offset* 0 ) { :PC ;offset2>> ADD2 #00 }
    %>> ( offset* 0 rel -- abs* ) { ADD2 }

    [
    @ foo ( -- )
    ( ... )
    << ,on-console >> .Console/vector DEO2
    ( ... )
    JMP2r

    @ on-console ( -> )
    ( ... )
    BRK
    ]

    #uxn #varvara 3 : )

  29. Does anyone have a better way to convert a relative address to an absolute address generically for relocatable libraries?

    This is how I define it, currently using 2 macros

    git.sr.ht/~ismael-vc/software-

    (relocatable in the sense the preassembled text bytecode can be relocated not the source code!)

    This is how I use it:

    git.sr.ht/~ismael-vc/software-

    ( save abs addr of /+dst in /dst )
    << ,/+dst >> ,/dst STR2

    ( pass abs addr of /cmd to expansion )
    << ,/cmd >> .System/expansion DEO2

    #uxn #uxntal #varvara

  30. I have a plan to make #Uxntal tutorials for people from other programming languages.

    Since I don't have much time for planning, starting now, I'll be dumping examples, exercises, etc. as they pique my interest and later I'll order them.

    So I'll start with log/mem in uxntal and log_mem in python:

    uxnomicon.miraheze.org/wiki/Ux

    They even have the exact same bug!
    Can you find it? ; P

    I'm working on fixing it and making log/mem accept a length to dump and an extended ram bank as well.

    #uxn #varvara

  31. I have a plan to make #Uxntal tutorials for people from other programming languages.

    Since I don't have much time for planning, starting now, I'll be dumping examples, exercises, etc. as they pique my interest and later I'll order them.

    So I'll start with log/mem in uxntal and log_mem in python:

    uxnomicon.miraheze.org/wiki/Ux

    They even have the exact same bug!
    Can you find it? ; P

    I'm working on fixing it and making log/mem accept a length to dump and an extended ram bank as well.

    #uxn #varvara

  32. Hey y'all! Does this looks uxny enough?

    I want to do a uxnsay cli tool

    $ uxncli fortune.rom | uxncli uxnsay.rom
    $ uxncli echo.rom Hello World | uxncli uxnsay.rom

    Would you help me make an ASCII art Uxn? :3

    I wanted to use ^^ for it's feet but it looks like a cat lol XD

    #uxn #uxntal #varvara

  33. I updated the fortune tool in #Uxntal , with more variation, got one liners with less than 33 cols from the BSD fortunes:

    uxnomicon.miraheze.org/wiki/Fu

    Raw code:

    paste.sr.ht/blob/858668a4a33da

    $ wget -O fortune.tal <rawlink>
    $ uxncli drifblim.rom fortune.tal fortune.rom
    Assembled fortune.rom in 11660 bytes.
    $ cp fortune.rom ~/roms
    $ echo "uxncli ~/roms/fortune.rom" >> ~/.zshrc
    $ source ~/.zshrc

    Or with an alias but check not to clash with BSD's `fortune`.

    I hope it makes you smile : )

    #uxn #varvara

  34. I'm trying to make a new version of Learn #uxntal in Y minutes, based on the other languages:

    paste.sr.ht/~ismael-vc/72b4467

    This is the current output:

    paste.sr.ht/~ismael-vc/9e070e1

    Any positive feedback is welcome! :)

    #uxn #varvara

  35. thinking about dynamic file inclusion in uxntal…

    I do not want to implement filename globbing in drifblim

    can I delegate this to some shell preprocessor instead?


    #uxntal
  36. I have made two "exact" #uxntal syntax highlight definitions, one for Micro and the other for Sublime Text, for their respective default Monokai themes.

    I only use these editors, but I plan to make one for vim as well:

    git.sr.ht/~ismael-vc/monotal/t

    Now my brain doesn't have to notice the highlighting differences when I switch editor.

    These will work with any theme in those editors I just made sure both Monokai themes looked the same in both editors.

    Sublime Text left, Micro right:

    #uxn #varvara

  37. RE: mastodon.social/@snufkin_vc/11

    I made this super simple #uxn REPL library for @wim_v12e but I also post it here in case it is also useful for your #uxntal projects :3

    #varvara

  38. To test my #Uxn networking device, I would like to make a very bare-bones irc-style command line chat client. Does anyone have a little library for line-based text input in #Uxntal?

  39. Now that I am developing a new #uxn #uxntal assembler in #python, I've been experimenting with a new way 2 do modularity without sacrificing granularity, by preloading macro definitions into D asm dict.

    The answer seems to be macros (lots and lots of them) not the concat rune `~`!

    This is how the lib would look like:

    paste.sr.ht/~ismael-vc/cc9e6bc

    And this is how it would be used:

    paste.sr.ht/~ismael-vc/a7c06e0

    The pros is that it is 100% valid uxntal

    paste.sr.ht/~ismael-vc/424ffda

    What have U come up with?

  40. #uxntal #bitart inspired by @bitartbot

    paste.sr.ht/~ismael-vc/c687338

    ( y 23 | x y ^ / y 24 & x y & | ^ x ~ y 16 + | ~ * 10 % )

    @λ ( x y -- x y val )
    DUP #17 ORA STH
    EORk
    STHr DIV STH
    DUP #18 AND STH
    ANDk
    STHr ORA
    STHr EOR STH
    OVR :NOT STH
    DUP #10 ADD
    STHr ORA
    :NOT
    STHr MUL
    #0a :MOD
    JMP2r

  41. @[email protected]

    nanochat server in 916 bytes, implemented entirely in uxn :D

    canon impl by @d6: https://git.phial.org/d6/nanochat

    difference is that mine has a limit of 65535 messages before the count overflows and you can't read any more :P
    oh and also you can DoS by starting a connection and never sending a newline…

    but at least it can avoid buffer overflow by kicking you!

    src: https://codeberg.org/notchoc/nanochat.tal
    rom: https://codeberg.org/notchoc/nanochat.tal/raw/branch/main/bin/nanochat.rom
    run: uxn2 -N nanochat.rom

    !!! DISCLAIMER: YOU ACCEPT EVERYTHING THAT WILL HAPPEN FROM NOW ON !!! UXN2 STILL DOES NOT HAVE SANDBOXING (YET) SO USE AT YOUR OWN RISK


    #uxn #uxntal #nanochat
  42. implemented Go (the board game) in uxn!!!

    click to place a stone, or press space to pass your turn

    good idea to read up on https://en.wikipedia.org/wiki/Rules_of_Go because i didn't implement any rules other than capturing :P

    src: https://codeberg.org/notchoc/weiqi.tal
    rom: https://codeberg.org/notchoc/weiqi.tal/raw/branch/main/bin/weiqi.rom
    run: uxnemu weiqi.rom

    next step is to write a game server so y'all can play against each other!
    (im almost finished with network device v3 i swear just gimme one more week)


    #uxn #uxntal #gogame #weiqi #baduk
  43. @[email protected]

    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
  44. 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
  45. 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
  46. CW: long code snippet, not friendly for screen readers

    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
  47. @[email protected]

    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
  48. ( 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
  49. 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.

  50. 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.

  51. 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.