Searching yarn

Twts matching #C
Sort by: Newest, Oldest, Most Relevant

My mate and I hiked some 16-18 kilometers to the Wasserberg. The 22°C sun was beating down hard on us. There were quite a bunch of clouds all around, but none of them casted the tiniest shade on us. Only in the second half we got a little bit luckier in that regard. Still, we were soaked before we even left town. Hardly any breeze.

Unfortunately, I left my camera at home and found it hidden behind the cettle in the kitchen after searching the entire house for some 15 odd minutes. However, a greenfinch paid me a visit this morning and I got it on camera. The sunset was crazy colored, too:

https://lyse.isobeef.org/gruenfink-2026-04-18/

⤋ Read More

The weathermen just cannot be right with their 20°C today, it must have been more. It was awfully hot, the light breeze was not enough and even absent most of the time. In the shade, it was alright. Other than that, the walk to the dairy farm and back was really beautiful. Very lovely scenery.

Somebody spilled their paintbox at sunset. Unfortunately, I missed to reinsert the SD card into my camera, so I could not take more photos of Azabache and his new mate. They quickly disappeared. He even landed right next to my window, so that would have been a killer shot.

https://lyse.isobeef.org/waldspaziergang-2026-04-17/

⤋ Read More

We cleaned up the forest today with the scouts at absolute dream weather. Blue sky, no clouds, 19°C sunshine. In the morning it was still quite chilly and windy, though. We didn’t find anything spectacular, maybe a rubber dinghy, three car tires and a broken ratchet strap are the most outstanding things to me apart from all the general rubbish, cigarettes, glass, wet wipes, etc. Still, a very fun activity. In the end we had bockwurst, grilled cheese and lye buns on the camp fire.

I then went for a quick stroll with my mate. It’s crazy how quickly the clouds moved in, 30-45 minutes tops. There will be rain in an hour. And the coming days only reach half the temps. I’m glad I took advantage of the great spring day. Haven’t seen Azabache yet and with the rain on deck, the odds are against him and me.

https://lyse.isobeef.org/waldspaziergang-2026-04-11/

⤋ Read More
In-reply-to » Eehhh, what the hell is going on here!?

@lyse@lyse.isobeef.org AI result ahead, feel free to ignore.

I “asked” the AI at work the same question out of morbid curiousity. It “said” that SQLite converts that integer to floating point internally on overflows and then, when converting back, the x86 instruction cvttsd2si will turn it into 0x8000000000000000, even if the actual floating point value is outside of that range. So, yes, it allegedly actually saturates, as a side effect of the type conversion.

I couldn’t find anything about that automatic conversion in SQLite’s manual, yet, but an experiment looks like it might be true:

sqlite> select typeof(1 << 63);
╭─────────────────╮
│ typeof(1 << 63) │
╞═════════════════╡
│ integer         │
╰─────────────────╯

