#dev 2016-12-12
2016-12-12 UTC
tantek joined the channel
cweiske and KevinMarks joined the channel
#
petermolnar Python people, date parsing question from me: http://stackoverflow.com/questions/41096537/date-parsing-php-and-python-gives-different-results-for-parsing-iso8601
#
petermolnar no, they are not
#
petermolnar wait
#
petermolnar ok, /me error
#
petermolnar revisited
#
petermolnar revisiting
#
petermolnar I need to wake up
#
petermolnar right
#
petermolnar copied the wrong terminal...
#
petermolnar so the problem is found, the astimezone doesn't do anything
#
petermolnar fixed the question
#
petermolnar so, summary: python always seem to use the machine's local timezone instead of the one I'm asking it to use
#
petermolnar I'll do that
#
petermolnar because it is indeed a different question
#
tantek.com edited /rsvp (+548) "/* Brainstorming */ explicitly document Remote Participation, and note why useful" (view diff)
KevinMarks_ joined the channel
#
petermolnar question fixed: http://stackoverflow.com/questions/41097146/
#
petermolnar I'm beginning to re-appreciate PHP and Perl... they are originated from simpler times, when date parsing worked...
#
petermolnar different problem
#
petermolnar $t = "2015-07-28T17:27:56+0000"; $d = strtotime( $t ); <- this works perfectly in PHP
#
petermolnar but you're right about the system one
#
petermolnar I'll rephrase it: different to my current problem :)
#
petermolnar but you're right about that
#
petermolnar epoch is UTC
#
petermolnar no timezone, no daylight saving time
#
petermolnar so if PHP doesn't respect that, indeed that is an issue
#
petermolnar I know
#
petermolnar print(d.astimezone(pytz.utc).strftime('%s')) <- but this should work, shouldn't it?
#
petermolnar because it doesn't
#
petermolnar checking
#
petermolnar print(d.strftime('%z')) -> +0000
#
petermolnar both machines
#
petermolnar ( I have a UTC and a CET machine with synced inputs for testing )
#
petermolnar the parsing of the string time is fine
#
petermolnar it's the epoch conversion which fails
#
petermolnar >>> import time >>> unixtime = time.mktime(d.timetuple()) >>> print(unixtime) - this one fails as well... this is a bad joke.
#
petermolnar >>> import calendar >>> print(calendar.timegm(d.timetuple())) - ... http://stackoverflow.com/questions/15447632/python-convert-utc-time-tuple-to-utc-timestamp
#
petermolnar so Python behave __excatly__ like PHP here
#
petermolnar it was, but these implementations... who made these decisions?
#
petermolnar seems like they never really had to work with dates, just to think of them
#
petermolnar let me get my time machine...
#
petermolnar wasn't alive in the 70s
#
petermolnar hah, the current time.h is from 91, and of course, since it's a linux re-implementation, https://linux.die.net/include/time.h; do direct copyright notes, only FSF, shall I assume Linus himself?
j4y_funabashi joined the channel
#
j4y_funabashi Think it is time for me to delve into learning javascript, I havent really looked at any frontend stuff for a long time and it looks like you can do some pretty amazing things these days
#
petermolnar j4y_funabashi don't. the JS ecosystem is turtles.
#
petermolnar what is Turtles all the way down?
#
Loqi It looks like we don't have a page for "Turtles all the way down" yet. Would you like to create it?
#
petermolnar I'm not sure that should go into the wiki
#
cweiske Turtles all the way down is https://en.wikipedia.org/wiki/Turtles_all_the_way_down
#
loqi.me created /Turtles_all_the_way_down (+114) "prompted by petermolnar and dfn added by cweiske" (view diff)
bret joined the channel
#
j4y_funabashi The main things I would like to do are add some fancy stuff to my posting interface
#
j4y_funabashi And improve my pagination so it loads new posts in rather than reloading the page
#
j4y_funabashi oh you mean browser history?
#
j4y_funabashi ok yeah I dont like it when sites do that either
#
j4y_funabashi petermolnar: do you mean that there are a million frameworks + libs?
#
@Inkwater_Masha How To Read Your Own AudioBook And Sell Direct To Customers http://www.thecreativepenn.com/2014/10/10/read-your-own-audiobook/?platform=hootsuite #indieauth #selfpub (twitter.com/_/status/808308030811045888)
loicm joined the channel
#
petermolnar j4y_funabashi I used to use endless scrolling: if it's automated ( based on scroll position ), it usually renders footers useless and while it's cool, in my opinion, it's more annoying than useful :)
#
petermolnar and yes, I meant that JS dependencies are endless pits
#
sknebel petermolnar: you relly want to look at extra libs for timestamps in python :/ I use https://github.com/boxed/iso8601 for iso-timestamp parsing and pytz for timezones (read the docs!) and dateutils for more free-formatted parsing...
#
petermolnar sknebel I'm using that, also tried dateutils
#
petermolnar to actually print utc epoch, you need calendar.timegm
#
petermolnar all the other methods I tried failed
#
ben_thatmustbeme aaronpk, was wondering if i can get your thoughts on this https://github.com/dissolve/inkstone/issues/14
#
ben_thatmustbeme i feel like its probably a security issue to just accept whatever is returned from the auth endpoint
#
petermolnar oh, wow, I generated all the shortcode and old slug redirects into a single nginx conf, 129k and 1900 lines o.O
#
ben_thatmustbeme aaronpk: i was thinking that might be okay, but would probably add the requirement of checking that the auth endpoint is still the same on the new URL
miklb__, tantek, gRegorLove and KartikPrabhu joined the channel
#
ben_thatmustbeme miklb__: you around?
#
ben_thatmustbeme miklb__: i just posted a response on github
tantek and KevinMarks joined the channel
#
ben_thatmustbeme i tried to test your endpoint to see what its returning exactly
#
ben_thatmustbeme but i don't have auth
#
ben_thatmustbeme i'll try disabling q=config option on mine and see what happens
#
ben_thatmustbeme hmm, the force refresh does not appear to be working correctly either
KevinMarks joined the channel
#
ben_thatmustbeme or actually, it is, i just broke my mp endpoint when trying to disable the q=config option
#
ben_thatmustbeme miklb__: is this from desktop?
#
ben_thatmustbeme if you inspect you should see the requests to route.php?q=
#
ben_thatmustbeme the response should be the raw JSON from your endpoint
#
ben_thatmustbeme or an error
#
ben_thatmustbeme it should try q=config first, then try q=syndicate-to when it fails
#
ben_thatmustbeme (this is when hitting the force refresh)
#
ben_thatmustbeme from the settings page, inspect the page, go to network tab
#
ben_thatmustbeme then hit force refresh
#
ben_thatmustbeme it doesn't try q=syndicate-to after that?
#
ben_thatmustbeme ah, hmm, okay
#
ben_thatmustbeme yeah, htast the correct spot, thats really odd. so that error is caught and retried with syndicate-to
#
ben_thatmustbeme really annoying
#
ben_thatmustbeme at least now i know its on safari
#
ben_thatmustbeme i should be able to debug this all on my wife's laptop
#
ben_thatmustbeme so its not seeing any response basically?
#
ben_thatmustbeme this is the problem of not having a central anything for this app. I tried to make it so anyone could deploy it with extremly little effort, anywhere
#
ben_thatmustbeme but, not central logging
#
ben_thatmustbeme it firefox inspector, it looks like this for me
KartikPrabhu and KevinMarks joined the channel
#
ben_thatmustbeme 'miklb' might be taken if you didn't register the handle
#
ben_thatmustbeme lol
#
ben_thatmustbeme eh, maybe
#
ben_thatmustbeme miklb__: last question, the response tab in there, you said you get a hash?
#
ben_thatmustbeme thats reallly odd
#
ben_thatmustbeme can you paste it to me in a private message?
#
ben_thatmustbeme i have no idea where that could be coming from
#
ben_thatmustbeme oh, so if you take a look at that screenshot again, https://ben.thatmustbe.me/static/inkstone-ff.png
#
ben_thatmustbeme what does it say for "Type"?
#
ben_thatmustbeme mine is coming up as JSON
#
ben_thatmustbeme but if i set certain headers i get it showing as PDF and i get the encoded data like that
#
ben_thatmustbeme ahhhh
#
ben_thatmustbeme yeah, i was able to reproduce that
#
ben_thatmustbeme its not form-encoded data you are sending back, but they header you are sending says that it is
#
ben_thatmustbeme you should send Content-Type: application/json
#
ben_thatmustbeme because its not the browser thats actually receiving the data, but the server, it can ignore the header
#
ben_thatmustbeme since inkstone runs entirely in the browser, its forced to run everything through there first
#
ben_thatmustbeme ohhhh, wait, are you actually returning json or form-encoded?
#
ben_thatmustbeme the spec doesn't allow for the form-encoded response for ?q=syndicate-to anymore
#
ben_thatmustbeme as i read it anyway
#
ben_thatmustbeme @aaronpk?
#
ben_thatmustbeme not in the official spec, but when we originally started doing discovery, thats what we used
KevinMarks joined the channel
#
ben_thatmustbeme voxpelli: its not that its responding with the wrong type, but just a non-expected type. queries to the micropub endpoint for syndication-to is responding with form-encoded data, not JSON data, micropub spec only allows for JSON
#
ben_thatmustbeme at least as i understand
#
ben_thatmustbeme confirmed, its responding with syndicate-to[][uid]= ....
#
voxpelli ben_thatmustbeme: I respond with JSON if JSON is requested, but I default to form-encoded, yes: https://github.com/voxpelli/node-micropub-express/blob/master/index.js#L314-L322
#
ben_thatmustbeme ahhh
#
ben_thatmustbeme okay, so i should be able to fix this by just making sure to request json
#
ben_thatmustbeme got it
KevinMarks joined the channel
#
voxpelli Opened an issue: https://github.com/voxpelli/node-micropub-express/issues/5
#
ben_thatmustbeme miklb__: hard refresh inkstone
#
ben_thatmustbeme v 1.1.6 should work
#
ben_thatmustbeme i think
#
ben_thatmustbeme i hope
#
ben_thatmustbeme it worked?
KevinMarks joined the channel
#
ben_thatmustbeme not on inkstone's end
#
ben_thatmustbeme huh, there may be other errors
#
ben_thatmustbeme but at least you got the list of syndicate-to
#
ben_thatmustbeme correct?
#
aaronparecki.com uploaded /Special:Log/upload "uploaded "[[File:facebook-add-location-prompt.png]]""
#
ben_thatmustbeme cool
#
ben_thatmustbeme let me know, open up a ticket when you figure it out, its probably an issue with inkstone
#
ben_thatmustbeme really should have been doing work that i'm getting paid to do instead.... i'll get back to that
KevinMarks_ joined the channel
KevinMarks joined the channel
#
ben_thatmustbeme miklb: I had another error I just fixed
#
ben_thatmustbeme it stopped sending the auth token
KartikPrabhu joined the channel
#
seblog.nl edited /events/2016-12-14-homebrew-website-club (+520) "added The Netherlands with Zegnat and Sebsel" (view diff)
