#dev 2023-07-09

2023-07-09 UTC
rhiaro and tei_ joined the channel
#
vladimyr
Huh, URLs aren't strings they just happen to have string representation https://frantic.im/no-strings/
#
vladimyr
And every language under the Sun has functions or classes for dealing with URLs https://www.php.net/manual/en/function.parse-url.php
tei_ joined the channel
#
vladimyr
So unless you are forced to use shell don't parse and/or modify URLs using regexes
#
vladimyr
puts away his dev 🎩
#
aaronpk
think of this function as prettying up the string representation of the URL
#
vladimyr
I know two things about you:
#
vladimyr
1/ you are an expert or at least senior dev
#
vladimyr
2/ you know what you are doing and you decided to avoid that whole parse, then alter and finally serialize back dance exactly because you know what you are doing :)
#
vladimyr
But I don't know anything about person who asked the question and operating under assumption they are new to development I believe it is better to not show them right away how to cut those corners 🙃
#
aaronpk
if it's just for display purposes then that's a lot different than managing URLs that are going to actually *do* something like if you are going to fetch the URL
#
aaronpk
but yes if you want to get scared off of ever parsing URLs with any tool, this is an excellent talk https://www.blackhat.com/docs/us-17/thursday/us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-Languages.pdf
#
vladimyr
This is hilarious :D 💯
#
aaronpk
it's amazing
#
vladimyr
For sure :) I don't know what does that say about me but those talks don't actually give me existential crisis but quality laugh :D
#
vladimyr
Author remarks on specific URL parts are hilarious :D
sivoais joined the channel
#
vladimyr
"curl doesn't verify that the URL is 100% syntactically correct. It is
#
vladimyr
instead documented to work with URLs and sort of assumes that
#
vladimyr
you pass it correct input" 🤣🤣🤣
#
vladimyr
And ofc Cat Acknowledgements 🐱 💯
bterry, [jgarber], jan6, vladimyr, gRegorLove_, jjuran, gRegorLove__ and everdimension joined the channel
#
everdimension
Heeey everyone! I don't remember the last time I actually chatted in an irc-like app
#
everdimension
I'm just discovering this indieweb movement.
#
everdimension
So I guess I just wondered if Eleventy (https://www.11ty.dev/) qualifies as indieweb
#
everdimension
But I guess it does: https://indieweb.org/Eleventy
#
c​apjamesg
Yes indeed!
#
c​apjamesg
We are technology agnostic. What matters is that you are interested in personal websites!
everdimension joined the channel
#
everdimension
I've fell into the trap of looking for a blog platform. I knew that this could be a rabbit whole, and instead you should just pick any platform and start writing. I tried to follow that advice
#
everdimension
And it has now been a month of me analyzing the options
#
capjamesg
It is easy to get caught up in what platform to use! There is no "right answer"; you can pick one and change later as your needs grow.
IWSlackGateway and everdimension joined the channel
#
everdimension
I've been very fondly considering https://write.as/. It's extremely simple with good typeography and aesthetics. But last moment I'm afraid I'm changing my mind on favor of eleventy
bterry, AramZS, btrem, gxt__, tei_, sebbu2, eitilt, geoffo, tei_1, [snarfed], [schmarty] and [aciccarello] joined the channel
#
[aciccarello]
everdimension, my Eleventy site is open source if you're looking for inspiration. https://github.com/aciccarello/ciccarello.me
#
Loqi
[preview] [aciccarello] ciccarello.me: Personal website hosted at https://www.ciccarello.me
#
[snarfed]
ugh, second AP implementation in just a couple weeks I've found that fails to handle even just a moderately complex Accept header: https://github.com/snarfed/bridgy-fed/issues/577#issuecomment-1627803190 , https://github.com/microdotblog/issues/issues/246
#
[snarfed]
conneg-- conneg-- conneg--
#
Loqi
conneg has -25 karma in this channel over the last year (-33 in all channels)
#
Loqi
conneg has -25 karma in this channel over the last year (-33 in all channels)
#
Loqi
[preview] [snarfed] Ugh, looks like Plume's content negotiation handling is too naive. Fetching https://blog.nataraj.ru/~/It/%D0%92%D1%8B%D0%BF%D1%83%D1%81%D1%82%D0%B8%D0%BB%20%D1%80%D0%B5%D0%BB%D0%B8%D0%B7%20%D0%B8%D0%B3%D1%80%D1%8B%20Goblin%20Camp%20v0.23 with the min...
#
[aciccarello]
Oof. I see why conneg is the bane of your existence
geoffo, [davidmead], nertzy and nertzy_ joined the channel
#
vladimyr
This just showcases that developers don't know how to speak HTTP and furthermore how to use libraries provided by ecosystem they are using https://lib.rs/crates/accept-header
#
vladimyr
And I'm sure there are bunch of others for your preferred lang/runtime, there should be a list of all of them somewhere online
geoffo and [tantek] joined the channel
#
[tantek]
if conneg causes so many developers to make mistakes, perhaps it's not developers that are the problem but instead the complexity & fragility of conneg--
#
Loqi
conneg has -26 karma in this channel over the last year (-34 in all channels)
geoffo, nertzy_, tei_ and [jamietanna] joined the channel
#
[jamietanna]
I recently wrote https://gitlab.com/jamietanna/content-negotiation-go and https://gitlab.com/jamietanna/content-negotiation-test-cases but reviewing some of the cases, couldn't quite remember _why_
#
[snarfed]
^ more evidence for conneg-- 😆
#
Loqi
[preview] [Ryan Barrett] Content negotiation considered harmful https://snarfed.org/matilda-used-car-salesman-harry-wormwood.jpg
#
[tantek]
that preview image 💀
nertzy_, bterry1, geoffo and [KevinMarks] joined the channel
#
[KevinMarks]
How about rel="alternate" considered helpful?
#
[tantek]
I'm still laughing about the 1.5MB JSON API return results
#
[snarfed]
BF would have worked in this case if Plume published those
#
vladimyr
[jamietanna]: expand your collection of test recipes https://github.com/jshttp/negotiator/blob/master/test/mediaType.js
geoffo joined the channel
#
[snarfed]
moved here from #indieweb, afaik we have no mf2 to "accept" a follow, right? totally ok, just checking
#
gRegor
Think so, not sure what an accept/decline/?? action would do in that context
#
gRegor
Thinking like an auto "follow back" action?
tei_ joined the channel
#
gRegor
[snarfed], low priority, but I noticed with my first (I think) reply to werd.social Mastodon, the instance didn't pick up my profile photo. I tried the update profile BF button shortly after, but still doesn't seem to show up after 24 hours.