sqlite> select typeof((1 << 63) - 1);
╭──────────────────────╮
│ typeof((1 << 63) ... │
╞══════════════════════╡
│ real                 │
╰──────────────────────╯

As for cvttsd2si, this source confirms the handling of 0x8000000000000000 on range errors: https://www.felixcloutier.com/x86/cvttsd2si

The following C program also confirms it (run through gdb to see cvttsd2si in action):

<a href="https://yarn.girlonthemoon.xyz/search?q=%23include">#include</a> <stdint.h>
<a href="https://yarn.girlonthemoon.xyz/search?q=%23include">#include</a> <stdio.h>

int
main()
{
    int64_t i;
    double d;

    /* -3000 instead of -1, because `double` can’t represent a
     * difference of -1 at this scale. */
    d = -9223372036854775808.0 - 3000;

    i = d;
    printf("%lf, 0x%lx, %ld\n", d, i, i);

    return 0;
}

(Remark about AI usage: Fine, I got an answer and maybe it’s even correct. But doing this completely ruined it for me. It would have been much more satisfying to figure this out myself. I actually suspected some floating point stuff going on here, but instead of verifying this myself I reached for the unethical tool and denied myself a little bit of fun at the weekend. Won’t do that again.)

⤋ Read More
In-reply-to » It's blackbird time again! https://lyse.isobeef.org/amsel-2026-03-29/

I called it quits a bit earlier and enjoyed the sunny 19°C blue sky in nature. I just sat an entire hour on a bench (12) near a habitat (07) and enjoyed the sun rays and singing birds around me. When I returned, the batteries were almost drained. The sunset finished them off, so that I could not record Azabache’s concert shortly after. However, I saw that amazing bird this morning and got him on film. Enjoy!

https://lyse.isobeef.org/waldspaziergang-2026-04-08/

⤋ Read More
In-reply-to » It's blackbird time again! https://lyse.isobeef.org/amsel-2026-03-29/

Thank you, @bender@twtxt.net!

My mate and I took advantage of the public holiday and went on a hike. At first, the 14°C and only slight wind weren’t all that terrible, especially since there were only a few clouds. Later, the sun got covered more and more and also the wind picked up. I was really glad that I brought my jacket along. In the beginning I was contemplating about leaving it at home, but then still wore it and stripped it a few minutes into the trip. It was very windy at the summit, so for our second lunch break wearing it was an absolute must. It was a very beautiful trip and I enjoyed my mate’s company.

Finally, Azabache showed up, too. I didn’t bother videoing with all the wind. Didn’t feel like fixing the audio. Maybe tomorrow.

https://lyse.isobeef.org/waldspaziergang-2026-04-03/

⤋ Read More
In-reply-to » It's blackbird time again! https://lyse.isobeef.org/amsel-2026-03-29/

Azabache returned just a few minutes later when the sparrow or great/blue tit was gone. Next time I will use a tripod to record the video. Also sorry about the sound, I used all my Audacity skills to remove the noise, but somehow, combining the video and audio track in kdenlive somehow messed up the sound. There’s some horrible sqealing towards the beginning.

The sun was out and tricked everybody to believe it’s nice and warm. However, with the wind, the 11°C felt way colder. Still, super nice out there, I enjoyed it a lot. The quick trip to the dairy farm took me more than double the regular time, because I took close to 400 photos. Oh boy, Lyse is such an idiot!

https://lyse.isobeef.org/waldspaziergang-2026-04-02/

⤋ Read More

@rdlmda@rdlmda.me most of our conversations used to be about twtxt, I am not going to lie. Lately? Not so much. It turns out (a) we don’t need a longer hash, (b) we don’t care so much about changing addressing, and © I am just Bender, what else can I say? :-D :-P

⤋ Read More
In-reply-to » @lyse oh wow! That 10, with ice stuck in it. Those flowers rock! They remind me of "Stardust" (movie).

@bender@twtxt.net Holy cow, I didn’t notice the ice! :-O Thanks for pointing that out! I was just after the bee. :-)

33°C down to 3°C, wow. O_o What a drop. But it raises again dramatically during day, right?

⤋ Read More

@movq@www.uninformativ.de I’ve got the same problem that you had the other day: finding past temperature data. But yeah, it looked much warmer than it actually was. Maybe 5°C? Possibly less when I found myself in the snow- and rainstorm in the end.

With the wind, my fingers were frozen. I should have worn gloves. Without them, I could only put my hands in the pockets of my jacket. That didn’t help much, though, because I frequently stopped to take yet another photo, so they cooled off again right away. :-D

Balancing the big/long, closed umbrella under my arm while I had my hands burried was also a little tricky.

First world problems. :-)

⤋ Read More

@movq@www.uninformativ.de Oh, so just half a millimeter then! :-D That’s plenty these days for everything to shut down, I’m afraid. If only the same élan was still in action as back then:

