hash code for a type string is not the same as hash code for the same string read by the reader ('the member bug') #6

Open
opened 2026-02-26 09:09:47 +00:00 by simon · 0 comments
Owner

member is failing, and it transpires that the hash code for a type string is computed differently from one for an identical string read by the reader:

:: (type member)

"LMDA"
:: (get-hash (type member))

397,936
:: (get-hash "LMDA")

25,865,840
:: (get-hash "LMD")

397,936

(this pattern is repeated for other strings returned by type).

So it appears that the hash for a type string is computed only for the first three characters (why?)

Note that this is not the only bug in member, but it needs fixed anyway.

member is failing, and it transpires that the hash code for a type string is computed differently from one for an identical string read by the reader: ```lisp :: (type member) "LMDA" :: (get-hash (type member)) 397,936 :: (get-hash "LMDA") 25,865,840 :: (get-hash "LMD") 397,936 ``` (this pattern is repeated for other strings returned by `type`). So it appears that the hash for a type string is computed only for the first three characters (why?) Note that this is not the only bug in `member`, but it needs fixed anyway.
simon self-assigned this 2026-02-26 09:09:47 +00:00
simon added this to the Release 0.0.6 milestone 2026-02-26 09:28:34 +00:00
simon added the
bug
label 2026-02-26 09:29:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: simon/post-scarcity#6
No description provided.