home.social

#varvara — Public Fediverse posts

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

fetched live
  1. 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

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

  3. 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!)

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

  5. #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

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

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

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

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

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

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

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

  13. 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 : )

  14. 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 : )

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

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

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

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

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

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

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

  22. I have updated the Software Tools in #Uxntal article at the #Uxnomicon .

    uxnomicon.miraheze.org/wiki/So

    I think this is a good chance to promote the Uxnomicon wiki in case some of you didn't know it existed.

    It is intended to be a place for all things #Uxn and #Varvara by and for the community and it's ecosystem.

    Without the need of pull requests, you don't even need to register an account in order to contribute!

    Feel free to use it for your projects and even your personal Uxn blog page.

    Enjoy :)

  23. Functions return, vectors break. It is known...

    ...when I realize I can:

    - BRK from the foo ( -- ) function and
    -JMP2r back the foo/on-foo ( -> ) vector

    in #uxntal 🤯

    Haha I'm not used to the event driven approach, but it has grown on me, I need to make a CLI game that uses this aspect.

    #uxn #varvara

  24. I have completed chapter 1 of "Software Tools in Pascal" in #uxntal !

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

    See the README for examples.

    Book:

    archive.org/details/softwareto

    The image shows the detab routine, the last program from chapter 1 ported to Uxntal.

    #uxn #varvara

  25. tabstops = [(i+1) % tabspace == 1 for i in 0:(maxline-1)]

    in #uxntal :

    paste.sr.ht/~ismael-vc/6cd6ae4

    The output shows the bool array and the stacks on exit:

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

    I'm working on "Software Tools in Uxntal" again, this routine is for the detab program:

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

    :) #uxn #varvara

  26. Working on a new #Uxntal book, it seems the "Learn X in Y Minutes" script format was not ideal.

    I wat to make something intensive and extensive a "Uxntal Pocket Reference".

    So far I have a working Sphinx + Texlive installation that highlights Uxntal syntax correctly, thanks to Python pygments out of the box support for Uxntal! \o/

    The image shows the Drifblim acid.tal assembler test:

    #uxn #varvara

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

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

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

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

  31. starting to write up all my thoughts on #uxn and #varvara capabilities, versioning, and specifications and... apparently i have a lot to say 😅

  32. starting to write up all my thoughts on #uxn and #varvara capabilities, versioning, and specifications and... apparently i have a lot to say 😅

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

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

  35. I'm not gonna lie, #uxn is the cutest damned thing I've seen in a while.

    Someone made a custom portable virtual machine called the #Varvara and wrote code for that machine while following vintage design patterns.

    It can run on any platform, including the browser and is a machine agnostic system. You can make applications, desktops - and it isn't limited by traditional hardware constraints.

    "Let's try to go slow, and fix things."

    Priceless.

    100r.ca/site/uxn.html

  36. I'm not gonna lie, #uxn is the cutest damned thing I've seen in a while.

    Someone made a custom portable virtual machine called the #Varvara and wrote code for that machine while following vintage design patterns.

    It can run on any platform, including the browser and is a machine agnostic system. You can make applications, desktops - and it isn't limited by traditional hardware constraints.

    "Let's try to go slow, and fix things."

    Priceless.

    100r.ca/site/uxn.html

  37. @[email protected]

    @neauoire may I propose: varvara touch input, as an extension of the mouse device

    additions:

    • one byte for touch id (0 means no touch i.e. mouse input)
    • one byte for touch pressure (>0 is down, 0 is up) EDIT: upsize to short for better fidelity

    xy coordinates will reuse that of mouse device

    as for pointer emulation, the varvara impl can fill in state/scrollx/scrolly as appropriate (e.g. one finger means leftclick, two finger means rightclick)

    so if I use noodle with a touchscreen, it'll treat my touch input as the mouse

    but if I use a rom that supports touch, it can detect touchid>0 and handle my touch input accordingly!

    wdyt ^^


    #uxn #varvara
  38. @[email protected]

    @neauoire may I propose: varvara touch input, as an extension of the mouse device

    additions:

    • one byte for touch id (0 means no touch i.e. mouse input)
    • one byte for touch pressure (>0 is down, 0 is up) EDIT: upsize to short for better fidelity

    xy coordinates will reuse that of mouse device

    as for pointer emulation, the varvara impl can fill in state/scrollx/scrolly as appropriate (e.g. one finger means leftclick, two finger means rightclick)

    so if I use noodle with a touchscreen, it'll treat my touch input as the mouse

    but if I use a rom that supports touch, it can detect touchid>0 and handle my touch input accordingly!

    wdyt ^^


    #uxn #varvara
  39. Finaly trying to do something with the #uxn #varvara audio device.

    Thanks to @d6 for this awesome Tetris soundtrack example!

    git.phial.org/d6/nxu/src/branc

  40. Finaly trying to do something with the #uxn #varvara audio device.

    Thanks to @d6 for this awesome Tetris soundtrack example!

    git.phial.org/d6/nxu/src/branc

  41. @[email protected]

    heyo @neauoire, what's your opinion on stateful ports?

    e.g. I want to connect to an address, I set the action port to connect mode by writing action/Connect, then I write in the address string until the null byte

    I understand that this is opposed to the file device which does this by writing a pointer* to the filename in memory and then an operation on another port, is that the preferred way? (if so, why?)


    #uxn #varvara
  42. „Textvorschläge sind immer willkommen“

    Ihre Leseleidenschaft hat Varvara schon viel beim Deutschlernen geholfen. Deshalb hat sie bei Little World den „Buchclub“ gegründet, wo sie sich mit anderen über Prosa und Poesie austauscht.

    home.little-world.com/varvara-

  43. You have to love the expressiveness of #uxntal

    %👊💥👊💥👊💥👊💥( a b c d e -- f )
    { ORA ORA ORA ORA }

    Naming it the #jojo operator just doesn't cut it! :)

    #uxn #varvara

  44. I have simplified how to use my hexdump routine, inspired by `hexdump -C`:

    paste.sr.ht/~ismael-vc/6bb6588

    No need 2 have symbols or macros defined to use it, just copy paste and you are ready to go!

    Example: `#0100 mem/log`

    It has proven to B extremely useful 4 me, when developing TalOS & now with D Kibi editor project.

    The version in the XXIIVV Oscean wiki is shorter but it doesn't show D absolute padding nor D ASCII contents.

    The `-C` in `hexdump` means: "canonical mode".

    #uxn #varvara #uxntal

  45. Got the cursor to move using the WASD keys (Dvorak) in Kibi!

    ⬅️ ⬆️ ⬇️ ➡️

    asciinema.org/a/764170

    #uxn #varvara #uxntal

  46. Today I worked a bit in kibi, made a little refactor and implemented padding to the hello message.

    Not much but I'm pleased. 😄

    #uxn #varvara #uxntal

  47. I finally got some time to work in kibi today, I have impremented and debugged kibi/get-win-size, kibi/get-cur-pos (used to get the window size) and updated kibi/draw-rows to draw the correct number of purple tildes on the first column. 😊

    I also made the makefile a lot nicer. 🧘‍♂️

    That means I'm almost at the middle of chapter 3 "Raw input and output", at step 35 of the original tutorial (special case the last row)! 🚀

    git.sr.ht/~ismael-vc/kibi/tree

    viewsourcecode.org/snaptoken/k

    #uxn #varvara #uxntal #kibi

  48. @garvalf yes that happens because D terminal uses cooked or sane mode (check "man stty"), it process input line by line by default (waiting for enter) & echoes what U type back so U can see it. We want to process each byte as it comes instead (we'll need to echo back "manually" when we reach D actual editing part). Check D second link of my tutorial and D "about" of femto.

    If U have any #uxn #varvara or #uxntal questions, feel free to reach me out anytime.

    And welcome to the uxn community! :)

  49. Hello everyone!

    I'm making a port of the Kilo editor by antirez (originally in C) to #uxntal AKA kibi (I'm not sure it will be around 1 "kibi"lines of code lol!

    But I'm also porting the awesome tutorial by snaptoken teaching how kilo works.

    I'd greatly appreciate if someone could take a look (maybe even follow along the tutorial) in order to get feedback.

    git.sr.ht/~ismael-vc/kibi/tree

    I'm aiming for no previous Uxntal experience required!

    Best regards.

    #uxn #varvara #editor #TUI #CLI #tutorial