jhbadger 2 days ago

"First off, it is really low level. From what I understand, not even the people at Infocom wrote raw zil. Instead, they used Lisp macros that generated zil."

Is there any evidence of this? The standard guide to ZIL (written as an in-house document at Infocom for new programmers [1]) presents it very much as if people would be writing it directly. It's also not that low level, only slightly more low level than Inform 6.

[1] https://archive.org/details/Learning_ZIL_Steven_Eric_Meretzk...

  • ndiddy 2 days ago

    The source code for most Infocom games is public, they did write them in ZIL. https://eblong.com/infocom/

    • kqr 2 days ago

      The way I understand it, ZIL at Infocom was a subset of MDL. More specifically, a subset that was easy to compile to the Z-machine. This means that during development, they'd mainly write ZIL code, but they'd do it in MDL, giving them access to the full powers of the Lisp during development. (Since MDL is an early Lisp.)

      Sometimes during game development they'd make use of MDL macros that were not available in ZIL, and they'd then have to either macroexpand manually, or hard-code those macros as language features into their ZIL compiler (because ZIL is not quite a Lisp and does not have support for custom macros).

      Again, this is the understanding I've pieced together in my head from various sources. I don't have the full picture! Maybe I should try to get in touch with the people who were there to ask them...

      • taradinoc 2 days ago

        Author of ZILF here. I wouldn't say that ZIL "does not have support for custom macros", because ZIL never existed in a form independent of MDL. There's no such thing as "MDL macros that were not available in ZIL", because there was never a version of ZIL that didn't have macros.

      • KerrAvon 2 days ago

        Yes. If you look at the ZILF compiler in particular, which is capable of compiling the original sources, there's a lot more MDL in there than you'd expect would be required for ZIL proper.

        • taradinoc 2 days ago

          Right - that's because ZIL was more or less a _superset_ of MDL.

          ZILCH (Infocom's compiler) provided all the functions of MDL, _plus_ a bunch of new ones that manipulated data structures which were then used to generate assembly code for the Z-machine.

          One of those new functions, ROUTINE, accepted code written in a domain-specific language resembling a stripped-down MDL, which was then translated into Z-machine instructions. But that domain-specific language isn't synonymous with ZIL: other functions that were inarguably part of ZIL, like OBJECT and SYNTAX, are not part of that domain-specific language.

          IMO, the only reasonable definition of ZIL is "the language accepted by a ZIL compiler", which (depending on whether you look at ZILCH or ZILF) is either a superset of MDL or an overlapping set.

dyates 2 days ago

Interesting read! A lot of AoC challenges involve navigating 2D grids, which can map quite nicely onto the text adventure model of connected rooms with compass direction exits (a grid of straightforward little passages, all alike). This insight led me to attempt Day 6 from last year's Advent of Code in Inform 7[1], though I ultimately admitted defeat on the second half. I've always found Inform 7's Mathematics Textbook English syntax quite charming, though perhaps I would have a different perspective if I'd ever attempted to build anything substantial with it.

[1]: https://davidyat.es/2024/12/23/aoc-2024-part2/#day-6-python-...

  • CheeseFromLidl 2 days ago

    Last year was my first participation and did everything in javascript in the browser. It’s high level enough to not lose your time in details, you have a graphical output if needed (canvas), text output, threading, parsing, …

verytrivial 2 days ago

Another worthy mention in this space is Linus Åkesson's dialog language[1]. From its description:

    Dialog is a domain-specific language for creating works of interactive fiction. It is heavily inspired by Inform 7 (Graham Nelson et al. 2006) and Prolog (Alain Colmerauer et al. 1972).
    An optimizing compiler, dialogc, translates high-level Dialog code into Z-code, a platform-independent runtime format originally created by Infocom in 1979.
Development seems dormant at the moment, but it feels more like Inform 7 'done right' to me. If my brain was a little bigger and calmer I'd be all over it. It has excellent documentation too. Very portable -- I compiled it locally under Termux on my phone with nothing but Clang.

[1] https://www.linusakesson.net/dialog/index.php

  • kqr 2 days ago

    Author here. I agree. It does seem like "Inform 7 done right" and I really like the Prolog evaluation model.

    I didn't know about Dialog when I wrote this article (learned of it just yesterday!) but unless life gets in the way I will explore it in a future article.

PaulHoule 2 days ago

I think I gotta try it with AVR-8 assembly or something like that this year.

Marazan 2 days ago

I was secretly hoping they would write solutions in Inform 7.