matrix implementation saga; 9 days left 

:blobcatnotlikethis2:

re: matrix implementation saga; 9 days left 

got the cofe.
might watch a couple more videos before we get spooled up.
gonna be a long day when i start writing the code.

re: matrix implementation saga; 9 days left 

today our job is to generate the code that takes query URLs and calls the right functions :ablobcatbongokeyboard:

re: matrix implementation saga; 9 days left 

```
#,---
#| _matrix/client/v3/rooms/{roomId}/send/{eventType}/{txnId}/
#`---
proc route__matrix_client_v3_rooms__roomid__send__eventtype___txnid__*(todo) =
let anchor = "txnId"
if not parse_string(source, here, anchor): return
if not parse_string(source, here, "/"):
case verb
of vPUT: return put__matrix_client_v3_rooms__roomid__send__eventtype___txnid__(todo)
else: discard
else:
discard
```
:comfy:

@Jain

re: matrix implementation saga; 9 days left 

:blobcatcoffee: quinn if this was IRC you'd be done already

:blobcatpain:

re: matrix implementation saga; 9 days left 

re: matrix implementation saga; 9 days left 

re: matrix implementation saga; 9 days left 

> invalid identifier: trailing underscores
nim why are you like this :blobcatpain:

re: matrix implementation saga; 9 days left 

@Jain for my next trick the route dispatcher compiles :blobcatbounce:

re: matrix implementation saga; 9 days left 

because build systems are derpy i do this trick where modules compile to executables (nim allows this) and the dependencies of that one module are listed in making the executable. then if another module requires it i add the executable as an order-only dependency.

since each module is now an executable it's also possible to just run that and its the unit test for the module :blobcatdunno:

this means that, basically, Tup is always running the tests and screams if you add in-tree dependencies weirdly.

Tup watches the filesystem and records what all gets touched during a build and throws a fit if it sees something in the tree that isn't in the build file. It ignores stuff outside the tree though (ok no; it does record an integrity stamp of those files so if you upgrade the system it will still be like :revblobfoxnotlikethis: PYTHON CHANGED. GOTTA RERUN ALL THE SCRIPTS)

you might wonder why i'm not using mk. well. because i'm not in a situation tup breaks :cirno_sip:

re: matrix implementation saga; 9 days left 

Tup is very nice. the filesystem monitoring catches or deals with unspecified dependencies so there isn't a whole lot of script maintenance penance. it also blows up horribly in some situations. since this isn't one of those, i'm using it.

please.build i might add support for later. it's ok. it's nice for dealing with monorepos and the like but then you have to deal with the sandbox and script maintenance and shit.

re: matrix implementation saga; 9 days left 

:blobfoxcofe: haha look at quinn being crazy over there
:blobcatcoffee: haha
:blobfoxcofeowo: wait is quinn actually doing it
:blobcatovo:

re: matrix implementation saga; 9 days left 

@icedquinn you’re calling it Quinntrix right?

re: matrix implementation saga; 9 days left 

@ademan names are for winners. it’s just called icedmatrix until i succeed :blobcatovo:

re: matrix implementation saga; 9 days left 

mm yes thousands of lines of code i don't have to maintain :youmusip:

re: matrix implementation saga; 9 days left 

probably have to refactor some stuff. forget if i decode the URL on arrival i know we strip the query but technically stupid things like /foo%xxbar/baz can arrive which asks for "/foo/bar" "/baz" and this is a legal URL (however retarded it is) and matrix sometimes uses parameters in the URL for things.

i don't think it actually runs up against this edge case but er. we shouldn't do that :blobcateyes:

then again saying fuck the rules is how you get high performance so maybe :blobfoxthisisfine:

re: matrix implementation saga; 9 days left 

the way i do it now is not strictly to http specs but its *very efficient* because it reads the string in place. this prevents creating a lot of garbage for the GC to collect later.

but we create garbage in the form of injecting headers and query strings in to a hash table. so this is probably worthless.

re: matrix implementation saga; 9 days left 

wonderful. that batch of code generation penance is done.
now to fix query string parameters :blobcateyes:
@p how do you feel about matrix servers that are not synapse :blobcatcofesip:
@p i shitposted that i'd do it in two weeks. it's been a couple of those days. there are threads about it :blobdeenodejs:
Follow

@icedquinn
I am looking forward to its release in 9 days! :blobparty:
@p

· · Web · 1 · 0 · 1
@xyfdi its probably going to be pretty bad.
before i started loafing for the night i was looking in to things like how sessions work and how i'm going to manage those session objects.

it looks like all of that stuff is basically bound to the auth key (kinda like Gemini using certs as cookies) but then there's also a pile of allowed authentication methods (i think we're allowed to 501 those) so it's like aaaaa

@p
i would have outsourced a lot of auth stuff to Open Policy Agent because that seems cool but the way matrix is designed is a little tricky about that. in the case of PSYC and possibly even jabber it's easy because chats are owned by one server and so it's entirely up to the chatroom controller (psyc even actively encouraged rooms adding room-specific scripts) but with matrix that is a bit limited. we can't for example even support pre-screening messages for abuse because that's just not how the event graph works.

there is some local stuff that it can be punted to but eeh. will deal with that some time later.

@xyfdi @p @graf @jain
taking a moment to point out that fucking google recaptcha is in this spec but TOTPs are not :blobcatamongus:

@graf @Jain @p @xyfdi
@Jain @graf @p @xyfdi i should figure out how to properly scream at them about this and by scream i mean submit a draft for that.

fortunately the fallback login is pretty nice. you just give a URL for the client to browse to. you're supposed to call a javascript method on success but if that doesn't work it also says to just re-submit the session token after the user is done (ex. laziest case you shell execute the URL to pop open the default browser, they do whatever there, then go back to the client and hit OK.)
alright i am going to be dead AF now :ablobgoodnight:

after sleep we'll have to see about getting logins working.

@Jain @graf @p @xyfdi
@p @Jain @icedquinn @xyfdi @graf That’s not a boat. Please try again.
“Well if you know which ones a boat, why do you want me to select them?”
We like to make you suffer.
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.