#dev 2016-08-02

2016-08-02 UTC
#
KevinMarks
In general, ignoring unknown ? parameters is expected behaviour isn't it?
#
tantek
query params? yes I believe that is typical
KevinMarks_ joined the channel
#
chromic.org
edited /Jekyll (+49) "/* IndieWeb Examples */ add chimo"
(view diff)
#
chromic.org
edited /MediaGoblin (+124) "Add "IndieWeb Examples" section"
(view diff)
#
GWG
tantek: I question everything.
#
tantek
GWG, that will take a long time, time that could be used coding
#
GWG
In this case, it made me think I should look at this issue.
#
GWG
Because I've been pushing for h-entry change in WordPress.
#
GWG
Should I change my recommendation it be on the top-level element?
#
tantek
GWG, unclear because of WordPress's bad history with dealing with legacy markup and theme / core / styling dependencies
#
KevinMarks_
No, you should not put u- photo on every img
#
KevinMarks_
For that issue
#
tantek
I would suggest either ALL of the markup for h-entry etc. go into "core" OR, likely better, ALL of it go into a plugin or theme
#
tantek
why is there u-photo on every image?
#
GWG
tantek: Core is out of the question. They rejected it for backcompat.
#
tantek
GWG, h-entry has nothing to do with backcompat
#
tantek
that makes no sense
#
GWG
There shouldn't be. But u-photo was put onto every avatar on the theory it was always inside an h-card.
#
tantek
"the theory"? how is that not the same code as the u-photo?
#
tantek
this sounds like you might be running into WordPress architectural flaws
#
GWG
Yes, ones I can't easily change.
#
tantek
regardless you need to figure out a way to make *THE SAME CODE* do both the h-* class name and any u-* p-* properties for it
#
tantek
otherwise they will get out of sync, and you'll get very bad markup errors
#
tantek
which is worse than no markup at all
#
tantek
just like what has happened with classic WordPress and "hentry" (before h-entry)
#
tantek
history will repeat it self
#
GWG
I'm not sure how to approach
#
tantek
first do no harm
#
GWG
tantek: This is akin to walking through a minefield.
#
tantek
no, worse.
#
tantek
this is akin to planting new mines in an old minefield
#
GWG
Every idea one of us has seems to do that.
#
GWG
Maybe this is an IWC topic.
#
tantek
that's not true at all
#
tantek
we've built plenty of things that grow and build upon each other and continue growing
#
tantek
it's WordPress in particular I'm talking about - in terms of making sure to NOT replicate the errors of the past
#
GWG
tantek: I meant, every idea we have about how to address the WordPress issue seems to plant new mines.
#
tantek
It's probably going to require that an entire plugin be responsible for all the markup, and making sure that property class names are only injected when the plugin can be absolutely certain that it successfully injected the h-* root class name for those properties
#
GWG
That was what the wordpress-uf2 plugin was supposed to be. I think it may be time for an update...but I'm not sure how a plugin can be certain
#
GWG
That is why I'm saying this may require a group of people to take on.
#
GWG
tantek: You are good at breaking down complex problems into simple problems. I've seen you do this.
#
tantek
GWG, it has to look at the markup that has been "output" so far, and verify what it expects is there
#
GWG
tantek: Output buffer?
#
GWG
Output buffering is frowned upon in WordPress.
#
GWG
I need to think about this.
#
tantek
GWG, output buffering would not be necessary if you could actually trust the plugin hooks to do the right thing
#
tantek
that's how I would pushback. the plugin architecutre is too unpredictable/complicated to be dependable, thus you have no choice but to output buffer to make sure the right thing is happening
#
GWG
Every time, or as a 'diagnostic test?
#
tantek
broken architecture should be more frowned upon than output buffering
#
GWG
Point taken
KevinMarks, KevinMarks_ and cweiske joined the channel
#
cweiske
aaronpk, why is "q" a reserved property in http://micropub.net/draft/#reserved-properties - q is only used in GET, not in POST so far
#
Loqi
[Aaron Parecki] Micropub
KevinMarks_, loicm_, tantek and petermolnar joined the channel
#
cweiske
aaronpk, why is "q" a reserved property in http://micropub.net/draft/#reserved-properties - q is only used in GET, not in POST so far
#
Loqi
[Aaron Parecki] Micropub
#
@Inkwater_Masha
What We Can Learn from J.K. Rowling’s Series Grid http://www.betternovelproject.com/blog/series-outline/ #amwriting #writetip #indieauth
(twitter.com/_/status/760467975468089345)
singpolyma joined the channel
#
GWG
Anyone have any thoughts on PHP session handlers? I was looking at memcached vs redis.
#
aaronpk
Those two won't be very different for most applications
#
aaronpk
If you're worried about scalability id use something like this https://github.com/stevencorona/SessionHandlerCookie/blob/master/README.md
#
GWG
aaronpk: I was looking at only running one, and both are an option for a persistent WordPress object cache.
gRegorLove joined the channel
#
GWG
The arguments seem to suggest redis is more flexible.
#
GWG
But I'll have to read more.
#
aaronpk
I'm a big fan of Redis
#
aaronpk
memcache is basically just storing keys and values. Redis has a bunch of different ways you can store things.
#
GWG
Right now, I am not using either directly.
#
GWG
Only through WordPress
#
GWG
I was doing some server work over the last few days. I brought back separate whole page caching for mobile so I could deliver different resources if I wanted to.
#
GWG
And Linode has given me more RAM since I last significantly tweaked those settings.
#
aaronpk
ah yes i love the free linode ram upgrades
#
aaronpk
last time i got that upgrade i downsized a machine back to what it had before and cut my costs in half :)
#
voxpelli
for sessions that should be persistent – use Redis – Memcache clears all data on restart if I remember correctly
#
aaronpk
redis does too unless you tell it not to
#
voxpelli
true, but at least you can make it persistent there :)
#
voxpelli
both Redis and Memcache being primarily in-memory are very easy to use wrong and not really get the benefits from that one would assume
#
GWG
voxpelli, how so?
#
voxpelli
when primarily used as caches the worst case scenario is that one gets no benefits from them, when used as data stores those the worst case scenarios are quite far worse
#
voxpelli
GWG: memory scales very badly, when you reach the limit it's very hard to scale up
#
GWG
I have not yet gotten there.
#
aaronpk
the big mistake people make with redis is using effectively as a cache, but not actually removing things from it, so it just keeps filling up
#
voxpelli
yeah, or to think that they can save something in Redis when they just have some 100 of them and when they get 10 000 of them they don't really have that much space left for them
#
voxpelli
one should pretty much only store things in redis where one have the need for speed that comes with in-memory databases
#
voxpelli
and keep the rest in more classic disk-backed systems
#
aaronpk
i often use the zsets with keys being unix timestamps in order to keep a sort of rolling last N items in a list
#
GWG
For me, implementing a persistent object cache for WordPress reduces database load.
#
KevinMarks_
Memcache does flush things automatically (or after time) does Redis not?
#
aaronpk
redis does if you tell it to
#
aaronpk
but you can put things in redis and if you don't set an expiration it tries to hold on to them forever
#
aaronpk
so you just have to be careful about how you use it. always setting TTLs on things, or using data structures in a way where you're always trimming them during normal operation
tantek joined the channel
#
GWG
Using it in testing, it certainly has a better cli.
#
GWG
I need to get my server email notifications system back online.
#
GWG
Anyone have a service they like witha free or cheap tier?
#
aaronpk
mailgun
#
GWG
I think I can handle less than 10k
#
tantek
what kind of service?
#
tantek
what is mailgun?
#
Loqi
It looks like we don't have a page for "mailgun" yet. Would you like to create it?
#
voxpelli
service for transactional emails
#
aaronpk
Mailgun is an API to send and receive emails
#
tantek
Loqi?
#
aaronpk
what is Mailgun?
#
Loqi
It looks like we don't have a page for "Mailgun" yet. Would you like to create it?
#
aaronpk
Mailgun is an API to send and receive emails
#
loqi.me
created /Mailgun (+76) "prompted by aaronpk and dfn added by aaronpk"
(view diff)
#
aaronpk
oops case sensitive
#
GWG
tantek, I just need my server to send alert emails and running a mail server is a pain
#
tantek
that's new
#
tantek
(Loqi being case sensitive)
#
tantek
GWG, worth documenting that use-case
#
voxpelli
There's a difference between newsletter e-mail services and transactional e-mail services, so important to use the right one :)
#
aaronpk
i rewrote almost all of Loqi so not surprised
#
aaronpk
eh, "newsletter" email services are a whole different thing. I wouldn't call mailgun a "transactional" email service.
#
aaronpk
you could send newsletters with mailgun if you wanted to
#
GWG
I will implement then document
#
GWG
My recent voxpelli Webmention failure made me want to get better logging.
#
voxpelli
aaronpk: they call it that themselves in the title of their site "Transactional Email Api Service" :P
#
aaronpk
yeah because they don't want to attract newsletter customers ;-)
#
voxpelli
eg. Mailchimp would be totally the wrong service for this use case though :)
#
voxpelli
despite it probably being the most widely used service for sending emails
#
aaronpk
this is what i'm talking about: https://mailtrain.org/
#
miklb
don't they have a transactional service as well as their newsletter service
#
aaronpk
self-hosted email newsletter application that can send via mailgun
#
voxpelli
miklb: they had Mandrill, then it all became chaos
#
GWG
I have to figure out what email notification I may want about Webmentions.
#
miklb
right, because they dropped free tier or something?
#
voxpelli
eg. Postmark does not allow bulk email sending: https://postmarkapp.com/blog/bulk-vs-transactional
cweiske joined the channel
#
Loqi
[cweiske] aaronpk, why is "q" a reserved property in http://micropub.net/draft/#reserved-properties - q is only used in GET, not in POST so far
#
aaronpk
sorry, still catching up
#
aaronpk
it's only used in GET, but in practice many server libraries mix get and post params so best to reserve it for both
#
voxpelli
Better to reserve too much than too little :)
#
voxpelli
An extension maybe could use q and POST?
#
voxpelli
One of the great things with mf2 is the extensibility that in turn encourages experimentation and innovation, so anything that makes that carry over to Micropub and similar is great
#
miklb
voxpelli following up on a prior conversation, I've got a #jekyll question for you
#
voxpelli
miklb: shoot! :)
#
miklb
voxpelli in your post layout, you include post.html and pass post=page, but then when you load post-content, you pass post=post. I don't follow assigning post variable assignments
#
miklb
I want to wrap up (finally) the micropub stuff for the theme today, have a lull in $work
#
voxpelli
miklb: It's Jekyll that assigns the data to different variables
#
voxpelli
"post" when iterating and "page" when standalone
#
voxpelli
So through my assigning I normalize it to the same variable (and since its in an include there's no downsides, not sure what would happen otherwise)
#
voxpelli
Well, only explicitly assigned bars are available in an include, right?
#
voxpelli
s/bars/vars/
#
miklb
well this comes back to where I was getting single page views to display content from front matter and the templates are using post.frontmatter not page.frontmatter
#
miklb
because then when you include post-content.html you pass post=post https://github.com/voxpelli/voxpelli.github.com/blob/master/_includes/post.html#L41
#
miklb
but somehow it works for you ¯\_(ツ)_/¯
#
voxpelli
miklb: It could be because I use includes and you don't, same code might not be usable inside and outside of an include
#
miklb
I do use a post-content include, and tried passing post=page and it didn't work
#
miklb
I don't have a post.html include though just the post layout
#
miklb
maybe I'll just trying it your way to see if it works. Trying to avoid all of the logic checks in the jekyll IW theme
#
miklb
that I used in my personal code
#
miklb
hmm. maybe I can just copy post-content and use a page-content
#
cweiske
aaronpk, is the access_token property allowed in http://micropub.net/draft/#json-syntax ?
#
Loqi
[Aaron Parecki] Micropub
#
cweiske
or is that specific to the form-encoded stuff?
#
miklb
s/page-content/single-content/
#
aaronpk
that is specific to form-encoded
#
cweiske
why is "not found" status 400 and not 404 on http://micropub.net/draft/#error-response ?
#
Loqi
[Aaron Parecki] Micropub
#
aaronpk
404 would be a weird response because it would suggest the micropub endpoint is not found
#
cweiske
400 could also mean your http lib is broken, so that's not better
#
aaronpk
that's true, but that's sort of how this kind of api has ended up working
#
aaronpk
in my ideal world, the endpoint would always return HTTP 200 and all error handling would be done in the response body. i've seen a couple APIs like that, but it's relatively uncommon.
#
cweiske
reading the error response section in detail tells me that I break the Micropub rules when I implement my "501 not implemented" status code, since none of the 4 allowed error codes carry that meaning
#
aaronpk
"If there was an error with the request, the endpoint must return an appropriate HTTP status code, typically 400, 401, or 403..."
#
cweiske
If an error body is returned, the response body MUST ... property named error with the value set to one of the below:
#
cweiske
oh, quill just successfully created a post on my micropub endpoing. success.
#
cweiske
let's see what happens when my token endpoint returns tokens with HTML tags and " and ' in them..
#
cweiske
will be fun with different clients
#
cweiske
<link rel="token_endpoint" href="http://anoweco.bogo/bobby-tables.php"/>
#
aaronpk
do we need to set restrictions on what chars can be used in tokens?
#
cweiske
people should escape their shit
#
aaronpk
I should try generating some tokens with RTL characters in them and see what happens
#
cweiske
emoji tokens!
#
Loqi
it is probable
#
cweiske
your identification: a smiling pile of poo
#
cweiske
quill happily accepts funny tokens and passes them on
#
cweiske
too bad quill's html editor dumps the in-reply-to url
#
cweiske
no html comments :/
#
aaronpk
oh yeah, no reply field on the html editor
#
voxpelli
thinks he has come up with a way to derive layout selection from mf2 data in a declarative way so it can be done through a configuration ENV variable – yay
KevinMarks joined the channel
#
voxpelli
I have to say – PEG grammars are awesome, overkill, terribly confusing and awesome
#
miklb
voxpelli that layout selection, is that in response to my questions?
#
voxpelli
miklb: yeah, to make the category customizable
#
miklb
is reading more about jekyll includes and passing params and variables
tantek and singpolyma joined the channel
#
tantek.com
edited /Events (+215) "move July event to past, LeadingDesign Conf this October, UX London next May is just a few days after IWC Nuremberg! IWS 2017 June (likely)"
(view diff)
#
www.boffosocko.com
edited /Getting_Started_on_WordPress (+2411) "expanded on rel-me and authentication"
(view diff)
#
miklb
voxpelli++
#
Loqi
voxpelli has 88 karma (4 in this channel)
#
miklb
I just groked how includes and passing params work :-P
#
gRegorLove
For https://github.com/indieweb/indiewebify-me/issues/42 we should probably just not test instagram. It generates the link back with JS, so the validator isn't going to find it.