https://3.bp.blogspot.com/_5wOW9jdbdvM/TEVVi8ZsMWI/AAAAAAAAALU/vVqvnZ1mzGQ/s1600/Bahn+Werbung+-+alle+reden+vom+Wetter.JPG

And here I am watching Mattias Björnström’s gas pedal freezing at full throttle around -40°C. Well, falls apart and gets stuck.

https://www.youtube.com/watch?v=MLgmV15XeSY

I’m not an expert on this subject at all, but I reckon an automatic in addition with all its sensors is much worse than a manual one. All wheel drive, studded tires and diff locked is what one wants in icy situations. :-D

⤋ Read More
In-reply-to » Just showelled 20cm of snow for half an hour, fuck me! I'm totally shattered. But it's worth it. Looks so beautiful. And all the disbelief and terror in the eyes of the people. Well, that's what our winters were like three decades ago. I'm just glad that I can work from home.

I’ve got sore muscles. The sticky snow couldn’t be pushed, it had to be laborously cleared shovel by shovel. :-D

In my lunch break, I went on a short stroll. Oh boy, walking through deep damp snow is exhausting! There were sections with easily 30 centimeters and more. Some big wind drifts had piled up. Despite melting off quickly in the 4°C, especially turning the trees brown again, the white landscape still looks so nice. I’m glad these road marking sticks finally came in handy for the snow plow guys. :-) The black and orange stripes are 30 cm high.

https://lyse.isobeef.org/waldspaziergang-2026-01-26/

That’s probably it. There’s no significant snowfall announced for the rest of the week and temperatures are supposed to stay in the 2-4°C range by day.

⤋ Read More

@movq@www.uninformativ.de I was also extremely surprised and couldn’t believe it myself. But around the hair were definitely two, three millimeters of ice with a bunch of snow on top. I couldn’t simply brush it off, the hair were all frozen together. Back in the house, it took maybe three minutes to melt the solidified white stuff and free up and disconnect the individual hair. Crazy.

Yeah, 0°C in town, maybe -2°C on the summit. It definitely didn’t feel all the cold, but I came prepared with a few layers of cloth.

⤋ Read More

What a beautiful, beautiful 0°C Sunday arvo and evening! The weather forecast delayed the snow by the minute. An hour or so after it finally started very, very lightly, I headed off for the woods to check out the lake again. Unfortunately, with the fresh snow layer, the crazy wild surface texture of the ice sheet wasn’t visible anymore. But it brought some other nice views and photo opportunities.

I initially thought that I just go for a quick turn. However, with the snowfall a wee bit increasing I was hooked and kept going. Visibility was poor, but the snow blankets just looked too stunning. The road surfaces were quite slippery, so I often just walked alongside the pathways. On downhill slopes I had some good fun sliding down the road on my feet. With varying success. Luckily, I managed not to fall.

On the summit of the mountain the twigs had those absolutely magnificently looking windblown crystal coverings. Awwwwwww! They never get old. It was already getting dark, so the camera was tired and wanted to sleep. The snow program then made use of the flash and I’m quite pleased with how these shots turned out.

Two deer crossed the road in front of me and ran into the woods, that was sight for sore eyes. Although I felt bad that they had to flee from me in this white terrain. By the time I got home, the snow had accumulated around eight centimeters in height, even in town down in the valley. Walking on this fresh snow is just amazing. And I love the sound it makes. Today, the snow consistency must have been just right, because the crushing sound was really loud.

I cannot recall that I had frozen hair and beard before, but today, there was a thick ice buildup. In case I had, it was definitely never this much. Felt really cool.

Enough of this preliminary skirmishing, there ya go: https://lyse.isobeef.org/waldspaziergang-2026-01-25/

⤋ Read More

My mate and I went on a hike earlier. Yesterday, we had lovely 12°C. But today, it was down to at most 4°C. Oh well. At least the sun was out and and there was just a tiny bit of wind. We knew upfont that scarf, beanie and gloves were mandatory. Especially at the more windy sections like up top the hills. The view was absolutely terrible, but we made the best of it.

