←back to thread

182 points Twirrim | 2 comments | | HN request time: 0.803s | source
Show context
Quekid5 ◴[] No.41874788[source]
JF Bastien is a legend for this, haha.

I would be amazed if there's any even remotely relevant code that deals meaningfully with CHAR_BIT != 8 these days.

(... and yes, it's about time.)

replies(3): >>41874845 #>>41874846 #>>41875024 #
1. Animats ◴[] No.41875024[source]
Here's a bit of 40 year old code I wrote which originally ran on 36-bit PDP-10 machines, but will work on non-36 bit machines.[1] It's a self-contained piece of code to check passwords for being obvious. This will detect any word in the UNIX dictionary, and most English words, using something that's vaguely like a Bloom filter.

This is so old it predates ANSI C; it's in K&R C. It used to show up on various academic sites. Now it's obsolete enough to have scrolled off Google. I've seen copies of this on various academic sites over the years, but it seems to have finally scrolled off.

I think we can dispense with non 8-bit bytes at this point.

[1] https://animats.com/source/obvious/obvious.c

replies(1): >>41876044 #
2. kstrauser ◴[] No.41876044[source]
Huh, that’s clever!