Interesting, HTTPS is almost twice as slow as plain HTTP on my server (~72 ms vs. ~135 ms):

$ hyperfine -r 50 "curl -so /dev/null 'http://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'"
Benchmark 1: curl -so /dev/null 'http://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'
  Time (mean ± σ):      72.7 ms ±  17.2 ms    [User: 6.2 ms, System: 4.8 ms]
  Range (min … max):    49.5 ms …  99.7 ms    50 runs

$ hyperfine -r 50 "curl -so /dev/null 'https://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'"
Benchmark 1: curl -so /dev/null 'https://movq.de/blog/postings/2024-05-23/0/t/word11a.jpg.jpg'
  Time (mean ± σ):     135.5 ms ±  28.9 ms    [User: 17.8 ms, System: 5.6 ms]
  Range (min … max):    93.2 ms … 198.5 ms    50 runs

⤋ Read More
In-reply-to » @lyse Besides, have a look at https://movq.de/v/cf0903ebc3/numb.png again: When it goes from item 9 to item 10, the indentation of the text (after the number) changes. Pretty ugly. In other words, a table of contents should be a table, not a list like it is at the moment. And that would require me to write my own extension for python-markdown … Probably not worth it.

@lyse@lyse.isobeef.org Oh my god, there’s nothing that CSS can’t do, eh? 😳 Crazy stuff.

⤋ Read More

Damn, I broke my Atom feed (and a reader let me know, that’s cool!).

I run vnu on all HTML and CSS files after each build of the website, but I don’t run a feed validator. 😬 Time to change that.

⤋ Read More
In-reply-to » @lyse Besides, have a look at https://movq.de/v/cf0903ebc3/numb.png again: When it goes from item 9 to item 10, the indentation of the text (after the number) changes. Pretty ugly. In other words, a table of contents should be a table, not a list like it is at the moment. And that would require me to write my own extension for python-markdown … Probably not worth it.

@movq@www.uninformativ.de Yes, that’s what I was thinking, too. For a moment, I wanted to suggest to use <ol> instead of <ul> to fix that. However, that’s only gonna work for the first level, but subsections then miss their parent level.

And it turns out that I was wrong. At least sort of. There are some CSS tricks to fix it: https://stackoverflow.com/a/26243681 Of course, with text or retro browsers, this is not gonna fly.

I also came across this interesting article. I just skimmed it and it’s about real tables of contents with page numbers, so not what you have in mind, but cool nevertheless: https://css-tricks.com/a-perfect-table-of-contents-with-html-css/

⤋ Read More

I complain about this a lot:

https://movq.de/v/e7cb49eefb/hiccupfx

But to be honest, my blog did the same thing – to some degree.

This is fixed now. The trick is to add width and height to all <img> tags. That way, modern browsers know how much space to reserve for the image. Without this, they just reserve zero space, so when the image finally loads, you get jumpy layout.

This effect is even worse when you use <img loading="lazy"> – which I can finally use, now that the jumpy layout has been fixed. 🥳

⤋ Read More
In-reply-to » Numbered headings in blog posts, yay or nay?

@lyse@lyse.isobeef.org Besides, have a look at https://movq.de/v/cf0903ebc3/numb.png again: When it goes from item 9 to item 10, the indentation of the text (after the number) changes. Pretty ugly. In other words, a table of contents should be a table, not a list like it is at the moment. And that would require me to write my own extension for python-markdown … Probably not worth it.

⤋ Read More
In-reply-to » Numbered headings in blog posts, yay or nay?

@movq@www.uninformativ.de I reckon section numbers are not really needed for articles. But if you number them, the anchors should probably not contain the section number, just the title. Especially for articles that may receive updates.

It’s probably another story for specifications. They’re kinda fixed and thus I found it useful in the past to include the section numbers in the anchors, so they show up in URLs when linking to specific sections. W3C RFCs only include the numbering in the anchors. This makes URLs fairly short, but it would be also nice to directly see what kind of section that URL actually links to.

⤋ Read More
In-reply-to » @lyse Mhm, yeah, I also think I like date := time.Date(2026, time.June, 19, /**/ 17, 0, 0, 0, time.UTC) the most. 🤔 (My only gripe with this is that it isn’t obvious whether the third 0 is milli-, micro- or nanoseconds. These days it’s probably nanoseconds, but you never know.)

@movq@www.uninformativ.de Right. A Go programmer eventually knows that its nanoseconds precision. Keyword arguments like in Python are just sooo superior to unnamed positional arguments. I wish that Go had them, too.

⤋ Read More