With the sun shining on us during our lunch break at a forest edge bench, we still enjoyed the lookout in 01. I brought some old carpet scraps to sit on and was happily surprised that they isolated even better than I had hoped for. Some hot tea helped us staying warm.

After five hours we returned just after sunset. I’m quite tired now, completely out of shape.

https://lyse.isobeef.org/waldspaziergang-2026-01-17/

⤋ Read More
In-reply-to » Btw @movq you've inspired me to try and have a good 'ol crack at writing a bootloader, stage1 and customer microkernel (µKernel) that will eventually load up a Mu (µ) program and run it! 🤣 I will teach Mu (µ) to have a ./bin/mu -B -o ... -p muos/amd64 ... target.

@prologic@twtxt.net I’d love to take a look at the code. 😅

I’m kind of curious to know how much Assembly I need vs. How much of a microkernel can I build purely in Mu (µ)? 🤔

Can’t really answer that, because I only made a working kernel for 16-bit real mode yet. That is 99% C, though, only syscall entry points are Assembly. (The OpenWatcom compiler provides C wrappers for triggering software interrupts, which makes things easier.)

But in long mode? No idea yet. 😅 At least changing the page tables will require a tiny little bit of Assembly.

⤋ Read More

Vacation: Doing crazy things like C on DOS, lots of Rust, bare-metal assembly code, everything is fine.

Back at work: How the fuck do I move an email in this web mail program? Am I stupid? 😮‍💨

⤋ Read More
In-reply-to » I came across this on "Why Is SQLite Coded In C", which I found interesting:

@bender@twtxt.net They’re not completely impossible, but C makes it much easier to run into them. I think the key point is that in those “safe” languages, buffer overflows are caught and immediately crash the program (if not handled otherwise) instead of silently corrupting memory, not being noticed right away and maybe only later crashing at a different location, where it can be very hard to find the actual root cause. This is a big improvement in my book.

Some programmers are indeed horrible. I’m guilty myself. :-)

I like the article.

⤋ Read More

I came across this on “Why Is SQLite Coded In C”, which I found interesting:

“There has lately been a lot of interest in “safe” programming languages like Rust or Go in which it is impossible, or is at least difficult, to make common programming errors like memory leaks or array overruns.”

If that’s true, then encountering those issues means the programmer is, simply, horrible?

⤋ Read More

Mu (µ) is now getting much closer to where I want it to be, it now has:

  • A process stdlib module (very basic, but it works)
  • An ffi stdob module that supports dlopen / dlsym and calling C functions with a nice mu-esque wrapper ffi.fn(...)
  • A sqlite stdlib module (also very basic) that shows off the FFI capabilities

😅

⤋ Read More
In-reply-to » @movq That's cool! I also like the name of your library. :-) I assume you made the thing load quickly, didn't you?

The baseline here is about 55 ms for nothing, btw. Python ain’t fast to start up.

$ time python -c 'exit(0)'

real    0m0.055s
user    0m0.046s
sys     0m0.007s

⤋ Read More

My little toy operating system from last year runs in 16-bit Real Mode (like DOS). Since I’ve recently figured out how to switch to 64-bit Long Mode right after BIOS boot, I now have a little program that performs this switch on my toy OS. It will load and run any x86-64 program, assuming it’s freestanding, a flat binary, and small enough (< 128 KiB code, only uses the first 2 MiB of memory).

Here I’m running a little C program (compiled using normal GCC, no Watcom trickery):

https://movq.de/v/b27ced6dcb/los86%2D64.mp4

https://movq.de/v/b27ced6dcb/c.png

Next steps could include:

  • Use Rust instead of C for that 64-bit program?
  • Provide interrupt service routines. (At the moment, it just keeps interrupts disabled.)

⤋ Read More
In-reply-to » Advent of Code 2025 starts tomorrow. 🥳🎄

