December adventure, 2023
I’ll also be logging stuff on mastodon.
01
I kicked things off by noodling with Decker. My goal was to get more acquainted with building and wiring up cards. I’ve played a lot with the scripting language from Decker, lil, but never really messed around with the rest of the application. It is lovely and I’m thinking I’ll spend at least the next few days of the adventure making toys with Decker.
02
Two little things for the second day of the december adventure!
- I deployed the weird little deck I made on day one, and cleaned it up a tiny bit. Not sure if I’ll share everything I make, but figured I’d share this one!
- I went deep on lil and Decker’s table interface, exploring the edges and how far I can push it before it becomes unreasonable. It is really really powerful! At least the native version of Decker can handle a table with a couple thousand rows. I’ve imported a dataset of pokemon data into it. I think I may do something with that over the next few days!
03
Today, day 3, I didn’t write any code! Instead, I walked across town, and spent about 4 hours with a friend who’s nearing the end of a web development focused bootcamp. I introduced him to TypeScript, which I don’t love, but have spent a lot of time with for work. It was fun to see something old to me through new eyes and have to figure out how to explain some of the basic concepts.
I’ve also updated the list of adventure logs! There are so many!
04
I lied yesterday! When I updated this adventure log I hadn’t touched any code, but in the evening, before bed, I ended up revisiting a stub of a game I wrote in JavaScript that uses the HTML canvas a while back. I thought real hard about how I could modify it into something like a teeny tiny game engine — a generic sort of thing I could use as a starting point for sketches of games. In support of that I explored some generic ways to support loading tiled map data.
Today I spent more time with Decker. The focus of my explorations today was to sort out easy ways to handle global state across multiple cards within a deck.
Something I like about Decker is that it makes state “tangible” by binding it to widgets. You can’t just have a variable hidden in some script on some card someplace in your deck. Instead, you have to have a widget (like a button, or form field) that “owns” that bit of state. It is so nice.
Decker lets you script interactions across cards within a deck. So, given 2 cards, banana
and kiwi
, you can do stuff like
on view do
counter.text:"Counter is ",banana.widgets.bunches.text
end
This bit of code sets the text of a widget named counter
on the current card (assumed to be kiwi
here) to the value of the widget named bunches
on the banana
card!
Game ideas be brewing!
05
After sharing yesterday’s adventure log I spent some time with uiua. It continues to blow my mind. Everything about it seems to make sense to me — the tooling is splendorous.
Today I did more than just explore Decker; today I began to actually make a thing! To the surprise of absolutely no one, a game. Nothing to show for it yet, but I’m excited. I have all the pieces I need in place — inter-card communication, something akin to constants, random number generation, an idea…all the things.
06
I didn’t do much adventuring today, because the bulk of my day was eaten by a big ol’ brain scan (hooray! brain bleed is resolved!) that left my eyeballs kinda fried. I did do a bit of sketching in Decker. I don’t love drawing in it. I think I may create my maps and stuff in a different program and import them.
07
Happy first night of Hanukah!
Today’s adventure was a strange ramble. I started by poking a bit at Decker, but, maybe inspired by some conversations I had today, and maybe just because I let my attention wander, I also noodled on implementing an htmx server.
I started a little bit on that a few different times — once in JavaScript, but that tasted too much of work, so I moved to Clojure (using Babashka) but quickly became confused because Clojure seems to be my kryptonite. Ultimately I landed on chibi-scheme. I don’t have much done, yet, but I do have a pleasant little servlet that returns HTML. If I continue, the next steps will be to add route handling, and assign an HTML fragment to each route. Nothing fancy. Oh, there was a brief stopover at Racket in that, too…wasn’t there.
This sort of thing is why I love the December Adventure, but also is why it feeds some habits that distract me from getting a big thing done — rather than focus on one big thing, plod plod plod, I flit from little dalliance to little dalliance.
This suggests I should learn from my friendly ratfactor! I’m gonna add a “map” to my Decker project, since it is the thing I’d like to finish. Tomorrow I’ll sketch out a plan, and every day I’ll map where I came from, and where I’m headed next.
08
I’m gonna call this one a rest day! I didn’t do any code-stuff, but I did write a blog post, practice doing some digital painting, and work on a story I’ve been working on off and on for a few months.
I also made an absurd amount of vegetarian sushi for dinner.
09
I once again lied — after sharing my adventure log yesterday, I ended up noodling around with some clojure. Got babashka to play nice! That felt like a major accomplishment, actually.
This morning I’m back to Decker.
I’ve noticed that the docs are a bit out of date! The syntax for inserting data into tables has changed, subtly.
The new syntax:
insert name age hobby with
"Alice" 23 "running"
"Bob" 25 "cooking"
"Charlie" 17 "birdwatching"
into people
The old syntax named the columns in the statement’s data,
insert
name:"Alice","Bob","Charlie"
age:23,25,17
hobby:"running","cooking","birdwatching"
into people
I found the note about this in the release notes of a recent version of Decker.
After toodling at that for a bit, though, I got hung up, unable to figure out how to programmatically insert table data into a grid widget. The docs weren’t very forthcoming with examples, so I posted a question on the Decker forums. I await guidance with bated breath!
Update: the one and only internet-janitor (mind behind Decker and lil, and oK) responded to my question and I’ve been set forth! Onward!
The hiccup I was running into is that all queries in lil are pure expressions that can’t modify data in place and I was trying to modify an empty table instead of making a new one.
Productive day! Some big breakthroughs were made on my silly game in Decker! I’m starting to find all the rough edges of both Decker and lil. None so bad, but fun little questions to noodle over as I make this thing.
…the siren song of array languages draws me ever nearer to the dastardly rocks. Will they be my desolation!? Keep watching to find out!
10
I ended up having a lot of time to spend adventuring yesterday evening. I had a lot of fun! I thought I may have found a bug in how lil handles truthiness, so today I set up a small sample project to document what I found and explore the issue more closely.
The root of the issue was, unsurprisingly, my fault! Having cracked the nut, though, I got 2/3rds of my game’s combat system done!
Next up, I’ll be adding logic to handle the opponent’s actions. I remain deeply smitten by both Decker and lil. I think I may submit what I’m making into the December Deck jam, if it is still running when I wrap.
11
I think today will be another rest day — I went back to work for the first time in a bit, so had a lot to catch up on. Enough computer time for one day.
Instead, I read the first chapter of The Structure and Interpretation of Computer Programs. I’ve read it before but it hasn’t ever stuck. Hoping a re-read may help that.
12
No computer, just kitchen time! I made ~100 latkes for the family and some friends.
13
Getting back into the swing of things after 2 days away from Decker. Today I added logic for the enemy in the combat system.
It is really boring, so I wanna tune it a bit, and maybe make it something other than just an “attack” or “rest” button. But, all the pieces are in place to start exploring different ways to handle these sorts of encounters.
I remain completely smitten with Decker and lil. Especially lil. It is a very pleasant programming system.
Tonight I’m going to read more of The Structure and Interpretation of Computer Programs, too!
14
I took a hiatus from Decker today. Instead, I dove into Sandra’s brev. I also explored her cst, that turns s-expressions into graphviz diagrams.
I’m not sure if I’ll pursue this, but I was noodling on making a little text-based toy where the object of the game is to create little graphviz maps of some space you are exploring — like a traveling cartographer game?
I also continue to read The Structure and Interpretation of Computer Programs.
15
I played a bunch of chess and went to bed early.
16
I walked to the local library for today’s adventure — there, I revisited the game in Decker for a bit — mostly I drew a silly map for it. Afterwards I started roughed in the bones of a game system in scheme.
Not much to show for it, yet, but I do always love re-visiting scheme. My brain isn’t in scheme-mode at the moment, so things that I think should be easy are proving mind bending, which is fun.
17
I let myself become very waylaid by scheme this weekend.
I created a scheme page for my wiki, and I captured a few useful bits of scheme code on the forget-me-not page.
Later today or tomorrow I’m determined to return to Decker and lil to get my weird game prototype into a shareable state by the end of the month.
18
It is so much fun reading all of the other adventure logs! Though, to be honest, I’m not sure how ya’ll keep at it! Especially on the work days, after work I’m so wiped out I don’t have much mental power to apply to adventuring.
Shout outs to ya’ll!
I explored Decker’s contraptions today. They’re a way to make re-usable, custom widgets.
I also revisited my game thing.
I think I’ve made an error in how the player’s state is handled. I haven’t totally sorted out what is going on yet. Like I said, I’m wiped, but, will try to figure that out soon.
19
I don’t usually like to do computer things in the morning — I try to preserve that time for reading. This morning, though, I woke up with an idea, so reached for Decker first thing.
I typically wake up between 4 and 5 AM to feed the cats and dog.
After they’ve finished eating there is almost always a strange and quiet moment where the cats sit right next to each other in the dawning light, and look out a particular window on to the street below.
The dog flops back to sleep, either under a desk or a bed.
Exploring my idea (to see if I could support ratfactor’s hiss stuff from within Decker) brought me to Decker’s pre-built module for visual novels!?
The kids are up now. The bustle of a day awaits! ONWARD ADVENTURERS!
A quick 19, part two
Everyone should go read the source code for ratfactor’s hiss — it is so legible, and stylish — not as in “cool,” but it has a style and is consistent. I adore that.
I think I could implement hiss’ parser using lil, but I think updating Decker cards dynamically is beyond my capabilities…and potentially Decker’s abilities. I’m gonna keep noodling, though.
20
This may not be my only entry for today, but, early this morning I got the jump on something I’ve been meaning to start on for a while: while not directly a programming thing, I started reading on the math (and programming) behind LLMs.
I started this, not because I’m particularly interested in making my own, or use them with any frequency, but because lately I’ve been drawn into more and more conversations where I’m finding the ability to talk about them as more than some sort of semi-mythical oracle a very useful skill.
So, with that said, this morning I focused on reading about embeddings, specifically the matrix operations that are useful in comparing and modelling large vector spaces against one another.
…and, I mean…this invites me to think “array programming, yo.”
21
Solstice! Today I hung out with friends, ran errands, made a big dinner, and generally chilled.
I’m just sitting down now for the first time of the day at a screen.
Over the course of this December Adventure I’ve been reflecting on how what I always want to build is a game and how I hardly ever do it. I have countless (almost literally) starts at it, and hundreds and hundreds of ideas for games, but, when I sit down to do it I generally get eaten by technical hurdles that, paired with limited time, are a bit too steep to scale.
But on the inverse side of things, if I sit down to bang out a web app (what I do for work) I can almost literally do it with my eyes closed. The thing is, I have little to no interest in doing that in my spare time.
No real ask, or next step, just sharing this observation about myself that, is itself, not really new, but, remains true for me.
22
For today’s adventure I did two things:
- I sewed a pink snake per my kid’s request
- I pulled together a basic IRC bot
I used to sew a lot before having kids; as an undergrad I actually TA’d for a bunch of animation and puppetry courses that involved a lot of sewing and practical sort of hand-making. I did a bit during the pandemic lock downs out of necessity, but not much. I’ve been staring at all my sewing stuff for years, though, and wanting to get back into the habit of making freaky little guys.
The IRC bot was inspired by some conversations I had on fedi: I’m wondering if it could serve as a good playground for making little narrative games, where, rather than having to build an engine and physics and and and on and on I plop some new interactive commands into an existing bot. I chose IRC because it is easy as pie (see what I did there?), but I could imagine migrating to something else one day.
23
So far today I’ve done no substantial computering other than writing this update. I spent most of the morning toodling around Portland on the cargo bike with a kiddo.
This evening I’m hoping to make either General Tso’s tofu (’tis the season) or dumplings, depending on what is in our cabinets.
I also got a package from a friend in Japan! He sent me a Japanese copy of Final Fantasy Tactics for the Gameboy Advance. I am wholly unequipped to play such a thing, but you bet your thumbs I’ll try!
24 and 25
Rest.
26
I did a secret.
27, 28, 29, 30
Despite not writing updates, and even though I’m back to work, the last few days have been, by far, the most productive (if I take “productivity” to mean some measure of lines of code) of the entire december adventure!
I pulled together a strange thing I’m calling game frame for the time being, it is meant as an exploration space for making little adventure games.
And then, as part of that, I also wrote a little Markov chain thing, that took on a life of its own — beak!
Neither is ready for “release” really, but I’ve linked to the working repo of each for anyone interested in poking around them.