#dev 2017-01-02

2017-01-02 UTC
KevinMarks_ joined the channel
#
petermolnar
!tell Zegnat the only thing I considered to add is the url as title for the inline footnote link, but pandoc don't seem to be able to do that; navigating indeed can be problematic this way, but I'm yet to find a solution for that :(
#
Loqi
Ok, I'll tell them that when I see them next
#
petermolnar
!tell sknebel I don't think that is doable with CSS
#
Loqi
Ok, I'll tell them that when I see them next
#
petermolnar
I will most probably need to add some JS to render a float popup on hover for the footnote references with the footnote content
#
petermolnar
that's not too hard and it will solve most problems
#
sknebel
What is Gogs?
#
Loqi
Gogs is a self-hosted Git server with additional features such as issue management https://indieweb.org/Gogs
#
Loqi
sknebel: petermolnar left you a message 16 minutes ago: I don't think that is doable with CSS
#
sknebel
What is Gitea?
#
Loqi
It looks like we don't have a page for "Gitea" yet. Would you like to create it?
#
sknebel
Gitea is a community fork of [[Gogs]]
#
loqi.me
created /Gitea (+69) "prompted by sknebel and dfn added by sknebel"
(view diff)
#
www.svenknebel.de
edited /Gitea (+167) "linkify, background"
(view diff)
#
www.svenknebel.de
edited /Gogs (+120) "/* Criticism */ fork"
(view diff)
#
petermolnar
!tell Zegnat apparently, there is a built-in backreference for footnotes in pandoc, I somehow misunderstood it's purpose and made it invisible w/ styling; it's back now, so you can jump back into the text from the footnotes.
#
Loqi
Ok, I'll tell them that when I see them next
KevinMarks joined the channel
#
KartikPrabhu
Loqi messages?
tantek joined the channel
#
tantek.com
edited /100DaysOfIndieWeb (+217) "/* More 100 days projects */ 100 days of positive photos"
(view diff)
cweiske and KevinMarks joined the channel
#
Zegnat
Thanks for fixing keyboard navigation on your site, petermolnar!
#
Loqi
Zegnat: petermolnar left you a message 11 hours, 12 minutes ago: the only thing I considered to add is the url as title for the inline footnote link, but pandoc don't seem to be able to do that; navigating indeed can be problematic this way, but I'm yet to find a solution for that :(
#
Loqi
Zegnat: petermolnar left you a message 10 hours, 29 minutes ago: apparently, there is a built-in backreference for footnotes in pandoc, I somehow misunderstood it's purpose and made it invisible w/ styling; it's back now, so you can jump back into the text from the footnotes.
#
Zegnat
petermolnar, you might want to hide the back to content links in your print stylesheet, they look out of place there
#
petermolnar
https://plainjs.com/ - for those who need one js to do one thing well without frameworks :)
#
Zegnat
There is also http://youmightnotneedjquery.com/ that will give you code snippets to replace things you might be using jQuery for
#
petermolnar
yep, I'm aware of that
#
petermolnar
although I'm still trying to avoid JS; CSS can do a lot of stuff on it's own now, like dynamically sizing elements to viewport width/height
#
petermolnar
back in the days that way done by nasty js
#
cweiske
!tell aaronpk your site still can be fooled into handling posts as replies to themselves by sending a webmention with an anchor, e.g. on https://aaronparecki.com/2016/12/29/10/
#
Loqi
Ok, I'll tell them that when I see them next
#
Loqi
[Aaron Parecki] I decided to make that my project for today! You're not crazy :-)
tantek joined the channel
#
sebsel
Anyway, I'm debugging further in my usual 'just run it again'-test mode.
#
Zegnat
If you want me to do some stuff on my end, let me know
#
sebsel
yeah I'm really screwing up now.
#
sebsel
php-comments needs $target to check for mentions
#
sebsel
but mf2 needs $source to solve relative urls.
#
sebsel
Zegnat your mention is there :) http://5eb.nl/4m82
#
Loqi
[Sebastiaan Andeweg] Another take on uploading screenshots to a Micropub Media Endpoint
#
Zegnat
Nice! Now only author information is missing :)
#
Zegnat
At least mine shows licit.li, unlike aaronpk’s which shows nothing :D
#
sebsel
Progress: aaronpk's post disappeared because I now recognise bookmarks and don't display them :P
#
sebsel
Zegnat your posts don't have a u-author
#
sebsel
wait I need to read that thing again
#
sebsel
what is authorship?
#
Loqi
authorship is a claim about who the author(s) of a post are https://indieweb.org/authorship
singpolyma joined the channel
#
Zegnat
I think my author info comes from step 6
#
sebsel
in php-comments line 75 there is a `if(array_key_exists('author', $properties)) {`, I think that one needs a `elseif`, looking for a rel=author.
#
sebsel
than at least the author-url can be set, so people can get a h-card (and cache it) outside of php-comments.
#
Zegnat
So it just doesn’t implement /authorship?
#
Zegnat
It probably isn’t the only library that doesn’t do that
#
Zegnat
might refactor his templates to make the whole h-entry self-contained
#
sebsel
aaronpk I added the test, hope it's ok.
#
sebsel
Then I can make a new thing for this rel=author-thing
#
sebsel
I should learn how to branch properly :)
#
aaronpk
looks like it'll need more tests for the different authorship cases https://github.com/indieweb/php-comments/blob/master/tests/BasicTest.php#L374
#
Loqi
aaronpk: cweiske left you a message 1 hour, 30 minutes ago: your site still can be fooled into handling posts as replies to themselves by sending a webmention with an anchor, e.g. on https://aaronparecki.com/2016/12/29/10/
#
aaronpk
lol cweiske
#
sebsel
yeah, I was focussing on isBookmarkOf first.
#
sebsel
I don't know how to solve this rel=author thing, because php-comments expects a h-entry-type $mf object.
#
sebsel
and the rels are one branch back, next to [items].
#
aaronpk
oh hm, you'd need to pass the list of rels to it also?
#
aaronpk
i think i wrote php-comments before the authorship algorithm was documented
#
sebsel
yeah it has no $rels argument atm.
#
sebsel
You could pass in the whole mf2 object, which has the advantage that you can search for a h-entry as well, but that would break all existing uses.
#
aaronpk
yeah darn. maybe pass the whole mf2 tree as another argument to be able to do both?
#
Zegnat
feels like you need a different library, sebsel ;)
#
sebsel
doesn't sound efficient...
#
sebsel
haha, probably
#
Loqi
hehe
#
aaronpk
well, this *should* be the right library for it
#
aaronpk
if it's that bad, we could also just bump the version and make breaking changes to the api
#
sebsel
if you do that, it would be nice to also fetch h-cards. but then you need a mf2-parser in the lib as well.
#
sebsel
sounds like a bigger project.
#
aaronpk
hm yeah
#
sebsel
also: XRay and php-comments kind of want to do the same thing... right?
#
aaronpk
yeah i guess so
#
sebsel
oh, with numbers and all!
#
aaronpk
so maybe the right answer is to turn XRay into a library that can be included separately from its http API
#
sebsel
that would be awesome :D
#
sebsel
but then we move the work to your #100daysofindieweb again :(
#
aaronpk
i actually wonder how much of it you could use as is
#
aaronpk
all the mf2 parsing logic is contained within a class, and called by the API here https://github.com/aaronpk/XRay/blob/master/controllers/Parse.php#L211
#
aaronpk
the rest of that controller is error checking and making the HTTP request
#
sebsel
What is $http? That makes the remote requests?
#
Loqi
HTTP is an abbreviation for Hypertext Transfer Protocol, a protocol for communication, supported by web servers (like Apache & nginx) and browsers https://indieweb.org/HTTP
#
aaronpk
that Formats\Mf2::parse function requires passing in an $http object which has methods for doing the actual fetching of the author h-card
#
sebsel
ah yeah
#
aaronpk
for the test suite, it's replaced by a version of the class that loads sample files from disk instead of making http requests
#
sebsel
nice :)
#
aaronpk
that also gives you a way to replace the http fetching mechanism with your preferred mechanism like if you prefer using Guzzle instead of curl
#
sebsel
a thing to note: php-comments gives a 'type' with values like 'reply' and 'like', but XRay just gives 'type=entry' with a 'like-of'. So they do different things.
#
voxpelli
so it's trying to evolve beyond what eg. php-comments does and do things in a more interchangeable way
#
sebsel
yeah I thought so! It's just that php-comments provides a post-type algorithm and Xray doesn't
#
sebsel
so that's where php-comments 'wins'.
#
aaronpk
oh interesting
#
aaronpk
ah yeah, i pushed that "type detection" logic into my website, using the raw data that XRay provides
#
aaronpk
i wouldn't be opposed to adding post type discovery to XRay tho
#
Loqi
[Tantek Çelik] Post Type Discovery
#
sebsel
yeah, I think I saw a property somewhere... like 'wp-matched-on' or something, which would be 'like-of' or 'in-reply-to', depending on where the target was mentioned.
#
sebsel
I just can't find it anymore
#
aaronpk
oh yeah that's something that webmention.io adds
#
aaronpk
(webmention.io uses XRay to parse the page, but webmention.io has its own logic for comments handling)
#
sebsel
Ah, that's why... :o
#
sebsel
So many services ;)
#
aaronpk
yeah my site is quite the rube goldberg machine
KevinMarks joined the channel
#
sebsel
okay, I wrote a blogpost and then all this happened
#
sebsel
I'm going to get some food here :)
#
sebsel
If you turn XRay into a lib, I would be glad to use it. Please say if I can be of any help with that :)
#
Zegnat
You should know better than to make blogposts
#
aaronpk
rhiaro: progress! I have a line for my trip now. just gotta make it curved next https://media.aaronpk.com/Screen-Shot-2017-01-02-08-29-36.png
DanC joined the channel
KevinMarks joined the channel
#
aaronpk
wow i haven't mathed in a while
tantek joined the channel
#
aaronpk
digs up trig knowledge from deep in his brain
#
KevinMarks
You could adjust the map projection so the great circle line is straight and the country outlines conform
#
aaronpk
no i just want the curved line like facebook
#
KevinMarks
Or you could do the svg cheat I suggested yesterday.
#
aaronpk
you still need the same math for that svg version
#
KevinMarks
<path d="M x1,y1 Q 0,0 x2,y2">
#
KevinMarks
And play with the 0,0 until you like the curve
#
aaronpk
i thought the bezier control point had to be an actual point in the space, not just arbitrary numbers
#
KartikPrabhu
svg can use relative coordinates
#
aaronpk
oh well that's magic
#
KevinMarks
0,0 is the top left so you'll get a curve that pulls that way. You likely want y=0 and some blend of the x1 and x2 depending. Quadratic beziers are easier to think about than cubics.
#
aaronpk
ah. well i'm working on that "some blend" right now
#
aaronpk
KartikPrabhu: yeah i'm going for #4 there, but notice that the coordinates it requires are absolute
#
aaronpk
so given the start point of 10,60 i need to find a good point to use where they use 20,80
#
aaronpk
and that depends on the distance and slope between the start and end points
#
KartikPrabhu
let me find relative coordinates then because I am sure SVG does that too
#
KevinMarks
Scroll down to the Q example
#
KartikPrabhu
aaronpk: search for "lowercase letter specifies relative coordinates"
#
KartikPrabhu
fragmentions would be useful here :P
#
KartikPrabhu
basically lowercase version of the command makes the point's position relative to the previous one
#
aaronpk
oh hey all the imagemagick functions support relative coordinates too
#
tantek
what is imagemagick?
#
Loqi
ImageMagick is open source software for editing images https://indieweb.org/ImageMagick
#
tantek
that's the one that keeps having vulns right?
#
aaronpk
depends on how you use it but yes
#
KartikPrabhu
what is vulns?
#
Loqi
It looks like we don't have a page for "vulns" yet. Would you like to create it?
#
aaronpk
KartikPrabhu++
#
Loqi
kartikprabhu has 1 karma in this channel (141 overall)
#
tantek
what are vulnerabilities?
#
Loqi
It looks like we don't have a page for "vulnerabilities" yet. Would you like to create it?
#
loqi.me
created /vulns (+21) "prompted by KartikPrabhu and dfn added by tantek"
(view diff)
#
KevinMarks
Technically vulns are insecurity
#
tantek
I was wondering if anyone was going to point out the doublethink
chrisaldrich joined the channel
#
KartikPrabhu
well this happened in response to cluttered webpages BS: https://mercury.postlight.com/
#
KartikPrabhu
it seems like a rebranding of readability
#
@sl007
@mahemoff Working on indieauth-node. Realized SMS is 100x more expensive in germany/EU (and empire?) compared to US. Also sad!
(twitter.com/_/status/815980813183488000)
miklb joined the channel
#
aaronpk
oh my.. my geometry and trig is so rusty
#
KevinMarks
I wrote great circle interpolation in 1993, so me too.
#
KevinMarks
That's why I was suggesting the xy cheat, as presumably you already cropped the map sensibly
#
aaronpk
i have two points, A and B, so I know the distance between them, and I know the angle there. how do I find point C?
#
KevinMarks
Why do you want that point?
#
aaronpk
using it as the control point for the bezier curve
#
sknebel
aaronpk: length of BC is sin(α)*length(BA), direction of BC is direction of BA rotated by 90° (swap x and y and negate one)
#
sknebel
… I think
#
aaronpk
i need the x,y coordinates of point C
#
KartikPrabhu
which axes is X?
#
sknebel
aaronpk: but if you know what direction C is in and how far you just add direction * length to B and you have C?
#
KartikPrabhu
actually what sknebel said seems correct
#
aaronpk
i drew it tilted because it may not be aligned with the x axis
#
KartikPrabhu
so X axis is horizontal?
#
sknebel
direction = unit vector of the direction, so x_B-x_A/length(AB), y_B-y_A/lrngth(AB)
#
sknebel
for the direction of AB
#
KartikPrabhu
and you know coordinates of A and B right?
#
sknebel
... and to late
#
aaronpk
and now i can adjust the angle used to tweak how it looks https://media.aaronpk.com/Screen-Shot-2017-01-02-10-55-53.png
#
aaronpk
guess this is going in my blog post today
#
aaronpk
!tell rhiaro does this look about right to you? https://media.aaronpk.com/Screen-Shot-2017-01-02-10-55-53.png
#
Loqi
Ok, I'll tell them that when I see them next
#
KartikPrabhu
that looks great
#
aaronpk
now we see what happens on a flight from PDX->SEA->LAS
#
aaronpk
lol crap
#
KartikPrabhu
technically it is correct !
#
KartikPrabhu
you'll have to figure out a heuristic of when to flip the directions
#
aaronpk
technically? i'm not sure any of this is "technically" correct
#
KartikPrabhu
well as in it follows your algorithm for the curves.
#
KevinMarks
That sort of what I was getting at - people want a curve that goes up and left rather than down and right
#
kartikprabhu.com
edited /fragmention (+403) "/* Challenges */ add challenge about focus"
(view diff)
#
aaronpk
i think the PDX->SEA hop looks "right", and the SEA->LAS should be flipped
#
KartikPrabhu
yeah you only want to fip the shorter one
#
KartikPrabhu
and flipping both will mess up in some other situation
#
aaronpk
i was thinking flipping the longer one
#
KevinMarks
Try midpoint for X and 0 or min(y1, y2) for y
#
aaronpk
no i'm happy with the curve as it is, i just need to find the right direction
#
KartikPrabhu
it think the min will give you a direction flip
#
KevinMarks
0 will give you bouncier curves that imply flying up
#
aaronpk
i get "bouncier" curves by increasing the angle in my equation
#
aaronpk
i don't want the curves to be asymmetric
#
aaronpk
ohhhh i always want to draw this from left to right
#
loqi.me
created /micro.blog (+149) "prompted by tantek and dfn added by miklb"
(view diff)
KevinMarks joined the channel
#
aaronpk
this is tricky
chrisaldrich1, chrisaldrich_ and bret joined the channel
#
KevinMarks
It is one of those things where geography and perception fight a bit
#
Zegnat
KartikPrabhu: ugh, I still owe you some updates on that fragmention section. My schedule has been messed up this last week
#
aaronpk
i can't get PDX->SEA to look right
#
KartikPrabhu
Zegnat: not to worry
#
aaronpk
i figured it out. if the line is wider than it is tall, then draw it from left to right. if it's taller than wide, draw from top to bottom
#
aaronpk
that causes the curve to always go up and/or to the right
#
aaronpk
the only one that looks slightly weird is SEA->KEF->FRA but i'm not actually sure what I *want* this to look like https://media.aaronpk.com/Screen-Shot-2017-01-02-12-29-27.png
#
aaronpk
aw man, another edge case? https://media.aaronpk.com/Screen-Shot-2017-01-02-12-32-49.png shouldn't that short hop be flipped?
#
aaronpk
i think to fix that one i'd need to ensure all angles made by joining the hops are acute
#
aaronpk
i'm gonna ignore that case for now
KevinMarks joined the channel
#
KevinMarks
That is a plausible great circle route - it does go over Iceland
#
aaronpk
that's a stop *in* iceland
#
aaronpk
so the problem with that one is it isn't obviously three segments
#
sknebel
maybe just add a circle/dot to each stop?
#
aaronpk
yeah, i think that will help
#
aaronpk
wow it has to be tiny for it to look good
#
sebsel
btw aaronpk: I solved my webmention-display :) I just worked around php-comments. https://seblog.nl/2017/01/02/2/screenshots
#
Loqi
[Sebastiaan Andeweg] Another take on uploading screenshots to a Micropub Media Endpoint
#
sebsel
Your site was solved by adding the source-url to the mf2-parser (should've done that anyway) and for Zegnat's site I check if author->url is empty and add rel=author from the rels list if present.
#
sebsel
The rest is just h-card fetching.
#
sebsel
I probably should translate the rest of the page if my post is in English :o
#
aaronpk
ah great
#
aaronpk
oh yeah, if you just fetch the author URL in my post you'll find the h-card that way. there's a shortcut where you can find the embedded h-card on the page but either works
#
sebsel
Yeah if there's an embedded h-card, php-comments will pick it up.
#
KevinMarks
Did you look at the Google ones, aaronpk?
#
aaronpk
maps? no. upload some screenshots to the wiki? I don't even know where to go to make google make those
#
KevinMarks
Looks like they only do one leg at a time though
#
KevinMarks
And they decided portland was vancouver
#
Zegnat
Same as Facebook then, re: only one leg at a time
#
Zegnat
KevinMarks, in case you missed it, this is Facebook’s display: https://indieweb.org/File:is-traveling-to-x-from-y.png
#
aaronpk
aha i had a bug in my zoom-to-fit code
#
KevinMarks
Wow, that is a clone of the Google one, down to the icons
#
seblog.nl
created /lang (+21) "Redirected page to [[language]]"
(view diff)
#
aaronpk
hm should this one be flipped? https://aaronparecki.com/2016/09/23/1/
#
aaronpk
that was exhausting
#
aaronpk
i did not expect that to take 7 hours
#
aaronpk
closes dozens of tabs
#
Zegnat
aaronpk, that was probably because of the tiny green goblins in your math. http://www.smbc-comics.com/comic/monty-hall-problems