Pinned post

hello, my name is Karol.
i'm a software developer and a visual artist. i currently reside in Wrocław, Poland where I code for a living.

in my free time i do recreational programming — i mainly tinker with parsers, compilers, and virtual machines, but i also toy around with retro computing and electronics.

besides programming, i have a passion for various kinds of restrictive art. my main focus is drawing and pixel art, although i also dabble in animation and graphic design.

last but not least, uxntal-vscode gets a fancy vectorized icon for `.tal` files!

Show thread

on the topic of comments inside macros -- a macro expansion creates a kind of separate scope (the same thing happens when including a file!), which handles comments separately from the outside scope. this means that any unclosed comments in a macro get closed at the end of it!

Show thread

all words between the "%MACRO" and "}" get copied into the definition directly and are parsed only when the macro is expanded. macro definitions inside macro defintions get a special treatment here: at assembly this results in an error, but imagine if you had `%MACRO { ( %NESTED ) }`. the nested macro definition is wrapped in a comments, so this should work, right? well, comments get parsed only during macro expansion -- the nested macro would still be detected, so it's good to highlight it

Show thread

macro definitions!

you don't need a brace ("{") following a "%MACRO". actually, you can have as many braces as you want, they all get skipped anyway! the only word that matters is a word beginning with a "}" which terminates the macro definition.

Show thread

nested comments! their quirk is that both top-level and inner comments must start with a "(", but top-level comments can have characters following the "(", whereas inner comments cannot.

also, the closing ")" can't have any characters following it, ever. it used to be the case, but now it's not

Show thread

overall, i had a great time encapsulating subtle uxntal parsing rules in a bunch of regexes. i find it relaxing. it may not be some kind of a huge, complex project, but i'm really proud of what i achieved over the last two weekends or so

here's some of the notable things (at least for me!!):

Show thread

i also changed the way i "test" both plugins. before i just used to have a huge `.tal` file with a bunch of edge cases that i looked at everytime i made a change to syntax highlighting, which was tiresome and error-prone. now i have a test suite with a bunch of `.tal` files -- each is a separate test case and each has an "expected" file that looks like this (see below). i no longer have to worry about breaking subtle things during refactoring as long as i have a test for them

Show thread

vim and vscode differ in how regions are treated, how nesting works, how you group spans. you must often take a completely different approach if you want to express the same idea, and i noticed that particularly well because i decided to keep the parity between uxntal.vim and uxntal-vscode

Show thread

making syntax highlighting for vim and vscode is similar-but-not-really. vim uses its own scripting language, and vscode uses textmate grammars encoded in a json -- both require you to write a bunch of uncomprehensible regexes, each with a slightly different notation

Show thread

hiiii, i released versions 0.2.0 for uxntal.vim and uxntal-vscode! now with new runes, nested comments, a bunch of changes to highlighting macro definitions, and more!!

in this thread im gonna talk about some of their features features that im kinda proud of

im so proud of my lil nails. i shaped them nicely and got some cool nail polish. to be fair, theyre very unpractical, but at least kinda pretty i think

1975: "Let's build the Internet, a network that can survive a nuclear war!"
2021: "Let's host everything on the server of this one discount bookshop!"

not sure if i should continue aoc in uxntal, it feels too much like a chore and just takes too much time for me :( might drop aoc completely and do something else or do some aoc in zig bc i wanted to learn it

finished advent of code day 2 in uxntal with @brendan's 64-bit number subroutines

the results get printed with a bunch of spaces at the start, but im gonna fix it someday

Show thread

got both of my lobes pierced today! my first ever piercings ^^

i'm really pleased with how the `?` macro turned out btw, here's how it works:

`NEXT-LINE` returns `string* 00` if there was a next line in the input, and returns `01` if there's no more lines. the `?` macro takes that 00 or 01 at the top and if it is a 01 (so no more input) it jumps to the end of the program where the final result is printed. otherwise, it continues the execution, so then `PARSE-DECIMAL` takes that `string*` and parses it to a `value^`

Show thread

made a little rewrite of the `next` subroutine, now i can do stuff like `NEXT-LINE ? PARSE-DECIMAL`

Show thread

advent of code in uxntal day 1

managed to do it without loading the entire input file into memory! i'm doing a buffered read of some sort, so the input is consumed more or less line by line. with the `next` procedure which returns the next number in the input, the code becomes really straightforward and most of the procedures can be shared between both parts

didnt do any prep so the whole thing took me like 4 hours x___x

@neauoire where does the suffix -tal come from? i noticed it in your works and i'm assuming it means "language", but i'd love to know its origins

Show older

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.