even our hippest AI enthusiasts found it absolutely terrible
Does this refer to the training course or to the tools themselves? ๐ค
Recent posts from feeds followed by sorenpeter@darch.dk
even our hippest AI enthusiasts found it absolutely terrible
Does this refer to the training course or to the tools themselves? ๐ค
@lyse one my most favourite smells too! I also love the rain. Absolutely love it!
@lyse totally in love with these flowers, and bee!

@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.
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.
@xuu, whatโs going on with yโall up in the mountains? The mouse has been mighty quiet for a while!
@movq "out of morbid curiosityโ LOL. That draw a laugh out of me, so easily! ๐คญ
@lyse 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="?search=include" class="tag">#include</a> <stdint.h>
<a href="?search=include" class="tag">#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.)
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 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโฏ Hmmm doesn't appear to be documented ๐ง Nut ly watch reckons i climbed 242m so yhay part is right!