Sorry, sorry

The last time I moaned about this was in 2015, so once per decade can’t be too much, surely?

But I had to upgrade my TV machine (for stupid reasons), and of course my little wireless keyboard that I use to control Emacs/mpv on the TV started misbehaving: The PgUp/PgDw keys stopped working, because they’re using non-standard key codes or something.

The solution is to:

  • Clone this repo
  • Apply this patch
  • Compile
  • cp ~larsi/src/xf86-input-evdev/src/.libs/evdev_drv.so /usr/lib/xorg/modules/input/evdev_drv.so

(Yes, that’s stupid, because you can’t update X without recompiling, but never mind.)

And then config X.

But the old ways of configuring this stuff has changed. For something that’s supposed to be on life support, people are sure changing how X is being configured. It used to be that you said:

Section "InputDevice"
    Identifier     "Logitech TV730"
    Driver         "evdev"
    Option         "Device" "/dev/input/tv730"
    Option         "event_key_remap" "402=112 403=117 272=89"
EndSection

This does nothing now. Instead you say:

Section "InputClass"
    Identifier "Force evdev for my Logitech"
    MatchProduct "Logitech TV730"   # use exact name from `xinput list`         
    MatchIsKeyboard "on"
    Driver "evdev"
    Option "event_key_remap" "402=112 403=117 272=89"
EndSection

See? MUCH BETTER!!!! That only took me two hours to find out, and I had to use ChatGPT, because this info is not readily accessible via Google, as far as I can see.

Perhaps after posting this, it will be?

While I’m moaning — the proprietary Nvidia drivers, man… The 5xx drivers don’t support my VIDIA Corporation GP107 [GeForce GTX 1050 Ti] video card. And the 3xx drivers, that do, won’t build.

(The doc says that the 5xx drivers are necessary for the Pascal architecture, but my card is Pascal. But whatevs.)

So I’m using the nouveau for the first time… and they seem to actually kind of work now? So that’s progress. There’s no acceleration, though, so I’m not sure it’ll actually be usable for watching 4K movies?

Hm… tried it with Thor: Love and Bullshit now, and it seems to work? Huh. Didn’t expect that.

[Edit: Total brain fart on my part that I spent hours to ponder. The 5xx drivers work perfectly, but the xorg.conf had to be tweaked a bit.]

Book Club 2025: Sannheten bortenfor by Anne Holt

I’ve still got a cold, so I thought I’d read a mystery.

And it’s pretty good! Holt is a solid mystery writer — she’s got the craft down. So we get a murder, and then lots of police investigation with a myriad of clues, and then a quite surprising, but satisfying, resolution.

My only quibble here is the length. It’s 340 pages, and while there’s really no part of the book that’s boring, it just doesn’t feel like it warrants that length, really.

And now I’m wondering whether she’s begun to be translated. I mean, Nordic Noir is huge, but Holt isn’t really a Nordic Noir author — she started in the 90s, and the amount of grisliness is kept to a minimum, really. Let’s see…

Yeah, there was a hardback from Scribner in 2016, for instance.

But what does the critics think?

Right.

Sannheten bortenfor (2003) by Anne Holt (buy new, buy used, 3.60 on Goodreads)

Having the SVG stroke go on the outside should be easy, right? Right?

My go-to tool to generate images (with text overlays and stuff) is svg.el in Emacs. It provides a convenient interface for making SVG files, and then I can just convert it to something else for display. The thing I’ve been using it for lately is to display actor names in movies I’m watching.

Which brings me to what I’m yammering about today — adding outlines to text. Because if you’re displaying text over random (moving) pictures, you have to add an outline so that you can read the text.

The normal way to do that in SVG is to specify a stroke-width. But as you can see, that’s ugly — the stroke is inside the letter shapes, effectively shrinking the shapes down and making them spindly and awkward.

Perhaps easier to see if you really exaggerate the width.

So the obvious question is: Can you specify that the stroke goes on the outside of the shape instead of the inside?

And:

Yes, very amusing. The quibbles are kinda quibbly:

Etc. So: Nope.

But of course it is possible to add an outline to a shape — you can do that perfectly in HTML/CSS with borders and stuff, so instead SVG has grown filters. Look how simple:

<svg width="900" height="200" viewBox="100 0 900 200">
    <filter id="outline">
        <feMorphology in="SourceAlpha" result="DILATED" operator="dilate" radius="4"></feMorphology>
        
        <feFlood flood-color="#32DFEC" flood-opacity="1" result="PINK"></feFlood>
        <feComposite in="PINK" in2="DILATED" operator="in" result="OUTLINE"></feComposite>

        <feMerge>
            <feMergeNode in="OUTLINE" />
            <feMergeNode in="SourceGraphic" />
        </feMerge>
    </filter>

    <!-- DILATED TEXT -->
    <text font-size="85px" dx="125" dy="130" font-weight="700" filter="url(#outline)">upgrade yourself</text>
</svg>

Which reminds me of this classic:

I think the SVG people did, really.

But it does work:

See? Erhm… Hm. That looks a bit odd… let’s up the outline radius:

