Searching txt.sour.is

Twts matching #HTML
Sort by: Newest, Oldest, Most Relevant
In-reply-to » is there consensus on what characters should(n't) be allowed in nicks? i remember reading somewhere whitespace should not be allowed, but i don't see it in the spec on twtxt.dev — in fact, are there any other resources on twtxt extensions outside of twtxt.dev?

@zvava@twtxt.net Good question. This is the spec, I think:

https://twtxt.dev/exts/metadata.html#nick

It doesn’t say much. đŸ€”

In the wild, I’ve only seen “traditional” nick names, i.e. ASCII 0x21 thru 0x7E.

My client removes anything but r'[a-zA-Z0-9]' from nick names.

​ Read More

Great. Yet another messed up plain text e-mail part. The URL was actually HTML-escaped. Took me five attempts to figure this out, because of course it had to be several kilometers long. In fact, the e-mail stated: “Please do not be surprised that the link is particularly long. It contains your personal configuration.”

A normal person is completely lost (that’s why I got involved). Visting the broken URL opens a popup dialog suggesting to deactivate script blockers. Which I had already done upfront as a matter of prudence.

Fun bonus on top: The JWT in the link has identical iat (issued at) and exp (expiry) claims. The expiry is definitely not checked, it’s well in the past.

Medical software just has to be horrible. It’s a law.

​ Read More
In-reply-to » at first i dismissed the idea of likes on twtxt as not sensible...like at all — then i considered they could just be published in a metadata field (though that field could get really unruly after a while)

@lyse@lyse.isobeef.org a content warning is kind of like a forum spoiler cut, or like the <details> tag in HTML; it lets you write a sentence or so that someone can then click to expand to see the actual post. it’s called a CW because most people use it to warn for potentially triggering/harmful subjects, but you can really use it for anything, like spoilers in a TV show or even for joke punchlines

​ Read More
In-reply-to » I have a late-2010s ThinkPad running OpenBSD, but it's about as fast as a snail carrying heavy shopping through molasses. I'd like to run something other than Linux, for variety, but the other members of the BSD family failed for various reasons. What OS do you guys think I should try?

@dce@hashnix.club You should try los86! 8-)

Well, what are you trying to do on this ThinkPad? That might affect the OS choices.

I really had to laugh when I read your initial comparison. I love it! :-D

​ Read More

Hmm, gnu.org is slow as heck. Shorter HTML pages load in about ten seconds. This complete AWK manual all in one large HTML page took a full minute: https://www.gnu.org/software/gawk/manual/gawk.html Is there maybe some anti AI shenanigans going on?

In any case, I find the user guide super interesting. My AWK skills are basically non-existent, so I finally decided to change that. This document is incredibly well written and makes it really fun to keep reading and learning. I’m very impressed. So far, I made it to section 1.6, happy to continue.

​ Read More

Ni Hao; bīng qílín!
I’m just dropping in, to emphasize my love for ice cream and the Chinese crawler bots, allocating their time and resources, towards scraping my humble website.

To show my gratitude, I’ve even added a random little dog generator to https://thecanine.ueuo.com/sparkle.html so that everyone can pick up their own custom dogFT, on their journey through my site.

​ Read More

I’ve got a prototype of my hardcopy simulator going. I’m typing on the keyboard and the “display” goes to the printer:

https://movq.de/v/56feb53912/s.png

https://movq.de/v/235c1eabac/MVI_8810.MOV.mp4

The biiiiiiiiiig problem is that the print head and plastic cover make it impossible to see what’s currently being printed, because this is not a typewriter. This means: In order to see what I just entered, I have to feed the paper back and forth and back and forth 
 it’s not ideal.

I got that idea of moving back/forth from Drew DeVault, who – as it turned out – did something similar a few years back. (I tried hard to read as little as possible of his blog post, because figuring things out myself is more fun. But that could mean I missed a great idea here or there.)

But hey, at least this is running on my Pentium 133 on SuSE Linux 6.4, printer connected with a parallel cable. 😍

(Also, yes, you can see the printouts of earlier tests and, yes, I used ed(1) wrong at one point. đŸ€Ș And ls insisted on using colors 
)

​ Read More

In order to publish my personal projects/pages (and most of my teaching materials, hundreds of pages) on #Codeberg, I need to convert #markdown files into #HTML and sprinkle some CSS & JS from a layout template, like #GitHub’s Pages #Jekyll does, but I dread the complexity of installing and tending to Jekyll or Hugo or other static site generators, and I can’t even imagine going near Forejo Actions or any sort of CI intergration.

