movq

www.uninformativ.de

No description provided.

In-reply-to » 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.

@lyse@lyse.isobeef.org Those are some very colorful shots. 👌 It was pretty warm here as well, health issues prevented me from going out, though.

(Have we established that Azabache is male? 😃)

⤋ Read More

@klaxzy@klaxzy.net I should cancel Netflix as well. Back when they started their streaming service, it was a revelation: Finally, I could watch interesting shows in English, without having to wait for years, and legally (I like to be a paying customer, if it’s good). But this is long over. The interesting shows are gone or, once again, I have to wait for years until they’re available on Netflix. So, why bother anymore? 🤷‍♀️

⤋ Read More

Another AI rant:

One of the “key features” of LLMs is that you can use “natural language”, because that is supposed to be easier than having to learn a programming language. So, when someone says to me, “I automated this process using AI!”, what they mean is: They have written a very, very large Markdown document. In this document, they list what the AI is supposed to do.

In prose.

This is a complete disaster.

Programming and programming languages have one crucial property: They follow a well-defined structure and every word has a well-defined meaning. That is absolutely brilliant, because I can read this and I can follow the program in my head. I can build a mental model. I can debug this, down to the precise instructions that the CPU executes. This all follows well-defined patterns that you can reason about.

But with these Markdown files, I am completely lost. We lose all these important properties! No debugging, no reasoning about program flow, nothing. It’s all gone. It’s a magic black box now, literally randomized, that may or may not do what you wanted, in some order.

People now throw these Markdown files at me … and … am I supposed to read this? Why? It’s completely random and fuzzy.

Sadly, these AI tools are good enough to be able to mostly grasp the authors intentions. Hence people don’t see the harm they cause, because “it works”.

We already have a ton of automations like this at work: Tickets get piped through an LLM and these Markdown files / prompts determine what will happen with the ticket, and maybe they trigger additional actions as well, like account creation or granting permissions. All based on fuzzy natural language – that no two humans will ever properly agree on.

Jesus Christ, we’re now INTENTIONALLY bringing the ambiguity of legal texts and lawyers into programming.

Using natural language is NOT easier than using a programming language. It is HARDER. Have you people never read a legal contract? And that stuff can STILL be debated in a court room.

I can’t begin to comprehend why we, tech folks, push this so hard. What is wrong with you? Or me?

(And, once again, we’re ignoring other factors here. LLMs use a ton of energy and ressources, that we don’t have to spare. It’s expensive as fuck. It doesn’t even run locally on our servers, meaning we give all these credentials and permissions to some US company. It’s insane.)

⤋ Read More
In-reply-to » @lyse Yes, and that’s why I’m 100% convinced that we’ll see a massive brain drain in a couple of years. This will affect young people even more, because they don’t have all the “old” knowledge to fall back on.

@lyse@lyse.isobeef.org

even our hippest AI enthusiasts found it absolutely terrible

Does this refer to the training course or to the tools themselves? 🤔

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

@lyse@lyse.isobeef.org Yes, and that’s why I’m 100% convinced that we’ll see a massive brain drain in a couple of years. This will affect young people even more, because they don’t have all the “old” knowledge to fall back on.

It’s concerning, I’ve warned about it many times, nobody listens.

I think the best thing one can do is explicitly not use any AI tools but keep your actual skills intact. Might be out of a (good) job for a while, but once this bubble bursts, this is who is going to get hired again. (I think.)

And considering how insanely expensive all this is, I’m still (mostly) convinced that the bubble will actually burst. This stuff just isn’t sustainable.

… or I might be wrong. And if so, I see an even darker future that I don’t want to put into words right now.

⤋ 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 » Eehhh, what the hell is going on here!?

@lyse@lyse.isobeef.org

Disclaimer: Can’t guarantee that I’m fully awake and I’m being trained at work not to use my brain anymore, so maybe this is complete bullshit. 😪🧟‍♀️

It says here that SQLite uses signed integers:

https://sqlite.org/datatype3.html

