#dev 2019-07-05

2019-07-05 UTC
valuemachine, gRegorLove, viaken, [tantek] and [Michael_Beckwit joined the channel
#
GWG
Anyone have a set of PHP functions that compare URLs regardless of scheme or the absence of scheme?
[Michael_Beckwit joined the channel
#
[Michael_Beckwit
not readymade, but I imagine it’d be fairly easy to do with https://www.php.net/manual/en/function.parse-url.php
#
GWG
I can write one. I thought someone might save me the trouble
#
[Michael_Beckwit
well, i don’t speak for everyone, so i’m just throwing some quick ideas out there 😄
#
[Michael_Beckwit
hopefully someone does
KartikPrabhu joined the channel
#
aaronpk
i have some stuff in https://github.com/aaronpk/p3k-utils/blob/master/src/url.php but i'm not sure it does what you need
#
aaronpk
ooh maybe the normalize_url function
#
aaronpk
p3k\normalize_url($a) == p3k\normalize_url($b)
#
aaronpk
also takes into account example.com/ vs example.com
#
aaronpk
(i.e. those are the same)
#
aaronpk
i think it only depends on other functions defined in that file, so should be easy to copy out to something else
#
GWG
aaronpk: I already have your build_url
#
GWG
I used it for something else
#
GWG
The problem now is http vs https
#
aaronpk
the normalize function covers that
#
GWG
If I'm comparing an http and an https, how does it handle that?
#
aaronpk
what do you mean compare?
#
aaronpk
compare for equivalence?
#
GWG
I want to make sure that it considers http://example.com and https://example.com to be the same.
#
aaronpk
nvm normalize_url keeps the scheme of the original input URL, just assumes http if no scheme is set
#
GWG
I'll figure it out.
#
aaronpk
it'd be a small change to have it treat them the same tho
#
GWG
I think I have an idea.
#
GWG
Added a second argument to force ssl
[tantek], valuemachine and [fluffy] joined the channel
#
[fluffy]
strictly-speaking http://foo and https://foo are not the same URL, in that you can have different sites served up on the different protocols. It’s not common but it does happen.
#
aaronpk
yes also that ^^
#
aaronpk
i went with the stricter approach for indieauth which is to actually check whether/which redirects to the other before considering them equivalent
#
[fluffy]
I purposefully don’t redirect http to https which causes me a lot of trouble in auth contexts.
#
[fluffy]
Reason being that https makes caching proxies basically useless, and I want to be supportive of folks sharing low-bandwidth links.
#
[tantek]
That’s interesting fluffy. Is there an article / tutorial about that? Or is it considered “common knowledge”?
#
[tantek]
Either way, probably worth adding to /performance since you’re a real world example of it
#
[tantek]
Maybe also worth noting on /https as a consideration (I think there’s an existing section there on redirecting http to https)
#
[tantek]
FWIW I also am not (yet) redirecting http to https on my personal site
jugheadjones69, valuemachine, [KevinMarks], swentel, gRegorLove and [asuh] joined the channel; jugheadjones69 left the channel
#
[asuh]
tantek: I remember reading about caching issue fluffy described on Eric Meyer’s blog: https://meyerweb.com/eric/thoughts/2018/08/07/securing-sites-made-them-less-accessible/
valuemachine, [tantek], swentie and swentel joined the channel
#
@andybelldesign
I’m on the way to Brighton today, so I think I’m going to have a crack at getting Webmentions working on my site. I think I’ll avoid to tube today, too and have a nice stroll from Paddington to Victoria.  https://andy-bell.design/notes/198/
(twitter.com/_/status/1147058055382745088)
KartikPrabhu, [xavierroy], gRegorLove, [grantcodes], valuemachine, jugheadjones69, juggy and [jgmac1106] joined the channel; jugheadjones69 left the channel
#
@xtof_party
↩️ I'm confident Andy. Love Clearleft. Currently boarding to Oban (Scotland) and would be happy to test webmentions on this note mid-july :) http://xtof.me/2019/07/05/embarquement-pour-oban-scotland-photoblog/
(twitter.com/_/status/1147121065040252929)
[Sadik_Shahadu], [tantek], [grantcodes], jugheadjones69, jugheadjones691 and [fluffy] joined the channel; jugheadjones69 and jugheadjones691 left the channel
#
[fluffy]
[asuh] thanks, that’s exactly the article I had in mind
#
@erikkroes
Anybody using the Webmention/Semantic-Linkbacks plugin for Wordpress? I'm not getting the result I expected, but not sure if that's my expectations. Twitter likes and mentions only become avatars, and not readable sentences in my comment list. #indieweb
(twitter.com/_/status/1147147073269243905)
#
@jgmac1106
↩️ Are you using an IndieWeb theme? There are four to five themes with some key features out of the box that improve the way webmentions display. (https://quickthoughts.jgregorymcverry.com/s/MagTZ)
(twitter.com/_/status/1147148809010634754)
jugheadjones691, [jgmac1106], jeremycherfas, jugheadjones69, [eddie], gRegorLove and [xavierroy] joined the channel; jugheadjones691 and jugheadjones69 left the channel
#
@andybelldesign
✍️ New post: “Adding Webmentions to my personal site” I thought it would be helpful to writeup adding Webmentions to my personal site which is built with @eleven_ty. https://andy-bell.design/wrote/adding-webmentions-to-my-personal-site/
(twitter.com/_/status/1147173967192567808)
#
@peterjlambert
↩️ Thanks for doing that, Andy. I’ve got halfway through the process but ran out of time and effort trying to figure out getting webmentions displaying on posts. I’ll have a good look over your PR and try again.
(twitter.com/_/status/1147175713910468614)
[tantek] and jjuran joined the channel
#
@jgmac1106
↩️ why I prefer webmention badges. All HTML and a W3C standard. The way the web was meant to be. I own my assessments and feedback from my own Domain. (https://quickthoughts.jgregorymcverry.com/s/2brILa)
(twitter.com/_/status/1147178977347407878)
[cleverdevil] joined the channel
valuemachine, jjuran, leg and [KevinMarks] joined the channel
[tantek] and [fluffy] joined the channel
#
[fluffy]
I’m looking for opinions on a thing. Let’s say I want to make a configuration file where it’s just a mapping from a string to a list of strings. There is no need to embed newlines or leading/trailing whitespace, but internal whitespace would be nice. I want it to be easily edited by non-expert users. I’d rather not write my own parser. Are there any standard formats that fit the bill?
#
aaronpk
for just that case, it'd be:
#
aaronpk
keyname:
#
aaronpk
- value1
#
aaronpk
- value2
#
[fluffy]
Yeah that’s what I was considering most strongly. Hmm
#
[fluffy]
but there’s some fun corner cases like the way it’s very, um, aggressive at parsing things as bools
#
aaronpk
oh yes lol i've run into that
#
aaronpk
i think if you have quotes aroudn the values then they are always strings
#
[fluffy]
yeah but that makes it an expert-mode thing
#
[fluffy]
This is for the user group stuff in Publ, incidentally
#
[fluffy]
Basically I want a configuration format where it’s clear that “These people belong to these groups”
#
[fluffy]
maybe I’ll just go with the .ini-style ConfigFile parser
#
[fluffy]
yeah I’ll just use that, it seems to make sense for my use cases
KartikPrabhu, valuemachine, Expherience[m], djmoch, [schmarty], [KevinMarks], gRegorLove, jackjamieson, [jackjamieson], [cleverdevil], [tantek], strugee and eddy[m]1 joined the channel