HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
itafroma
zork-mdl
OPEN SOURCE2015–2025
itafroma / zork-mdl

zork-mdl

Original MDL source code for MIT's version of Zork

2Distinct people
12Mentions
1Explicit recommenders
82GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Original MDL source code for MIT's version of Zork

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

After some experimentation, I hypothesized that there was a troll flag in Zork, and once I finally discovered the source code decades later, I found out there actually was,…

DonHopkins used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 6:01:32 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year12 dated mentions

Observed mentions: 2015-02-15 10:24:13 UTC to 2025-05-10 10:14:33 UTC.

0123452015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC101
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC303
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC505
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202

What Hacker News says

3 sources
The problem with trying to map Zork by dropping objects around, is that the damn thief comes along and picks them up. (Think of the thief as an incremental garbage collector, but not conservative because he also steals objects from your inventory that are still in use!) https://github.com/itafroma/zork-mdl/blob/be079a4ed234071222... ; "SUBTITLE A SEEDY LOOKING GENTLEMAN..." So if you want to make a map by dropping objects, be sure to kill the thief first, otherwise he will rob you blind and take all the objects you dropped. (<NOT .DEAD?> <COND (<MEMQ .STILL <HOBJS .HACK>> <PUT .HACK ,HOBJS <SPLICE-OUT .STILL <HOBJS .HACK>>> <PUT .HOBJ ,OCONTENTS (.STILL)> <PUT .STILL ,OCAN .HOBJ>)> <PUT .HACK ,HOBJS <SET HH <ROB-ROOM .RM .HH 100>>>
Read the rest
<PUT .HACK ,HOBJS <SET HH <ROB-ADV .WIN .HH>>> <PUT .HACK ,HFLAG T> <COND (<AND <N==? .OBJT .HH> <NOT .HERE?>> <TELL "A seedy-looking individual with a large bag just wandered through the room. On the way through, he quietly abstracted all valuables from the room and from your possession, mumbling something about \"Doing unto others before..\"" ,LONG-TELL1>) (.HERE? <SNARF-OBJECT .HOBJ .STILL> <COND (<N==? .OBJT .HH> <TELL "The other occupant just left, still carrying his large bag. You may not have noticed that he robbed you blind first.">) (<TELL "The other occupant (he of the large bag), finding nothing of value, left disgusted.">)> <REMOVE-OBJECT .HOBJ> <SET HERE? <>>) But first be sure to hand him (or let him steal) the jewel encrusted egg before you kill him, since he's the only one with nimble enough fingers to open the egg without breaking it, to get to the clockwork canary inside. Once you retrieve the opened egg from his lair, take the canary to the tree and wind it, and you will receive a beautiful brass bauble! <SET EGG <SFIND-OBJ "EGG">> <MAPF <> <FUNCTION (X) #DECL ((X) OBJECT) <COND (<G? <OTVAL .X> 0> <PUT .HACK ,HOBJS <SET HH <SPLICE-OUT .X .HH>>> <INSERT-OBJECT .X .RM> <COND (<==? .X .EGG> <SETG EGG-SOLVE!-FLAG T> <TRO .X ,OPENBIT>)>)>> https://github.com/itafroma/zork-mdl/blob/be079a4ed234071222... <OBJECT ["EGG"] ["BIRDS" "ENCRU"] "jewel-encrusted egg" <+ ,OVISON ,TAKEBIT ,CONTBIT> EGG-OBJECT (<GET-OBJ "GCANA">) (OFVAL 5 OTVAL 5 ODESC1 "There is a jewel-encrusted egg here." OCAPAC 6 ODESCO "In the bird's nest is a large egg encrusted with precious jewels, apparently scavenged somewhere by a childless songbird. The egg is covered with fine gold inlay, and ornamented in lapis lazuli and mother-of-pearl. Unlike most eggs, this one is hinged and has a delicate looking clasp holding it closed. The egg appears extremely fragile.")> <OBJECT ["BEGG" "EGG"] ["BROKE" "BIRDS" "ENCRU"] "broken jewel-encrusted egg" <+ ,OVISON ,TAKEBIT ,CONTBIT ,OPENBIT> <> (<GET-OBJ "BCANA">) (OCAPAC 6 ODESC1 "There is a somewhat ruined egg here.")> <OBJECT ["GCANA" "CANAR"] ["CLOCK" "MECHA" "GOLD" "GOLDE"] "clockwork canary" <+ ,OVISON ,TAKEBIT> CANARY-OBJECT () (OFVAL 6 OTVAL 2 ODESC1 "There is golden clockwork canary here." ODESCO "There is a golden clockwork canary nestled in the egg. It has ruby eyes and a silver beak. Through a crystal window below its left wing you can see intricate machinery inside. It appears to have wound down.")> <OBJECT ["BCANA" "CANAR"] ["BROKE" "CLOCK" "MECHA" "GOLD" "GOLDE"] "broken clockwork canary" <+ ,OVISON ,TAKEBIT> CANARY-OBJECT () (ODESC1 "There is a non-functional canary here." ODESCO https://github.com/itafroma/zork-mdl/blob/be079a4ed234071222... <DEFINE EGG-OBJECT ("AUX" (BEGG <SFIND-OBJ "BEGG">) (EGG <SFIND-OBJ "EGG">)) #DECL ((BEGG) OBJECT) <COND (<AND <VERB? "OPEN"> <==? <PRSO> .EGG>> <COND (<TRNN <PRSO> ,OPENBIT> <TELL "The egg is already open.">) (<EMPTY? <PRSI>> <TELL "There is no obvious way to open the egg.">) (<==? <PRSI> <SFIND-OBJ "HANDS">> <TELL "I doubt you could do that without damaging it.">) (<TRNN <PRSI> <+ ,WEAPONBIT ,TOOLBIT>> <TELL "The egg is now open, but the clumsiness of your attempt has seriously compromised its esthetic appeal."> <BAD-EGG .BEGG>) (<TRNN <PRSO> ,FIGHTBIT> <TELL "Not to say that using the " 1 <ODESC2 <PRSI>> " isn't original too...">) (<TELL "The concept of using a " 1 <ODESC2 <PRSI>> " is certainly original."> <TRO <PRSO> ,FIGHTBIT>)>) (<VERB? "OPEN" "POKE" "MUNG"> <TELL "Your rather indelicate handling of the egg has caused it some damage. The egg is now open."> <BAD-EGG .BEGG>)>> https://github.com/itafroma/zork-mdl/blob/be079a4ed234071222... <DEFINE CANARY-OBJECT ("AUX" (HERE ,HERE) (TREE <SFIND-ROOM "TREE">)) #DECL ((HERE TREE) ROOM) <COND (<VERB? "WIND"> <COND (<==? <PRSO> <SFIND-OBJ "CANAR">> <COND (<AND <NOT ,SING-SONG!-FLAG> <OR <MEMBER "FORE" <STRINGP <RID .HERE>>> <==? .HERE .TREE>>> <TELL ,OPERA> <SETG SING-SONG!-FLAG T> <INSERT-OBJECT <SFIND-OBJ "BAUBL"> <COND (<==? .HERE .TREE> <SFIND-ROOM "FORE3">) (.HERE)>>) (<TELL "The canary chirps blithely, if somewhat tinnily, for a short time.">)>) (<TELL "There is an unpleasant grinding noise from inside the canary.">)>)>> https://github.com/itafroma/zork-mdl/blob/be079a4ed234071222... <PSETG OPERA "The canary chirps, slightly off-key, an aria from a forgotten opera. From out of the greenery flies a lovely songbird. It perches on a limb just over your head and opens its beak to sing. As it does so a beautiful brass bauble drops from its mouth, bounces off the top of your head, and lands glimmering in the grass. As the canary winds down, the songbird flies away.">
In Eaten by a Grue: podcast on Infocom games, text adventures and interactive fiction
The original Zork source code in MDL which is available here: http://retro.co.za/adventure/zork-mdl/ It's also here on github: https://github.com/itafroma/zork-mdl It is fascinating to read, and really beautiful code, quite understandable even if you don't know MDL, and practically a form of literature. I played the original Zork on MIT-DM and also the Infocom versions of course. Reading the source code is like seeing the behind-the-scenes underground rooms and passages at Disneyland! While I was playing Zork, I found a bug. First some context: when you're battling the troll, you can give things to him, and he eats them! Sometimes he drops his axe, and you can pick it up and kill him with it. He blocks the exits until you kill him. So I tried "give axe to troll," and he ate his own axe, then cowered in terror: "The troll, disarmed, cowers
Read the rest
in terror, pleading for his life in the guttural tongue of the trolls." Not satisfied with that, I tried "give troll to troll", and he devoured himself: "The troll, who is remarkably coordinated, catches the troll and not having the most discriminating tastes, gleefully eats it." ...Except that I still could not get out of the exit, because every time I tried, it said "The troll fends you off with a menacing gesture." I figured there must be a troll flag that wasn't getting cleared when the troll devoured itself. And sure enough, I found it in the code, and it's called "TROLL-FLAG!-FLAG"! Here is an excerpt of the MDL troll code, where you can see the bug, where it should clear the troll flag when the troll devours itself, but doesn't (well that's how I would fix it!): https://github.com/itafroma/zork-mdl/blob/be079a4ed234071222... <COND (<VERB? "THROW" "GIVE"> <COND (<VERB? "THROW"> <TELL "The troll, who is remarkably coordinated, catches the " 1 <ODESC2 <PRSO>>>) (<TELL "The troll, who is not overly proud, graciously accepts the gift">)> <COND (<==? <PRSO> <SFIND-OBJ "KNIFE">> <TELL "and being for the moment sated, throws it back. Fortunately, the troll has poor control, and the knife falls to the floor. He does not look pleased." ,LONG-TELL1> <TRO .T ,FIGHTBIT>) (<TELL "and not having the most discriminating tastes, gleefully eats it."> <REMOVE-OBJECT <PRSO>>)>) (<VERB? "TAKE" "MOVE"> <TELL "The troll spits in your face, saying \"Better luck next time.\"">) (<VERB? "MUNG"> <TELL "The troll laughs at your puny gesture.">)>) (<AND ,TROLL-FLAG!-FLAG <VERB? "HELLO">> <TELL "Unfortunately, the troll can't hear you.">)>> The troll bugs are also in Zork I! Here's a newspaper article from January 8 1985 about "Infocom Glitches Bug Game Players"! http://articles.sun-sentinel.com/1985-01-18/features/8501020... And here's another article from March 29, 1985: "Zork I Fuddles Mental Health With Choices": http://articles.sun-sentinel.com/1985-03-29/features/8501120...
In Eaten by a Grue: podcast on Infocom games, text adventures and interactive fiction

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.