#social 2017-10-26

2017-10-26 UTC
rowan joined the channel
#
cwebber
horray it's still connected
#
cwebber
fixed that one
ppppp, sujin, xmpp-social and alanz joined the channel
#
erincandescent
cwebber: I'm not sure I understand the need for a CAS - surely you're signing the "child" object's ID, not the child itself?
rowan and tantek joined the channel
#
cwebber
erincandescent: depends, are you including all the child's data in the signed payload?
#
cwebber
you have the option of doing either
#
cwebber
{"object": "https://example.org/foo"}
#
cwebber
vs
#
cwebber
{"object": {"id": "https://example.org/foo", "content": "ha ha"}}
alanz joined the channel
#
cwebber
and those *mean* different things:
#
cwebber
did you Create some object at this uri?
#
cwebber
or did you Create a Note that said a specific message?
#
erincandescent
How do linked data signatures even work for this?
#
cwebber
erincandescent: they normalize to triples before signing
#
cwebber
I can explain more later but I have a call
timbl and rowan joined the channel
#
puckipedia
I should really migrate Kroeg to proper JSON-LD
#
Loqi
agreed.
#
puckipedia
if (objElement["@type"].Type == JTokenType.String) Console.WriteLine("BAD PUCK.");
#
puckipedia
... what was this for
#
puckipedia
"to": "as:Public"
#
puckipedia
I mean yes
#
puckipedia
I should've seen this coming
#
puckipedia
.. okay, I think this primitive JSON-LD in-hacker-y works
#
puckipedia
okay I should've done this a bit earlier I guess. there's a whole lot of places that hard-code the ["type"]
#
puckipedia
lol. I just ran the whole code from start to end, tried to get a user object. result: {"type": [], "bto": [], "bcc": []}
#
puckipedia
aand I have a hacky JSON-LD added! This should also pave the way for triple-based storage
rowan joined the channel
#
puckipedia
Kroeg now also has each instance use its own @context - https://gist.github.com/puckipedia/918e47d859a8b969b84b0a84c088585d
#
puckipedia
any suggestions/notes?
#
cwebber
done with client stuff for the day, can get back to AP
#
cwebber
puckipedia: I have some code sketched out to show the debug information in the test suite but it's taking longer than expected... I'm going to switch to running the actual tests against your instance and try to make sure things are working right in general
#
puckipedia
right. I just rewrote Kroeg to use JSON-LD so everything is probably broken
timbl joined the channel
#
cwebber
oh :O
#
cwebber
well maybe I should work on adding hte debug stuff after all then
#
puckipedia
haha
#
Loqi
rofl
#
puckipedia
this should also easily allow for triple storage which is fun
#
cwebber
puckipedia: are you going to CAS your quads too? ;)
#
puckipedia
maaaaybe
#
cwebber
oh
#
cwebber
the whole reason I was like "debugging is gonna be hard to set up" is
#
cwebber
because I am a moron
#
cwebber
I had most of it working
#
cwebber
and I defined new code to return a debug-apclient
#
cwebber
i put that code above where it returned
#
cwebber
and left it returning the normal apclient
#
cwebber
well no wonder it wasn't calling the debug version
#
puckipedia
me: halleluja, it works *two seconds later, after the client loaded the data* welp it broke again
rowan joined the channel
#
cwebber
nice
#
cwebber
okay I've got par tof the debug stuff working
#
cwebber
needs to be prettier :P
#
puckipedia
now I have the issue that it translates 'orderedItems' into 'items'
#
puckipedia
because orderedItems is just items, but as an @list
rowan_, rowan, rowan__ and rowan___ joined the channel
#
puckipedia
"to:talItems": 27
#
puckipedia
I don't know what happened here
#
cwebber
apo:calypse
#
Gargron
hmph
#
Gargron
i need to steam through and implement remote accounts and follow model so cobalt can actually distribute updates
#
Gargron
but i'm kinda meh on that, motivation is intermittent
#
puckipedia
so I think we've all missed a thing in the ActivityPub spec and now my code is hurting
#
puckipedia
https://www.w3.org/ns/activitystreams#Public compacts into as:Public
#
Loqi
[Amy Guy] ActivityStreams 2.0 Terms
#
puckipedia
... that *is* the Public collection, right
#
puckipedia
yep
#
puckipedia
now I'm trying to find a way to not have JSON-LD do that specific compaction
#
puckipedia
cwebber: ^
#
puckipedia
like. Kroeg won't have any issues with it. but everything else will probably choke on it
eugr joined the channel
#
cwebber
what's wrong with as:Public?
#
cwebber
oh
#
cwebber
I see.
#
cwebber
the spec doesn't point out that it'll compact to as:Public
#
puckipedia
and I'm not sure if anyone realised
#
cwebber
rhiaro: ping
#
puckipedia
oh huh. erincandescent actually did see this coming
#
puckipedia
<p>TODO: New URI? Can we get as:public in the schema or such?</p>
#
erincandescent
I'm slightly sad that Public ended up with a http(s) URI
#
erincandescent
I always felt it should have been an URN or something explicitly not dereferencable
#
cwebber
oop
#
cwebber
erincandescent: yeah that makes sense
#
cwebber
uhm
#
cwebber
well
#
cwebber
I'd say "it's a fragment id" but I'm not happy with that answer
#
erincandescent
You can dereference a thing and go hunting for a fragment
#
cwebber
tbh there's a major downside to both fragments as not-defererenceable things and fragments as embedded-in-something-else using the same URI structure
#
cwebber
yeah
#
cwebber
if there's one thing I wish I could change about the web it would be to have some way to set a bit declaring which of those is meant :P
#
erincandescent
Meanwhile something like urn:w3c:activitystreams:public would be very explicitly not dereferencable but also involve major standards organization wrangling at this point (becasue e.g. urn:w3c doesn't exist)
#
cwebber
erincandescent: you're right
#
cwebber
harumph
#
puckipedia
tbh I'd be okay with {"Public": "as:Public"} as I don't think many other IDs in audience will be mangled
#
cwebber
yeah I think it'd be "fine" if people knew to look for it
#
puckipedia
put it in the spec, and also make it the canonical URI to use? also then we need to somehow fix Mastodon because yeah that won't interoperate anymore
#
cwebber
:\
#
cwebber
well
#
cwebber
I mean technically the spec isn't wrong
#
xmpp-social
[ajordan] It's just underspecified
#
cwebber
it isn't informing people of this issue though
#
cwebber
and that is a problem
#
xmpp-social
[ajordan] I wonder what tantek's thoughts will be
#
puckipedia
.. should I make an issue on the github?
#
xmpp-social
[ajordan] Normally I'd assume he'd be against it because it'd break existing impls
#
xmpp-social
[ajordan] But that's only because the spec isn't clear enough and they're technically violating spec (kinda?)
#
puckipedia
if you assume the data that's sent has to be compacted JSON-LD, then yes
#
puckipedia
I guess Mastodon can slowly ease in a fix
#
cwebber
I think that's probably the best route, get other implementations to add support
#
cwebber
we aren't changing *spec* behavior, but we do need to bring other implmentations up to current behavior
#
Loqi
[puckipedia] #264 Public collection URI gets compacted into as:Public
rowan_, rowan and JanKusanagi joined the channel
#
cwebber
puckipedia: debug functionality added!
#
cwebber
but it's ugly as effff
#
cwebber
I need to clean it up
#
puckipedia
nice
#
cwebber
oh and I just broke it of course, lol
#
cwebber
fixed
#
cwebber
there
#
cwebber
now it's prettier
#
cwebber
puckipedia: https://test.activitypub.rocks/ give it a swing
#
cwebber
I should probably make it so you can click-to-expand them
#
cwebber
instead of displaying the whole thing
#
cwebber
but time is limited etc
#
puckipedia
I'm quickly adding a quirk into the JSON-LD compacter
#
puckipedia
quirk is needed for Mastodon compat :<
#
cwebber
;<
#
puckipedia
until the PR I mentioned is merged
#
puckipedia
aaand making a post errors
#
puckipedia
forgot to update this to new ASTerm syntax
#
cwebber
puckipedia: well all the tests run though the one that's "inconclusive" looks like it's because my thing gets confused when it got the 403 again
#
cwebber
puckipedia: the debug info does sem helpful
#
cwebber
(running against your server)
#
cwebber
anyway, also pleasantly, it no longer times out
#
cwebber
(the websocket connection)
#
cwebber
so anyway
#
puckipedia
okay I think I got the quirk in the right place
#
puckipedia
cwebber: hm, I'll try in a bit
#
cwebber
hopefully that's helpful for you to test both your thing and to tell me which issues are my fault :)
#
cwebber
when you turn on debugging mode it gets verrry verbose. Again, I need to add click-to-expand
#
cwebber
but you should have useful data at least!
#
cwebber
does a bit of css styling to make it more readable
#
puckipedia
wow I think everything broke with my JSON-LD changes
#
puckipedia
cwebber: HEY WHERE'S YOUR @CONTEXT :<
#
puckipedia
well I need to probably be able to parse non-@context objects
#
puckipedia
but that's what everything exploded on on the new thing
#
puckipedia
cwebber: aha, the "An indecisive note" fails because there's no actor on the Create
#
puckipedia
same with the Follow, etc
#
puckipedia
cwebber: wow that http debugging is so useful
#
puckipedia
seriously. really helps!
#
puckipedia
going to bed. hopefully that helps, cwebber :P
#
cwebber
puckipedia: wowee is it not there
#
cwebber
yeah I guess it wasn't because implied context which is not good enough full ack :D
#
cwebber
puckipedia: I'll deal with it tomorrow.
#
cwebber
glad the http debugging is helpful
#
cwebber
puckipedia: and yeah I guess I should do "the most correct thing" on this :)
#
cwebber
rather than the minimally acceptable thing ;)
#
cwebber
puckipedia: thanks for all your help testing :)