Pinned toot

Hi! If you just got a follow request from this account, it's because I'm moving here from pl.rly.cx and I'd like to remain in contact with you~ :blobsHug:

grrr this got the statistics nerd in me all fired up now

Show thread

ap dev 

it's not making me feel terrible about my programming abilities... yet

Show thread

ap dev 

it is once again time to put the code away for mental health reasons lol

ap dev 

I think it's funny how Mastodon has a whole converter for this and my implementation is just like "here's a sum type that holds all the allowed values for the type field, deserializer go brrr"

Show thread

gender - 

I'm gonna beat up the CEO of gender

Show thread
Riley ✨ boosted

dev 

thank fuck for unit tests

ap dev, this will probably mean nothing to you 

alternatively, I can just suck it up and pass the id into the method on the `Actor` to create the activity but that makes me sad

Show thread

ap dev, this will probably mean nothing to you 

I'll probably make it have an `id` when deserializing, and generate one on demand when it has access to the database in the body of `IntoActivity`, since the Activity subtypes cannot be serialized, only `Activity` can be

Show thread

ap dev 

now I just need to find an ergonomic way to add ids to every Activity subtype without completely fucking up my super sexy API

Show thread

ap dev 

basically, I have an `ap` module, which has two submodules: `act` and `obj`. The former holds Activity subtypes (e.g. Like, Create) and the other holds enums that describe which `object` payloads are understood for the Activity (the struct and the enum have the same name)

so an `act::Undo` struct has a union named `obj::Undo` of the types that can be undone.

So that makes adding a new kind of payload very trivial

Show thread

ap dev 

my current way of working has a very declarative vibe to it and I'm very happy with it tbh

Show thread

ap dev 

type system crimes now cause Note and Article types to be accepted as the same Note-like thing :blobDab:

Riley ✨ boosted
Riley ✨ boosted
Riley ✨ boosted

queer culture is crying because you really love your friends

Show older
Tootsite

Tootsite is a general and moderated instance with a focus on your safety. We're running glitch-soc!