#dev 2025-05-19

2025-05-19 UTC
rossabaker, bugliker0, [Jo], PsyLok, doesnm, barnaby, NaomiAmethyst5 and cow_2001 joined the channel
#
capjamesg
Are there best practices for styling code snippets for a print style sheet?
#
capjamesg
I'm working on my print stylesheet. https://jamesg.blog/2021/07/21/building-a-blog-search-engine-part-ii is an example page with a code snippet. I have scrolling enabled on desktop right now, but this doesn't translate to print. The code snippet gets cut off on print.
#
capjamesg
[edit] I'm working on my print stylesheet. https://jamesg.blog/2021/07/21/building-a-blog-search-engine-part-ii is an example page with a code snippet. I have scrolling enabled on desktop right now, but this doesn't translate to print. The code snippet gets cut off on print.
#
Loqi
[preview] [James] Building a search engine for my blog: Part II
ttybitnik and grufwub joined the channel
#
[tantek]
capjamesg, alternating light green and off-white horizontal backgrounds with fake paper holes. here you go: https://www.pdp8online.com/images/greenbar.shtml
#
[tantek]
here's another sample you can extrapolate from: https://i.sstatic.net/JUonzd2C.png
#
capjamesg
My biggest issue right now is line wrapping.
#
capjamesg
My code snippets have a lot of indentation.
#
[tantek]
wait, you have lines of code more than 70 characters long?
#
[tantek]
capjamesg, IMO 80cpl is a good coding limit. This post makes some of the psychological (rather than historical) points: https://laprade.blog/80-char-line-limit
#
perryflynn
in code projects I am at 120 for a long time. so I can have to coding windows very comfy on a 4k screen. for code on blog posts I still stick to shorter lines exactly because of readability. but it's difficult anyway, as it is broken on mobile/responsive layouts without a horizontal scroll bar anyway.
balintm, [snarfed] and [KevinMarks] joined the channel
#
[tantek]
[KevinMarks] loooool indeed
#
[tantek]
isolated example
#
[tantek]
also the hardest part of any code I have right now to maintain
#
[tantek]
longer answer is, the whole auto-link / auto-markup functionality needs to be rewritten as an actual formal parser (to a specification which I need to write)
#
[tantek]
PHP8 being so much faster, especially with use-cases like a long regex has allowed me to postpone that again
srijan joined the channel
#
[tantek]
[snarfed] when did BridgyFed notifications stop displaying the text of what was "reacted to" and only display "--" instead? E.g. when I go to https://fed.brid.gy/web/tantek.com/notifications I see "reposted -- " and "liked https://tantek.com/2025/138/t1/ran-bay-to-breakers"? Seems like a UX regression
#
[snarfed]
[tantek] news to me, not intentional. is it maybe a picture with no text?
#
[snarfed]
hmm no, ok. not sure
#
[tantek]
nope, never. it started maybe a couple of months ago? apologies I should have brought it up immediately.
#
[snarfed]
whoa really? ok
#
[snarfed]
will look
#
[snarfed]
unrelated, personally I don't find https://laprade.blog/80-char-line-limit very convincing. it's largely trying to apply research on reading _prose text_ to _code_, but they're very different. I don't read code remotely like I read text, totally different experience, not nearly as much scanning/skimming
#
[snarfed]
also code has deliberate line breaks, while prose only has paragraphs. if anything code is maybe more like poetry, with authorial scanning and lines and usually closer reading, but still pretty different
#
[snarfed]
also sorry I/we should maybe => #indieweb-random
#
[tantek]
thanks for taking a look [snarfed]!
PsyLok, rrix, ttybitnik, barnaby, balintm and [schmarty] joined the channel
#
[schmarty]
lol the green and white dot matrix print styles. that gave me flashbacks!!
#
[tantek]
now I'm curious if there's a CSS issue for this (because I'm pretty sure there's no feature for rotating background across *lines* like in a PRE)
#
[artlung]
No, but there is our pal, the lh unit. https://codepen.io/artlung/pen/ZYYNJOx
barnaby joined the channel
#
[tantek]
emoji << Nicer version of that Unicode page of all the emojis: https://codewordcreative.com/find-emojis.html
#
Loqi
ok, I added "Nicer version of that Unicode page of all the emojis: https://codewordcreative.com/find-emojis.html" to the "See Also" section of /emoji https://indieweb.org/wiki/index.php?diff=101535&oldid=101519
#
[tantek]
green << Example UI of a theme switcher between light, dark, eco-mode: https://codewordcreative.com/find-emojis.html
#
Loqi
ok, I added "Example UI of a theme switcher between light, dark, eco-mode: https://codewordcreative.com/find-emojis.html" to the "See Also" section of /green_computing https://indieweb.org/wiki/index.php?diff=101536&oldid=101265
NaomiAmethyst, shoesNsocks, gRegor and [qubyte] joined the channel
#
[artlung]
did someone say "_green and white dot matrix print styles. that gave me flashbacks!!" -- (paging [schmarty]) --_ https://codepen.io/artlung/pen/ZYYNJOx .... definitely feeling those flashbacks myself.
#
gRegor
Now I'm imagining a page that as you scroll down it makes the dot matrix printer sound
#
perryflynn
How should I handle different languages in Micropub/Microformats? I would like to post notes in german and in english. At least for h-entry the microformats wiki does not list a language property. I found this one here: https://microformats.org/wiki/multilingual-examples but how is this handled on micropub/microformats json level?
#
gRegor
(obviously behind a toggle to turn on sound, don't be *that* obnoxious :D)
#
gRegor
Ooh, that's a good question. I think that might fall under extensions, though not sure if it's been discussed yet: https://indieweb.org/Micropub-extensions
#
[schmarty]
artlung++
#
Loqi
artlung has 11 karma in this channel over the last year (59 in all channels)
#
gRegor
mf2 doesn't have its own language property but uses the HTML `lang` attribute. There's some experimenting with that in the mf2 parsers, where it gets returned at the same level as the `type` and `properties`. Example: https://php.microformats.io/?url=https%3A%2F%2Fseblog.nl%2F2016%2F02%2F21%2F1%2Fsjiphol-leedies-djentelmen-sjiphol
#
Loqi
[preview] [Sebastiaan Andeweg] Dis is Sjiphol, leedies en djentelmen. Sjiphol.
#
gRegor
I *think* an `mp-*` property in the micropub request might be the way to try it, like `mp-lang=en`
#
perryflynn
nice. if my current PR at micropublish.net is through I'll ask barryf if he would accept such a feature as PR no. 2. :-) Thanks gRegor
#
perryflynn
since it is already in mf2-php, there is no protocol extension necessary, right?
#
gRegor
https://micropub.spec.indieweb.org/#reserved-properties has some details, it should be brainstormed and discussed on that extensions page (or I think there's a github linked from there)
#
gRegor
"Clients and servers wishing to experiment with creating new mp- commands are encouraged to brainstorm and document implementations at indieweb.org/Micropub-extensions.
#
gRegor
I'm surprised language isn't on there, I thought someone had done that in micropub
#
perryflynn
multilanguage is quite a journey, I had to craft alot of stuff for jekyll in the past, too.
#
perryflynn
but thanks again, will put it on my todo list.
barnaby joined the channel
#
[tantek]
[artlung]++ 🤯
#
Loqi
[artlung] has 12 karma in this channel over the last year (60 in all channels)
#
[tantek]
I keep forgetting how much fun/crazy stuff is possible with gradient functions
#
[tantek]
[artlung] wow if I change the 2lh to 6lh it gets the 3 lines at a time effect too!
#
[tantek]
and #dfd is closer to what the paper looks like than lightgreen
#
[artlung]
Eric provided the color for the final example. Maybe I need to make that global.
#
[artlung]
Yeah, made it global. 🙂
#
[tantek]
I'm still old school and prefer hacking 216 colors before going all hsl fancy
#
[artlung]
Bottom of the codepen includes code for you to set those colors [tantek]
#
capjamesg
[artlung] You may have received a few webmentions. These were all sent by me.
#
[tantek]
Eric's color is too subtle for a wide variety of display devices (e.g. projectors at a conference 🙂 )
#
capjamesg
I'm trying to build the automated This Week in the IndieWeb webmention sender.
#
[tantek]
like from the Newsletter itself?
#
[artlung]
capjamesg++ nice. Tantek, for some context, at least I think this is helpful context -- I discovered a few months ago that I could pull webmentions from the indieweb wiki. I do it on https://artlung.com/front-end-study-hall/ - I noticed some webmentions to FrESH pages. Including 2 from _This Week in the IndieWeb_ which James had sent in March.
#
[tantek]
the holes and perforation are pure art goodness sakes
#
[tantek]
to be lost on most readers lol
#
[artlung]
sorting out how to make the holes transparent to the background was VERY satisfying.
barnaby, shoesNsocks and Kolev joined the channel
#
[tantek]
it's totally worth a "here's how I did it" blog post
#
gRegor
Haha, that reply on Mastodon "Tractor feed paper? The box model hack? How many different ways do you have to make me feel old in one post?" http://toot.wales/@woe2you/114536854532931076
#
[tantek]
hahahaha
#
Loqi
nice
bret joined the channel