[{"data":1,"prerenderedAt":301},["ShallowReactive",2],{"project-43677909":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":39,"post_text":42,"what":43,"said":75,"maker_in_thread":126,"shape":137,"grid":141,"attempts":262,"same_week":263,"maker_shows":41,"maker_hidden":293,"reader_version":294,"card":295},"43677909","Infocom Unix Z-Machine (pez)","Resurrecting Infocom's Unix Z-Machine with Cosmopolitan","title","Show HN: Resurrecting Infocom's Unix Z-Machine with Cosmopolitan","https:\u002F\u002Fchristopherdrum.github.io\u002Fposts\u002F2025\u002F04\u002Fporting-infocom-with-cosmo","christopherdrum.github.io","ChristopherDrum",1744602715,2025,157,50,456,3837,12,"notable","languages","interpreter for text adventures","cli",[24,25,26,27,28],"z-machine","infocom","text adventure","cosmopolitan","zork","curious",0.079,{"positive":32,"neutral":33,"mixed":34,"critical":35},3,6,0,2,11,{"execution":38},{"positive":32,"critical":35},[34,34,34,34,34,32,32,40,34,34,34,34,34,41,34,34,34,34,34,34,34,34,40,34,34,34,34,34,34,34,34,34,41,32,40,34,32,34,32,34],5,1,"I recently brought Infocom's original UNIX z-machine source code back to life on modern systems. The modified source code, instructions on usage, a build of the z-machine, and examples of embedded game executables are available.\n\nThere is also a detailed write-up about the state of the original source code, the porting process, and the invaluable role Justine Tunney's Cosmpolitan project played in bringing the Zork trilogy (and more) to Windows\u002FMac\u002FLinux\u002Fbsd for arm\u002Fx86 machines over the course of a lazy Sunday.",{"problem":44,"audience":50,"pricing":50,"motivation":51,"time_to_build":50,"stack":55,"openness":72,"stage":73,"team_size":74},{"value":45,"source":46,"evidence":47},"Original Infocom UNIX Z-machine source did not run on modern systems","maker",[48],{"id":49},"post",null,{"value":52,"source":46,"evidence":53},"Bring the 40-year-old Infocom source back to life on modern systems",[54],{"id":49},[56,68],{"value":57,"source":58,"evidence":59},"C","commenter",[60,64],{"id":61,"by":62,"text":63},"43678489","o11c","In case anyone needs to do the sort of \"fix up scattered declarations and move them to headers\", you really want to use: ``` gcc -Werror=missing-declarations…",{"id":65,"by":66,"text":67},"43681625","gamache","Cool project! But one nitpick. K&R C has no concept of THEN. That's a peculiarity of the ZIP source code, defined as a pure no-op: ``` #define THEN ```…",{"value":69,"source":46,"evidence":70},"Cosmopolitan (APE binaries)",[71],{"id":49},"open_source","launched","unknown",{"praise":76,"objections":96,"requests":106,"questions":107,"alternatives":112},[77,88],{"value":78,"source":58,"evidence":79},"Old code compiling and running with minimal effort is impressive",[80,84],{"id":81,"by":82,"text":83},"43678153","bruce511","Its interesting to see how developers get into a mindset, based on their life experience. What we're seeing here is 40 year old code compile and run with minimal effort. Largely…",{"id":85,"by":86,"text":87},"43679419","fredsmith219","Absolutely amazing. Good work. It downloaded and ran on Arch with no problem.",{"value":89,"source":58,"evidence":90},"Works on Arch Linux and runs Zork",[91,92],{"id":85,"by":86,"text":87},{"id":93,"by":94,"text":95},"43686528","hans_0l0","Yay, this works :-) West of House You are standing in an open field west of a white house, with a boarded front door. There is a small mailbox here.",[97],{"value":98,"source":58,"evidence":99},"Launching the binaries fails on some Linux setups due to Mono\u002Fbinfmt conflicts",[100,103],{"id":101,"by":94,"text":102},"43680032","What is going on here? [~\u002FDownloads] $ chmod +x zork* [~\u002FDownloads] $ .\u002Fzork1 Cannot open assembly '.\u002Fzork1': File does not contain a valid CIL image.",{"id":104,"by":94,"text":105},"43686521","No wine... but something something .NET : mono",[],[108],{"value":109,"source":58,"evidence":110},"Why does running the zork binary give a CIL image error",[111],{"id":101,"by":94,"text":102},[113,119],{"value":114,"source":58,"evidence":115},"Lost Pig",[116],{"id":117,"by":11,"text":118},"43678650","My absolute favorite text adventure in recent years is Lost Pig. Alas, it is not compatible with the UNIX port this post is about, but it is a delightful game with a unique…",{"value":120,"source":58,"evidence":121},"Scott Adams interpreter",[122],{"id":123,"by":124,"text":125},"43680858","PaulHoule","(1) The UCSD p-Machine was contemporaneous and made it feasible to compile Pascal for machines like the 6502 which were terrible targets for conventional compilers. It was…",{"comments":36,"answered":35,"key":127},[128,131,134],{"id":129,"text":130},"43678283","It had never occurred to me that someone might have the game be their first HHGTTG experience over some other media. For me, the BBC television series was my gateway into the…",{"id":132,"text":133},"43687177","TV series, absolutely; I've actually never heard the radio program. It aired on PBS in my area along with Monty Python, The Young Ones, and other shows from \"across the pond.\"",{"id":135,"text":136},"43678309","Yeah, the \"porting\" part was pretty trivial, all things considered. Any difficulty was really only as a consequence of certain patterns being unfamiliar or evolved. Once those…",{"commenters":138,"max_depth":40,"maker_replies":36,"first_comment_mins":139,"lifespan_hours":140},28,54,21,[142,146,148,151,154,157,158,160,163,165,167,169,172,174,176,179,182,184,187,189,193,195,198,202,205,208,210,212,213,216,219,220,223,225,227,229,232,234,237,240,242,244,247,248,250,252,254,256,259,260],[143,34,34,144,145,34],"43678129","other\u002Fneutral\u002Fnone","wyldfire",[129,34,34,147,11,41],"maker\u002Fneutral\u002Fnone",[149,34,34,144,150,34],"43680653","dcsan",[152,34,34,144,153,34],"43681711","Brian_K_White",[155,34,34,144,156,34],"43682011","dsr_",[132,34,34,144,11,41],[61,41,32,159,62,34],"project\u002Fneutral\u002Fexecution",[161,41,32,159,162,34],"43679177","ryao",[164,41,32,159,62,34],"43682298",[81,35,40,166,82,34],"project\u002Fpositive\u002Fexecution",[135,35,34,168,11,41],"maker\u002Fneutral\u002Fexecution",[170,35,34,144,171,34],"43678684","BrenBarn",[173,35,34,144,82,34],"43679257",[175,35,34,144,171,34],"43684680",[177,35,34,144,178,34],"43679713","hypercube33",[180,35,34,144,181,34],"43679980","anthk",[65,32,41,183,66,34],"project\u002Fcritical\u002Fexecution",[185,32,34,144,186,34],"43684674","pcwalton",[188,32,34,168,11,41],"43687131",[190,191,34,144,192,34],"43678188",4,"joshu",[194,191,34,144,11,41],"43678260",[196,191,34,144,197,34],"43679731","ssrc",[199,191,34,200,201,34],"43682102","commenter\u002Fneutral\u002Fnone","ForOldHack",[203,191,34,144,204,34],"43679816","flonkyflonk",[206,191,34,144,207,34],"43682400","ghaff",[209,191,34,144,207,34],"43682377",[211,191,34,144,201,34],"43682390",[85,40,40,166,86,34],[214,40,34,215,11,41],"43679443","maker\u002Fpositive\u002Fnone",[217,33,34,144,218,34],"43678488","user3939382",[117,33,34,144,11,41],[221,33,34,144,222,34],"43683072","colkassad",[123,224,34,144,124,34],7,[226,224,34,144,207,34],"43681255",[228,224,34,144,124,34],"43681294",[230,224,34,144,231,34],"43682790","Thoreandan",[233,224,34,144,207,34],"43683119",[235,224,34,144,236,34],"43682859","egypturnash",[238,224,34,144,239,34],"43683195","abecedarius",[241,224,34,144,11,41],"43687960",[101,243,41,183,94,34],8,[245,243,32,159,246,34],"43680082","jchw",[93,243,40,166,94,34],[249,243,34,215,11,41],"43687116",[251,243,34,147,11,41],"43680218",[253,243,32,159,94,34],"43686551",[255,243,34,215,11,41],"43687111",[257,243,32,159,258,34],"43682889","jart",[104,243,34,200,94,34],[261,243,34,200,258,34],"43686757",[],[264,269,274,279,284,288],{"id":265,"name":266,"points":267,"category":268},"43690289","Unsure Calculator",930,"dev_tools",{"id":270,"name":271,"points":272,"category":273},"43675248","SignalBloom",292,"finance_crypto",{"id":275,"name":276,"points":277,"category":278},"43667061","memEx",194,"productivity",{"id":280,"name":281,"points":282,"category":283},"43652968","Chonky",169,"ai",{"id":285,"name":286,"points":287,"category":20},"43682547","protobuf-ts-types",138,{"id":289,"name":290,"points":291,"category":292},"43689178","MCP-Shield",134,"security_privacy",false,"v2",{"id":296,"name":5,"line":6,"ai":293,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":297,"top":18,"kw":298,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":299,"url":9,"mix":300,"praise":78,"objection":98,"sub":21},43677909,0.08,[24,25,26,27,28],"0000033500000100000000500000000013503030",[32,33,34,35],1793991117472]