#indiewebcamp 2013-10-05

2013-10-05 UTC
warden, npdoty, shaners, melvster, barneybook, caseorganic, jernst, wardn_, catsup, barneybook|2, gjones, joshr___, eschnou, LauraJ, lmjabreu and jschweinsberg joined the channel
#
@matthew_meadows
today's show was amazing. international greatness, #indieweb style "nice guys finish last. or so they say" -... https://www.facebook.com/matthew.meadows/posts/10202096862241702
(twitter.com/_/status/386424366470144000)
andreypopp, barneybook|2, cweiske, squeakytoy, wardn_, gjones, jschweinsberg, barnabywalters, LauraJ, Lorn_, bnvk, benwerd, poppy and npdoty joined the channel
#
barnabywalters
aaronpk: am I right in thinking that https://github.com/aaronpk/IndieAuth/blob/master/lib/relparser.rb#L74 will never be executed?
#
barnabywalters
if secure is ever set to false an exception will be raised and skip to line 79
caseorganic and raik joined the channel
#
barnabywalters
currently working on various relmeauth algorithms in https://etherpad.mozilla.org/indiewebcamp-relmeauth-algorithms
caseorganic joined the channel
#
aaronpk
barnabywalters: yes looks like you're right
#
aaronpk
I think I added the exception recently to better show an error, rather than just silently failing
#
barnabywalters
aaronpk: the redirect following algorithm in load_page is only used for determining what page to fetch to parse for rel-me links and whether or not that page is secure, *not* for determining the final rel-me URL used to authenticate the user, right?
#
aaronpk
correct. actually the rel-me URL used to authenticate the user is always whatever they entered in the form
#
barnabywalters
normalised to include a trailing slash, if I’m interpreting https://github.com/aaronpk/IndieAuth/blob/master/lib/relparser.rb#L33 correctly
#
aaronpk
correct
#
aaronpk
I believe a trailing slash is required, because an empty path component of a URI implies the slash
tilgovi_ and caseorganic joined the channel
jschweinsberg joined the channel
#
aaronpk
hm possibly yes
wardn_ joined the channel
#
barnabywalters
well, seeing as it’s directly before a return statement ;)
#
barnabywalters
I wrote out pseudocode for the important stages here: https://etherpad.mozilla.org/indiewebcamp-relmeauth-algorithms
#
barnabywalters
later on I’ll try to write a basic test suite and try to get a PHP implementation of rel verification working
#
barnabywalters
the bit I’ve found most difficult to understand is the fact that redirected URL resolution is *slightly* different for going from a rel-me-url to final rel-me url, and going from a profile-url to final-profile URL
#
barnabywalters
as the second one has the “is the redirect insecure but the rest of it matches” step
#
barnabywalters
although, the comparison is actually exactly the same
#
barnabywalters
it’s just that for the second case, indieauth only warns the user if no URLs succeeded
#
barnabywalters
if no rel-me backlinks matched AND one of the links was an insecure redirect but otherwise matched, then let the user know how to fix it
#
barnabywalters
argh, that while loop’s in a block. what’s the scope of a return statement within a block?
#
barnabywalters
does https://github.com/aaronpk/IndieAuth/blob/master/lib/relparser.rb#L207 just return from the “for each rel-me link” loop, or from the entire function?
jernst joined the channel
#
aaronpk
return returns from the function, not the block
#
barnabywalters
is that what the multiple return values do or is that just how blocks work?
#
barnabywalters
(sorry for all these pestering questions btw)
#
aaronpk
just how blocks work. the multiple return values is really just returning an array
#
aaronpk
return 1,2 returns [1,2], and it just so happens that you can assign [foo,bar] = [1,2]
#
barnabywalters
sure, as in python or go or PHP with list()
#
barnabywalters
I thought it might be some crazy of returning from multiple scopes at once
#
barnabywalters
but actually that makes no sense
#
barnabywalters
ah, so ruby blocks can have implicit returns but not explicit ones
caseorganic joined the channel
#
aaronpk
this is kind of why I want to have a test suite, so I can rewrite this code to clean it up :)
#
barnabywalters
aaronpk: when you’ve got a spare minute can you look over http://microformats.org/wiki/relmeauth-algorithms and see if you can spot any glaring errors?
#
barnabywalters
it’s pretty much lifted from your ruby implementation
#
barnabywalters
I just tried to generalise and name things more clearly
eschnou, LauraJ, npdoty, caseorganic, spinnerin, scor and wardn_ joined the channel
#
christopheducamp.com
created /Jekyll-fr (+2513) "[fr:first draft translation]"
(view diff)
josephboyle, caseorganic, poppy, wardn_, andreypopp and andreypopp_ joined the channel