#dev 2017-11-20

2017-11-20 UTC
KartikPrabhu, tantek, [keithjgrant], snarfed, bengo and [miklb] joined the channel
#
aaronpk
!tell Zegnat I updated the docs for Caterpillar, including a new section on running as a system service: https://github.com/aaronpk/Caterpillar#running-as-a-system-service Let me know if that helps! There's also a folder with an example of how all the code fits together.
#
Loqi
Ok, I'll tell them that when I see them next
#
Loqi
[aaronpk] Caterpillar: Caterpillar is a PHP job queueing system based on beanstalkd
renem, [manton], [chrisaldrich], [miklb] and tantek joined the channel
#
@frankmeeuwsen
@ChrisAldrich @disqus I still need to work on a migration to webmentions!
(twitter.com/_/status/932492878412156928)
KartikPrabhu and cweiske joined the channel
#
@tamssokari
Yet another beauty of the web is in discovery of shared interests by someone whose paths have crossed with yours. (last RT was discovered through a comment / webmention on @adactio's blog)
(twitter.com/_/status/932512565023952896)
amz3 joined the channel
#
@tamssokari
Yet another beauty of the web is in discovery of shared interests with someone whose path has crossed yours. (last RT was discovered through a comment / webmention on @adactio's blog)
(twitter.com/_/status/932512805659594752)
[pfefferle], [jeremycherfas], loicm and [kevinmarks] joined the channel
#
Zegnat
[kevinmarks], cweiske, https://cyber.harvard.edu/rss/encodingDescriptions.html seems to suggest you just get the content of <description> and decode HTML entities once to get to the HTML content of an RSS item
#
Loqi
Zegnat: aaronpk left you a message 9 hours, 21 minutes ago: I updated the docs for Caterpillar, including a new section on running as a system service: https://github.com/aaronpk/Caterpillar#running-as-a-system-service Let me know if that helps! There's also a folder with an example of how all the code fits together.
#
Zegnat
If it isn’t CDATA, that is. If it is CDATA the content just equals HTML.
#
Zegnat
petermolnar: “<content:encoded><![CDATA[ is simpler, I can just dump the actual HTML content there” - that’s exactly how <description><![CDATA[ is already supposed to work though, if I read that encoding page right
#
ancarda
I saw something the other day about calculating the length of a Tweet, was it this library? https://github.com/twitter/twitter-text I seem to remember it had a commit about t.co links being https:// soon. Am I mis-remembering?
#
Loqi
[twitter] twitter-text: Twitter Text Libraries
#
ancarda
I can't find that commit or any mention of t.co being https (possibly I was daydreaming)
#
ancarda
2 years ago, did this ever happen? I think t.co links have always been http:// right?
#
sknebel
ancarda: ? I only see https links on twitter
#
ancarda
Maybe I've never noticed - trust me to be oblivious to something that happened 2 years ago and I'm just finding out now
[kevinmarks] joined the channel
#
[kevinmarks]
The content:encoding thing is including an external xml module from the RDF fork of rss http://web.resource.org/rss/1.0/modules/content/
#
[kevinmarks]
The rss spec is short because it does not cover this kind of complexity
#
Zegnat
ancarda does it matter whether t.co are https or not? Any link in a tweet is counted as 23 characters.
#
Zegnat
[kevinmarks], I feel like https://cyber.harvard.edu/rss/encodingDescriptions.html is pretty clear about encoding
#
cweiske
(this is about one of the 4 formats that call themselves "RSS")
#
[kevinmarks]
so <content:encoded><![CDATA[ in RSS needs the xmlns:content="http://purl.org/rss/1.0/modules/content/" header
#
[kevinmarks]
so it's actually an <encoded> tag from that namespace
#
Zegnat
I mean, if I add any RSS at all it would be the latest 2.0 spec. Which seems to be pretty clear on encoding for the description element
#
cweiske
.. using the rss 1.0 namespace
#
[kevinmarks]
<content><![CDATA[ in Atom is a native element defined to be full text
#
[kevinmarks]
rather <content type="html"><![CDATA[
#
[kevinmarks]
you can do the thing tantek does, and put xhtml in there without escaping, but it often confuses parsers
#
[kevinmarks]
you can also put <content type="text"> and either CDATA it or just use xml escaping.
#
Zegnat
I don’t author XHTML, so that’s out, [kevinmarks].
#
[kevinmarks]
no, that is quixotic and likely to make your feed fail if you accidentally get it wrong
#
Zegnat
Hmm, tantek’s feed hasn’t died for me, even though he too had some XHTML problems some weeks ago. Maybe my feed reader fixed the mistakes.
#
[kevinmarks]
feedparser has a lot of code to deal witg this kind of thing
eli_oat and tantek joined the channel
#
Zegnat
10 days ’til PHP 7.2 stable release. Everyone ready?
#
ancarda
Yeah, should be cool once it's live! Going to stick to 7.1 for now as it won't be on apt-get for a while, even though I can get it on Homebrew now
#
cweiske
ondrey's deb archive is always up to date
#
cweiske
s/y/j/
#
cweiske
he is the official debian php maintainer and offers the latest versions on his own repository
#
ancarda
Hmm, I do seem to remember `ppa:ondrej/php`, I think I did this when 7.0 had just been released, as I wanted to upgrade as soon as I could
#
ancarda
I'm ok to wait for 7.2 though :/
KartikPrabhu joined the channel
#
Zegnat
I think I had to go through deb.sury.org just to get 7.1 on debian stable.
#
Zegnat
So if you are on debian and are on 7.1, you probably use it already, which means you also already have access to 7.2 (even right now, I think RC6 is on there)
#
Zegnat
is relearning how to write services
#
cweiske
init services?
#
petermolnar
Zegnat you mean systemd unit files?
[manton] joined the channel
#
Zegnat
petermolnar, yes
#
Zegnat
I have done this some year ago, but totally forgot most of it
#
petermolnar
poke me if you get stuck, but it should be rather straightforward
#
Zegnat
Yeah, I should be able to get this working. Run PHP process as www-data user, depend on beanstalkd already running.
#
aaronpk
I can't keep all the systemd/init stuff on ubuntu straight. it seems like they keep changing their minds every release
#
ancarda
I think Ubuntu these days just uses systemd
#
sknebel
yeah. they had the added complication of going through upstart first, so they have compat layers for that
#
Zegnat
As far as I can see, Debian is still just systemd with the standard INI-format .service files. I know these. I just don’t do anything with them often enough to know by heart.
#
sknebel
but you can write "pure" systemd files, just as on debian
#
sknebel
yes Zegnat
#
Zegnat
Basically I am procrastinating with other server stuff so I do not have to wrangle with nginx and my ssl set-up for now
#
ancarda
I'll happily take over
#
ancarda
Actually serious note here; I'd be happy to help anyone with anything security related. I know for a lot of people, setting up SSL is really boring and painful
[kevinmarks] joined the channel
#
aaronpk
there's /etc/init/, /etc/init.d/, and /etc/systemd/, and I can never remember which is the "right" one to use
#
Zegnat
I was going to go with https://mozilla.github.io/server-side-tls/ssl-config-generator/ until I learned that nginx can’t handle separate settings per vhost, so I need to decide on one.
#
aaronpk
[miklb] [chrisaldrich] still having trouble with indienews? I see a rel=syndication link on miklb's post, but indienews expects a microformats u-syndication or u-category link, not rel
#
aaronpk
Zegnat: nginx can handle different ssl settings per vhost
#
ancarda
If you use `systemctl install foo.service`, AFAIK systemd will symlink to that from /etc/systemd/system/foo.service
#
Zegnat
Alright, yes, aaronpk, I could be more clear. Certain ssl settings like ssl_protocols cannot differ per vhost on the same IP.
#
sknebel
aaronpk: not all kinds of settings differently. e.g you can't have it support different TLS versions on different vhosts
#
petermolnar
aaronpk 'systemctl [action] [stuff]'
#
Zegnat
It isn’t the most clearly documented thing though. Which really ticked me off
#
petermolnar
or 'service [stuff] [action]'
#
aaronpk
oh sure but I don't think that's an nginx limitation, that sounds like a protocol limitation
#
petermolnar
don't use the directory links
#
sknebel
it's not a protocol limitation
#
aaronpk
petermolnar: how do you add things there without using the directories?
#
petermolnar
systemctl enable x
#
Zegnat
It is a limitation of the protocol implementation in openSSL as used by nginx. If my research has been good.
#
petermolnar
oh, you mean new unit files?
#
aaronpk
yeah like if I want to write a service for the ownyourswarm worker
#
petermolnar
for that you need the paths, yes, but that's /lib/systemd/system on debian imo
#
aaronpk
omg there's /lib/systemd on ubuntu too.
#
aaronpk
so wait is systemd the best current one?
#
aaronpk
not whatever /etc/init/ is?
#
petermolnar
as init system? that's the de facto at this point in time
#
aaronpk
it's newer than /etc/init.d/
#
petermolnar
/etc/init.d is the old place for bash scripts
#
petermolnar
sorry, that's etc/inittab
#
petermolnar
the ancient one
#
petermolnar
yeah, it's a bit messy
#
sknebel
petermolnar: afaik /lib/systemd/system is for system provided units, /etc/systemd/system for administrator added/overrides
#
aaronpk
also the docs are super confusing, because the first result for "ubuntu systemd" is this page with a pretty good URL https://wiki.ubuntu.com/systemd which has this giant warning at the top "The information on this page is severely out of date. Don't use it!"
#
petermolnar
I has root, I use /lib :D
#
aaronpk
which makes me think that this is not the best option
#
sknebel
the actual systemd docs aren't bad
#
Zegnat
What sknebel said, I am adding my worker service under /etc/. Even if I am root :P
#
Loqi
[cweiske] phubb: PHP PubSubHubbub server. Mirror of http://git.cweiske.de/phubb.git/
KartikPrabhu joined the channel
#
petermolnar
the archlinux wiki is usually very good for understanding things
#
petermolnar
but it differs from ubuntu here and there
#
petermolnar
however, to simple get a basic understanding, it's usually the best source
#
Zegnat
Wow, that @ trick seems super useful cweiske!
#
Zegnat
makes note to simply always check cweiske repos first
#
sknebel
aaronpk: on there, specifically the "The systemd for Administrators Blog Series" and then the man pages e.g. https://www.freedesktop.org/software/systemd/man/systemd.unit.html# + of course serverfault ;)
#
petermolnar
a note to the @ unit files: you can't use invalid usernames with that, eg. I forced usernames to match domain names - systemd doesn't accept that with @, so in that case, use the user id
#
aaronpk
I guess at some point I should rebuild all my init scripts in systemd
#
sknebel
Zegnat: that "@ trick" is the idea of "instances" http://0pointer.de/blog/projects/instances.html
#
aaronpk
I have a combination of upstart, systemd, and supervisord right now
#
petermolnar
the @ is how I run multiple spotify instances on the same server
#
sknebel
(like the note at the bottom of that post: " If you'll plan to comment on the escaping algorithm please also mention where you live so that I can come around and paint your bike shed yellow with blue stripes. ")
#
Zegnat
Basically exactly what you want for a worker that listens for jobs on beanstalk: if I ever see that the 1 worker can’t keep up I want to quickly add another instance
#
petermolnar
btw if you need tricky dependencies, such as timestamp change on file -> restart X, I still use monit
#
Zegnat
Great if I can do that without having to clone the service file
#
petermolnar
so whenever the ssl certs are regenerated, it automatically restarts the relevant services
#
aaronpk
Zegnat: that does look neat. hopefully it's good enough to drop the whole forking mechanism of my caterpillar worker
#
Zegnat
aaronpk, yeah, I never knew instances were a thing. We didn’t use them at work for our Gearman workers.
#
Zegnat
And I rather have systemd manage the instances than a PHP script with Caterpillar. No offence ;)
#
aaronpk
same. I wrote that before systemd was around
#
aaronpk
if you change your caterpillar worker to use `run_foreground` it will be a worker directly and you can use it with that instead of forking
#
sknebel
petermolnar: yeah, it's a bit strange that path units can't do service restarts nicely
#
Zegnat
Yes, i realised that. Run foreground and only 1 worker. But at that point I wondered if I couldn't just write against Pheanstalk directly.
#
Zegnat
Not sure yet what I settle on for the workers, aaronpk. First looking into getting the php scrip to reliably run through systemd.
#
aaronpk
yeah, at that point caterpillar is really just the pattern of calling methods on classes, and handles a little bit of beanstalk boilerplate for you
snarfed and [miklb] joined the channel
#
[miklb]
aaronpk there is a u-syndication on the href
#
aaronpk
[miklb]: I didn't see it in the source
#
aaronpk
oops my bad I see it now. was wrapping weird
#
[miklb]
figured it was in my markup and how the syndication plugin inserts that link. I’ll look closer.
#
[miklb]
I want to figure it out so I can start doing weekly IndieWeb WordPress wrap-up posts.
KartikPrabhu joined the channel
#
dgold
schmarty++ for morris
#
Loqi
schmarty has 9 karma in this channel (51 overall)
#
schmarty
dgold: ooh, are you using it? i just got it set up for my personal site yesterday and fixed a bug or two.
[kevinmarks] joined the channel
#
loqi.me
edited /Facebook (+85) "[kevinmarks] added "We Can't Trust Facebook to Regulate Itself - New York Times http://nzzl.us/6FLIrHJ" to "See Also""
(view diff)
#
schmarty
it could definitely use a review from someone who is used to releasing "real" PHP apps
#
schmarty
but i am happy with it so far.
KartikPrabhu joined the channel
#
dgold
schmarty: I haven't started using it, but I'm excited to see someone releasing such a thing
tantek joined the channel
#
ascraeus.org
edited /JSON_Feed (+164) "/* IndieWeb Examples */"
(view diff)
#
Zegnat
dgold, you don’t have access to a JSON serialisation function? It is generally not a good idea to write serialisation formats through templating functions
#
dgold
i'm afraid i'm unsure what you mean, Zegnat
#
Zegnat
You are now using a template file. But when you write {{ .Title }}, are you sure that is doing all the escaping JSON needs? It is better to just put an object through something like PHP’s json_encode() to make sure what you are creating is valid JSON.
#
Zegnat
Not sure if Hugo gives you access to a json_encode-like function though.
#
dgold
it does - jsonify
#
Zegnat
This is also how a lot of XML files (RSS/ATOM) have gone wrong throughout the years. People writing XML by hand and echo’ing variables into it.
#
Zegnat
While they should really have been using XML libs for writing the files.
#
dgold
in the final code I used, which I need to replace the one on that old blog post with, I use:
#
dgold
"title": {{ .Title | jsonify }}
#
sknebel
not in the code in your articl
[miklb] joined the channel
#
Zegnat
Can’t you just make an Object, append the .Site.Pages you want, and then jsonify the entire object once?
#
Zegnat
That would be the recommended way, IMHO
snarfed joined the channel
#
petermolnar
I'm going to ask the unholy question: are there any proper xml namespace hacks/includes to serve atom AND rss in the same file? :D
#
tantek
hahahaha
#
Loqi
tantek: lol
#
tantek
petermolnar that seems like the kind of unholy hack to try web searching for
#
tantek
and if no one has done it, and you can do it in a way that works with the remaining few feed file aggregators, it's definitely worth a blog post
#
tantek
bonus points if you can make it valid XHTML as well, with h-feed :D
#
loqi.me
created /FTTC (+390) "prompted by Zegnat and dfn added by ancarda"
(view diff)
#
loqi.me
edited /FTTC (+78) "/* See Also */ new section"
(view diff)
#
loqi.me
created /FTTP (+308) "prompted by tantek and dfn added by ancarda"
(view diff)
#
loqi.me
edited /FTTP (+69) "/* See Also */ new section"
(view diff)
#
loqi.me
created /FTTH (+17) "prompted by sknebel and dfn added by sknebel"
(view diff)
#
dgold
Zegnat: yes it does!
#
tantek
petermolnar: now you have me curious
#
dgold
Zegnat: I don't think you can do that with hugo, tbh
#
tantek
since I try to stick with XML-valid HTML5, theoretically I should be able to drop in the extra Atom and RSS elements and have them just "work" on my home page
#
tantek
oh wait you can't do that with RSS because RSS requires XML-escaping all the nested HTML in articles/items because RSS itself is not powerful enough to handle nested markup for content (Atom fixed this)
#
tantek
RSS--
#
Loqi
rss has -2 karma in this channel (-3 overall)
#
dgold
rss--
#
Loqi
rss has -3 karma in this channel (-4 overall)
#
tantek
but I *might* be able to do that with Atom
#
snarfed
"can i CASSIS RSS and Atom" may be the perfect tantek nerd snipe
#
tantek
snarfed, hahaha
#
tantek
that'll take longer. my home page / feed file generation code is still mostly PHP-specific, with some use of CASSIS functions. converting the whole thing to CASSIS is still a longer term project
#
Zegnat
dgold, could be that hugo doesn’t support it. Just wanted to point out that templating serialisation formats is often very fragile.
#
tantek
yeah for sure
#
dgold
it it wrong that i kinda prefer how my site looks in unmung than how it looks in the actualité?
#
snarfed
oh yeah i just meant CASSIS as a generic verb for "find a working subset of two alternative languages"
#
aaronpk
Maybe that's lowercase "cassis"
#
tantek
snarfed I don't think Atom / RSS have any overlap
#
tantek
in tags etc.
#
tantek
it would be more like a parallel universe kind of thing
#
snarfed
so maybe "union" instead of subset
#
tantek
(e.g. I've done this with HTML + JS)
#
tantek
(files that can be read/parsed/"executed" as either)
#
tantek
useful for JS with built-in HTML marked up documentation
#
tantek
you can src= include it to work, and just drop it into a browser to view its documentation
#
tantek
*rich documentation
#
tantek
ages ago in the early 2000s I think
#
tantek
gosh this is hard to search for
#
dgold
went down a rabbit hole looking for this, forgot it was dave winer
#
dgold
rss, but in json
#
tantek
well I know it's in my blog from 2002-2006 so I may just have to do local file search since web search is failing me
#
aaronpk
Oh my... what's the relationship between that and JSONFeed
#
tantek
aaronpk - don't go there, I believe there is drama
#
tantek
I wish I could search Google for markup in examples like "src="
#
tantek
specifically inside <code> elements
[miklb] and dougbeal|mb1 joined the channel
#
[miklb]
aaronpk now I’m getting a `target_mismatch` error, URL on the page did not match the target URL of the Webmention. Any suggestions?
#
[miklb]
what is target mismatch
#
Loqi
It looks like we don't have a page for "target mismatch" yet. Would you like to create it?
#
[miklb]
lol, seems I had a trailing slash and that caused it to fail.
[manton] joined the channel
#
[manton]
aaronpk I started to type an answer about JSON Feed and Dave's RSS as JSON, but Tantek's right, don't want to add more drama... Happy to talk about it in Austin over a beer. ?
#
tantek
manton++
#
Loqi
manton has 1 karma in this channel (30 overall)
[cleverdevil] joined the channel
#
Loqi
drama has -1 karma
snarfed joined the channel
#
aaronpk
[miklb]: that sounds like whatever url was send as the target parameter in the webmention request was not exactly the same as the url in the post
#
[miklb]
aaronpk, yes, I had news.indieweb.org/en/ and it was rejecting the trailing slash
#
tantek
when I see URLs with .../cache/busting/... in them it makes me sad. Sad that apparently dealing with caching is so hard that people need such hacks
#
tantek
(from oree.co )
#
tantek
(via [cleverdevil] )
#
tantek
what is netdna-ssl.com?
#
Loqi
It looks like we don't have a page for "netdna-ssl.com" yet. Would you like to create it?
#
tantek
what is netdna-ssl
#
Loqi
It looks like we don't have a page for "netdna-ssl" yet. Would you like to create it?
#
tantek
why does netdna need a *separate domain for SSL?!?*
#
[miklb]
aaronpk unless I was getting caught with caching
#
aaronpk
I don't think it caches... I could be wrong
#
loqi.me
created /WooCommerce (+110) "prompted by tantek and dfn added by [miklb]"
(view diff)
#
[miklb]
I create static html cache of my entries
tantek and [kevinmarks] joined the channel
#
[kevinmarks]
dgold You could use the unmung template, it's jinja2 so close to the Hugo style
#
dgold
[kevinmarks]: thanks, :), but I think i'll take it as a sign from high atop the whatever that I need to change my site's design quite completely
#
[kevinmarks]
Oh, maybe not, the template is doing the name mapping https://github.com/kevinmarks/unmung/blob/master/hfeed.html
#
[kevinmarks]
I forgot I did it that way
amz3 and KartikPrabhu joined the channel
#
@CodingItWrong
The #indieweb is a return to the original vision of the web; I want to make an 88x31px “Works With Webmentions” badge (cc @keithjgrant)
(twitter.com/_/status/932731732985565187)
tantek joined the channel
#
tantek
I found it, by browsing my website files directory, not by search. There's definitely a use-case for a human browseable website files directory, in contrast to hiding things in an opaque (and fragile) database file (even SQLlite), or having a system that generates thousands of files.
[keithjgrant] and [kevinmarks] joined the channel
#
loqi.me
created /TLA (+117) "prompted by aaronpk and dfn added by [kevinmarks]"
(view diff)
#
tantek.com
edited /TLA (+30) "prompted by aaronpk, FTFY kevinmarks"
(view diff)
#
loqi.me
edited /TLA (+27) "/* See Also */ new section"
(view diff)
KartikPrabhu joined the channel
#
tantek.com
edited /jargon (+120) "expand with indieweb examples to relate to indieweb, add word as new acronym usage as well"
(view diff)
#
tantek
here it is - the poorly named "Semantic Scripting" for how I figured how to make a file that is both HTML and Javascript simultaneously http://tantek.com/log/2002/11.html#L20021121t1730
#
tantek
The example, rather than the backstory: http://tantek.com/log/targetsheet.html
#
tantek
there you go snarfed ^^^
#
tantek.com
edited /wikifying (+640) "/* Define jargon */ Definitions include indieweb relevance"
(view diff)
#
tantek
wow that hack is 15 years old tomorrow
#
tantek
considers making a version of cassis.js that also displays as HTML
#
aaronpk
would it be basically inline docs for all the functions?
#
aaronpk
that'd be pretty hilarious
#
tantek
hmm I wonder if each function would make sense as an h-entry
#
tantek
then you could browse them in your feedreader
#
tantek
perhaps with good revision control, you could even insert the created/published/updated dates per function
#
tantek
perhaps even per function authors if there are different primary authors of different functions