BY ALL THAT”S UNHOLY!!! OK, I’ve converted the SVG to JPEG using ImageMagick, and its SVG support is a bit, er, funny. Let’s look at it in Firefox:

Yeah, that looks OK?

Let’s see… what about rsvg-convert?

Well, that’s fine, isn’t it? So you need pretty a pretty recent SVG toolchain for this to work, I guess.

I wonder what happens if I up the outline radius ridiculously…

It’s a bit brutal…

A 0.5 opacity looks OK, I guess…

Anyway. That’s the rant for today: We can never have good things.

Book Club 2025: A College of Magics by Caroline Stevermer

I bought this because Lois Macmaster Bujold told us to:

And I think I’m coming down with a cold, so a fun fantasy book sounds like just the thing.

(Amusingly enough, the cover says that it’s better than Harry Potter. But this book was originally published in 1994, which I guess means that the publisher rushed out new editions of anything vaguely resembling Harry Potter to capitalise on the Harry Potter success.)

First of all, I’m surprised at how the big the type is. And indeed:

They’ve embiggened the font so that they can have a 480 page book instead of a 380 page book, because by this edition, only huge fantasy books sell.

But is it any good? It’s a frustrating book.

Stevermer is quite good at dialogue. So you get tons and tons of scenes of people talking wittily to each other, and these scenes work quite well, even though the actual jokes often make you go “er… wat?” Stevermer isn’t good at anything else, really. The world building is super duper thin. The book is supposed to be set in an alternate 1910 where magic is a thing, but virtually everything we encounter seems like it’s either from the 1700s or is medieval — it’s like the author hasn’t pictured the surroundings at all.

Even worse is that the author doesn’t seem to plan anything at all. I don’t think there’s a single plot element that’s planned in advance. Instead we get scenes like this, where just before Our Heroine needs to magically unlock a door, we’re told that her friend had tried to do the same earlier.

Which makes for a bewildering reading experience. Things just happen, and then another thing happens, and then another, and that’s the way for 480 pages.

Yeah, that’s pretty much it.

A College of Magics (1994) by Caroline Stevermer (buy used, 3.71 on Goodreads)

Ill-Advised Musings On LLMs

I’ve got a cold, so I’ve been idly sitting around doing some slightly more thorough testing of my Emacs/mpv setup for asking LLMs what actor is on the screen of the movie I’m watching, and it’s led to me pondering just why some people are so (literally) incredibly enthusiastic about LLMs.

I mean, LLMs are fun. And useful for doing tedious programming things — for instance, the other day I asked ChatGPT to transform a li’l 150 line Javascript thing from Jquery to pure Javascript — and it did it flawlessly. (And also badly, engineering wise, since it did pointless stylistic changes on just about every line.) That would have been boring to do myself, so it’s nice that there’s a tool for that now.

But non-programming things? I just don’t understand the enthusiasm, because whenever I try to use an LLM for something, it’s never more than a toy. Somewhat useful toy, sure, but you can’t say in any way that it actually, like, works.

I wonder whether the enthusiasm is paradoxically based on how bad LLMs are in general. That is, when you chat with one of those things, it’ll give you the wrong answer a lot of the time, but then you say “but that’s not right”, and it’ll say “Good catch! You’re so smart! I’ve never seen anybody be that smart before; you must be a genius!” or variations thereof, depending on how high the company in question has dialled the knob that’s marked “Ass-Kissing” in the LLM console.

It’s just hard to be mad at a technology that’s consistently stupider than you are, and that always confirms your secret suspicion that you’re really, really smart yourself.

So I’m testing the same screenshot repeatedly with the same LLM (Gemini-2.5-Flash here) to try to see just what level of bullshit it’s giving me. This is Keanu Reeves from Even Cowgirls Get The Blues, and while he does look kinda untypical here, I think if you give somebody a cast list and ask who it is, I don’t think it’s that hard to pick him out as the most likely candidate.

But Gemini isn’t better than a throw of the dice here, even though I’ve tried in many ways to instruct it “if you don’t know, don’t guess”.

It even guesses correctly some of the time.

But let’s try some other movies…

It gets Dakota Johnson correct (from the cinematic masterpiece Madame Web).

Always.

This, from Dune Part Two, doesn’t seem right? Actually, I forget his name now… Oh, yeah, Dave Bautista.

No. So is it really just going through the list of cast members and picking one at random? What if I don’t tell the LLM what movie the screenshot is from…

Nope, makes no difference. It picked a guy from a different Dune movie, though?

It gets Timothée right — always, whether I tell it the movie or not.

Well, it’s not a totally bad guess — they aren’t totally dissimilar. (It’s Bill Pullman from Lost Highway, though.)

Yeah, if I tell it the movie, it gets it right.

Nnnnno.

So, once again, when I try to use an LLM for something, the result is somewhat useful — it’s better than nothing, but you can’t rely on it at all.

And people want to use these things to process social security applications and stuff.

Amazon apparently has a thing for letting you know who’s on screen (called “X-Ray”), and according to rumours, it’s based on hiring people in low-cost countries to tag every scene with the people on the screen. I thought identifying actors would surely be a solved problem by now, but I guess Amazon knows best.