#varvara — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #varvara, aggregated by home.social.
-
hexdump -C needed a spa day, so I gave it a massage:
https://paste.sr.ht/~ismael-vc/a074bf4e12d557fce43da4a13cfd038baf275f09
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!)
-
hexdump -C needed a spa day, so I gave it a massage:
https://paste.sr.ht/~ismael-vc/a074bf4e12d557fce43da4a13cfd038baf275f09
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!)
-
hexdump -C needed a spa day, so I gave it a massage:
https://paste.sr.ht/~ismael-vc/a074bf4e12d557fce43da4a13cfd038baf275f09
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!)
-
hexdump -C needed a spa day, so I gave it a massage:
https://paste.sr.ht/~ismael-vc/a074bf4e12d557fce43da4a13cfd038baf275f09
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!)
-
Live coding Zen an Uxntal testing library:
https://www.youtube.com/watch?v=YEp6Vhtfta0
#uxn #uxntal #varvara #TDD #virtualmachine #fantasycomputer #assemblylanguage
-
Live coding Zen an Uxntal testing library:
https://www.youtube.com/watch?v=YEp6Vhtfta0
#uxn #uxntal #varvara #TDD #virtualmachine #fantasycomputer #assemblylanguage
-
Live coding Zen an Uxntal testing library:
https://www.youtube.com/watch?v=YEp6Vhtfta0
#uxn #uxntal #varvara #TDD #virtualmachine #fantasycomputer #assemblylanguage
-
Live coding Zen an Uxntal testing library:
https://www.youtube.com/watch?v=YEp6Vhtfta0
#uxn #uxntal #varvara #TDD #virtualmachine #fantasycomputer #assemblylanguage
-
Live coding Zen an Uxntal testing library:
https://www.youtube.com/watch?v=YEp6Vhtfta0
#uxn #uxntal #varvara #TDD #virtualmachine #fantasycomputer #assemblylanguage
-
I made an article at #Uxnomicon documenting the API of Zen, my tny #Uxntal testing framework:
https://uxnomicon.miraheze.org/wiki/Zental
I hope it might be helpful for others as it has been to me!
: )
-
I made an article at #Uxnomicon documenting the API of Zen, my tny #Uxntal testing framework:
https://uxnomicon.miraheze.org/wiki/Zental
I hope it might be helpful for others as it has been to me!
: )
-
I made an article at #Uxnomicon documenting the API of Zen, my tny #Uxntal testing framework:
https://uxnomicon.miraheze.org/wiki/Zental
I hope it might be helpful for others as it has been to me!
: )
-
I made an article at #Uxnomicon documenting the API of Zen, my tny #Uxntal testing framework:
https://uxnomicon.miraheze.org/wiki/Zental
I hope it might be helpful for others as it has been to me!
: )
-
#Uxntal #testing #framework in 760 bytes.
https://paste.sr.ht/~ismael-vc/2f2d41f245481d121632654f86effbcdf25457ac
I have called it Zental, in the images you can see it testing itself (the failed tests are expected).
Usage: https://paste.sr.ht/~ismael-vc/82d44be228adaf7be199e2e2bca77bd1c36ad729
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
-
#Uxntal #testing #framework in 760 bytes.
https://paste.sr.ht/~ismael-vc/2f2d41f245481d121632654f86effbcdf25457ac
I have called it Zental, in the images you can see it testing itself (the failed tests are expected).
Usage: https://paste.sr.ht/~ismael-vc/82d44be228adaf7be199e2e2bca77bd1c36ad729
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
-
#Uxntal #testing #framework in 760 bytes.
https://paste.sr.ht/~ismael-vc/2f2d41f245481d121632654f86effbcdf25457ac
I have called it Zental, in the images you can see it testing itself (the failed tests are expected).
Usage: https://paste.sr.ht/~ismael-vc/82d44be228adaf7be199e2e2bca77bd1c36ad729
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
-
#Uxntal #testing #framework in 760 bytes.
https://paste.sr.ht/~ismael-vc/2f2d41f245481d121632654f86effbcdf25457ac
I have called it Zental, in the images you can see it testing itself (the failed tests are expected).
Usage: https://paste.sr.ht/~ismael-vc/82d44be228adaf7be199e2e2bca77bd1c36ad729
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
-
Today I have implemented malloc in 76 bytes in #Uxntal .
https://paste.sr.ht/~ismael-vc/21de76cd6c103a469ff06f33696a95c49bf87508
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.
-
Today I have implemented malloc in 76 bytes in #Uxntal .
https://paste.sr.ht/~ismael-vc/21de76cd6c103a469ff06f33696a95c49bf87508
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.
-
Today I have implemented malloc in 76 bytes in #Uxntal .
https://paste.sr.ht/~ismael-vc/21de76cd6c103a469ff06f33696a95c49bf87508
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.
-
Uxnomicon now has support for the Monotal (Monokai for Uxntal) light and dark themes!
- https://git.sr.ht/~ismael-vc/monotal
- https://uxnomicon.miraheze.org/wiki/MediaWiki:Common.css
- https://uxnomicon.miraheze.org/wiki/MediaWiki:Common.jsThe 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: https://uxnomicon.miraheze.org/wiki/Acid.tal
-
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.
https://git.sr.ht/~ismael-vc/monotal/tree/main/item/src/srht
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 : )
-
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
-
I worked today in #uxn syntax files and I got a consistent style across the micro editor, sublime text and pygments!
https://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: highlightMonotal is just how each uxntal token is mapped to a Monokai color.
-
I have updated my #Uxntal syntax definitions for #micro and #subl Sublime Text, as well as #Python #Pygments
https://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.
: )
-
I have updated my #Uxntal syntax definitions for #micro and #subl Sublime Text, as well as #Python #Pygments
https://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.
: )
-
I have updated my #Uxntal syntax definitions for #micro and #subl Sublime Text, as well as #Python #Pygments
https://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.
: )
-
I have updated my #Uxntal syntax definitions for #micro and #subl Sublime Text, as well as #Python #Pygments
https://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.
: )
-
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
] -
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
] -
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
https://git.sr.ht/~ismael-vc/software-tools-in-uxntal/tree/main/item/src/lib/log/mem.tal#L54
(relocatable in the sense the preassembled text bytecode can be relocated not the source code!)
This is how I use it:
https://git.sr.ht/~ismael-vc/software-tools-in-uxntal/tree/main/item/src/lib/log/mem.tal#L111
( save abs addr of /+dst in /dst )
<< ,/+dst >> ,/dst STR2( pass abs addr of /cmd to expansion )
<< ,/cmd >> .System/expansion DEO2 -
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:
https://uxnomicon.miraheze.org/wiki/Uxntal_for_Python_users
They even have the exact same bug!
Can you find it? ; PI'm working on fixing it and making log/mem accept a length to dump and an extended ram bank as well.
-
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:
https://uxnomicon.miraheze.org/wiki/Uxntal_for_Python_users
They even have the exact same bug!
Can you find it? ; PI'm working on fixing it and making log/mem accept a length to dump and an extended ram bank as well.
-
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.romWould 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
-
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.romWould 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
-
I updated the fortune tool in #Uxntal , with more variation, got one liners with less than 33 cols from the BSD fortunes:
https://uxnomicon.miraheze.org/wiki/Fun_to_Program_your_Varvara#Chapter_1_-_What%27s_Your_Fortune%3F
Raw code:
https://paste.sr.ht/blob/858668a4a33da1aa11bcac3d6234237713aa4a1e
$ 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 ~/.zshrcOr with an alias but check not to clash with BSD's `fortune`.
I hope it makes you smile : )
-
I updated the fortune tool in #Uxntal , with more variation, got one liners with less than 33 cols from the BSD fortunes:
https://uxnomicon.miraheze.org/wiki/Fun_to_Program_your_Varvara#Chapter_1_-_What%27s_Your_Fortune%3F
Raw code:
https://paste.sr.ht/blob/858668a4a33da1aa11bcac3d6234237713aa4a1e
$ 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 ~/.zshrcOr with an alias but check not to clash with BSD's `fortune`.
I hope it makes you smile : )
-
I have updated the Software Tools in #Uxntal article at the #Uxnomicon .
https://uxnomicon.miraheze.org/wiki/Software_Tools_in_Uxntal
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 :)
-
Functions return, vectors break. It is known...
...when I realize I can:
- BRK from the foo ( -- ) function and
-JMP2r back the foo/on-foo ( -> ) vectorin #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.
-
I have completed chapter 1 of "Software Tools in Pascal" in #uxntal !
https://git.sr.ht/~ismael-vc/software-tools-in-uxntal
See the README for examples.
Book:
https://archive.org/details/softwaretoolsinp00kern
The image shows the detab routine, the last program from chapter 1 ported to Uxntal.
-
tabstops = [(i+1) % tabspace == 1 for i in 0:(maxline-1)]
in #uxntal :
https://paste.sr.ht/~ismael-vc/6cd6ae4b4c40a5ce1cbf7e5748c289989e516607
The output shows the bool array and the stacks on exit:
https://paste.sr.ht/~ismael-vc/c2e0a2527734825ba3e3cb382baac1f1835aadf0
I'm working on "Software Tools in Uxntal" again, this routine is for the detab program:
https://git.sr.ht/~ismael-vc/software-tools-in-uxntal/tree/main/item/README.md#detab
-
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:
-
I'm trying to make a new version of Learn #uxntal in Y minutes, based on the other languages:
https://paste.sr.ht/~ismael-vc/72b446745f60ce160c307ffa598e1d26c1affa1e
This is the current output:
https://paste.sr.ht/~ismael-vc/9e070e14520e9255b03c3bad5a18ee1952fd734e
Any positive feedback is welcome! :)
-
I'm trying to make a new version of Learn #uxntal in Y minutes, based on the other languages:
https://paste.sr.ht/~ismael-vc/72b446745f60ce160c307ffa598e1d26c1affa1e
This is the current output:
https://paste.sr.ht/~ismael-vc/9e070e14520e9255b03c3bad5a18ee1952fd734e
Any positive feedback is welcome! :)
-
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:
https://git.sr.ht/~ismael-vc/monotal/tree
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:
-
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:
https://git.sr.ht/~ismael-vc/monotal/tree
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:
-
RE: https://mastodon.social/@snufkin_vc/116710615559101382
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
-
RE: https://mastodon.social/@snufkin_vc/116710615559101382
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