#dev 2024-04-02

2024-04-02 UTC
#
btrem
@#!@# Help request: how do I deploy a site on Netlify that I uploaded. So /not/ via a GitHub repo?
#
[aciccarello]
Shouldn't it automatically be deployed?
#
btrem
You'd think. When I try to view it with the netlify.app subdomain, I get 404.
#
btrem
So maybe the problem is not the deploy but something else.
#
btrem
sighs
[Jan_Tuomi], saptaks, superkuh, [lcs] and [Scout] joined the channel
#
[Murray]
I'd check that it works locally e.g. launch the `index` file. Is that definitely in the root? How did you upload? Drag'n'drop the folder?
#
capjamesg
What is the best way to mark up poetry?
#
Loqi
It looks like we don't have a page for "best way to mark up poetry" yet. Would you like to create it? (Or just say "best way to mark up poetry is ____", a sentence describing the term)
#
capjamesg
I have been using p tags for each line.
#
capjamesg
And br tags for stanza breaks.
#
[KevinMarks]
Interesting, I do iy the other way round. A stanza is more like a paragraph for me
lazcorp joined the channel
#
lazcorp
I'd use <p> for each stanza, and <br> to separate lines within each stanza
#
lazcorp
MDM also suggests <br> for line breaks and <p> for stanzas/verses: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br
#
[KevinMarks]
Why are they using <br /> instead of <br>? We have up on XHTML2 a long time ago
#
lazcorp
[KevinMarks] I'm guessing it's an old example that they haven't bothered updating to HTML5 (but the semantics are the same, at least)
superkuh, Guest6 and to2ds joined the channel
#
to2ds
Adding "replace <br /> with <br>" to technical debt list 😄
ttybitnik joined the channel
#
[Jan_Tuomi]
Writing `<br />` might also be a symptom of JSX-brain, I find myself writing that sometimes after writing React or similar 😄
#
[lcs]
Did we really abandon the principle of closing tags? This is outrageous
#
[lcs]
also adds replace <br /> with <br> to tech debt list
#
[Murray]
One of the issues is that it's inconsistent. `<img />` is still closed. And yeah, JSX and other templating languages also adopted strict always-close rules. Always bugged me that HTML doesn't 😅
#
[KevinMarks]
'closing' tags in HTML is a weird XMLism
#
[KevinMarks]
I am annoyed by my HTML editor in VSCode turning `<p>` into `<p></p>` when I type it as that breaks formatting when I do it in the middle of a block of text I'm editing.
#
[Murray]
You can disable that in the settings; can't remember off the top of my heading what it's called, but something to do with auto-close
#
[KevinMarks]
lots of HTML elements don't need closing as they auto-close within contexts - `<p> <li> <dt> <dd> <td>` for example
#
[Murray]
I like to think of that as the chaotic good of HTML 😄
mretka and lazcorp joined the channel
#
lazcorp
[Murray] - I can't find any spec saying the <img> element needs to be <img .... />
#
lazcorp
all the examples at https://www.w3.org/TR/2011/WD-html5-author-20110809/the-img-element.html do not use the closing slash at the end
#
[Murray]
Guess I've just been wrong about that for years 😅 Again, MDN always has closing slashes, but perhaps that isn't required after all
#
[Jan_Tuomi]
`<p>` and `<li>` without the closing tags are cursed and you cannot change my mind
#
lazcorp
And as a double-check, https://validator.w3.org/nu reports <img .... /> (img element with a closing slash) as an info line with advice not to use the trailing slash
#
lazcorp
Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.
#
lazcorp
From line 22, column 9; to line 25, column 55 >↩ <img↩ class="fit-picture"↩ src="/media/cc0-images/grapefruit-slice-332-332.jpg"↩ alt="Grapefruit slice atop a pile of other slices" />↩↩
#
[KevinMarks]
`<p></p>` is cursed because it can exit the context for the `<p>` and break css formatting based on `p {}`
jacky joined the channel
#
[Murray]
Surely a closing tag _should_ always exit context?
to2ds joined the channel
#
to2ds
<!doctype chtml> = cursed HTML
#
[KevinMarks]
if you have something like `<main><h2></h2><p>text<p>more text</main>` then the first `<p>` is closed by the second one, and the second by `</main>` so you can style with `p {max-width: 70ch}` for example. If the second `<p>` becomes a `<p></p>` then it will fall back to `main`'s formatting.
AramZS joined the channel
#
redblobgames
I find it easier for my pea brain to reason about it when everything is closed explicitly
[campegg] joined the channel
#
[campegg]
Personally, I'm on team </p>, but if you're consistent with whatever you choose, the exit context thing shouldn't be an issue, right?
#
btrem
I always explicitly close my elements.
#
btrem
I don't know this to be true, but I suspect that the reason for self-closing tags is because html elements were originally created as dividers, not elements in the tree sense. So <p> was the equivalent of a pilcrow: a new paragraph begins here. <hr> worked the same way: a new section starts here (html5 makes that explicit).
#
btrem
And when the sgml folks got involved, they had to make it work in the tree sense. Easiest way was to enable shorttags, so <p> didn't need </p>; and declare <hr> to be void.
#
btrem
No way to verify. But it's plausible, and explains certain unfortunate "features" of html.
#
[campegg]
Huh, I did not know that. So was the intent to have something like `text text text<p>text text text` as the representation of two paragraphs?
#
btrem
I *don't* know that.
#
btrem
But I suspect that is the case.
#
btrem
Which would explain why orphaned text is allowed in html. But was not allowed in the failed *x*html.
#
btrem
xhtml being an attempt to fix the problems with html.
#
[campegg]
Fair assumption. And my response was poor phrasing on my part.
#
aaronpk
"problems"
#
jacky
unruly freeform text
#
jacky
the villain of ontological databases _everywhere_
#
btrem
Well, this is a touchy subject. I actually think implicitly closing tags was a mistake, as it made learning html much more difficult than it needed to be. If you could search the old ciwa* usenet groups, you'd find many a post asking why a validator claimed a mismatched </p> tag when no such tag was in the source code.
#
btrem
And implicitly closing tags has delayed the introduction of useful features. I have direct experience of this.
#
btrem
And for all we know, it prevented features altogether.
#
redblobgames
I think you needed the tree view of things for CSS to work
#
btrem
Exactly so.
#
redblobgames
I end up writing my pages and blog in xhtml, and converting to html with a post-process step.
#
btrem
I think there's a conflation of the misguided notion of sgml purity with the practical need for an easily understood parsing model.
#
btrem
So as I said, this is a touchy subject here, to the point that it can become hostile environment, but I think there /were/ problems with html as it was originally created. The shorttags "feature" being one. And I sympathize with the desire to fix them, even if efforts to that effect were misguided at best and often much worse.
#
btrem
And looking above, I mistakenly said "...the reason for self-closing tags is because..." when I meant "the reason for implicitly closing elements is because...."
jeremycherfas joined the channel
#
btrem
[campegg]: didn't mean to jump down your throat. Just wanted to make it clear that I have no way of knowing why <p> was created as it was. Just a hypothesis. Because these things have a way of taking on a life on their own.
[Paul_Robert_Ll] joined the channel
#
[Paul_Robert_Ll]
I wonder if MDN is using Prettier to lint their examples, I think that enforces the closing slash
#
[KevinMarks]
the modern HTML spec does define a consistent way of creating a tree from the implicitly closed tags.
#
[campegg]
btrem, all good! It was poor phrasing by me 🙂
#
capjamesg
[tantek] How do you think post preview retrieval relates to metaformats? I was starting to write up how I retrieve post previews for use in hovercards on my website as a draft spec and realised that maybe there is too much overlap with metaformats? I'm not sure.
#
[aciccarello]
Link previews are my main use case for metaformats
#
capjamesg
Yeah, it sounds like metaformats solve the problem.
#
capjamesg
Thanks!
#
btrem
[KevinMarks]: it does. And that's a solution to the implicit closing problem that is obviously far better than xhtml. Which, for the record, I thought was a failure from pretty much day one and never once used.
#
btrem
To put it another way: xhtml was a very wrong solution to some very real problems.
Guest6_ and lazcorp joined the channel
#
lazcorp
And all this because capjamesg asked about HTML markup for poetry :)
to2ds joined the channel
#
to2ds
I'm afraid to ask about formatting poetry in Markdown now :D
#
capjamesg
to2ds Don't. I'm asking about HTML because markdown is terrible for publishing poetry.
#
to2ds
Though today's conversation helped to figure out a Markdown thing that plagued me with <br /> <br> stuff.
#
to2ds
Didn't know that two spaces after a line would auto pop-in a <br> for free!
#
[aciccarello]
Yup, one of the many warts of markdown
#
[aciccarello]
Personally, I like markdown as a plaintext format but there are lots of rough edges
#
[aciccarello]
_...ducks out of the markdown debate_
#
to2ds
Markdown works for the majority of my use cases. Then I tried HTML tables 😱
#
btrem
I, too, like markdown, as it generally works for my site. But I'm a relative novice. I've only been using it for...hmm, when /did/ I launch my personal website?
#
btrem
checks
#
btrem
2021. So three years.
#
to2ds
Maybe Markdown requires that 10,000 hours of mastery? :D
#
btrem
I didn't know until very recently that two spaces at the end of a line made a <br> element. So maybe, yeah! :-D
#
btrem
My text editor of choice strips extra spaces at the end of a line, so there was no way to accidentally stumble on that "feature."
#
[qubyte]
If markdown doesn’t work for you, make your own! https://qubyte.codes/blog/marqdown
#
capjamesg
[qubyte] What equation is in the math rendering?
#
capjamesg
I remember it from high school.
#
[qubyte]
Heh, the solution to quadratic equations with two roots. A classic.
#
[qubyte]
While I wasn’t looking, MathML got good. Still, usually too laborious to write by hand.
#
[qubyte]
*MathML support in browsers
#
redblobgames
Thanks to Igalia!
to2ds joined the channel
#
to2ds
btrem - 😩 Doesn't the text editor have a ✅ Don't second guess me. configuration somewhere?
#
to2ds
[qubyte] - Just looked at one of the parser regex in Markdown package and got dizzy 😄
#
sknebel
[snarfed]: https://snarfed.org/2024-04-02_52710 has a weird link on the image and looks very empty when federated to mastodon ;)
#
[qubyte]
Yes, marked is best described as _venerable_. Those are historied regexes.
#
[tantek]
ok first the whole h1/title debate and now self-closing empty tags or not?!? Who is bringing up these longstanding perma-dev-drama topics?!?
[aciccarello] joined the channel
#
[aciccarello]
Beautiful photo though
#
[aciccarello]
New channel #indieweb-bikeshed /sarcasm
#
gRegor
double close the tags to be extra safe <//joke>
#
[aciccarello]
Safety first
#
to2ds
And here we thought poetry would be relaxing.
[tantek] joined the channel
#
[tantek]
Markdown-- is horrible for poetry due to Markdown's mistaken treatment of hard line breaks (with no space before) as "soft-breaks", I will say
#
Loqi
Markdown has -4 karma in this channel over the last year (-3 in all channels)
#
bacardi55[m]
@btrem (https://matrix.to/#/%40irc_libera_btrem%3Amtx.bacardi55.io) In case you don't know, you can use a \ at the end of the line in your markdown to add a <br> (like you, I remove all spaces at the end of the line, so that's the way it works for me)
#
[tantek]
like don't expect people to edit their poetry to put two spaces at the end of each line just to pacify Markdown's quirk
#
to2ds
My 100 day project is haiku written in Markdown. Will now need 600 superfluous spaces now 😂
#
[campegg]
Something has gone weird with my DigitalOcean droplet… starting about 40 mins ago, Python started running at 100% CPU usage. A reboot and a hard shutdown/restart didn't help. Any ideas on how I can track down what's happening? I haven't touched anything on it for over a week now, so it's not new code or anything like that.
#
[campegg]
(And sorry, I know this is more system admin and isn't directly IndieWeb-dev-related!)
#
[tantek]
[campegg] we've had some discussions about creating a separate channels, perhaps an "indieweb-server" channel would be a good place to encourage these kinds of discussions. WDYT?
#
[tantek]
would a -dev vs -server distinction make sense
#
[tantek]
or would it be better to have indieweb-frontend vs indieweb-dev ?
#
[aciccarello]
[campegg] did the droplet have an automatic update or something?
#
[campegg]
[tantek] yeah, I think it might… I like -server better than -frontend/-backend; the former is more sysadmin, while the latter two both roll up into building sites
#
[campegg]
(👆 re: -dev vs -server distinction)
#
bacardi55[m]
Can you see what python script is running ? (eg with a ps faux | grep python)
#
[campegg]
[aciccarello] not sure… will check
#
[tantek]
[campegg] cool, good to know, I'll add the options on the brainstorming section and invite further votes / opinions
#
to2ds
Does -server imply -sysadmin?
#
[campegg]
That's a good question to2ds
#
[campegg]
Thanks for the tip bacardi55[m]! It looks like a cron job gone awry that's doing to the damage
#
[campegg]
*doing the damage
#
to2ds
bacardi55[m]++
#
Loqi
bacardi55[m] has 1 karma over the last year
#
[campegg]
Now I just have to try and work out why it's gone rogue after running perfectly for months
#
[campegg]
bacardi55[m]++
#
Loqi
bacardi55[m] has 2 karma over the last year
to2ds joined the channel
#
to2ds
It's been a while, but I remember similar issues when jobs running under cron stepped on previous jobs that were not finished within the cron interval.
barnaby joined the channel
#
[campegg]
to2ds it looks like a cron job (that runs a Python script) that just isn't finishing, then the next one spawns a new python process and so on. I don't know why it just started happening, though… there hasn't been any change to the script. Will need to spend a bit more time investigating after work
#
to2ds
Sounds familiar. Not that it applies to your situation, but we had solved some of those cron spawned reentrant types of issues with fnctl/flock, etc.
[schmarty] joined the channel
#
[schmarty]
lockfiles++
#
Loqi
lockfiles has 1 karma over the last year
#
[qubyte]
While markdown is far from perfect, I think we’re being a little unfair to it here. Its original intent was for prose, not poetry. Anyway, HTML is a poor fit by default too. When it comes to poetry, nothing is off the table, right? Playing with alignment and spacing is common, and HTML doesn’t have a built in vocabulary. That stuff needs styles to be applied to achieve. markdown++
#
capjamesg
My problem with markdown is that it is deceptively useful for poetry.
#
capjamesg
Well...
#
capjamesg
Actually...
#
capjamesg
That's unfair.
#
capjamesg
It may be the markdown-to-HTML conversion that is messing something up.
#
capjamesg
Maybe we need a markup language for poetry 😂
#
jacky
poetrylang
#
jacky
tbh poetry would be the most anarchistic format (have you seen Warshan Shire's work? Rupi Kaur's?)
#
[campegg]
poemdown? marketry?
#
[campegg]
PFM? (poetry-flavored markdown)
#
jacky
po'down (thought that might get mixed up with a sandwich)
#
[campegg]
😆 +1 for po'down
#
to2ds
If we ever make it back to New Orleans, I'm ordering one of those :D
#
capjamesg
(which I love)
#
capjamesg
to2ds New Orleans is amazing.
#
[qubyte]
I’m reminded of LilyPond. https://lilypond.org
#
[qubyte]
coem could be embedded in markdown hehehe
#
to2ds
capjamesg - Indeed! 😊
#
[Paul_Robert_Ll]
So… tabs or spaces? _ducks_
#
capjamesg
throws a tab
#
jacky
gets hit with the <TAB> and watches 8 spaces fall to the ground
#
[qubyte]
Oh wow. Coem is fascinating.
#
to2ds
Ok with either as long as using VI/VIM _ducks_
#
capjamesg
Name for the markdown language: poemdown. It sounds like a poetry throwdown. 😄
#
capjamesg
[qubyte] It is! I wrote a coem at the weekend.
#
Loqi
[preview] Writing a poem in coem
#
capjamesg
(I just noticed [campegg] suggested poemdown already :D)
#
[qubyte]
I don’t grok it just yet though…
#
capjamesg
[qubyte] It took me an hour to get into it.
#
capjamesg
It got me thinking differently about how I write poetry, which was nice.
#
[qubyte]
I think loqi just doesn’t like me much. No honouring my ++. No previews. :(
[benatwork] joined the channel
#
capjamesg
[qubyte]++
#
Loqi
[qubyte] has 1 karma in this channel over the last year (7 in all channels)
#
[qubyte]
I’m popular now.
#
to2ds
Not coem, but encapsulated marriage in a few lines of Python.
#
to2ds
[qubyte]++
#
Loqi
[qubyte] has 2 karma in this channel over the last year (8 in all channels)
#
Loqi
[preview] [Todd Presta] Summarizing marriage in a few lines of Python code. try: print("What do you want for dinner?") raise Exception("This will lead nowhere.") except: print("I don't know. What do you want?") finally: # Three Hours later... print("How was your c...
#
capjamesg
to2ds I rarely see the `finally` block in use 😄
#
capjamesg
By the way, if you are ever stuck for a meal idea, eat waffles.
#
capjamesg
You can't go wrong with waffles.
#
[qubyte]
waffles++
#
Loqi
waffles has 1 karma over the last year
#
to2ds
😄 The SO loves waffles!
#
[qubyte]
We have a waffle iron. It gets used fairly often. Need to get good maple syrup when I visit Toronto this June.
#
capjamesg
Optionally served with eggs and a hash brown.
#
[KevinMarks]
If you use mysql from node you really want a finally
#
[qubyte]
At least until explicit resource management makes it into V8. https://github.com/tc39/proposal-explicit-resource-management
#
Loqi
[preview] [tc39] proposal-explicit-resource-management: ECMAScript Explicit Resource Management
#
[tantek]
anyone have a (reference to a) corpus of plain text poetry/poems online? would be great for my Markdown-evisceration presentation-in-progress as well as "training" (or testing) my Markdown replacement
#
[campegg]
I managed to track down what was going on with my server; the cron job I use to process incoming and outgoing webmentions was hanging because of a malformed outgoing webmention. Thanks again for the pointers that got me looking in the right place, bacardi55[m]++
#
[qubyte]
malmention?
#
capjamesg
The opposite being the palmention?
#
bacardi55[m]
Great that you found the issue!
#
[campegg]
This is starting to push against my long-held—and very strong, almost visceral—dislike of portmanteaux 😉
#
[qubyte]
Thank you for using the correct plural.
#
[qubyte]
Also, my favourite word and compulsion.
#
[campegg]
[qubyte] if I'm going to hate on something, I'm going to do it right, lol
#
capjamesg
[campegg] You mean... a portmant-no?
#
[campegg]
Please, no. (Also, I think we're getting into #indieweb-chat territory here)
#
capjamesg
To chat we venture!
#
btrem
to2ds: I can configure VS Code to not strip spaces at EOL. But I find that config useful. So I never accidentally left two spaces at the end of a line, and never discovered the markdown "feature."
#
btrem
bacardi55[m]: I've never needed to put a <br> in my markup. And if I did, I have my setup configured to allow html, so if I had, I would have just inserted the <br> tag.
#
btrem
Back to my netlify question, if that's ok: if I drag-and-drop a folder with only images into a new netlify site, will the site show the images a la apache? As folders with images in them? If not, that would explain the 404 I get when I try to view the site.
to2ds joined the channel
#
to2ds
btrem: That makes sense. My editor is a just a textarea with a little JS to resize it based on the content. Though editing on iPad it adds a period if I press two spaces so need to add one space and the revisit the line and add another 😑
#
btrem
That's a bit tedious. :-(
#
to2ds
Either that or explicitly add <br />, er uh <br> now :D
#
btrem
:-D
#
btrem
Is this your own editor? Make a "poetry" option that turns off the two spaces are a period.
Guest6233 joined the channel
#
to2ds
Yes. The belief was that a plain ol' HTML textarea would be amenable to Markdown without hiccups in most cases.
#
to2ds
It's not a big issue though, and it's more streamlined than having to chisel cuneiform into a stone just to make a micro blog post 😄
#
[tantek]
HTML textarea predates Markdown. Its Markdown that's not amenable to HTML textareas, not vice versa
#
to2ds
Indeed!
ttybitnik joined the channel
#
[tantek]
"npm install cally" < nope nope nope
#
[tantek]
if it was actually "small", you could copy/paste it from a single file. "install" != "small"
#
[tantek]
apparent conversation enders for me (where I walk away or end up never following up): "just npm install ...", "grab some time on my calendly"
to2ds joined the channel
#
to2ds
[tantek]++ for copypasta deployment :D
#
Loqi
[tantek] has 25 karma in this channel over the last year (104 in all channels)
#
to2ds
I fall in love with a solution and then I have to NPM? 😩
#
[tantek]
tinbox << side project idea: go through "popular" "simple" npm packages and write-up one-file code solution alternatives that work by copypasta instead without all the ceremony/overhead/vulns of yet-another-npm dependency
#
Loqi
ok, I added "side project idea: go through "popular" "simple" npm packages and write-up one-file code solution alternatives that work by copypasta instead without all the ceremony/overhead/vulns of yet-another-npm dependency" to the "See Also" section of /User:Tantek.com/tinbox https://indieweb.org/wiki/index.php?diff=94481&oldid=93467
#
[tantek]
it'll have to wait until I replace Markdown
#
[tantek]
first things first
[Murray] joined the channel