7 comments

[ 163 ms ] story [ 3573 ms ] thread
SBCL uses a single zero bit to tag integers. This trick means the representation of n is just 2n, so you can add the values directly without any decoding.

It obviously also means that all the other tag values have to use 1 as the last bit.

Is AI able to measure the ratio of craft to cruft source lines of code in Emacs over its lifetime?
FYI thecloudlet, the last quote from a Reddit user at the end seems to have duplicated content (copy-paste error?)

I read both articles and am looking forward to your next! I’d be interested in understanding more about the relationship of EMacs to GCC since you noted the authors were the same and the internals were written with some compiler awareness.

You only need one bit tag and it is for number.

Symbols are just list of numbers. Variable is just a nameless place in memory, but often associated with a symbol.

Numbers in symbols are printed out as ASCII-characters when it seems appropriate, like after SETQ.

Or we could decide that number-list that ends with 0 and contains only range(0x21,0x7F) is printed out as symbol. Does not matter, it is just syntactic sugar.

And We do not need strings for much anything. We could of course decide that number-list with ord('"') is printed out as string. The reader could also follow this protocol.

I had all this figured out at one time. And I dont remember any major issues. B-)