←back to thread

156 points ChristopherDrum | 1 comments | | HN request time: 0.202s | source

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.

There 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/Mac/Linux/bsd for arm/x86 machines over the course of a lazy Sunday.

Show context
bruce511 ◴[] No.43678153[source]
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 because the C language has respected backwards compatibility.

Yes, there were breaking changes along the way, but they were trivial to resolve in hours. And (more interesting) the author believed that to be true and so persevered.

I saw this recently as well. I run a lot of programs on Windows. Many are 32 bit, written in the 90s for Windows 95, or 98. They all still run. Microsoft bends over backwards to keep things compatible.

I also get to write a lot of web API clients. I tell customers that it won't work forever. Web APIs are constantly changing. The service (especially Google) will change something soon to break it.

The people building those APIs are expecting only currently-maintained apps to run. They have no concept (or experience) of 40 or 30 year old code "just running". Crumbs, if you get 5 years out an API client you're doing well.

replies(3): >>43678309 #>>43678684 #>>43679713 #
1. ChristopherDrum ◴[] No.43678309[source]
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 patterns were identified, it was only "roll up your sleeves and do the work" to get it going again.

Working on this kind of got me re-thinking my approach to my personal projects again. What can I do today to best ensure my own code will be this easy to run in 30 years? As a corollary to that, what can I build today that will be interesting enough to want to run again in 30 years?