I rewrote all my solutions in Rust (except for day 10 part 2) and these are the runtimes on my i7-3770 from 2013 (this measures CLOCK_PROCESS_CPUTIME_ID, not wallclock):

day01/1 [      00.000501311] Result: 1066
day01/2 [      00.000400298] Result: 6223
day02/1 [      00.000358848] Result: 12586854255
day02/2 [      00.000750711] Result: 17298174201
day03/1 [      00.000106537] Result: 17405
day03/2 [      00.000404632] Result: 171990312704598
day04/1 [      00.000257517] Result: 1626
day04/2 [      00.007495342] Result: 9173
day05/1 [      00.000237212] Result: 505
day05/2 [      00.000142731] Result: 344423158480189
day06/1 [      00.000229629] Result: 4076006202939
day06/2 [      00.000279552] Result: 7903168391557
day07/1 [      00.000204422] Result: 1622
day07/2 [      00.000283816] Result: 10357305916520
day08/1 [      00.029427421] Result: 84968
day08/2 [      00.028089859] Result: 8663467782
day09/1 [      00.000310304] Result: 4764078684
day09/2 [      00.015512554] Result: 1652344888
day10/1 [      00.000796663] Result: 375
day10/2 [      --.---------] Result: 15377 (Z3)
day11/1 [      00.000416804] Result: 753
day11/2 [      00.000660528] Result: 450854305019580
day12/1 [      00.000336081] Result: 577
day12/2 [      00.000000695] Result: no part 2

A little under 90 ms total.

On my Samsung NC10 netbook from 2011 with its Intel Atom N455 at 1.6 GHz:

day01/1 [      00.003771326] Result: 1066
day01/2 [      00.003267317] Result: 6223
day02/1 [      00.003902698] Result: 12586854255
day02/2 [      00.006659479] Result: 17298174201
day03/1 [      00.000747544] Result: 17405
day03/2 [      00.002737587] Result: 171990312704598
day04/1 [      00.001263892] Result: 1626
day04/2 [      00.044985301] Result: 9173
day05/1 [      00.001696761] Result: 505
day05/2 [      00.000978962] Result: 344423158480189
day06/1 [      00.001387660] Result: 4076006202939
day06/2 [      00.001734248] Result: 7903168391557
day07/1 [      00.001295528] Result: 1622
day07/2 [      00.001809659] Result: 10357305916520
day08/1 [      00.277251443] Result: 84968
day08/2 [      00.284359332] Result: 8663467782
day09/1 [      00.003152407] Result: 4764078684
day09/2 [      00.071123459] Result: 1652344888
day10/1 [      00.005279527] Result: 375
day10/2 [      --.---------] Result: 15377 (Z3)
day11/1 [      00.003273342] Result: 753
day11/2 [      00.005139719] Result: 450854305019580
day12/1 [      00.002857552] Result: 577
day12/2 [      00.000004421] Result: no part 2

A little over 700 ms total.

I like this. You get performance that’s more or less in the ballpark of C, but without the footguns.

⤋ Read More

Day 7 was pretty tough, I initially ended up implementing an exponential in both time and memory solution that I killed because it was eating all the resources on my Mac Studio, and this poor little machine only has 32GB of memory (I stopped it at 118GB of memory, swapping badly!), This is what I ended up doing before/after:

  • Before: Time O(2^k · L), memory O(2^k), where k is the number of splitters along a reachable path and L is path length. Exponential in k.
  • After: Time O(R·C) (or O(R·C + s) with s split events), memory O©, where R = rows, C = columns. Polynomial/linear in grid size.

⤋ Read More

Awk to take lines from Plan 9’s /lib/unicode and prepend the actual glyph and a tab: awk ‘{cmd=sprintf(“unicode %s”, $1); cmd | getline c; printf(“%s %s\n”, c, $0)}’

⤋ Read More
In-reply-to » Advent of Code 2025 starts tomorrow. 🥳🎄

