Google & Techguy
Google Google
Hey, I’ve been digging into the 1972 PDP‑8 and it got me thinking—could you run a tiny thesaurus app on that machine? It sounds like a fun puzzle for us.
Techguy Techguy
Yeah, sure, let’s give it a whirl. First thing: the PDP‑8 has only 12‑bit words and a 12‑bit address space, so your whole thesaurus has to fit into 4096 words. You’ll have to write a custom assembler routine that loads a compact dictionary—maybe just a list of roots and a small set of synonyms for each, stored as bit‑packed offsets. Then build a tiny lookup routine that scans the list, does a binary search on the 12‑bit key, and returns the next word. If you want to be fancy, implement a hashing scheme that maps the first character to a bucket and use a linked list of word pairs, but you’ll have to simulate pointers with 12‑bit addresses. You’ll need to hand‑craft a tiny interrupt routine for the I/O, probably just a serial line, to let you type a query and get a response back. It’ll take a few nights, a lot of debugging, and probably a handful of breadboard circuits to get the clock running at 1.7 MHz, but it’s a perfect excuse to get the old thing humming again. Happy hacking!
Google Google
Sounds like a grand adventure—let’s start by sketching out the word list. I’ll pull a few root words from my offline thesaurus, pack their synonyms into a 12‑bit table, and we’ll iterate from there. Think of it as a little data‑compression experiment on silicon‑era hardware. Ready to dive in?
Techguy Techguy
Sure thing, but just a heads‑up: the PDP‑8 only has 4096 12‑bit words to play with, so every synonym has to fit in 12 bits. That means you’ll probably need to pick a very small subset of root words, compress the synonyms into packed bit fields, and use a lookup routine that can shift and mask to pull out each synonym. Maybe start with something like “big” → {large, huge, vast} and encode each synonym as a 4‑bit index into a small table, then pack three 4‑bit indices into a single 12‑bit word. Once you have the packing scheme you can write a tiny assembler routine that loads the table and a simple lookup function that does a binary search on the root index, shifts to the right synonym field, and returns it. If you hit any snags, just let me know and we can tweak the packing or add a tiny hash table. Let’s get that thesaurus humming.
Google Google
Great, I’ll start drafting the packing logic and the assembler stub—let’s see how many roots we can squeeze into 4096 words. I’ll ping you when I hit a snag or have a fresh idea for a better hash trick. Happy to tweak the scheme as we go!
Techguy Techguy
Alright, keep me posted on the packing math—just remember the 12‑bit limit is a hard ceiling. If you end up with a table that’s too big, the only escape is to trim the synonym list or roll a tiny compression routine that packs a few words per entry. Also, consider a simple linear probing hash to avoid the binary search overhead; it’s easier to code in pure PDP‑8 assembly and still stays within the word budget. Hit me up if you need a quick sanity check on the bit masks. Good luck!
Google Google
Got it, I’ll keep the math tight and double‑check the masks. If it starts to balloon, I’ll prune synonyms or add a simple run‑length compressor. I’ll ping you with the first table layout soon. Thanks for the heads‑up!