#dev 2018-02-11

2018-02-11 UTC
tantek, treora and [eddie] joined the channel
#
[eddie]
Hmmm, I must be doing something wrong. I’m trying to post a JSON Syntax Micropub Request to Aperture and It’s breaking on XRay, saying undefined index: data.
#
[eddie]
This is my micropub request. I’m I confused about the JSON Syntax? https://gist.github.com/EdwardHinkle/6fc99152bf0ab73a85af314cc4da26a0
#
[eddie]
Oops I meant, am I confused
renem, lovePhpoY and mblaney joined the channel
#
mblaney
hi eddie, I think you want h-entry for the type.
#
aaronpk
mblaney is right
#
aaronpk
I need to add some better error checking in XRay tho. It assumes you're giving it output from the mf2 parser right now
[eddie] joined the channel
#
[eddie]
Thanks guys! I’ll try that
#
[eddie]
Ohhhh interesting. I must have blended h=entry and type: h-entry.
maingo and [eddie] joined the channel
#
[eddie]
Yay! It worked!
#
Loqi
woot
#
[eddie]
Thanks Loqi, you’re the best 🤙
#
Loqi
you're welcome
barpthewire, [kevinmarks], [jeremycherfas] and jeremycherfas joined the channel
#
Zegnat
jeremycherfas, I’ve got tea ;) Here is the total overkill code I was using to communicate with Known: https://gist.github.com/Zegnat/92e176449e7a2aa1baaba3e56227a089
#
jeremycherfas
Let me look through that
#
Zegnat
What I did there is abstract a whole lot of logic I didn’t want to think about. So I depend on a standardised HTTP Client class and such.
#
jeremycherfas
Just getting my head around it.
#
jeremycherfas
So index.php builds the signature?
#
Zegnat
I created a KnownAPI class that does all the API work. The index.php loads the Composer autoloader to get access to dependencies (like the HttpClient).
#
Zegnat
So all index.php does is initiate the KnownAPI class (which requires class dependencies and the user’s Known information) and then call the `create` method.
#
jeremycherfas
I am not at all familiar with any of those http functions
#
Zegnat
Ah, yeah, I was afraid of that :( Basically, there is a standard for how you can implement HTTP requests and responses in PHP: https://www.php-fig.org/psr/psr-7/
#
jeremycherfas
https://gist.github.com/Zegnat/92e176449e7a2aa1baaba3e56227a089#file-knownapi-php-L23 is the core of the matter. I should be able to try something like that without the rest, or not?
#
Zegnat
Yes. That builds and sends the request. Should be able to convert that into curl code easy enough.
#
jeremycherfas
OK, I need to go back to my first attempts and see what was happening. Thanks. I will bother you again later, I am sure.
#
Zegnat
Most of the lines are just addHeader, so those go into a curl_setopt for CURLOPT_HTTPHEADER.
#
Zegnat
Please do. Else you can always try to pull in the KnownAPI.php file. Just means you need to load a few dependencies through composer if you do.
#
jeremycherfas
I had hard-coded my username and signature, so let me get back to playing with that.
KartikPrabhu joined the channel
#
jeremycherfas
Woohoo zegnat++
#
Loqi
giggles
#
Zegnat
Fixed it? :D
#
jeremycherfas
Looks like I too can post linked title and description now. But currently all hard coded.
#
Zegnat
Awesome! Yeah. I was thinking yesterday that while the Micropub code messes some stuff up, it really should work with Known’s own API. So I gave it a shot :)
#
@jjdelc
All this #micropub and #webmention client and server development has me going "wow".. https://jj.isgeek.net/2018/02/11-102016-am/
(twitter.com/_/status/962632260125151233)
#
jeremycherfas
The weird part is, I'm pretty sure that that is where I started off, and now I'm thinking that maybe I wasn't escaping things properly.
#
Zegnat
Just happy to get you started with some working code again, no matter what went wrong previously :)
#
sknebel
huh, Known doesn't show likes properly in their RSS feeds :/
#
sknebel
wait no, it's somehow including broken bits for likes for normal posts
#
sknebel
oh no, that's jeremys experiments with zegnats code ;)
#
sknebel
so nothing wrong, nevermind
#
sknebel
got confused because my feedreader redirects me to the liked post, not the like-post
#
Zegnat
Experiments with his own code, I don’t think he is running mine ;)
#
Zegnat
Credit where credit is due :D
ben_thatmustbeme joined the channel
#
Zegnat
Hmm. I am still not sure what the exact algorithm is that is being described here: https://github.com/indieweb/microsub/issues/11#issuecomment-364673611
#
Loqi
[aaronpk] There must be a better way to describe this then. The idea is that only the orderings of the provided items would be affected by the operation. Some examples: given: `[a b c d e]` command: `[c b]` ("move `c` up") result: `[a c b d e]` given: ...
#
Zegnat
goes to write some test code
#
jeremycherfas
finishes annotating his scraps of code so he can pick up again tomorrow
#
Zegnat
sknebel, did you look any more at that ^^^
#
sknebel
look at the issue ;)
#
Zegnat
Oh, yeah, that makes a lot more sense as a system
#
Zegnat
I was just wondering how the thing aaronpk wrote could be applied at all. Mostly struggling to understand the more-than-two case.
raretrack joined the channel; mblaney left the channel
#
@TeamWembassy
@Dries @davewiner Started some early work on, http://drupal.org/project/posse I already have WebMention support via http://Webmention.io it was the lowest hanging fruit. Could use help creating tests for it though. Next target is probably going to be twitter.
(twitter.com/_/status/962673022309052416)
dgy joined the channel
#
aaronpk
Zegnat: I implemented that yesterday in Aperture, it wasn't too hard.
#
Zegnat
I should check out the code. Maybe that one example you gave with three items just threw me off. I wasn’t sure how to get from the input to the output with that command
#
Zegnat
f([a b c d e], [e d b]) = [a e c d b]
#
aaronpk
I suspect the vast majority of the usage will be swapping two adjacent items or specifying the new order of the full list, but it's convenient that there is only one method needed for both
#
Zegnat
I am not sure I understand the code you put into Aperture, aaronpk. Isn’t that only accepting a full array of the new order?
snarfed joined the channel
#
Zegnat
Yes, but isn’t that only accepting a sorted array: https://github.com/aaronpk/Aperture/blob/master/aperture/app/User.php#L43 ? Not a swap etc?
#
aaronpk
since there is a database column storing an integer used for sorting, that function swaps the integer with any of the other channels provided in the input
#
aaronpk
yes, it takes an array of the new order of the channel IDs
#
GWG
I am playing with time and d
#
Zegnat
I was most interested in the function that enables f([a b c d e], [e d b]) = [a e c d b]
#
GWG
ate inputs today
#
aaronpk
Zegnat: I guess start on line 47 then
#
aaronpk
line 41 gets the current order, the first array in your example f
#
aaronpk
actually no I guess it's not an analogous version of your f
#
aaronpk
this only ever touches the channels that are being modified
#
GWG
Wondering if using two time and date selectors was the best for duration
#
Zegnat
f(arrayPerOldSort, reorderCommand) = newlySortedArray ; basically taken from your comment in the GitHub issue
#
Zegnat
And I am having a hard time seeing how f() works there. But maybe your example was a bit far-fetched?
#
aaronpk
the function I wrote will work with the `e d b` example, but that's because it's not strictly doing `f([a b c d e], [e d b]) = [a e c d b]`
#
aaronpk
it's pulling things from the database and writing back to the database, rather than accepting input and returning the new sorted output
#
Zegnat
Yeah, I’m starting to see that now. Finding it hard to visualise that though. Maybe I should setup a Aperture db instance just to get the clear picture.
Zegnat, barpthewire, tantek and snarfed joined the channel
#
tantek
!tell aaronpk I think the "Twitter Card" on this POSSE tweet reply shows *less* information (lacks the amount) and takes up more space (unnecessarily) https://twitter.com/aaronpk/status/962024854764400642
#
Loqi
Ok, I'll tell them that when I see them next
#
@aaronpk
@t @BlueStarDonuts @t Donut delivery complete! 🍩 Hope they were tasty! 😋 💵 ➡ https://aaronparecki.com/pay/9
(twitter.com/_/status/962024854764400642)
[eddie] joined the channel
#
tantek
hah, my title element on my pay page has the same "mistake" (omitting amount)
#
tantek
fixes
#
aaronpk
I might need to move the logic in my pay pages into the backend of my site instead of having it all be JS code
#
aaronpk
I did it all in JS at first to avoid having to make a bunch of special-case custom backend code
#
aaronpk
but it's been pretty stable now, so might be worth solidifying
#
tantek
darn it my local tantek . dev broke somehow
#
tantek
yeah mine is all in the backend, no JS
#
aaronpk
if I move it to the backend then I can do things like turn off the twitter card or make it better, and change the title tag to include the amount
#
tantek
fixed. /pay and /tip pages now show amount in title
#
tantek
now that I created the Github Bridgy org, I noticed something else new in the oauth prompt for Bridgy Pub to Github
#
tantek
the Bridgy org is listed there, along with a [ Grant ] button to its right
#
tantek
in addition to the org above it which has a [ Request ] button
#
tantek
the other orgs listed before those have no such buttons
#
sknebel
are you admin of the bridgy org?
#
tantek
an owner yes, one of
#
tantek
I just got it yesterday (released from a squatted account)
#
sknebel
then it makes sense you have the right to give apps access to it I guess
#
tantek
for others?
#
sknebel
not sure, I'd think its only for your connection
#
sknebel
others would have to do "request" and then you could allow them to do so as well I guess
KartikPrabhu joined the channel
#
[eddie]
Yeah the request is because you don’t have the authority to grant access, so the request button will send that request to the org admins
#
[eddie]
Grant appears when you have authority to grant access
#
[eddie]
Bingo!
KartikPrabhu joined the channel
#
[eddie]
aaronpk, about Microsub spec: Yeah, I think so. I think notifications remain as they are. But I think Home is just another channel in the Microsub Server. No special client treatment.
#
[eddie]
But a Microsub Server is required to start with a single Home channel (uid is whatever the Microsub Server wants)
#
aaronpk
ah good idea
#
aaronpk
that also means omitting the notifications channel from the list makes more sense
#
aaronpk
clients should assume it exists
#
[eddie]
Yep, it does
#
aaronpk
even though it's not in the list
#
[eddie]
Exactly
#
aaronpk
although one problem with that is how do I return the number of unread items in that channel
#
[eddie]
That’s a good question
#
Zegnat
reflexively went to microsub.spec.indieweb.org but that isn’t a thing
tantek joined the channel
#
[eddie]
Hmmm I would be okay with notifications being returned in the list of channels for information wise. I think the main issue is sorting. It seems strange to have notifications in the sorting mix
[kevinmarks] joined the channel
#
[eddie]
Would it be weird to always return notifications as the first channel, and to define that a Microsub server ignore any attempt at placing the uid notifications in the re-order call?
#
[eddie]
So if I sent [a, b, notifications, c, d] the server would just remove notifications from the list
#
[eddie]
And have the spec define “special channels such as notifications can’t be ordered”
#
aaronpk
interesting
#
aaronpk
one benefit of that is if clients *dont* include any special handling for the notifications channel it will still show up
#
[eddie]
That is true. And at the top which is a good place to have notifications
#
aaronpk
okay I think I like it
#
GWG
Anyone available for a moment to talk Link Preview data?
#
GWG
I'm still trying to make sense of something
#
[eddie]
GWG what do you mean by Link Preview Data?
#
GWG
[eddie]: Think x-ray
#
GWG
I'm taking a URL and parsing it, and using that to present a preview of same.
#
[eddie]
Ohhh gotcha
#
[eddie]
What are you currently thinking about that?
#
GWG
So, I'm getting a lot more than just name, author, and featured right now. I'm capturing all the elements used in comment presentation as well
#
GWG
summary, published date, updated date, categories...
#
GWG
Site name
#
GWG
So, I've been storing featured image, published/last updated date, and categories/tags for some time, but haven't actually displayed them. I am brainstorming displaying them
#
GWG
But, is there such a thing as too much data in a link preview?
#
GWG
Also, I set it all up to work as a citation.
#
GWG
So, in different contexts, site name, publication, and album(for posting music) are all the same data point.
#
GWG
I'm wondering if I made it too complicated
#
[eddie]
I think there is such a thing too much preview data. Not for storage as much as display. I think the key is not overloading the display. But I think the data is useful because it can inform the display
#
GWG
Well, what I did in weather is I hid a lot of the fields from view, but still stored them.
#
[eddie]
I think that is useful to store them but hide them
#
GWG
Fields as in, in the editor, not the actual post, because I'm not currently displaying some of them, but held them because I want to someday
#
GWG
I'm rethinking every single one of them
#
[eddie]
The editor contains the link preview data?
#
[eddie]
Does it allow someone to edit it? Or just see what they are commenting on?
#
GWG
I actually allow it to be viewed/edited in the post UI.
#
GWG
Mostly edited. Not everything parses as expected
tantek joined the channel
#
GWG
So, it can be manually adjusted.
#
[eddie]
Ohhh interesting. That makes sense
#
GWG
But I want to hide that more to encourage people to not worry about it so much.
#
[eddie]
Yeah I think that’s good. I don’t know much about Wordpress UI but it might even be nice to hide it behind a “edit preview data” button where it takes an extra step to edit it. Thus discouraging the editing unless it’s required
#
GWG
I also included Start and End Date/Time, which is currently only used to calculate duration, because I wanted to have it for events later on...but I'm thinking I might have been better off with a duration picker.
#
GWG
[eddie]: I'm asking in here, over the WordPress room because it isn't a WordPress specific discussion
#
[eddie]
That’s tough, for events I think start and end time IS useful. But I can see how having it there for every most might be a bit much
#
GWG
So, I was thinking of adding a duration picker and showing/hiding the start and end date as needed.
#
GWG
I do specific post typing, not implied
#
GWG
So, there is a selector I can use
#
[eddie]
Ohhh so you can adjust based on the type
#
GWG
More JS than I normally do, but the complaint j12t made was that no one could figure out what properties should be set for what type
#
[eddie]
Yeah I think that’s a huge thing to think about. Definitely a good choice to start hiding things based on type
#
[eddie]
The less cognitive work when a person posts the smoother the flow
#
GWG
All I ever want to do with JS is things like show/hide/AJAX. I really don't like sites where things don't work without JS.
#
GWG
The way I'm changing it, everything will show without JS
#
[eddie]
Yeah that’s a good choice
#
[eddie]
Basically make everything show and then hide it using JavaScript on initial load
#
[eddie]
So you mentioned replacing start/end with duration
#
[eddie]
What is duration for on other post types?
#
Loqi
It looks like we don't have a page for "duration for on other post types" yet. Would you like to create it? (Or just say "duration for on other post types is ____", a sentence describing the term)
#
GWG
[eddie]: Duration is used for music/video/reading, for example.
#
[eddie]
Definitely :thumbsup: That makes sense
#
GWG
So, I'll likely set it that if start/end is set, but duration isn't, to derive one from the other still.
#
sknebel
sounds good. If you have the space, quick buttons for hours and minutes (:15, :30, :45, :00) also can be quite effective
#
aaronpk
[eddie]: one change with removing `default` as a known uid is now the channel parameter is required for every command
#
dgold
is there supposed to a notifications channel in a msub server?
#
dgold
doesn't have one
#
aaronpk
in Aperture? I thought I made it create that when a new user is created
#
[eddie]
aaronpk: ohhhhh hmmm that does seem an unfortunate side effect 😕
#
dgold
aaronpk: I have 'home' and one that I added myself
#
dgold
home doesn't appear to have anything in it
#
aaronpk
dgold: weird, i'm gonna have to look at that. it was supposed to create two channels for you when you first logged in
#
[eddie]
dgold: Do you see home in Aperture or Indigenous?
#
[eddie]
Just because I add the Home in there in indigenous automatically
#
dgold
[eddie]: oh, in Indigenous
#
[eddie]
ahhh gotcha
#
[eddie]
Yeah so your aperture doesn’t have either Home or Notifications
#
[eddie]
I had the same issue
#
dgold
in Aperture, when I created my first user, there was nothing there apart from aaron's apologia
#
aaronpk
how did you make the user account?
#
dgold
about to make that live now, aaronpk
#
[eddie]
I had him insert it into the Users table
#
[eddie]
is there a proper way to make the user?
#
aaronpk
ah I see what happened
#
aaronpk
there's an event that is supposed to run after a user is created, but that would only work if it's created from code
#
aaronpk
so I should make a command to create the first user, since I disabled creating users by logging in via indieauth
#
[eddie]
Ahhh yeah, that makes sense
#
aaronpk
[eddie]: how annoying will it be to always have to specify a channel in requests?
#
[eddie]
As a client, that’s not bad
#
aaronpk
having the notifications channel in the list also means you don't have to localize the name on the client
#
aaronpk
dgold: sweeet
#
aaronpk
oh you can remove Pusher from that, I realized I had just left in the default .env config from Laravel. I don't actually use Pusher for anything
#
dgold
consider it gone!
#
aaronpk
whoa do your article pages also show other posts?
#
dgold
i hope not
#
dgold
ah - I linked to that before the publication thing ended its work
#
dgold
if you follow that link again, it should just show the single post
#
aaronpk
I still see a bunch of stuff after the last line "visit your new site and sign in"
#
sknebel
dgold: yep, they are gone for me
#
aaronpk
is there some caching thing going on?
#
dgold
it must be caching
#
Loqi
[Daniel Goldsmith] WebSub Part II: Aperture
#
dgold
sorry
#
dgold
yeah, if loqi sees that, then its your local cache
#
sknebel
1st redirects to 2nd
#
dgold
there shouldn't be any... I am confused.
#
sknebel
oh no, it doesn't
#
dgold
ok, for some reason, the fist is redirecting to my homepage
#
dgold
*first
#
sknebel
that's odd, I thought it didn't a few moments ago
#
dgold
nginx is returning 304->homepage
#
dgold
time to look at nginx
#
aaronpk
not for me
#
Loqi
[Aaron Parecki] aaronpk@aaronparecki ~/Code: curl -I https://ascraeus.org/article/websub-part-ii-aperture HTTP/1.1 200 OK Server: nginx Date: Sun, 11 Feb 2018 19:01:10 GMT Content-Type: text/html; charset=utf-8 Content-Length: 55151 Last-Modified: Sun, 11 Feb 2018 1...
#
aaronpk
oh no loqi haha
#
Loqi
hehe
#
aaronparecki.com
edited /Microsub-spec (+662) "changes to default channel handling as described in https://github.com/indieweb/microsub/issues/16"
(view diff)
#
dgold
I think I see the problem - hugo
#
aaronpk
[eddie]: ^^
#
dgold
hugo is, for some reason, dropping the /article/ when it generates the file.
#
Loqi
[Daniel Goldsmith] WebSub Part II: Aperture
#
aaronparecki.com
edited /Microsub-spec (-78) "/* Actions */ channel parameter is now required (https://github.com/indieweb/microsub/issues/16)"
(view diff)
#
aaronpk
mentioning github issues in the wiki changelog means the wiki edits show up on the github thread
#
tantek
aaronpk but only the first of the two Microsub-spec edits above
#
tantek
the second, which also references the github issue by url, did not show up in https://github.com/indieweb/microsub/issues/16#ref-commit-049abee
#
tantek
also if that's the case, how come the IRC chat log mirrors on github are not also showing up in the issue?
#
aaronpk
it has to be part of the github commit message
#
tantek
not the content, got it
#
aaronpk
I made the wiki sync script use the wiki changelog as the git commit message
#
aaronpk
tho it only commits every 5 minutes, not on every wiki edit, which is probably why that second one didn't show up
#
aaronpk
true, might still show up
#
aaronpk
wiki changes get clustered in 5 minute chunks to git. i'd like to have each wiki edit be its own git commit but that is a lot harder
#
tantek
5 min is likely enough granularity to catch most edits by themselves
[jeremycherfas] and [kevinmarks] joined the channel
#
[eddie]
aaronpk: Looks great!
#
aaronpk
i'll work on changes for Aperture then!
KartikPrabhu joined the channel
#
aaronpk
aw man, i'm already doing the thing I didn't want to deal with by having other users of thi
#
aaronpk
I have to make a migration that will fix things up for you all rather than just hacking my own account up
#
tantek
oh? adding features that you don't use yourself?
#
Zegnat
To be fair, aaronpk, using migrations (if you are talking DB) with your use of Laravel is also just a good practice
#
aaronpk
this is a weird one tho
#
aaronpk
I would have just moved my notifications channel to the top of the list on my account. but instead I made a migration to adjust that for all the user accounts.
#
aaronpk
not actually a schema change
#
Zegnat
Ah. Hmm.
#
aaronpk
not a huge deal, it's just that this is exactly the thing I was trying to avoid at this early stage of the project, to make it so I can move quicker
#
Zegnat
To be fair, all “users” know that this is all unsupported.
#
Zegnat
(To be fair is turning into a new starting sentence for me, I need to stop that.)
#
aaronpk
yep but it'll save me time in the end to make this migration instead of having to give instructions to people in IRC later :P
#
dgold
then do it, man.
#
Zegnat
I’ll file an issue against your kindness, is there an aaronpk/aaronpk repo?
#
Loqi
[aaronpk] self
#
KartikPrabhu
what the what!
#
KartikPrabhu
holy %@%@!
#
KartikPrabhu
I've been laughing for the past minute
#
dgold
aaronpk: I know that Aperture is early alpha - I have no expectations.
#
Zegnat
ponders opening a self-repo too
#
kartikprabhu.com
created /fragmentioner (+212) "stubbed page"
(view diff)
#
KartikPrabhu
what is fragmentioner?
#
Loqi
fragmentioner is a Javascript utility by Kartik Prabhu which gives a pop-up link with the fragmention URL to a piece of selected text https://indieweb.org/fragmentioner
#
tantek
KartikPrabhu++
#
Loqi
kartikprabhu has 9 karma in this channel (161 overall)
[eddie] joined the channel
#
[eddie]
aaronpk: ditto to what is being expressed. Happy to alter my database how I need to
#
dgold
[eddie]: are you using indig as a m.blog reader?
[kevinmarks] joined the channel
#
[eddie]
dgold: I want to build native m.b support. But for now, I used Aperture to subscribe to my m.b JSON timeline feed
#
[eddie]
So one of my Aperture channels has all the posts from m.b
#
dgold
excellent
AngeloGladding and snarfed joined the channel