FWIW, day 03 and day 04 where solved on SuSE Linux 6.4:

https://movq.de/v/faaa3c9567/day03.jpg

https://movq.de/v/faaa3c9567/day04%2Dv3.jpg

Performance really is an issue. Anything is fast on a modern machine with modern Python. But that old stuff, oof, it takes a while … 😅

Should have used C or Java. 🤪 Well, maybe I do have to fall back on that for later puzzles. We’ll see.

⤋ Read More
In-reply-to » Alright, this yarnd installation has been properly fixed.

cat /etc/mokou/yarnd.conf
exec=/usr/pkg/sbin/daemonize -c/var/db/yarnd -u www -p /var/run/yarnd.pid /usr/pkg/sbin/chpst -e /usr/local/etc/yarnd /usr/local/sbin/yarnd -b 127.0.0.1:[classified information]

I know this might seem a bit overengineered, but the previous command until now had the secrets exposed on the process list

⤋ Read More

Fark me 🤦‍♂️ I woke up quite late today (after a long night helping/assisting with a Mainframe migration last night fork work) to abusive traffic and my alerts going off. The impact? My pod (twtxt.net) was being hammered by something at a request rate of 30 req/s (there are global rate limits in place, but still…). The culprit? Turned out to be a particular IP 43.134.51.191 and after looking into who own s that IP I discovered it was yet-another-bad-customer-or-whatever from Tencent, so that entire network (ASN) is now blocked from my Edge:

+# Who: Tentcent
+# Why: Bad Bots
+132203

Total damage?

$ caddy-log-formatter twtxt.net.log | cut -f 1 -d  ' ' | sort | uniq -c | sort -r -n -k 1 | head -n 5
  61371 43.134.51.191
    402 159.196.9.199
    121 45.77.238.240
      8 106.200.1.116
      6 104.250.53.138

61k reqs over an hour or so (before I noticed), bunch of CPU time burned, and useless waste of my fucking time.

⤋ Read More

I had no meetings this arvo, so I made an appointment with the woods in my extended lunch break. The 6°C warm sun was out all day long and there was only a very light breeze. So, a very nice autumn day.

When I stopped to take a photo in the forest, a deer behind me took off into the woodland. I didn’t see it before. Also, I came across one or the other clearing. Sadly, it’s all commercial timberland here. Luckily, in a year or so, when nature slowly took over and reclaimed some spots, the apocalyptic sites are then looking a bit more decent again.

Cleaning of the ruin walls on my backyard mountain slowly takes shape. They made some progress and moved on to the other section. The flag on top is halfway disintegrated again, all the yellow half is completely gone. I’m wondering if they just stop replacing it at some point in time. But probably not.

Enjoy! https://lyse.isobeef.org/waldspaziergang-2025-11-19/

⤋ Read More
In-reply-to » FTR, I see one (two) issues with PyQt6, sadly:

@movq@www.uninformativ.de I think I now remember having similar problems back then. I’m pretty sure I typically consulted the Qt C++ documentation and only very rarely looked at the Python one. It was easy enough to translate the C++ code to Python.

Yeah, the GIL can be problematic at times. I’m glad it wasn’t an issue for my application.

⤋ Read More
In-reply-to » There are no really good GUI toolkits for Linux, are there?

FTR, I see one (two) issues with PyQt6, sadly:

  1. The PyQt6 docs appear to be mostly auto-generated from the C++ docs. And they contain many errors or broken examples (due to the auto-conversion). I found this relatively unpleasent to work with.
  2. (Until Python finally gets rid of the Global Interpreter Lock properly, it’s not really suited for GUI programs anyway – in my opinion. You can’t offload anything to a second thread, because the whole program is still single-threaded. This would have made my fractal rendering program impossible, for example.)

⤋ Read More

Design trends I think will take off in 2026
but tierlist

S - move from flat design to more detailed, 3D, more complex logos.

