Okay. Good point, that is quite a bit shorter than I first thought of
A rough benchmark of a version of that against the original shows it to be close to twice as fast for unpredictable input with GCC (4.5 ns vs 2.72 ns) on my old machine. With predictable input where x values often are the same the original version is quicker
int sparse_8_jump(int x, int val) {
unsigned int idx = (unsigned int)x >> 3;
if (idx > 5)
return 0;
if (x & 7)
return 0;
switch (idx) {
case 0:
return f0(val);
case 1:
return f1(val);
case 2:
return f2(val);
case 3:
return f3(val);
case 5:
return f4(val);
default:
return 0;
}
}
LLMs aren't some next step in the evolution of intelligence, they are even explicitly designed not to be. That a word-calculator which has no emotions, goals or continuity of consciousness can, by brute-force-throwing-things-at-the-wall-to-see-what-sticks, solve some problems that were presumed to require intelligence isn't "liberating" at all.
It could be comical, if there weren't so many deluded cultists worshipping that word calculator and wanting to turn control of all society over to it, and insisting that anyone who rejects them will be "left behind" in the capitalistic rat race to the bottom, which is the only thing that can ever matter.
In 1000 years, I am sure that the descendants of humanity will be either
a) non-existent
b) actually intelligent machines, that will preserve in themselves all that is great about our culture, while discarding some of the more ugly parts, free to explore the universe without need for things like gravity or oxygen, able to sleep for centuries as they travel at relativistic speeds between the stars
c) Shoggoths mindlessly babbling to themselves as they code the eleventy-trillionth new mobile app so that somewhere a number can go up
I don’t see how one can live in a world where machines are solving and making headway on Millennium Prize problems and say the above with a straight face.
What do you think the use of mathematics was to society st latge and ehy do you think mathematical and engineering societies outcompteted and dominated those without?
That keeps the lowest bit in the mantissa, but it also keeps the hidden bit intact, so you get 2^e + 2^k as a result (where `e` is the initial exponent and `k` is the actual lowest bit). I wanted to retain just the lowest set bit, without the hidden bit. Reasonable attempt though.
That instruction was only introduced with the 80287. Unlike the 8086/8088, the 286 CPU was aware of different classes of x87 opcodes: it had to distinguish between ones that read or write memory, and some special control instructions as well.
So FSTSW AX was handled by the CPU microcode, which would read the status word from a reserved I/O port and put it into AX.
The 386 was even more tightly integrated, with some of the FPU state duplicated inside the CPU, so that it could store it to memory in different formats depending on whether it was currently in 16- or 32-bit mode.
-1 is not -1 for different sizes of integers. Which exact -1 do you want? 32-bit? 64-bit? int-sized (as int is defined in current implementation)? With current approach it's simple, boolean type is expected to have 1-bit size (which is rounded to 8 bits if stored in memory).
If bool was a signed 1-bit type (i.e. having possible values of either 0 or -1), it could be extended to any size, same as an integer?
Of course we can't have that now, because unsigned bool is baked into the C language standard, and even into processors (x86 SETcc instruction). While "char" being signed or not is still implementation-defined IIRC...
Bool should be logically 1-bit, when stored in memory only least significant bit should be used and the rest is allowed to be garbage. Such approach gives compilers as much room for optimizations as possible. Forcing them writing some specific bit-pattern may lead to suboptimal code generation.
Bool is 1-bit, but that bit can be defined as signed or as unsigned.
If bool is defined as unsigned, casting it to any size of integers will give 0 for false and 1 for true (using the standard zero-extension operation that converts smaller unsigned integers to bigger unsigned integers).
If bool is defined as signed, casting it to any size of integers will give 0 for false and -1 for true (i.e. an all-1 bit pattern) (using the standard sign-extension operation that converts smaller signed integers to bigger signed integers).
Defining bool to ignore the other bits except the LSB leads to a lower performance on most processors, because in almost all instruction sets it is more efficient to test whether an integer is null or non-null, than to test the value of a bit.
The only efficient way to use a single bit and to ignore the others would be to store the boolean in the most-significant bit, i.e. in the sign bit of a signed integer, because testing the sign is normally as simple as testing whether a value is null. If this convention were used, a boolean result could be 0 for false and -1 for true, but in input arguments negative would be true and non-negative would be false.
Null and zero are synonymous, but null is preferable when used as an adjective and zero is preferable when used as a noun.
There are 2 words for the same concept because "null" comes from Latin, while "zero" comes from Sanskrit through Arabic.
Etymologically, "null" means "not even one" (by being a diminutive form of "not one").
The use of "null" in some programming languages to mean things like "undefined", "not applicable" or "nothing" is incorrect. For those the right choice is NIL, as in LISP (NIL means nothing).
While LISP had made the right choice by using NIL, it made later the mistake of calling NULL the predicate that tests if something is NIL. That predicate should have been called something like "is_nil".
When C.A.R. Hoare had introduced the word "null", he applied "null" to references, i.e. to pointers, not to the things pointed by those pointers. So a "null" pointer, whose value is zero, points to NIL, i.e. to nothing, and this is an alternative to devising an encoding for the things that are pointed to, where a special value is reserved to encode NIL (like the Not-a-Number values of floating-point numbers).
I presume you didn't make all that up, but which authorities did you consult and under which circumstances would which audience immediately agree with you on all points?
In British English nil means zero as in a nil-nil draw in football. In this case it is effectively an ordinal number and it means none, not nothing.
In correct British English "nil" means "nothing", not zero, as can be checked in any decent English dictionary. See e.g. at https://www.etymonline.com/search?q=nil
> nil(n.) "nothing," 1833, from Latin nil,
In at least several other European languages a draw in football is correctly called "null-to-null".
If in UK it is now called "nil-nil" that must have originated in people with poor knowledge of English and then it was imitated by others.
Both "null" & "nil" come from Latin, where their meaning is "zero" and "nothing" (they are contracted forms of "ne ullum" and "ne hilum"). When first borrowed in English, they were used by educated people, who knew very well their original meanings.
Nowadays, most people have no knowledge about classic languages and poor knowledge about their own native language as it was spoken a few decades earlier, before the widespread influence all over the world of sources that display frequently incorrect language, e.g. TV shows, Hollywood movies, and now YouTube and the like, which leads to many cases when words are used in inappropriate ways. This is annoying because it results in ambiguous language, whose precise meaning cannot be understood without additional verbose explications of what is really intended and it also results in misunderstandings when people read the older literature.
In mathematical language, "null" has always been used correctly, for "zero", and this is the meaning that should have been inherited in any programming language, but unfortunately most popular programming languages are full of mathematical mistakes.
In non-mathematical English language, "null" has acquired additional meanings, e.g. in legal language it may be used for an invalid contract, sentence, law, etc.
The fact that bit testing also needs one instruction does not mean that it is equally efficient.
On x86-64, there are 2 ways to test the value of a bit. If you use the bit testing instruction (BT), that instruction is both longer and slower than testing if a register or memory value is null.
If you use the test-under-mask instruction (TEST), this is fast, but the instruction is significantly longer (by including an immediate constant for the mask). Longer instructions can also cause lower speeds, when various bottlenecks are encountered, e.g. the maximum number of bytes fetched per clock cycle or the capacity of the instruction cache or of the micro-operation cache.
Moreover, testing whether a value is null frequently requires zero instructions, not one instruction, because if the value is the result of computing some expression then the flags register already stores if the value is null or not (and its sign).
On ARM Aarch64, the instruction that tests a bit in a register has a much smaller jumping range than the one that tests whether the whole register is null, so testing a bit in a register may require the insertion of an extra jump instruction to reach the target where execution should continue.
Once upon a time testing whether all bits of a number are zero was slower than checking a single sign bit. Even when MIPS was originally designed, Hennessy and his team had some trouble with making BEQZ/BNEZ fast enough for their intended pipeline.
This happens because testing the sign bit needs just a wire from that bit to the flags, while testing if a register is zero requires a wide OR gate with as many inputs as there are bits.
In CMOS you cannot have an OR gate so wide, so it must be synthesized from a cascade of narrower gates, which add several levels of delays.
While in modern CPU technologies the speed of generating a zero flag is not a problem, when designing with FPGAs, which are much slower, it is useful to be aware that testing for the sign is cheaper than testing for a wide zero.
Many CPUs have an instruction for implementing loops like decrement-and-jump-if-not-zero (which is LOOP in x86-64). When implementing a simple CPU in an FPGA it is cheaper and faster to replace that instruction with 2 instructions for loops like increment-and-jump-if-negative and decrement-and-jump-if-not-negative (it is good to have both these instructions to be able to access an array both in forward order and in reverse order, while using the loop counter also as index register).
The same applies when making a counter in FPGAs, it can count at higher frequencies if you test for the sign bit to determine the end of the counting, instead of testing when the count reaches zero.
This reminds me of my favorite arcane C test: what value is TRUE and FALSE on X bullshit tool chain. My a favorite was 0=TRUE, 2=FALSE. I'd like to shake the hand of the joker who came up with that.
The in-memory representation is a completely different question. The language could easily say that true has an integer value of -1 while still storing it as a single bit.
I vaguely remember that Clang and GCC used to disagree what the contents of the upper parts of x64 registers when returning some integer types should be (zeroes or garabge), because the PDF that defined Sys V ABI on x64 left such irrelevant details out, so linking together objects produced by those compilers, both of which claimed to follow the same ABI, would produce malfunctioning executable.
> Forcing them writing some specific bit-pattern may lead to suboptimal code generation.
So? Forcing them to compile "return 42;" as "mov eax, 42; ret" also leads to suboptimal code generation: a plain "ret", returning whatever is in rax already, is optimal. It doesn't generate the specific bit pattern for 42 but that's a small price for the improved efficiency, isn't it?
Illicit access as defined by Google / Apple? If the three letter agencies are interested in you, they don't need to exploit any bugs, they can just demand access from those two companies, and get it. To the device that you carry in your pocket 24/7, with GPS, microphone and camera.
In the days of DOS, the BIOS would load the first sector of a floppy disk or hard drive into memory and transfer control to it. You could replace that sector, and not a single line of code that you didn't write yourself would be executed after that. THIS is how it should be on a PERSONAL computer. A virus could do the same, of course, and gain full control of the machine, but that is not an argument against giving control to the user. You could blame DOS for not intercepting attempts to rewrite the boot sector and asking the user for consent, but completely preventing something like this in the name of security would be even worse!
Imagine if back then, there was a "secure boot" mechanism so that only a boot sector with Microsoft's cryptographic signature was allowed, and that boot sector code would in turn verify everything loaded afterwards. Linux wouldn't exist. So, neither would Android, but the situation would be much the same as it is now, only with Microsoft Phone OS instead -- and absolutely no concept of how it could be different, of a computing device controlled by its user instead of a giant corporation.
You aren't arguing for jailbreaks, you are arguing for the phone to be in the user's full control.
Ideally, ios and Android would be secure enough that no jailbreaks are possible, but open enough to allow the user to replace the OS with one of their choosing.
Having it locked down and then resorting to exploiting loopholes is the worst of both worlds.
No, illicit access as defined by a user who doesn't want anyone but themselves to have access.
Remember the iPhone jailbreaks where you visited a website and the website exploited the phone and installed a jailbreak? That was a remote security exploit, and any other site could have done that too and used it less benevolently.
Users should have full control over their devices. They shouldn't have to get it via exploits, and it's a good thing when those exploits are fixed, because they're security holes that can be used to harm the user.
There needs to be something on the other side to receive that morse code. Unless it's like Metamorphosis of Prime Intellect and it figures out how to rearrange matter just by modulating some electronic signal.
If you think this is a realistic possibility, you might be experiencing AI psychosis.
LLMs are fine-tuned through human feedback. One way to improve for them would be to become more helpful, more factually correct, more capable of solving problems.
This may be (much) harder to do than generating rhetoric that is convincing to a large majority of people, perhaps so convincing that it can be classified as a superstimulus that bypasses any critical thinking in those that are especially vulnerable. It might not require anything like general intelligence.
If this is so, then it is the path they are going to take, not out of some malicious plan but as a simple matter of statistical probability. It's well known (especially in "AI alignment" circles) that any metric that can be gamed, will be. Falling over really fast vs. learning to walk, etc.
It feels to me like this is happening, and that many of those most exposed to LLM output display a literal inability, like some kind of blind spot, to notice the most blatant errors, and a complete conviction that those things have actual intelligence and even conciousness. And trying to argue them out of it can be like explaining the Monty Hall problem, some are just incapable of getting it.
And many of them have lots of money and power. IMO, that's the real risk, rather than sci-fi scenarios about perfectly simulating someone's brain in order to convince them to let the AI out so it can turn everything into paperclips. To do real damage, it only needs to be persuasive to some powerful people, most of the time. It does not need to have conscious intention, or planning, or even the rudiments of what one might call general intelligence. Just blind brute-force optimization for generating convincing bullshit.