#indiewebcamp 2014-01-20

2014-01-20 UTC
#
barnabywalters
aaronpk: okay, *maybe* the whole thing will work now
#
barnabywalters
try logging in and going to /notes/new
#
barnabywalters
you should see a little box saying success has happened
#
barnabywalters
if you do, try posting a note
#
Loqi
yea!
#
aaronpk
it's not prompting me for the "post" scope
#
barnabywalters
hm weird, looking into it now
#
aaronpk
barnabywalters: also state is 0
#
barnabywalters
that would be because the client library returns false when discovering the micro pub endpoint
#
aaronpk
oh! cause
#
aaronpk
rel=micropub now
#
barnabywalters
I’ll just discover manually pending lib update
#
aaronpk
trying again
#
aaronpk
no the library is fine i think
#
aaronpk
ok i'm signed in
#
barnabywalters
you’re in?
#
aaronpk
did you say it should look different now?
#
barnabywalters
yeah there should be a little box welcoming you by domain name
#
aaronpk
i see my domain in the top right corner
#
aaronpk
but there's still the "Welcome, guest!" blue box
#
barnabywalters
what does the blue callout box say?
#
barnabywalters
ah, okay, so something isn’t working
#
barnabywalters
I’ll add better logging then try again
#
barnabywalters
aaronpk: actually, easier, can you check what your cookies for waterpigs.co.uk are and send me the contents of indieauth_token if it exists?
#
barnabywalters
then I can decrypt it locally and take a look
#
@jeena
Thanks to #indieweb I finally cleaned up all the old code on my own website. I still had some rails 2 stuff in ... https://jeena.net/notes/9
(twitter.com/_/status/425059938806026240)
#
barnabywalters
aaronpk: oookay there was some faulty logic in the auth handler — try /notes/new again now
#
@peakwinter
@jeena I can't "webmention" you yet but just wanted to say that this looks really cool :)
(twitter.com/_/status/425060697068675072)
#
aaronpk
YEAH it worked!
#
aaronpk
well, signed in anyway
#
aaronpk
let me try posting now
#
aaronpk
whoa it kinda worked!
#
barnabywalters
huh weird URL
#
barnabywalters
with a space in
#
aaronpk
yeah let me fix that
scor joined the channel
#
barnabywalters
“kinda” — what else went wrong?
#
aaronpk
fixed!
#
aaronpk
just that. my endpoint parsed out the tags wrong
#
barnabywalters
so, proof of concept complete
#
barnabywalters
that is very awesome
#
aaronpk
now I need to add "via Taproot" to the note! like old twitter
#
barnabywalters
aaronpk: serious props for indieauth/client, it makes implementing this stuff super easy
#
barnabywalters
all the bugs were my fault :)
#
aaronpk
yay! glad to hear
#
barnabywalters
did it not get syndicated due to lack of micropub syndicate param?
#
aaronpk
that and my post endpoint doesn't do syndication yet
#
Loqi
hehe
#
aaronpk
oh no!
#
barnabywalters
because relative photo URLs
#
barnabywalters
that happened on benwerd’s site too, maybe there’s a problem in php-mf2
#
aaronpk
no, I'm just using an old version
#
barnabywalters
wow, half past midnight here now
#
aaronpk
well congrats!! that's super awesome
#
aaronpk
that went relatively well!
#
barnabywalters
I’m off for the night. thanks aaronpk for help and library! this is an excellent building block
#
barnabywalters
goodnight all
#
aaronpk
this is super exciting!
#
aaronpk
goodnight!
#
Loqi
buenas noches
#
Loqi
ciao
bnvk joined the channel
#
aaronpk
so i'm thinking a successful create should actually return a "301" header instead of "201 Created"
#
aaronpk
since that way a browser posting directly to a micropub endpoint can be redirected to the post after it's created
#
Jeena
oh neat, hehe bridgy works with my website and twitter, I just need to get the microformats data instead of the title which only says "Bridgy Response" ^^
hallettj and lukebrooker joined the channel
#
Jeena
it looks like I am misunderstanding something with microformats, I do have author, dt-published and u-url on my page but nobody seems to be able to find them: http://indiewebify.me/validate-h-entry/?url=http%3A%2F%2Flala.home.jeena.net%3A3000%2Fnotes%2F36
#
Jeena
is it because I nested them?
#
aaronpk
I like to test by looking at the parsed JSON from php-mf2
#
aaronpk
looks like the url and published are showing up inside the author
#
Jeena
hm yeah I will try to change that
#
aaronpk
yeah because they're in the h-card. those property should be outside the h-card otherwise you're saying they are properties of the h-card
#
Jeena
ok, I changed that and it already looks better
#
Jeena
need to bookmark that url, it is quite usefull to see it like that
#
aaronpk
indeed!
#
Jeena
but why is the name property together with the date and the content?
#
aaronpk
name is an implied property
#
aaronpk
!tell barnabywalters I fixed your photo here! Turns out I wasn't passing in the base URL to the mf2\Parse function! http://aaronparecki.com/notes/2014/01/19/1/indieweb-micropub
#
Loqi
Ok, I'll tell him that when I see him next
#
Jeena
so it takes "use the textContent of the .h-x for name" in my case I assume
#
aaronpk
I believe so. I'm not super familiar with that part of the code
lukebrooker joined the channel
#
Jeena
this is awkward, I am thinking about just using twitters oembed to get the data I need instead of trying to get it from the microformats from bridgy, because either I am too dumb to use https://github.com/G5/microformats2 or it is just broken
#
aaronpk
hmm it is quite possible that gem is missing some things
#
aaronpk
I unfortunately can't help much with that, I've really only used the php one
#
Jeena
yeah no problem, I will att some issues to the issue tracker so they know somebody wants to use it ;)
nastika, snarfed, snarfed1, fmarier and CheckDavid joined the channel
#
KartikPrabhu
ok so horribly stuck again. As per previous suggestion I moved auto-sending of webmentions from a post to a post_save hook. But it still seems that the target is unable to retrieve my source because it does not have a proper URL. The internet is too fast for my server?!! How are other folks doing auto-sending of mentions from post?
#
snarfed
ugh, no fun. sounds like django still can't serve the post while you're in the post-save hook?
#
snarfed
i don't know django, but you can definitely look at other example code that sends mentions from posts. e.g. https://github.com/pfefferle/wordpress-webmention
#
KartikPrabhu
I think post_save is supposed to be after saving to database, but it might be in some locked state! I might have to do some async things. sigh! thanks for the wordpress example link
#
snarfed
you could try to send the webmention http requests async
#
KartikPrabhu
yeah. that is the direction I am leaning in... but first must take a break from staring at python code :P
#
snarfed
heh, good call
jchelp, pdurbin, tantek and hallettj joined the channel
#
snarfed.org
edited /Events (+0) "/* Upcoming */"
(view diff)
#
snarfed
i've heard rumblings about people getting together in more places for homebrew website club. new york? london? reykjavik? feel free to add them to the wiki!
#
andysylvester.com
edited /Special:Log/upload () "uploaded a new version of "[[File:AndySylvester.jpg]]""
(view diff)
schalkneethling joined the channel
howardshippin, cweiske, snarfed and ireheart joined the channel
#
KartikPrabhu
ok so unfortunately Django's post_save is not really post_save. My posts do not seem to have a URL until post_save finished executing. Tried with a 1min delay in post_save to autosend webmentions, but with no luck!
tilgovi and KartikPrabhu joined the channel
#
KartikPrabhu
aaronpk, tantek: do you auto-send webmentions on post publish? if so do you do it asynchronously?
#
aaronpk
KartikPrabhu: yes my webmentions are sent out asynchronously after the post is created
#
KartikPrabhu
aah alright. I might have to investigate that then. post_save hook did not work as expected :(
#
aaronpk
Very off
#
aaronpk
But I don't know anything about django
#
KartikPrabhu
yeah the docs do say post_save is activated after adding to database but it doesn't seem to be working. In any case async sending seems more robust
tantek, melvster and Jihaisse joined the channel
#
tantek
KartikPrabhu - I don't have auto-sending webmentions implemented yet.
#
KartikPrabhu
i was just wondering how people have implemented it, since I am having quite the trouble
#
tantek
I've written some code for it, specifically for endpoint discovery
#
tantek
looks for it
#
cweiske
KartikPrabhu, I have an external service doing the webmention sending
#
cweiske
it gets notified via my atom feed and sends out webmentions to all linked urls
#
cweiske
s/gets notified/watches my atom feed/
#
Loqi
cweiske meant to say: it watches my atom feed via my atom feed and sends out webmentions to all linked urls
#
tantek
cweiske - that's a nice building block
#
KartikPrabhu
tantek: I am using bear's ronkyuu but the problem is more with syncing it with the save method for posts
#
KartikPrabhu
cweiske: that sounds interesting
tantek joined the channel
#
tantek
here's the code I wrote so far for webmention endpoint discovery: https://github.com/indieweb/link-rel-parser-php/blob/master/src/IndieWeb/link_rel_parser.php I haven't made much progress past that.
#
cweiske
the only problem I have currently is that I receive pingbacks for the images I link in my blog posts :)
dvirsky joined the channel
#
KartikPrabhu
thanks. good things to explore on MLK day holiday
#
bear
KartikPrabhu - that would be a good thing for me to add - a small tool that monitors feeds for new outbound webmentions
#
KartikPrabhu
i am sort of sceptical using ATOM or RSS feeds to do that, since those are supposed to be old technologies anyway. Maybe using a h-feed page would be good
#
tantek
KartikPrabhu - certainly if you're building the tool yourself for your own site, h-feed / h-entry publishing / parsing is the way to go.
#
bear
KartikPrabhu - you could use the feed only to know when your url is active
#
KartikPrabhu
bear: that is a good suggestion too
#
KartikPrabhu
hello Jihaisse
#
KartikPrabhu
bear: in fact I was planning to make a page that will accept a url from form input, parse it and send mentions all using ronkyuu. Maybe I should just use that on my own site :P
#
bear
the signaling of events is always the fun part for a hybrid static site
#
KartikPrabhu
the plan was to have auto-sending and this page working through the long weekend. Hopefully tomorrow
eschnou joined the channel
LauraJ, squeakytoy and lukebrooker joined the channel
#
@hackr_rss
Quiz Pt. 88 (The Bad Good Idea Edition): endlich wieder einmal ein quiz: warum ist das Indieweb eine schl... http://hackr.de/2014/01/20/quiz-pt-88-the-bad-good-idea-edition
(twitter.com/_/status/425213896836644864)
LauraJ and glennjones joined the channel
#
@pfefferle
RT @diplix: indieweb und reclaim social media - was ix so am wochende gemacht habe —http://wirres.net/article/articleview/7046/1/6/
(twitter.com/_/status/425225227963215872)
eschnou and bnvk joined the channel
lukebrooker, eschnou, pasevin, Sebastien-L, barnabywalters and nloadholtes joined the channel
#
Loqi
barnabywalters: aaronpk left you a message 11 hours, 42 minutes ago: I fixed your photo here! Turns out I wasn't passing in the base URL to the mf2\Parse function! http://aaronparecki.com/notes/2014/01/19/1/indieweb-micropub
#
@KathryneArnold
@IndieAuth Thanks for your supportive and helpful retweets. I really appreciate all the shout outs. Take care!
(twitter.com/_/status/425256261664251904)
pdurbin, brianloveswords, pasevin, lukebrooker, glennjones, nloadholtes, LauraJ, pfefferle, friedcell, Zegnat, CheckDavid, bnvk, snarfed, kromskaya and jonnybarnes joined the channel
nastika, Sebastien-L, glennjones and tantek joined the channel
#
@aral
RT @franatique: @flexewebs here is a jumpstart to get you started on the #indiedata stuff http://indiewebify.me/
(twitter.com/_/status/425304540142137344)
chelman joined the channel
#
jonnybarnes
when your tests are failing, in part because the expected result is wrong!
#
barnabywalters
jonnybarnes: such are the perils of testing
#
barnabywalters
who tests the tests?
friedcell joined the channel
#
jonnybarnes
yeah, testing some posse code and in my expected result I truncated one too many words before adding hashtags/premalink
#
jonnybarnes
that test is still failing mind
#
jonnybarnes
but that is good, because it will force me to add the next feature. work out if the truncated string ends in a punctuation character and strip that as well
#
jonnybarnes
barnabywalters: did you get your truncating code working again? I remember it was cutting notes in the middle of words.
#
jonnybarnes
"THE TRUNCANATOR" was it?
#
barnabywalters
jonnybarnes: nope, I should actually work on that now
#
barnabywalters
yeah I need to rewrite it using tantek’s truncate_to_word function
#
barnabywalters
instead of duplicating the logic
#
jonnybarnes
is that in his cassis code?
#
jonnybarnes
is that in github anywhere?
#
barnabywalters
actually I’m going to rewrite a bunch of my generic text processing functions as cassis functions instead of having yet another nasty helper library
#
jonnybarnes
does cassis actually mean anything then?
#
barnabywalters
er, client and server something or other
#
jonnybarnes
I don't really like cassis, or at least the way tantek writes it
#
barnabywalters
it’s a bit… hectic… in style
#
barnabywalters
and sure, I’d rather have everything in nice namespaces/modules
#
barnabywalters
but the ability to run seamlessly in two places makes up for it for me
#
barnabywalters
and it is generally very well written — auto_link is the best, most complete auto linking function I’ve ever come across
#
jonnybarnes
yeah, I'm sure the logic is superb, I just find it hard to read
#
barnabywalters
it’s a problem tantek’s aware of
#
jonnybarnes
in his ellipsize function tantek cuts the following from the end of the string: @$ -~*()_+[]{}|;,<>
#
jonnybarnes
why no full stop?
#
jonnybarnes
or is having " word.… #tag https://premali.nk/abc" ok?
#
barnabywalters
good point – easiest to ask him or raise an issue
#
jonnybarnes
whenever I type http thse days its a reflex reaction to add the s
#
bear
in word slicing algorithms, . (or full stop) is never used because it's already a boundary marker
#
bear
you would be wrapping already at that spot if your doing first pass truncation/wrapping based on whitespace
#
@taylorjessica92
RT @franatique: @flexewebs here is a jumpstart to get you started on the #indiedata stuff http://indiewebify.me/
(twitter.com/_/status/425316489479335936)
#
jonnybarnes
bear: I'm not using the cassis function itself, my code currently provides a truncated string to add the ellipsis too based on the space character. So I can have a truncated string that ends with a full stop
#
bear
jonnybarnes - ah, I was just commenting in general having written that type of function many many times in the past
#
@thursdayschild
@corbie On that, and the sentence above, about owning our own data, outside of social networks. http://indiewebcamp.com/
(twitter.com/_/status/425317496309047296)
#
jonnybarnes
I think if I have got a truncated string ending in a full stop, I should remove that before adding the ellipsis
#
jonnybarnes
would you guys agree?
#
barnabywalters
I would say that word.… looks messy
snarfed joined the channel
#
bear
nods
jonnybarnes joined the channel
#
jonnybarnes
woohoo, it works
#
jonnybarnes
all tests passing
#
jonnybarnes
though my code could probably do with a little refactoring
#
bear
all code can/could
#
jonnybarnes
barnabywalters: did I read correctly off twitter, people who's sites support the microhub API can now use waterpigs.co.uk/notes/new to post new notes?
#
barnabywalters
jonnybarnes: that is correct!
#
jonnybarnes
that is cool!
#
barnabywalters
indeed! waterpigs.co.uk itself doesn’t actually support micropub to create posts yet, but it can be used as a client app
#
snarfed
now that's funny
#
snarfed
your posting UI is ahead of your server
#
snarfed
entertaining
#
snarfed
regardless, nice work!
#
barnabywalters
snarfed: thanks! it was pretty easy due to aaronpk’s client library
#
barnabywalters
oauth+indieweb discovery with URLs as identifiers works pretty seamlessly
tantek joined the channel
#
jonnybarnes
so this is whats currently preparing the notes on my site before I send them to twitter, is it awful? https://github.com/jonnybarnes/posse/blob/master/src/Jonnybarnes/Posse/NotePrep.php
#
barnabywalters
jonnybarnes: looks okay to me — why a class instead of more easily reusable functions though?
#
jonnybarnes
I don't really see a difference between \namepsace\function() and \namepsace\class->function()
#
jonnybarnes
well you'd actually have $var = \namepsace\class()
#
jonnybarnes
then $var->function()
#
aaronpk
if you do static functions it'd be \namespace\class::function()
#
aaronpk
i still think the backslash is weird
#
jonnybarnes
how do other languages handle namepsaces?
#
barnabywalters
jonnybarnes: yep, instance methods force instanciation, which means more surface area to learn+remember
#
barnabywalters
instead of function name, parameter order, it’s classname, construction parameters, method name, method name parameters
#
aaronpk
in ruby it's ::
#
barnabywalters
that’s 2x the number of LOC and at least 2x the surface area
#
barnabywalters
python uses . for almost everything
#
jonnybarnes
you know, I've never heard someone talk about surface area with regards to programming
rektide joined the channel
#
barnabywalters
pretty sure I didn’t make the term up :) I hear people talking about API surface area and attack surface area occasionally
#
barnabywalters
in this case it maps quite nicely to the conventional physical representation of code, as characters on screen
#
rektide
which does? (just joined channel)
#
barnabywalters
rektide: talking about code having surface area
#
barnabywalters
and more surface area being harder to learn+remember, e.g. functions vs classes (in some cases)
#
snarfed
definitely. surface area is a pretty common, good metaphor for both APIs and security
#
barnabywalters
is currently wrapping his original-post-discovery library up into a package
#
rektide
post discovery in what way? there's surface, then there's means to make surface exploration happen, which generally means you cannot see the code & examples in action as per a library.
#
snarfed
barnabywalters: looking fwd to it! i'll be interested to compare against https://github.com/snarfed/activitystreams-unofficial/blob/master/source.py#L220
#
barnabywalters
snarfed: indeed! this is another place where cross-platform test cases would come in really handy
#
aaronpk
didn't you make progress on that?
#
aaronpk
you had a test suite written in HTML IIRC
#
snarfed
iirc it was for mf2 stuff, but maybe not for original post discovery specifically
#
snarfed
but i'll stop putting words in barnabywalters's mouth
#
barnabywalters
actually it was in indieweb/rel-me
#
jonnybarnes
talking of tests, can anyone think of any additions to my noteprep test suite? https://github.com/jonnybarnes/posse/blob/master/tests/NotePrepTests.php
#
barnabywalters
that package has a basic HTML+mf2 test suite
#
barnabywalters
but I’m unhappy with it
#
barnabywalters
as it really needs arbitrary key-value pairs
#
barnabywalters
without being extremely domain specific like glennjones’s mf2 parser HTML+mf tests are
rektide joined the channel
#
tantek
reads logs
EHLOVader and cweiske joined the channel
pasevin joined the channel
barnabywalters, glennjones, dvirsky, eschnou, friedcell, benjaminchait, madmaxer, benjaminchait_, KartikPrabhu, bnvk, julio_, jonnybarnes, pasevin, hallettj, CheckDavid and lisova joined the channel
benjaminchait, squeakytoy and hober joined the channel
#
@matthewlmcclure
Nice collection of IndieWeb links. Promising too much to say it will provide surveillance prevention. http://aralbalkan.com/notes/2014-the-rise-of-indie-tech/
(twitter.com/_/status/425399132094623744)
iangreenleaf, friedcell, lukebrooker, EHLOVader, tantek and josephboyle joined the channel