#dev 2023-10-17

2023-10-17 UTC
#
[tantek]
gRegor, aaronpk curious what specific problems a "routing framework" is solving for you, especially in PHP
#
aaronpk
[tantek]: being able to create nice URLs without every URL having to end in a slash where the file is index.php, and similarly wanting to use a templating framework that doesn't involve putting `include(header.php)` at the top of every file
#
aaronpk
for example, my website has URLs like /YYYY/mm/dd/slug and I don't want to have to make a new post by making an index.php file like /YYYY/mm/dd/slug/index.php
#
aaronpk
and similarly I'd like my tag pages to be created automatically, rather than having to create a file like /tag/indieweb/index.php each time i make a new tag
#
aaronpk
so the web server sends all requests (that don't match a file) to the /index.php script, which reads the actual requested URL and figures out what to do with it
#
aaronpk
the "figures out what to do with it" part is the routing framework
#
aaronpk
I *could* write my own, but that sounds like a losing battle, so I chose one that already exists
monoob1 joined the channel
#
epoch
is that using PATH_INFO under the hood?
gRegor joined the channel
#
gRegor
I also like Slim's other features, not just the router: PSR-7, middleware, dependency injection. And I like how lightweight it is overall.
#
gRegor
I used it for indiebookclub and for some work projects
#
[tantek]
thank you that helps aaronpk++
#
Loqi
aaronpk has 45 karma in this channel over the last year (115 in all channels)
#
[tantek]
Those overlap heavily with my own use-cases for "routing", and it turns out I most of that in my short URL handler (Whistle) and some of it in Falcon, and it could be better abstracted into one place
#
[tantek]
what "input" do you give the "routing framework"? e.g. do you give it some set of URL patterns (like robots.txt takes?) and it matches those to different PHP files to handle those paths?
#
[tantek]
I'm going to choose that battle and write my own (likely building it into CASSIS, or a cassis-runtime) that works in both JS (clientside) and PHP (serverside) if I can. that's the goal.
#
gRegor
They support regex and placeholder arguments
#
gRegor
It uses this component for the routing, if you're interested in just that part: https://github.com/nikic/FastRoute
#
Loqi
[preview] [nikic] FastRoute: Fast request router for PHP
[tw2113] and bterry joined the channel
#
epoch
oki doke, looks like those things don't bother using PATH_INFO
#
epoch
makes more sense to base it on $_SERVER['REQUEST_URI'] anyway
gRegor, jjuran, gerben, geoffo, Xe, sebbu2, [jamietanna], [jeremycherfas], AramZS, [benatwork] and piusbird joined the channel
#
[tantek]
Bluesky << Search API endpoint is not auth'd and can be viewed from a browser, e.g.: https://search.bsky.social/search/posts?q=indieweb or https://search.bsky.social/search/posts?q=indieweb.org
#
Loqi
ok, I added "Search API endpoint is not auth'd and can be viewed from a browser, e.g.: https://search.bsky.social/search/posts?q=indieweb or https://search.bsky.social/search/posts?q=indieweb.org" to the "See Also" section of /Bluesky https://indieweb.org/wiki/index.php?diff=89864&oldid=88293
jeremycherfas and [KevinMarks] joined the channel
#
sknebel
OY,SSE sounds like an encouragement to vector compute ;)
#
[tantek]
[snarfed] have you considered using the Bsky open search API as a feed / polling approach to Bluesky backfeed? E.g. https://search.bsky.social/search/posts?q=snarfed.org (no app key / phrase / password needed)
#
[KevinMarks]
Firesky is good for the old conference hashtag feed view
#
[KevinMarks]
I could add search to bsky.link quickly, but I think James is trying to discourage use now
[campegg] joined the channel
#
[snarfed]
bluesky backfeed is already mostly implemented in [Joel_Auterson]'s https://github.com/snarfed/bridgy/pull/1523 and nearby PRs! uses the official API, not search
#
Loqi
[preview] [JoelOtter] #1523 Add Bluesky backfeed support
#
[tantek]
^ except with requiring Username and App Password tho. Presumably using the search API would require neither
#
[snarfed]
opt in for backfeed seems useful though? that's how Bridgy (classic) works with all other silos, first you auth
#
[snarfed]
I've gotten negative feedback before on projects like https://github.com/snarfed/hackermention that surprised people by proactively/promiscuously backfeeding to their sites
#
[snarfed]
do you have a reasonable use case for enabling backfeed for an account that you can't/won't auth for?
#
Loqi
[preview] [snarfed] hackermention: Universal webmention backfeed for silos like Reddit, Hacker News, and more.
#
sknebel
opt-in target vs source I'd think?
#
sknebel
i.e. "I want notifications of my site being mentioned in other places"?
#
[tantek]
[snarfed] didn't you do something with Reddit or HN where you were streaming all references to a domain without any auth?
#
[tantek]
yes I think sknebel makes the right distinction
#
[snarfed]
yeah that's what I linked to 😁
#
[snarfed]
ohh I see. yes, we'd eventually use bluesky search to backfeed site links
hoschi joined the channel
#
hoschi
Has anyone tried implementing an activity mosaic (think github) yet in some way? I'm thinking about putting some of my habit tracking onto the website or at least showing, how well I'm doing.
#
[tantek]
I feel like we have a few examples of that but don't remember where on the wiki
#
sknebel
what is calendar heatmap?
#
Loqi
calendar heatmap is a 2-dimensional calendar view that shows a value over time through color coding it, often with warmer colors indicating higher values (hence heatmap) https://indieweb.org/calendar_heatmap
#
sknebel
no indieweb examples, seems people prefer other styles:
#
sknebel
what is posting graph?
#
Loqi
posting graph is a visualization of post publishing frequency which can be presented in various ways like a calendar heatmap or a sparkline, and also called contributions or a contribution graph by GitHub https://indieweb.org/posting_graph
#
[KevinMarks]
You could also use the joy division graph https://www.kevinmarks.com/joyofsparks.html
#
Loqi
[preview] The Joy of Sparks 2016-05-08
#
[tantek]
what is an activity mosaic
#
Loqi
It looks like we don't have a page for "activity mosaic" yet. Would you like to create it? (Or just say "activity mosaic is ____", a sentence describing the term)
#
[tantek]
activity mosaic is /calendar_heatmap
#
hoschi
Thanks for mentioning some alternatives sknebel ! I hoped, this style somewhat existed already on the indieweb but different visualizations are great too.
gRegor joined the channel
#
hoschi
[KevinMarks]: so joy sparks are basically a sparkline with linebreaks?
#
[KevinMarks]
Yes, wrapped daily in this case (the original was wrapped at the pulsar frequency). You could put the date/time and number on hover. For individual posts, wrapping by week likely makes more sense than by day.
#
hoschi
I like that idea!
#
[KevinMarks]
I also have my wriggly histogram that I should write up. The premise there is that you plot the time accurately on the x axis and increment the y value each time, resetting every hour or day. It's really good at spotting surges.
#
hoschi
Sure, though that one might be less intuitive to understand at first glance.
#
[KevinMarks]
an example (each row is a different site, blue dots are requests for info at each site, so a proxy for site failure)
#
[KevinMarks]
so you don't just get a barchart, you get a slope for the increase too
#
hoschi
Guess it's a bit late for me to get that (nearly 8pm), but anyway: interesting approach, combining plott chart and bar chart
ajr and emery joined the channel; emery and ajr left the channel
#
gRegor
I recently added my posting graph back, originally inpsired by github's
#
gRegor
Still need to link each square to its archive page
btrem, gRegorLove_ and geoffo joined the channel
#
c​apjamesg
gRegor link?
dustinm`, geoffo and gerben joined the channel
#
hoschi
gRegor: Seems pretty solid 👍
#
gRegor
looks better when I actually post, haha
#
hoschi
:D
hoschi, geoffo, gerben and [catgirlinspace] joined the channel