Should I be brave and do the Jekyll /static generator thing? Any other ideas for poor, overworked, stressed out, clumsy people? :(

​ Read More

#Pillow #PIL #Python

DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15) img1 = PIL.Image.fromarray(my_array, mode="RGB")

So I went to see the documentation:

https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray

And came out empty handed, that is, couldn’t understand what to do instead :(

And the plot thickens:
https://github.com/python-pillow/Pillow/pull/9063

(@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses this)

​ Read More

#Pillow #PIL #Python

DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15) img1 = PIL.Image.fromarray(my_array, mode="RGB")

So I went to see the documentation:

https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray

And came out empty handed, that is, couldn’t understand what to do instead :(

And the plot thickens (this affects many projects, there are some workarounds, but some argument about “reverting” this change allowing some “mode” on import):

https://github.com/python-pillow/Pillow/pull/9063

(@py5coding@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses mode=“RGB”)

​ Read More

#Pillow #PIL #Python
On Image.fromarray():

DeprecationWarning: 'mode' parameter is deprecated and will be removed in Pillow 13 (2026-10-15) img1 = PIL.Image.fromarray(my_array, mode="RGB")

So I went to see the documentation:

https://hugovk-pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.fromarray

And came out empty handed, that is, couldn’t understand what to do instead :(

And the plot thickens (this affects many projects, there are some workarounds, but some argument about “reverting” this change allowing some “mode” on import):

https://github.com/python-pillow/Pillow/pull/9063

(@py5coding@py5coding I guess you’ll want to check this out at some point. py5_tools.animated_gif uses mode=“RGB”)

​ Read More
In-reply-to » Speaking of manpages:

@kat@yarn.girlonthemoon.xyz On the one hand, all these programs have a very long history and the technology behind manpages is actually very powerful – you can use it to write books:

https://www.troff.org/pubs.html

I have two books from that list, for example “The UNIX programming environment”:

https://movq.de/v/c3dab75c97/upe.jpg

It’s a bit older, of course, but it looks and feels like a normal book, and it uses the same tech as manpages – which I think is really cool. 😎

It’s comparable to LaTeX (just harder/different to use) but much faster than LaTeX. You can also do stuff like render manpages as a PDF (man -Tpdf cp >cp.pdf) or as an HTML file (man -Thtml cp >cp.html). I think I once made slides for a talk this way.

On the other hand, traditional manpages (i.e., ones that are not written in mandoc) do not use semantic markup. They literally say, “this text is bold, that text over here is italics”, and so on.

So when you run man foo, it has no other choice but to show it in black, white, bold, underline – showing it in color would be wrong, because that’s not what the source code of that manpage says.

Colorizing them is a hack, to be honest. You’re not meant to do this. (The devs actually broke this by accident recently. They themselves aren’t really aware that people use colors.)

If mandoc and semantic markup was more commonly used, I think it would be easier to convince the devs to add proper customizable colors.

​ Read More

#GitHub #GitHubPages #fail This is driving me mad


Images randomly deciding not to load on all my pages.

Is it just me? Is it my browser’s fault? Is it just in Brazil?

I was working on this #shapely + #trimesh page
 and I can only see the last image (the animated gif)!

https://abav.lugaralgum.com/material-aulas/Processing-Python-py5/shapely-e-trimesh.html

Update: On this exact page I have bungled the image URLs (I blame Marktext for being stupid and not using a relative reference). But I swear loading problems have been going on other well formed pages.

​ Read More
In-reply-to » QR codes, already posted about them in the last two posts, but I want to hear your hot takes: Should they only be black and white, are they even worth doing in 2025, incorporating them into things,..? Also, finally getting full screen view for avatars in XMPP - a better integrated one, after 25 years. Y@ay! Media

@bender@twtxt.net I think it’s actually a new XEP proposal ( https://xmpp.org/extensions/xep-0084.html#proto-info ), but it’s still a bit unclear. Sorry for the late and vague response, I’m still trying to test it and see what it’s even about, didn’t yet find a server, that supports it.

​ Read More

In 1996, they came up with the X11 “SECURITY” extension:

https://www.reddit.com/r/linux/comments/4w548u/what_is_up_with_the_x11_security_extension/

This is what could have (eventually) solved the security issues that we’re currently seeing with X11. Those issues are cited as one of the reasons for switching to Wayland.

That extension never took off. The person on reddit wonders why – I think it’s simple: Containers and sandboxes weren’t a thing in 1996. It hardly mattered if X11 was “insecure”. If you could run an X11 client, you probably already had access to the machine and could just do all kinds of other nasty things.

Today, sandboxing is a thing. Today, this matters.

I’ve heard so many times that “X11 is beyond fixable, it’s hopeless.” I don’t believe that. I believe that these problems are solveable with X11 and some devs have said “yeah, we could have kept working on it”. It’s that people don’t want to do it:

Why not extend the X server?

Because for the first time we have a realistic chance of not having to do that.

https://wayland.freedesktop.org/faq.html

I’m not in a position to judge the devs. Maybe the X.Org code really is so bad that you want to run away, screaming in horror. I don’t know.

But all this was a choice. I don’t buy the argument that we never would have gotten rid of things like core fonts.

All the toolkits and programs had to be ported to Wayland. A huge, still unfinished effort. If that was an acceptable thing to do, then it would have been acceptable to make an “X12” that keeps all the good things about X11, remains compatible where feasible, eliminates the problems, and requires some clients to be adjusted. (You could have still made “X11X12” like “XWayland” for actual legacy programs.)

​ Read More

37C3 and New Year’s Eve 2023
Another one from the vaults. The 37C3 conference took place in
December, 2023. This report was mostly written in January, 2024.
Mostly finished it at night in my cottage between 28 and 29th
December, then edited and added some stuff in July, 2025. So
 Only
1.5 years late?

It was a little ironic, and a little sad, that I was finishing the
37C3 report during 38C3. I didn’t manage to get any tickets for me and
#3 for 38C3 and had to make do with watching the stream.

The links to the talks go to [C 
 ⌘ Read more

​ Read More
In-reply-to » Global update: Trump in Scotland says EU trade deal has 50-50 chance as tariff row grows. Gaza sees 9 more starvation deaths (122 total); UN says famine is deliberate. Thai-Cambodia clashes kill 16, displace 135k. US raid in Syria kills top ISIS leader & sons.

@prologic@twtxt.net what a great world we live in! No wonder they marked this sector unoccupied.

​ Read More

Here’s an example of X11/Xlib being old and archaic.

X11 knows the data type “cardinal”. For example, the window property _NET_WM_ICON (which holds image data for icons) is an array of “cardinal”. I am already not really familiar with that word and I’m assuming that it comes from mathematics:

https://en.wikipedia.org/wiki/Cardinal_number

(It could also be a bird, but probably not: https://en.wikipedia.org/wiki/Cardinalidae)

We would probably call this an “integer” today.

EWMH says that icons are arrays of cardinals and that they’re 32-bit numbers:

https://specifications.freedesktop.org/wm-spec/latest-single/#id-1.6.13

So it’s something like 0x11223344 with 0x11 being the alpha channel, 0x22 is red, and so on.

You would assume that, when you retrieve such an array from the X11 server, you’d get an array of uint32_t, right?

Nope.

Xlib is so old, they use char for 8-bit stuff, short int for 16-bit, and long int for 32-bit:

https://x.org/releases/current/doc/libX11/libX11/libX11.html#Obtaining_and_Changing_Window_Properties

That is congruent with the general C data types, so it does make sense:

https://en.wikipedia.org/wiki/C_data_types

Now the funny thing is, on modern x86_64, the type long int is actually 64 bits wide.

The result is that every pixel in a Pixmap, for example, is twice as large in memory as it would need to be. Just because Xlib uses long int, because uint32_t didn’t exist, yet.

And this is something that I wouldn’t know how to fix without breaking clients.

​ Read More

gomdn: Yet another Static Site Generator
Yet another Static Site Generator (SSG), but this one is mine.

It’s a stupidly simple Go program ( wc says 229 lines), more like a
hack, really, but I don’t need something like Hugo. Most of the real
work is done by the goldmark package, of course. This is mostly just a
wrapper, deciding if something needs to be rebuilt.

I’ve been using a Perl script together with cmark (originally
Markdown.pl) since forever. And before that the old [txt2tags](htt 
 ⌘ Read more

​ Read More

@movq@www.uninformativ.de I fully agree with you on https://www.uninformativ.de/blog/postings/2025-07-22/0/POSTING-en.html!

Although, in the first screenshot, the window title background is much darker in the new version than the old one!1!1 :-P Kidding aside, the contrast in the old one is still better.

Also, note the missing underlines for the Alt hotkeys now. I just think that the underline in the old one is too thick.

​ Read More

Status 2025-07-21
Morning, computer! Spending my days off trying to figure things out.
Some of them will occur in this post. I think best when I’m writing,
after all.

Intro

I’m back from a short vacation since a couple of weeks. I’m still
going to take a few days off every week for a while. I need the break.
It’s been way too many 12-16 hour workdays. I’m nominally working 80%
(~6 hour days), so I figure I’ve been working a lot for free.

Yeah, well, I like the TKey project to succeed. The ideas behind it
have implicatio 
 ⌘ Read more

​ Read More

TKey: The Next Generation
Not speaking for my employer, just as an interested developer in an
interesting open source project.

As you might have noticed, the platform repo of the Tillitis TKey has
some alpha tags for the next generation, Castor:

https://github.com/tillitis/tillitis-key1/tags

An alpha tag means that all planned features for the platform are in
place, but there’s not yet a complete audit and a lot of testing 
 ⌘ Read more

​ Read More
In-reply-to » Something happened with the frame rate of terminal emulators lately. It looks like there’s a trend to run at a high framerate now? I’m not sure exactly. This can be seen in VTE-based terminals like my xiate or XTerm on Wayland. foot and st, on the other hand, are fine.

st tries not to redraw immediately after new data arrives:

https://git.suckless.org/st/file/x.c.html#l1984

The exact timings are configurable.

This is the PR that changed the timing in VTE recently (2023):

https://gitlab.gnome.org/GNOME/vte/-/issues/2678

There is a long discussion. It’s not a trivial problem, especially not in the context of GTK and multiple competing terminal widgets. st dodges all these issues (for various reasons).

​ Read More

The WM_CLASS Property is used on X11 to assign rules to certain windows, e.g. “this is a GIMP window, it should appear on workspace number 16.” It consists of two fields, name and class.

Wayland (or rather, the XDG shell protocol – core Wayland knows nothing about this) only has a single field called app_id.

When you run X11 programs under Wayland, you use XWayland, which is baked into most compositors. Then you have to deal with all three fields.

Some compositors map name to app_id, others map class to app_id, and even others directly expose the original name and class.

Apparently, there is no consensus.

​ Read More
In-reply-to » This aggressive auto-logout on my bank’s website 


@movq@www.uninformativ.de Yeah, it’s a shitshow. MS overconfirms all my prejudices constantly.

Ignoring e-mail after lunch works great, though. :-)

Our timetracking is offline for over a week because of reasons. The responsible bunglers are falling by the skin of their teeth: https://lyse.isobeef.org/tmp/timetracking.png

  1. The error message neither includes the timeframe nor a link to an announcement article.
  2. The HTML page needs to download JS in order to display the fucking error message.
  3. Proper HTTP status codes are clearly only for big losers.
  4. Despite being down, heaps of resources are still fetched.

I find it really fascinating how one can screw up on so many levels. This is developed inhouse, I’m just so glad that we’re not a software engineering company. Oh wait. How embarrassing.

​ Read More

I did a “lecture”/“workshop” about this at work today. 16-bit DOS, real mode. đŸ’Ÿ Pretty cool and the audience (devs and sysadmins) seemed quite interested. đŸ„ł

  • People used the Intel docs to figure out the instruction encodings.
  • Then they wrote a little DOS program that exits with a return code and they used uhex in DOSBox to do that. Yes, we wrote a COM file manually, no Assembler involved. (Many of them had never used DOS before.)
  • DEBUG from FreeDOS was used to single-step through the program, showing what it does.
  • This gets tedious rather quickly, so we switched to SVED from SvarDOS for writing the rest of the program in Assembly language. nasm worked great for us.
  • At the end, we switched to BIOS calls instead of DOS syscalls to demonstrate that the same binary COM file works on another OS. Also a good opportunity to talk about bootloaders a little bit.
  • (I think they even understood the basics of segmentation in the end.)

The 8086 / 16-bit real-mode DOS is a great platform to explain a lot of the fundamentals without having to deal with OS semantics or executable file formats.

Now that was a lot of fun. đŸ„ł It’s very rare that we do something like this, sadly. I love doing this kind of low-level stuff.

​ Read More

Okay, here’s a thing I like about Rust: Returning things as Option and error handling. (Or the more complex Result, but it’s easier to explain with Option.)

fn mydiv(num: f64, denom: f64) -> Option<f64> {
    // (Let’s ignore precision issues for a second.)
    if denom == 0.0 {
        return None;
    } else {
        return Some(num / denom);
    }
}

fn main() {
    // Explicit, verbose version:
    let num: f64 = 123.0;
    let denom: f64 = 456.0;
    let wrapped_res = mydiv(num, denom);
    if wrapped_res.is_some() {
        println!("Unwrapped result: {}", wrapped_res.unwrap());
    }

    // Shorter version using "if let":
    if let Some(res) = mydiv(123.0, 456.0) {
        println!("Here’s a result: {}", res);
    }

    if let Some(res) = mydiv(123.0, 0.0) {
        println!("Huh, we divided by zero? This never happens. {}", res);
    }
}

You can’t divide by zero, so the function returns an “error” in that case. (Option isn’t really used for errors, IIUC, but the basic idea is the same for Result.)

Option is an enum. It can have the value Some or None. In the case of Some, you can attach additional data to the enum. In this case, we are attaching a floating point value.

The caller then has to decide: Is the value None or Some? Did the function succeed or not? If it is Some, the caller can do .unwrap() on this enum to get the inner value (the floating point value). If you do .unwrap() on a None value, the program will panic and die.

The if let version using destructuring is much shorter and, once you got used to it, actually quite nice.

Now the trick is that you must somehow handle these two cases. You must either call something like .unwrap() or do destructuring or something, otherwise you can’t access the attached value at all. As I understand it, it is impossible to just completely ignore error cases. And the compiler enforces it.

(In case of Result, the compiler would warn you if you ignore the return value entirely. So something like doing write() and then ignoring the return value would be caught as well.)

​ Read More
In-reply-to » Come on, why is the bloody IBAN only in the damn HTML part of your e-mail but not in the plain text!? Grrr! Don't you wanna get paid, dealer!? Your new web shop system sucks so bad, I want the old version back.

@kat@yarn.girlonthemoon.xyz Ooh, I’ve got to bookmark that page. 😃

@aelaraji@aelaraji.com I wish I had the luxury of not reading that junk. 😅 But instead, I have a Mutt hotkey that pipes an HTML mail through elinks 
 Bah.

​ Read More
In-reply-to » Fuck me sideways, Rust is so hard. Will we ever be friends?

@prologic@twtxt.net I’m trying to call some libc functions (because the Rust stdlib does not have an equivalent for getpeername(), for example, so I don’t have a choice), so I have to do some FFI stuff and deal with raw pointers and all that, which is very gnarly in Rust – because you’re not supposed to do this. Things like that are trivial in C or even Assembler, but I have not yet understood what Rust does under the hood. How and when does it allocate or free memory 
 is the pointer that I get even still valid by the time I do the libc call? Stuff like that.

I hope that I eventually learn this over time 
 but I get slapped in the face at every step. It’s very frustrating and I’m always this đŸ€ close to giving up (only to try again a year later).

Oh, yeah, yeah, I guess I could “just” use some 3rd party library for this. socket2 gets mentioned a lot in this context. But I don’t want to. I literally need one getpeername() call during the lifetime of my program, I don’t even do the socket(), bind(), listen(), accept() dance, I already have a fully functional file descriptor. Using a library for that is total overkill and I’d rather do it myself. (And look at the version number: 0.5.10. The library is 6 years old but they’re still saying: “Nah, we’re not 1.0 yet, we reserve the right to make breaking changes with every new release.” So many Rust libs are still unstable 
)


 and I could go on and on and on 
 đŸ€Ł

​ Read More

Come on, why is the bloody IBAN only in the damn HTML part of your e-mail but not in the plain text!? Grrr! Don’t you wanna get paid, dealer!? Your new web shop system sucks so bad, I want the old version back.

​ Read More

fn sub(foo: &String) {
    println!("We got this string: [{}]", foo);
}

fn main() {
    // "Hello", 0x00, 0x00, "!"
    let buf: [u8; 8] = [0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x00, 0x00, 0x21];

    // Create a string from the byte array above, interpret as UTF-8, ignore decoding errors.
    let lossy_unicode = String::from_utf8_lossy(&buf).to_string();

    sub(&lossy_unicode);
}

Create a string from a byte array, but the result isn’t a string, it’s a cow 🐼, so you need another to_string() to convert your “string” into a string.

I still have a lot to learn.

(into_owned() instead of to_string() also works and makes more sense to me, it’s just that the compiler suggested to_string() first, which led to this funny example.)

​ Read More

So I was using this function in Rust:

https://doc.rust-lang.org/std/path/struct.Path.html#method.display

Note the little 1.0.0 in the top right corner, which means that this function has been “stable since Rust version 1.0.0”. We’re at 1.87 now, so we’re good.

Then I compiled my program on OpenBSD with Rust 1.86, i.e. just one version behind, but well ahead of 1.0.0.

The compiler said that I was using an unstable library feature.

Turns out, that function internally uses this:

https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.display

And that is only available since Rust 1.87.

How was I supposed to know this? đŸ€šđŸ«©

​ Read More