blackhole://nilFM

decadv 2024

December Adventure is low key; just work on some projects every day in December.

Quick links for the projects mentioned in this log:

day 1

I've been riding a coding high since Thursday. I've been rethinking underbbs as more of a toolkit for integrations than an app. I finished the anonymous AP integration which all the AP adapters should share, and started the new vision for the frontend as composable components instead of a full app.

I ran into the classic "i want to deserialize polymorphic json but i don't have sum types" situation and had to implement a piecewise json deserialization as suggested by this medium post.

When instantiating components, you mark them with a data-target attribute and once you open the websocket connection and initialize the adapters the websocket handler will fetch any data that the components might be interested in by checking that data-target and making the appropriate fetch based on what type of component it is. (This interferes with "subscribe" but this isn't implemented for the honk adapter yet so I'll cross that bridge later). Similarly, when data comes in, components are iterated over and their data-latest is updated with the new data's ID after it's been stored in memory.

Fetching a profile is fully working and public posts get as far as the datastore, just need to render them on the DOM.

day 2

Got public honks to display. It needs styling and i need to fix how bonks are handled on the backend. Probably reversing the direction of the "renoteId" and adding the bonker and bonk time as optional to the Message.

I took today off work to burn PTO, so I'm gonna go skate.

day 3

We have bonks! Keeping it simple for now. This is probably a good point to get all the adapters up to feature parity.

day 4

Used the honk API's gethonks action to implement the HonkAdapter's Subscribe method.

day 5

I cleaned up the HonkAdapter.Subscribe method and started implementing a timeline component which uses it. Because the TimelineElement might control other simpler components (like if you click on a username it might fill in an existing ProfileElement) in the future, i thought this was a good opportunity to use the Datagram.Target to basically tell data from Subscribe that it should go directly to the timeline component.

I also scrapped a bunch of frontend code that I'm not using anymore, and refactored the BatchTimer constructor to make it simpler to instantiate (now the constructor creates the request function for you based on some parameters you give it instead of passing the entire function as a parameter).

Making good progress. The timeline component needs a standard way to set the filter. For the HonkAdapter it could be a simple dropdown with home and atme but other adapters (especially NostrAdapter) could support much more complex filters, so it might make sense to create a generic timeline filter component that can be customized for different use cases and pass the filter to the timeline component...

day 6

Created a simple timeline filter dropdown and tested/refined the subscription logic so it handles resubscription properly.

day 7

Mostly just fine-tuning to use the frontend as a library from an arbitrary origin. Websocket server allows connections from any origin, data-gateway is now universally supported (in the DatagramSocket as well), and the webpack config has output.iife set to false.

day 8

I fixed the way boosts were passed to the timeline. That was all!

day 9

Fun stuff here! I added file attachment capabilities to HonkAdapter.Do's post action, implemented the CLI and API wrappers around AdapterDo, and implemented a simple CreateMessageElement which can call the post action.

I also adjusted the time comparisons on identical notes to not create duplicates in the DOM when the same data comes in twice (as might happen with Subscribe and Fetch being used together). Then, I added some stuff to support replies.

First, we add the data-interactable attribute to our timeline and message list components, which propagates to the individual messages as well. The messages, when filling themselves with data, will show reply and boost buttons if they are interactable. Boost is not yet implemented.

The second piece is the data-replywith attribute. This denotes the ID of the CreateMessageElement that will reply for this timeline. Then, when we instantiate the reply button, we just have it set the message ID to the CreateMessageElement's replyto field and focus its main textarea.

When the do::post is successful, the form is cleared. Otherwise, we should show an error message on the component itself, but I'm tired so... later.

day 10

I started merging the AuthorMessagesElement into the TimelineElement and sketching out a NavigatorElement which is used to show a detailed view of data passed in from the timeline and has a navigable history.

day 11

(Mostly) finished what I started yesterday, but data from other servers that is not already pulled from Subscribe is 99% of the time not fetchable on demand from the NavigatorElement's children because of authorized fetch, so it's time to implement it I guess!

day 12

I didn't work on underbbs, but wrote a script to dissect media files based on a tracklist/chapter list.

day 13

I played with some phonk and dnb tracks together.

day 14

Installed a photovoltaic module on my Element.

day 15

Back to underbbs, I fixed the way webfinger lookups work (not all servers are as forgiving with the acct: identifier as honk) and did some reserach on how to implement authorized fetch.

day 16

Doing a bit more research on how to implement authorized fetch. The documentation on this is not particularly front and center. You sign the request with the private key, using keyID parameter as a URL to an AP actor. That AP actor then has to have the publickey exposed for signature verification. This can be an auxiliary JSON renderer endpoint on the quartzgun API.

days 17-23

Mostly burned out on programming. Made little bits of progress toward authorized fetch, but mostly just jamming out and skating.

day 24

Fired up kdenlive and put zb9 together.

day 25

Not a lot, I struggled to fix my signal desktop container, turns out it's just chromium that's broken and i neede to resync the device.

day 26

Started cyber dragonmaid. I sketched it on paper, took a photo, and then digitized it in GIMP.

day 27

Continued on cyber dragonmaid, adding shading, the horns and tail, background, etc.

days 28-31

Here and there trying to fix the deserialization problem underbbs is having with certain AP actors, but no luck. Otherwise, I did minor touchups on cyber dragonmaid and spent new year's eve practicing more for NWC6 (mixing on my tailgate).