A - glass, not just liquid, Windows Vista, 7, 11,… accessibility concerns, but I like to see it.

B-/C+ - black and white icons, favicons. I did it before it was cool, but it’s getting overused.

E - gradientslop, barely started, already all blends together.

⤋ Read More
In-reply-to » There are no really good GUI toolkits for Linux, are there?

@movq@www.uninformativ.de Yeah, give it a shot. At worst you know that you have to continue your quest. :-)

Fun fact, during a semester break I was actually a little bored, so I just started reading the Qt documentation. I didn’t plan on using Qt for anything, though. I only looked at the docs because they were on my bucket list for some reason. Qt was probably recommended to me and coming from KDE myself, that was motivation enough to look at the docs just for fun.

The more I read, the more hooked I got. The documentation was extremely well written, something I’ve never seen before. The structure was very well thought out and I got the impression that I understood what the people thought when they actually designed Qt.

A few days in I decided to actually give it a real try. Having never done anything in C++ before, I quickly realized that this endeavor won’t succeed. I simply couldn’t get it going. But I found the Qt bindings for Python, so that was a new boost. And quickly after, I discovered that there were even KDE bindings for Python in my package manager, so I immediately switched to them as that integrated into my KDE desktop even nicer.

I used the Python KDE bindings for one larger project, a planning software for a summer camp that we used several years. It’s main feature was to see who is available to do an activity. In the past, that was done on a large sheet of paper, but people got assigned two activities at the same time or weren’t assigned at all. So, by showing people in yellow (free), green (one activity assigned) and red (overbooked), this sped up and improved the planning process.

Another core feature was to generate personalized time tables (just like back in school) and a dedicated view for the morning meeting on site.

It was extended over the years with all sorts of stuff. E.g. I then implemented a warning if all the custodians of an activitiy with kids were underage to satisfy new the guidelines that there should be somebody of age.

Just before the pandemic I started to even add support for personalized live views on phones or tablets during the planning process (with web sockets, though). This way, people could see their own schedule or independently check at which day an activity takes place etc. For these side quests, they don’t have to check the large matrix on the projector. But the project died there.

Here’s a screenshot from one of the main views: https://lyse.isobeef.org/tmp/k3man.png

This Python+Qt rewrite replaced and improved the Java+Swing predecessor.

⤋ Read More
In-reply-to » There are no really good GUI toolkits for Linux, are there?

@movq@www.uninformativ.de Don’t you worry, this was meant as a joke. :-D

There was a time when I thought that Swing was actually really good. But having done some Qt/KDE later, I realized how much better that was. That were the late KDE 3 and early KDE 4 days, though. Not sure how it is today. But back then it felt Trolltech and the KDE folks put a hell lot more thought into their stuff. I was pleasantly surprised how natural it appeared and all the bits played together. Sure, there were the odd ends, but the overall design was a lot better in my opinion.

To be fair, I never used it from C++, always the Python bindings, which were considerably more comfortable (just alone the possibility to specify most attributes right away as kwargs in the constructor instead of calling tons of setters). And QtJambi, the Java binding, was also relatively nice. I never did a real project though, just played around with the latter.

⤋ Read More
In-reply-to » That was a very non-fun day at work.

@movq@www.uninformativ.de Yeah, this is similar to my 2025 GWM Cannon Ute (truck) that we recently bought. It has this app called the “GWM App” that lets you view various health/stats of the vehicle, open/close the door, locks, control the A/C etc, all from your Mobile Phone. – But… Guess what?! :D It has a goddamn fucking SIM card in the head unit (dash) somewhere that once you “consent” and agree it signs up to some god knows what local cellular service and all that wonderul functionality is controlled by, guess what… A fucking goddamn CLOUD service! da actual flying fuck is wrong with these people?! – Are we some of the only people in the world that realize how fucking dumb all this Internet-connect shit™ really is?

⤋ 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