In pure bits, 1 << 63 would be 0x8000000000000000, but as a signed value, it gets interpreted as -9223372036854775808. Subtracting 1 yields -9223372036854775809 – but that doesn’t fit in 64 bits anymore. It’s possible that SQLite doesn’t want to wrap around but instead saturates? Haven’t checked. 🤔

With 62 bits, there is enough room.

With 1 << 64, I have no idea how SQLite wants to handle this, because this should immediately trigger a warning, because it doesn’t fit right away. Maybe it gets truncated to 0?

sqlite> select printf('0x%x', 2 * (1 << 64));
╭──────────────────────╮
│ printf('0x%x', 2 ... │
╞══════════════════════╡
│ 0x0                  │
╰──────────────────────╯
sqlite> select printf('0x%x', 0 - 1);
╭──────────────────────╮
│ printf('0x%x', 0 ... │
╞══════════════════════╡
│ 0xffffffffffffffff   │
╰──────────────────────╯
sqlite> select printf('0x%x', 0 - 2);
╭──────────────────────╮
│ printf('0x%x', 0 ... │
╞══════════════════════╡
│ 0xfffffffffffffffe   │
╰──────────────────────╯

⤋ Read More
In-reply-to » That's a very interesting thought and I agree: https://benhoyt.com/writings/dependencies/

@lyse@lyse.isobeef.org Indeed. Very unpopular, though. I’ve long given up that fight at work.

In reality, there are too few real incidents. It doesn’t hurt enough. It’s always: “Something could happen!” But we’ve never been hit big time by an attack like this … so I just look like a paranoid idiot.

⤋ Read More
In-reply-to » In case you’re wondering where they are: https://artemistracker.com/

This whole thing was pretty weird, btw. I had no idea it was happening until basically yesterday. No news coverage, nobody mentioned it. 🤔 And suddenly, boom, we’re going to the moon. What? 😅

⤋ Read More
In-reply-to » This year for some reason or another, I decided to purchase an Ocarina, I've been practising a fair bit every now and again, basically during work breaks and sometimes in the afternoon / evenings (not enough to annoy the family 🤣) Anyhoo, that was 3 months ago, since then I've built up a bit of a Repertoire:

@prologic@twtxt.net Nice. 😊 That’s the beauty of a small instrument like that: You can just pick it up, play a little bit, put it back. 👌 (Can’t do that with my stuff. 🤣)

⤋ 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
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 Damn, nice! I know exactly what you mean – the output/screenshot looks trivial, but there’s so much going on behind the scenes. 😃

Did you do the whole dance with BIOS boot and everything?

⤋ Read More
In-reply-to » Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace… :-D Yep, suddenly there went my X…

@lyse@lyse.isobeef.org … I sure hope that they generate these files from the general terminfo database instead of maintaining their own DB. 😳

⤋ Read More
In-reply-to » Some work on the menu system to brighten my mood a little bit. No mouse support yet.

@bender@twtxt.net I’m already using it for tracktivity (meant for tracking activities and events, like weather, food consumption, stuff like that), which is basically a somewhat-fancy CSV editor:

https://movq.de/v/f26eb836ee/s.png

I have a couple of other projects where I could use it, because they are plain curses at the moment. Like, one of them has an “edit box”, but you can’t enter Unicode, because it was too complicated. That would benefit from the framework.

Either way, it’s the most satisfying project in a long time and I’m learning a ton of stuff.

⤋ Read More
In-reply-to » Here am I looking at the different tcell.Key constants and typing different key combinations in the terminal to see the generated tcell.EventKeys in the debug log. Until I pressed Ctrl+Alt+Backspace… :-D Yep, suddenly there went my X…

@lyse@lyse.isobeef.org Unix terminals are quite limited in that regard. 🫤 You know how Ctrl works? The XOR 0x40 thing? And Alt doesn’t exist at all, it’s just a prefixed ESC byte.

I was surprised to see curses knowing about “Shift+Tab”, wondering how that is supposed to work. Well, it’s an escape sequence, of course (depending on the terminal, of course).

⤋ Read More