#dev 2019-05-10

2019-05-10 UTC
gRegorLove_, KartikPrabhu and snarfed joined the channel
#
@pierremartin
J’aurai quelques questions liées à l’IndieWeb, notamment autour de la mise en place d’un provider IndieAuth pour gérer l’authentification à travers divers systèmes utilisés par une association. C’est où le meilleur endroit pour demander ? (ou qui)
(twitter.com/_/status/1126716003289669634)
snarfed, chris_ritma and [Rose] joined the channel
#
Ruxton
gwg SVG discussion - is the only issue here that SVG's come from external source and need a width/height set before including them into project?
snarfed joined the channel
#
Ruxton
GWG: try rsvg-convert (in librsvg) across the files - https://github.com/numixproject/numix-tools/blob/master/numix-tools/svgscale -- i've used things like this in the past to generate sprite sheets+css for SVG+png/png2x fallback for web and create android/ios icons at the same time
istrk and KartikPrabhu joined the channel
#
Zegnat
AutoAuth means it becomes slightly harder for receivers of e.g. bridgy private posts to accidentally publish them. Because they will need to support autoauth and authorise to bridgy before the posts can even be fetched. Meaning existing webmention receivers cannot accidentally start to also publish private posts
[Rose] joined the channel
#
GWG
!tell Ruxton If that is the best way to address the icon size going out of control when loaded without the style sheet in a feed reader
#
Loqi
Ok, I'll tell them that when I see them next
#
Loqi
Ruxton: GWG left you a message 1 minute ago: If that is the best way to address the icon size going out of control when loaded without the style sheet in a feed reader
#
GWG
So, looking at inline styling as well
#
GWG
There's a surprising lack of discussion about this despite it having a name
#
Zegnat
People care surprisingly little for the non-css cases. Lots of sites get real weird without styling applied. (And this will of course apply to both fringe browsers *and* feed readers.)
#
Ruxton
I'm not sure they SHOULD display in the feed. In whch case I'd do them as backgrounds in the style and they wouldnt show, but that's a whole nother discussion
#
Ruxton
GWG: lack of discussion is because until 5? years ago SVG in browser was a nightmare
#
Ruxton
maybe a bit longer than 5
#
GWG
Ruxton, I can hide them in RSS feeds, but not h-feeds
#
GWG
I am playing around with solutions
[chrisaldrich], [xavierroy], KartikPrabhu, [frank], [tantek] and [Rose] joined the channel
#
GWG
I just realized why this styling won't work. I need to redo the weather display. Maybe I will add.d
#
GWG
add data elements for my measurements
[kevinmarks] joined the channel
#
GWG
Other than current conditions and temperature, what makes sense to display for weather?
#
[Rose]
Wind speed
#
[tantek]
UV levels, humidity %, precipitation % chance
#
GWG
I have it stored along with direction, cloudiness, pressure, humidity, etc
#
[Rose]
I'd love to turn on all of those
#
GWG
Just don't know what it would look like
#
GWG
I am in the display code trying to improve the css as part of the icon issue
#
GWG
I realized that I didn't finish adding part of the display generation arguments. So you can't customize
#
[Rose]
I can do a sketch at my gate if that might help
#
GWG
Happy to accept suggestions.
#
GWG
I want to add a short and full display option
[jgmac1106] joined the channel
#
[kevinmarks]
Dark Sky and https://www.metoffice.gov.uk are both worth a look for UI
#
[tantek]
what is weather
#
Loqi
Weather is the state of the atmosphere at a place and time as regards heat, dryness, sunshine, wind, rain, etc https://indieweb.org/weather
#
[tantek]
weather << Good UI examples: Dark Sky, https://www.metoffice.gov.uk
#
Loqi
ok, I added "Good UI examples: Dark Sky, https://www.metoffice.gov.uk" to a new "See Also" section of /weather https://indieweb.org/wiki/index.php?diff=60947&oldid=55633
jjuran joined the channel
#
jeremycherfas
GWG I'm not sure pricipation chance % is worth recording unless you go back and calculate some sort of prediction accuracy.
wagle joined the channel
#
GWG
I didn't record it
#
GWG
It is accumulation
swentel, [jgmac1106] and [kevinmarks786] joined the channel
#
GWG
[Rose]: Any sketch inspiration?
#
[Rose]
I have a screenshot from the inflight information. Unfortunately I have no idea what it would look like in its current form on my site, because it breaks my sidebar.
#
GWG
That's my problem
#
[Rose]
I need to investigate that later. I have a few sketches, but I'm on a 150kb/s connection right now.
#
GWG
I need to have a few different versions for people's different themes
#
GWG
And people can always customize
#
[Rose]
In my case, the widget ticket seems to go over most of the screen
#
[Rose]
*title
jjuran, [schmarty] and [tantek] joined the channel
#
sknebel
[Rose]: btw, did you get anywhere with hacking on bridgy, or did you end up doing something ele?
#
[Rose]
I started, got a bit lost with 3 repos but it's on my project list again this weekend.
#
sknebel
I've hacked on bridgy a bit in the past, so feel free to ping me about it
#
[Rose]
Thanks!
[aaronpk] and KartikPrabhu joined the channel
#
@sebastiangreger
Sendmention & Commention: a pair of #Indieweb webmention plugins for @getkirby - personal, opinionated and VERY beta https://sebastiangreger.net/2019/05/sendmention-commention-webmentions-for-kirby-3/
(twitter.com/_/status/1126838073004834816)
#
sknebel
(Commention somehow makes me think "Commotion" :D)
#
sknebel
sgreger++
#
Loqi
sgreger has 2 karma in this channel over the last year (3 in all channels)
KartikPrabhu and kisik21 joined the channel
#
kisik21
Good morning IndieWeb! Let's play a game! What do you think this Python code snippet does? Is it weird-looking enough for you?
#
kisik21
target_post["properties"]["comment"].index(list(filter(lambda i: target in i["properties"]["url"], target_post["properties"]["comment"]))[0])
#
kisik21
I totally need to comment the heck out of it if someone here won't understand here
#
kisik21
s/here$/it/
snarfed joined the channel
#
KartikPrabhu
seems to be getting the url of comments to some post. I usually stick to list comprehension. I dont understand lambda expressions very much
#
snarfed
KartikPrabhu++ agreed! kisik21: list comprehensions are generally a lot more readable
#
Loqi
KartikPrabhu has 5 karma in this channel over the last year (26 in all channels)
#
snarfed
eg your inner expression would become [t for t in target_post["properties"]["comment"] if t in i["properties"]["url"]]
#
snarfed
i often write code like what you posted at first, then if it's too big or awkward, i pull some of it out into variable(s) or simple loop(s) for readability. comments are good, but readable code is better.
#
snarfed
[Rose]++ good luck! definitely start with just oauth-dropins and ignore the other two
#
Loqi
[Rose] has 10 karma in this channel over the last year (36 in all channels)
#
[Rose]
Thanks! I'll work on it
[kimberlyhirsh], [frank] and [jgmac1106] joined the channel
#
aaronpk
i wonder if i can bug adactio to fix his HTTP Accept header handling this weekend
[schmarty] joined the channel
#
kisik21
KartikPrabhu: snarfed: Actually that stuff is: Find a post with certain URL in the comments of h-entry and get its number in the array so I can update it. This snippet will become a part of Salmention support in the new rewrite of pyindieblog
#
kisik21
OH WAIT
#
kisik21
I made a mistake in the code
#
kisik21
it should be `source in i["properties"]["url"]` not `target`
[gerwitz] joined the channel
#
kisik21
So that's how it should work: `target_post["properties"]["comment"][target_post["properties"]["comment"].index(list(filter(lambda i: source in i["properties"]["url"], target_post["properties"]["comment"]))[0])] = mf2py.parse(source)["items"][0]` and then dump the post back in the DB/filesystem/whatever I'll end up using as persistent storage
#
kisik21
basically get a comment number by its url, then rewrite the comment including the updated information
#
kisik21
I included a note in my org-mode file right next to this snippet so I won't forget what does it do
#
sknebel
I'd split that up in multiple lines, maybe even local functions for sure. Also, not sure what role that plays exactly, but salmentions need checks if data actually changed, and you can't entirely rely on the the main post on a page being the first mf2 item on the page
snarfed and [tantek] joined the channel
#
GWG
aaronpk, what is wrong with his headers?
#
aaronpk
his site returns http 406 when i try to fetch it
#
GWG
Another one
[Rose] joined the channel
#
GWG
I am still trying to figure out weather markup
#
GWG
I display in Fahrenheit. I wonder if that is an issue.
gRegorLove_ and snarfed joined the channel
#
GWG
Do I need p-unit?
#
GWG
Zegnat, what do you do... your site isn't loading for me to check
#
sknebel
GWG: copy-paste from his site: <span class="p-height h-measure"><data class="dt-measured" value="2015-07"><span class="p-num">1.84</span>&nbsp;<abbr title="metres"><span class="p-unit">m</span></abbr></data></span>
#
GWG
Interesting
#
GWG
I guess I should consider data for temperature
#
sebsel
which, if I recall correctly, is taken from aaronpk's site
#
sebsel
as in: I remember Zegnat saying "oh if Aaron does it...!"
#
GWG
I always say that
#
sebsel
https://aaronparecki.com/rides <- these have p-unit too
#
GWG
He is usually ahead of all us
#
Zegnat
It is taken from the microformats wiki
#
GWG
I just figured it was time to fix my markup
#
GWG
I spent time trying to style a class that wasn't there
#
Zegnat
I thought it was from there, at least. Will need to check.
#
GWG
Looking at wrong function instead of code
#
Zegnat
I thought I put HTML comments everywhere in my HTML for experimental properties taken from mf wiki, but apparently not for measurement :/
#
GWG
So I want to add some styling classes, started noticing that I didn't mark up the units
#
GWG
I am also trying to make it look nicer
#
GWG
[Rose] also mentioned she would, like me, appreciate additional weather data that I store but couldn't figure out how to display
#
GWG
I have a lot of things like that
#
GWG
I need a Designer
#
[Rose]
Design ideas, dodgy handwriting and frames optional
[jgmac1106] joined the channel
#
[jgmac1106]
Graphic only with more data on toggle
#
GWG
I don't think I have uv
#
GWG
I will look into my APIs
#
GWG
Nice layout though
#
@mauricehh
↩️ Cool thing! I am currently working on a comment system and wanted to add webmentions to that, too (sometimes in the future) maybe I can leave away that part, then. How do you handle spam? I don't have a good solution for that yet.
(twitter.com/_/status/1126907317834932225)
[jgarber] joined the channel
#
[jgarber]
aaronpk I noticed a thing recently with adactio.com and tantek.com. Their servers are returning `Upgrade: h2` and `Connection: Upgrade` response headers. This was causing an issue with an HTTP library I was using that hadn’t updated to handle this behavior.
#
[jgarber]
Maybe that’s related to what you’re observing?
#
aaronpk
no i've talked with adactio about this before. he has some parsing of the http accept header, but it's doing exact match instead of letting me request things at different priority
#
[jgarber]
Ahh, okay. Got it!
#
aaronpk
so i say i accept a bunch of different formats, one of which is HTML, but HTML is not the first in the list so his site rejects it
#
snarfed
conneg--
#
Loqi
conneg has -4 karma over the last year
#
[jgarber]
Gotcha. Using the q-factor weighting bits in the request?
#
Zegnat
[jgarber]: the upgrade shouldn’t really give you an issue, surely? Just means you MAY upgrade to using http/2
#
Zegnat
That q thing is annoying though, multiple lines of selfauth only exist to support that
#
[jgarber]
Zegnat The bug in the particular library: https://github.com/httprb/http/issues/514
#
Loqi
[cognita] #514 Empty string instead of page content
#
[jgarber]
Goodness that’s a lotta kinda of JSON. 😂
#
aaronpk
i had to prioritize activity+json over html because otherwise mastodon returns HTML but their json is usually more accurate
#
[jgarber]
* kinds of JSON
#
snarfed
unpopular opinion: i naively suspect conneg has been a net negative for web development at large for decades now. nice idea in theory, but more painful than useful in practice. if each URL only served a single content type (with maybe narrow support for compression etc), our lives would be easier overall.
#
[jgarber]
What is conneg?
#
Loqi
conneg is short for HTTP Content Negotiation, a method by which a browser or other web client can request content of various types from a web server, and depending on what is requested, and what the server supports, it tries to provide the best it can https://indieweb.org/conneg
#
[jgarber]
Should’ve known there’d be a page.
#
aaronpk
considering literally most of the web doesn't use conneg i think that's probably an accurate statement
#
snarfed
so easy to change file extension, add query params, use rel-alternate, etc for a different content type if necessary
#
snarfed
i literally have rhiaro's domain hard-coded into granary and bridgy due to this
#
[jgarber]
I wouldn’t know anything about that… << glares at his own website >>
#
Loqi
Sorry, I couldn't find a page named "I wouldn’t know anything about that…" or similar
#
Zegnat
I go back and forth on it. I kinda like having multiple variants of the same resource at the same resource address. But in practice it is almost never actually practical
#
[jgarber]
Maybe the site’s next iteration will be _super orthodox_…
#
aaronpk
Zegnat: i think that's exactly the problem. it has a nice appeal *in theory*
#
Zegnat
Also, most sites do not seem to set the Vary header, so how would you even find out conneg can be used?
#
aaronpk
hardcoding :)
#
sknebel
well, the theory is that you don't need to find out: you ask for everything you understand and get the best match
#
snarfed
it's worse than not practical, it's actively surprising and harmful and error prone
#
snarfed
and notoriously difficult to handle correctly, as we're seeing here
#
snarfed
ok i'll stop ranting now :P
#
sknebel
it's also used rarely enough that libraries/frameworks don't support it well
[kimberlyhirsh] joined the channel
#
Zegnat
That’s the real bad one. It isn’t really super hard: given you have read enough about the HTTP spec to know what is expected.
#
Zegnat
But if your framework developers haven’t read it, and you haven’t read it, and both of those things are likely to be true … you get issues
#
snarfed
i submit as evidence this conversation ^ and tons of others in previous chat as evidence that in practice it is hard to implement
#
sknebel
it's more expensive, but I also feel like "one type url and include rel-alternate Link headers if you want to point to other variants" would probably be more reliable
[schmarty] joined the channel
#
snarfed
both when you don't know it and it surprises you, *and* when you know it and you're trying to get fiddly q details right
#
aaronpk
also interesting that i'm not even using q values in here and it's still failing
#
aaronpk
IIRC the q value isn't required? it means i accept all format equally?
#
sknebel
(well, no, I forgot that you can't expect stuff to understand the concept of "multiple Link: headers" either, but that's one where I firmly lay the blame at the feet of the implementer who missed that
#
snarfed
literal comment in the current bridgy code: "Only send Accept header to rhiaro.co.uk right now because it needs it, but Known breaks on it."
#
[jgarber]
q value is definitely optional based on the examples and can (apparently) even be mixed in the list of values:
#
[jgarber]
```// Multiple types, weighted with the quality value syntax:
#
[jgarber]
Accept: text/html, application/xhtml+xml, application/xml;q=0.9, image/webp, */*;q=0.8```
#
aaronpk
it's not even clear if it's required from those docs
#
sknebel
yes, q is optional
#
[jgarber]
Maybe there’s something in the spec… https://tools.ietf.org/html/rfc7231#section-5.3.2
#
[jgarber]
…which isn’t loading for me at the moment. 🙃
#
sknebel
Each media-range MAY be followed by one or more accept-params, beginning with the "q" parameter for indicating a relative quality factor.
#
aaronpk
and this conversation continues to demonstrate this is hard to understand and implement
#
sknebel
it's funny how that's repeated despite nobody arguing against it :D
#
snarfed
that's how much we all (ok almost all) hate it
[tantek] joined the channel
#
Zegnat
I don’t actually hate it, but if there is any part of it that I hate, it is the fact that q is optional. It means you on the server end have to be tie-breaker.
#
Zegnat
And because the UA end doesn’t always get it right, you may still be sending the wrong data :(
#
Zegnat
I have actually had to swap the tie-breaker in selfauth (https://github.com/Inklings-io/selfauth/blob/master/index.php#L193-L206) a number of times
#
Zegnat
(Note that selfauth is CC0, and if anyone wants a short q-value parsing function you can rip it right out and I will not be mad)
[chrisaldrich] and jackjamieson joined the channel
#
Zegnat
points all handwavey at the regexes contained in there and mumbles something about how it just works
BenLubar, gRegorLove__, leg, snarfed, [Rose], callMeBaby and doubleloop joined the channel
#
doubleloop
I made a sketch for wrapping my head round all the different bits of my site, any notes on it appreciated! https://doubleloop.net/2019/05/10/5392/
#
Loqi
[Neil Mather] A first attempt at a sketch of what’s going on with my Indieweb setup.
snarfed joined the channel
#
Zegnat
doubleloop: I’d be super interested in reading how you feel all those separate fiddly bits are performing with your site at its core. Because you use WordPress, and that is a huge common denominator to target.
[kimberlyhirsh] and [schmarty] joined the channel
#
[schmarty]
ooh, what's emupub?
snarfed joined the channel
#
doubleloop
[schmarty]: Oh heh, that's what I called the micropub layer for spacemacs
#
doubleloop
Zegnat: hmm good question
#
doubleloop
I'd say the micropub/webmention endpoints all works pretty smoothly thanks to the plugins
#
doubleloop
But things display in a weird way on my site, or something I post displays weirdly elsewhere - so perhaps more a problem with the microformats
#
doubleloop
*sometimes they display in a weird way
#
doubleloop
Not all the time
#
doubleloop
I'd prefer not to have all my data going into Wordpress' database, which is a bit of a blackbox to me
#
doubleloop
I'd probably feel more comfortable having the content in flat files in some version control somewhere
[tantek] joined the channel
#
doubleloop
I'd like to liberate the data some day. It would be cool if there was a service that could read through your feed, and pull out the MF2 for each post and put it into canonical json.
#
doubleloop
Like a generic Indieweb backup service
#
Zegnat
Oh, interesting idea
#
kisik21
wait did someone here say Emacs?!!
#
snarfed
emacs++
#
Loqi
emacs has 1 karma in this channel over the last year (2 in all channels)
#
kisik21
emacs++
#
Loqi
emacs has 2 karma in this channel over the last year (3 in all channels)
#
kisik21
I use Emacs
#
kisik21
and thought of Emacs-based Micropub client
#
kisik21
but never implemented it because my elisp knowledge is... well... lacking
#
kisik21
doubleloop: if only your implementation was capable of posting exported Org-mode files :3
#
kisik21
I'd post my drafts for my new blog engine
#
kisik21
oh wait
#
kisik21
my blog is offline
#
kisik21
I have nowhere to post!
#
doubleloop
kisik21: Check out arcology
#
kisik21
Arcology, a portmanteau of "architecture" and "ecology", is a field of creating architectural design principles for very densely populated, ecologically low-impact human habitats.
snarfed joined the channel
#
kisik21
lol
#
doubleloop
Although that other definition does sound interesting :D
#
kisik21
I can't access the source T__T
KartikPrabhu joined the channel