Searching yarn

Twts matching #62
Sort by: Newest, Oldest, Most Relevant
In-reply-to » Dunno if anyone will find this interesting... But some ~6 months or so ago I experimented briefly with creating a whole bootloader + kernel + userland -- Basically an entire OS in the Mu programming language (which as you know I also designed and created) -- 6 months later I've worked on it some more after spending the last week working on improvements to Mu itself, which is now able to compile itself with its own Mu implemented compiler and now have an os/arch backend called muos/amd64 that boots into a running shell, with a tiny little vfs, UNIX-like semantics, syscalls, read/write, etc. It works pretty nicely, and aside from a small Assembly "nucleus", most of the Kernel and Userspace is written in Mu.

I just taught the scc SLOC tool I use how to detect and recognize the Mu programming language. So itโ€™s actually a bit worse than your estimate. Itโ€™s more like ~60/30 at the moment:

>>> mu = 1445
>>> asm = 2365
>>> T = mu + asm
>>> mu / T * 100
37.9265091863517
>>> asm / T * 100
62.07349081364829

โค‹ 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

Eehhh, what the hell is going on here!?

SELECT
    printf("0x%x", (1 << 63) - 2),
    printf("0x%x", (1 << 63) - 1),
    printf("0x%x",  1 << 63     ),
    printf("0x%x", (1 << 63) + 1),
    printf("0x%x", (1 << 63) + 2)

SQLite yields:

0x8000000000000000 (instead of 0x7ffffffffffffffe)
0x8000000000000000 (instead of 0x7fffffffffffffff)
0x8000000000000000 (correct)
0x8000000000000001 (correct)
0x8000000000000002 (correct)

Huh!? O_o Am I stupid? What am I missing here? Or is this actually a bug? :-?

With 62 bits, everything is spot on:

0x3ffffffffffffffe
0x3fffffffffffffff
0x4000000000000000
0x4000000000000001
0x4000000000000002

And 64 bits rather unsurprisingly also yield:

0xfffffffffffffffe
0xffffffffffffffff
0x0
0x1
0x2

โค‹ Read More

reviewing logs this morning and found i have been spammed hard by bots not respecting the robots.txt file. only noticed it because the OpenAI bot was hitting me with a lot of nonsensical requests. here is the list from last month:

i have placed some middleware to reject these for now but it is not a full proof solution.

โค‹ Read More

Hmm:

42 75 69 6C 64 20 77 68 61 74 20 6D 61 6B 65 73 20 79 6F 75 20 68 61 70 70 79 2E 20 4C 65 74 20 6D 69 73 65 72 61 62 6C 65 20 70 65 6F 70 6C 65 20 62 75 69 6C 64 20 74 68 65 20 72 65 73 74 2E

โค‹ Read More