#dev 2024-02-28

2024-02-28 UTC
#
[tantek]
touch UIs are very poor for text entry
#
[Joe_Crawford]
I have had luck using the text-to-speech a few times but it's the exception
#
capjamesg
Is there a way to redirect a user only if they request a specific kind of content via content negotiation?
#
capjamesg
For example, if someone requests a text/plain file on jamesg.blog/test, can I redirect them to jamesg.blog/test123
#
capjamesg
But only redirect if that text/plain request is made.
#
jacky
should be doable, yeah
#
jacky
iirc bridgy.fed _kinda_ does that to expose the needed parts for federation
#
[Joe_Crawford]
At the web server level (I think of apache first, but nginx too) and at whatever application framework that you choose too - route the request in a default manner and then inspect the requested type to see if there's a special handler
#
[Joe_Crawford]
something along the lines of
#
[Joe_Crawford]
```RewriteCond %{HTTP_ACCEPT} !text/plain
#
[Joe_Crawford]
RewriteRule ^test$ /test123 [L]```
#
[Joe_Crawford]
I have the luxury of not testing that first but feels right. Whether it truly covers your case not sure.
#
[Al_Abut]
[Joe_Crawford] my favorite text-to-writing trick is to use an app like JustPressRecord to capture and then transcribe a voice memo as a first draft of an idea. Works great when I want to walk and talk through an idea.
#
[Joe_Crawford]
[Al_Abut] ++
#
Loqi
[Al_Abut] has 2 karma in this channel over the last year (3 in all channels)
#
[Joe_Crawford]
Thanks for that have to check out JustPressRecord
#
capjamesg
My use case: making a Linux `man` page for every blog post.
[snarfed] joined the channel
#
[Al_Abut]
Right on! Just a heads up that the transcript can require a pass through chatgpt for clean up. There’s better tools like http://otter.ai that are way expensive though.
jeremycherfas, [KevinMarks], jacky and [aciccarello] joined the channel
#
aaronpk
hmm i tried sending a webmention to that opensource.org post but it says no webmention url found
#
aaronpk
weird, because i see it in the browser
#
aaronpk
oh shoot, the SSL CA roots on my server are too old!
#
jacky
`sudo apt install unattended-upgrades`
#
aaronpk
weird that and `update-ca-certificates` didn't do anything
#
aaronpk
but the `/etc/ssl/certs/ca-certificates.crt` file was just updated
#
aaronpk
crap no luck
#
jacky
also not trying to be a backseat to this if not useful (tbh it's distracting me from a code problem lol)
#
aaronpk
yeah nothing is working
#
superkuh
Is there HTTP you can use?
#
aaronpk
no? this affects anyone using aperture or telegraph right now, to send webmentions or fetch feeds
#
superkuh
Oh. Not just webmention, proxying it out. Got it.
#
aaronpk
proxying?
#
superkuh
To third party services like telegraph?
#
superkuh
I do webmention itself without HTTPS all the time.
#
aaronpk
if the site you're fetching only responds on https then you don't have a choice
#
superkuh
Right. It's too bad the HTTPS only push has made everything so fragile.
#
aaronpk
not really helpful right now
#
superkuh
I really just brought it up because I thought you could use the HTTP endpoints available while your cert stuff is broken.
#
aaronpk
that's not really how this works
#
jacky
the only thing I can quickly think of is pulling in some container and copying the certs out of that image (or even more direct, out of a virtual machine)
#
jacky
if you need it to just work, but that wouldn't resolve the automatic updating
#
aaronpk
ok it seems like there are two separate places that the root certs are installed, `/etc/ssl/certs/` is what was updated, but `/usr/share/ca-certificates/mozilla/` is not updated
#
jacky
interestinggg
#
jacky
have you tried `sudo dpkg-reconfigure ca-certificates` to force the package to reinstall itself? (running that locally and emptying my `/etc/ssl/certs` obtained those certs for me)
#
aaronpk
oh no, i think it's because they haven't updated the root CA list for ubuntu 16 since it is EOL
#
jacky
oh no
#
jacky
if you get to .18 you should be okay
#
jacky
if not .20
#
aaronpk
ugh, well at least i've moved a few things off this server already
#
aaronpk
really makes me want to trim down the number of apps with complicated dependencies i am maintaining
#
jacky
whispers in the magical world of containers
#
jacky
but admintax-- of containerization
#
aaronpk
yeah i feel like that just adds another layer of maintenance
#
jacky
https://dokku.com/ hides it a bit (making it a bit like Heroku) but I do wish there was something like a Compose file (so you could define all of the apps and just redeploy en-masse)
#
aaronpk
ok and now php on the command line can fetch the site
#
aaronpk
ok progress
#
aaronpk
but why still no webmention endpoint?
bterry and gRegorLove_ joined the channel
#
aaronpk
[snarfed]: opensource.org is in your list of domains to not bother sending webmentions to from bridgy 😂 might want to update that
#
aaronpk
i stole the list at some point for telegraph
#
aaronpk
syncs his list with bridgy
#
aaronpk
soooo the actual problem was the domain was blocked in telegraph, but if it wasn't blocked it would still have had cert issues, so at least those are both solved now
#
aaronpk
fun times
jeremycherfas joined the channel
#
aaronpk
still need to ruthlessly remove sites from this server asap
#
aaronpk
i wonder what it would take to replace webmention.io with something
#
[tantek]
I wonder if webmention blocklists (due to lack of support) should have expirations/renewals of 6 months or maybe 12 (i.e. every so often, you do discovery anyway, just in case, and remove from block list if an endpoint is found)
#
aaronpk
seems reasonable but like more code to write
#
aaronpk
at this point i need to reduce the number of lines of code in my life, not add more
#
[tantek]
that's a good measure
tryinbrian, jacky and geoffo joined the channel
#
[schmarty]
oof sorry for the ubuntu 16.x EOL biting you aaronpk. hugops++
#
Loqi
hugops has 2 karma in this channel over the last year (5 in all channels)
#
[schmarty]
rolling all our servers off that was a work project last year 😅
#
aaronpk
oh gosh
AramZS, khurt and tPoltergeist joined the channel
#
GWG
24.04 LTS is coming up soon, I always consider upgrading around the time a new LTS comes out
lockywolf and gxt_ joined the channel
#
[tantek]
MDN Developer Curriculum: https://developer.mozilla.org/en-US/curriculum/ — hopefully a lot of this will resonate with IndieWeb development perspectives. LMK!
#
[jamietanna]
Conneg++ but I know snarfed and others aren't always a fan
#
Loqi
Conneg has -15 karma in this channel over the last year (-18 in all channels)
tPoltergeist and [fluffy] joined the channel
tPoltergeist joined the channel
#
capjamesg
You can now view my blog posts as linux manual pages.
#
capjamesg
A one liner: `curl -s -H "Content-Type: text/groff" https://jamesg.blog/2024/02/19/personal-website-ideas/ -L 2>&1 > /tmp/man_page && man /tmp/man_page && rm /tmp/man_page`
#
capjamesg
Sorry that the command isn't too elegant. There seems to be no way on macOS to read a man page from stdout/stdin.
#
capjamesg
That code will not work, briefly.
tPoltergeist, geoffo, [Murray], bterry1, Guest6, [dominik], AramZS, kimberlyhirsh and to2ds joined the channel
#
to2ds
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
#
to2ds
Thought conneg was some kind of conference 😄
jacky joined the channel
#
to2ds
[tantek]++ The MDN Developer Curriculum is super cool!
#
Loqi
[tantek] has 29 karma in this channel over the last year (108 in all channels)
tPoltergeist joined the channel
#
capjamesg
Ironically, I'm having a bit of trouble with conneg 😄
#
capjamesg
But it's more an nginx thing.
#
to2ds
Did you find a solution?
#
[Joe_Crawford]
So it worked, and it’s some kind of handler in nginx? Or where James?
#
capjamesg
It is a handler in nginx but it's messed up right now.
#
capjamesg
Apparently you can't nest an if statement in an if statement in an NGINX config block.
#
to2ds
I played around with this before. NGINX map was helpful in this respect to reduce "if" use.
#
to2ds
The trick was mapping the "accept" request header to value and then testing for that value with "if" in a location block.
to2ds joined the channel
#
to2ds
Hmm. Trying to find a backup copy of the NGINX config file used for the experimentation, but no luck so far.
mahboubine and [kimberlyhirsh] joined the channel
#
_tommys
any css whizz fancy taking a look at this? https://tsxyz.site/journal/
#
_tommys
i would like it if the 'February 2024' header's background-color was the full-width of the page. Would I be better off making a parent <div> with color:black, setting the overflow values and having it slightly wider than 100%? When I move the <h1> left and right it only moves the text, the 'background-color' box stays as it is
#
[Murray]
@tommys: I'm not sure I understand. Do you want the black background to be the full width? Because that's what I already see 😄 Or do you want it to ignore the page-level padding?
burley joined the channel
#
[tantek]
looks like that Tailwind criticism had some major flaws: https://mariohamann.com/test-quality-vs-bashing-tailwindcss
#
[Murray]
If it's the latter, the problem is that you're within a web component with `contain: content` set
#
[tantek]
Tailwind << ^ problems with the Tailwind vs Semantic CSS comparison article: https://mariohamann.com/test-quality-vs-bashing-tailwindcss
#
Loqi
ok, I added "^ problems with the Tailwind vs Semantic CSS comparison article: https://mariohamann.com/test-quality-vs-bashing-tailwindcss" to the "See Also" section of /Tailwind https://indieweb.org/wiki/index.php?diff=93509&oldid=93489
#
[Murray]
I'm not entirely sure how to override that, but if you can change that value, you should be able to do something like `margin-inline: -1rem` to break the `<h1>` out of the container (you may then need to apply inline padding to realign the text)
#
[Murray]
[tantek]: I'm not sure I would qualify that as "major" flaws, but yes, it bothered me as well that the sites are clearly not identical, and I definitely agree with Mario that it would be great to have a standardised test site to actually measure this stuff against. I remember Zach Leat did something at least a little fairer comparing different framework build times etc. but I've not seen anything comparable around CSS strategies
#
[Joe_Crawford]
I notice that blog _tommys is in a web component `<zero-md>` but what Murray describes is correct typically. I think that shadow dom can't exceed its container.
#
[Joe_Crawford]
You can't exceed the margins of a web component
#
[Murray]
Is there no way to target the `:root` value of `contain` then? It feels like that _should_ be modifiable, but I've never tried.
#
[Murray]
If not, the other option @tommys would be to remove the page margin on the `html` and `body` elements, then handle the layout fully from within the web component itself 🙂
#
[Joe_Crawford]
(I admit I've not had to debug local CSS styles against a web components enough to know every nuance of how they may interact but Murray's assessments and recommendations sound pretty great to me)
#
[tantek]
[Murray] I'm no fan of Tailwind, yet that was quite a long list of non-trivial differences in so-called "identical" designs
#
[Murray]
Joe, same, I've really not tried modifying web components in that way at all 😅
burley, gRegor and bterry1 joined the channel
#
aaronpk
gah i need to add support for signed GETs because now a bunch of my replies/likes of mastodon posts are failing
lazcorp joined the channel
#
lazcorp
gRegor - I've been wanting to try it, but there's no linux version yet
#
lazcorp
What I'd like to see is Glaze/Nightshade integrated with ImageMagick so that CMSs can automatically protect images that are uploaded to websites via them
to2ds joined the channel
#
to2ds
capjamesg - Found some notes. Not sure if this will work for your particular case, but might be a good starting point.
#
to2ds
capjamesg - It uses separate subdirs under document root: /test for .html and /test-plain for .txt.
#
to2ds
capjamesg - map $http_accept $WANT_PLAIN_TEXT { ~.*text/plain.* 1; default 0; }
#
to2ds
capjamesg - location /test { if ($WANT_PLAIN_TEXT = 1) { rewrite ^/test/(.*)$ /test-plain/$1 last; } try_files $uri $uri/ $uri.html =404; }
#
to2ds
capjamesg - location /test-plain { default_type text/plain; try_files $uri $uri/ $uri.txt =404; }
#
aaronpk
progress.. got part of it to use signed GETs
#
aaronpk
i can now actually get the reply/like sent back to the person now, but my URL expansion code is a completely separate code path, and uses hosted XRay, so now I need to somehow slot in signed GETs there
#
aaronpk
quickest way might be to make XRay into a tiny activitypub actor with its own key it uses to fetch posts
#
to2ds
Getting anything "signed" working is some G.O.A.T level stuff 😄
#
aaronpk
speakign of which, what exactly happens with signed GETs? does mastodon only return the content if it's fetched by a follower? even if the account isn't private?
[marksuth] joined the channel
#
[qubyte]
When it comes to tailwind, I’d never use it myself. _However,_ at the coworking space I use there are at least a few small (usually solo) business owners I know who just need to get things done and don’t have the time to learn CSS properly or to the money to hire someone. It’s just not their focus. For them it’s like bootstrap of yore.
#
aaronpk
i don't know about you, but it still seems like using tailwind requires learning a lot more than it took to use bootstrap
#
[qubyte]
So I’m not going to browbeat them over it. I will sing the praises of modern CSS (even as a non-front-ender) and hope the positive message sinks in over time.
#
[qubyte]
I’m not so sure. It seems like folk pick it up really fast. They might just be smarter than me though.
#
[qubyte]
It’s certainly more than bootstrap was though, yes.
burley, gRegorLove_, jeremycherfas and burley_ joined the channel
#
[KevinMarks]
It does have a reasonable looking classless default doesn't it?
[Fran], burley and [tantek] joined the channel
#
[KevinMarks]
This is a good thread on the direction tooling has taken https://kolektiva.social/@beka_valentine/112010594002575242
[jeremycherfas] joined the channel; immibis left the channel
#
[aciccarello]
I think that thread raises some valid points about influences on architecture but it seems like an over-simplification to me.
#
[tantek]
gah, it's one of those days where I don't have the attention span to bother with reading a tootstorm. if it's important/relevant enough I'm sure they'll blog it, otherwise it wasn't really right? ephemeral masto-web and all
#
[tantek]
or [KevinMarks] can you give a tl;dr summary of why it's particularly indieweb-dev relevant?
#
[tantek]
otherwise I think we should do more "generic" link dropping/sharing in #indieweb-chat instead
#
[KevinMarks]
There is a tooling effect there too - as I use phanpy.social, I get very fluid thread reading compared to default mastodon, so have more thread tolerance
#
[tantek]
and focus the chat here on actual relevant-to-how-you-build-create-your-personal-site
#
[tantek]
does clicking on a random Mastodon link in a browser open your phanpy.social? otherwise then no one else is having the experience you're having
#
gRegor
Prefixing https://phanpy.social/#/ makes it more readable, though it is still long, would prefer a blog post
#
gRegor
I've had that prefix method not work sometimes, too, might need to be signed in for some Mastodon threads
#
gRegor
also doesn't have the attention span
#
[snarfed]
aaronpk re fediverse signed gets ("authorized fetch"), afaik instances generally only reject them if the user has blocked them, otherwise they're accepted
[Jo] joined the channel
#
aaronpk
ahh thx
[lifeofpablo] joined the channel
#
aaronpk
yes that mastodon toodstorm could use some tightening up and copy editing
burley, lazcorp and to2ds joined the channel
#
aaronpk
watch what you clone!
#
capjamesg
That's scary to see.
burley joined the channel
#
[aciccarello]
Especially when looking for software that's more actively maintained, I'll often look for forks. Scarry
burley, lazcorp and tryinbrian joined the channel
#
capjamesg
to2ds Try `curl -sL -H "Content-Type: text/groff" https://jamesg.blog/2024/02/19/personal-website-ideas/ > result.man && man ./result.man` in your CLI.
#
to2ds
capjamesg++ - That is super cool!
#
Loqi
capjamesg has 43 karma in this channel over the last year (167 in all channels)