Thursday, April 28, 2022

Inform 7 open-source release

Today is the traditional Inform 7 birthday. Okay, April 30 may be more traditional, but close enough. The point is, today Graham posted the full source code for a new release of Inform 7. Here is his announcement forum post.
This is tagged as a beta release, and the IDEs have not yet incorporated the new compiler. So it's not fully ready for use. But I have successfully downloaded it, compiled it, and run some tests.
In other good news, the Inform bug tracker is back, now in Jira form.
Some notes:
Do you like NeXT-style release numbers, named releases, datestamps, or semantic versioning? Inform has you covered every which way! This release is formally "Inform 7, v10.1.0-beta+6U93 'Krypton' (28 April 2022)".
Some older versions of I7 now have semantic version numbers as well, and will be available as options in the IDE:
  • 6L02 (May 2014): Inform 9.1
  • 6L38 (August 2014): Inform 9.2
  • 6M62 (December 2015): Inform 9.3
This is good news for existing users, as upgrading a large game across Inform versions has always been a moderate headache. It's even possible that users will contribute bug fixes to the 9.x branches.
Compiling Inform is not a one-liner. This is because Graham has actually released three packages: inform, inweb, and intest.
All three are written in inweb, a "literate programming" meta-dialect of C. Read the forum post or the inweb manual for a full explanation of this. The micro-summary is that it's C code annotated with documentation such that it can generate either an executable or a manual.
The fact that inweb is written in inweb means that the whole mess requires a certain amount of bootstrapping, in the original sense. But it's just a few commands, and they go smoothly on Mac/Win/Linux. See the READMEs for details.
Reading source code in this style is somewhat unnerving to us old coders. You can look at a source file, or the equivalent web page -- they're blatantly the same thing; just nicer formatting on the web version. It reads like a manual with bits of sample code. But of course this is the code. You're looking at it. If you want to fix a bug, you fix this file; the change applies to executable and manual alike.
The effect is somehow like one of those night-in-the-museum fantasies where the buffalo and the Transparent Woman start walking around and talking to you. In the manual (or source), Graham quotes Christopher Wyk (CACM 33.3, 1990): " one has yet volunteered to write a program using another's system for literate programming." This may yet remain true.
This I7 release doesn't change the language much from the last (2015) release. The big changes are under the hood. The classic two-stage compiler (I7→I6→Glulx) is now three stages (I7→Inter→I6→Glulx). But the new Inter stage can also be compiled to C source and then a native executable. More formats like JS or C# could be added in the future. This is still experimental, but it opens the possibility of using Inform as middleware in other game frameworks. (This has always been possible with enough layers of hackery, but now it's more sensible.)
Plenty more could be said, but I think that'll do for tonight. Have fun poking around.


  1. This is *unbelievably* exciting! Thanks much for the heads up. I've been watching for this moment for many years now — can't wait to play with it.

    Thanks so much to Graham and to you for your work on I7 over the years. It is a truly special tool.

  2. This is great news! I didn't expect this to be done so "soon". I've been enjoying Graham's annual "still hasn't done what he said" updates and was, honestly, looking forward to the next one. "Has done what he said" is even better!

    Inweb and intest look like modestly cool tools--simpler in usage than I would have guessed--and the "possibility of using Inform as middleware in other game frameworks" seems like potentially a huge...well, a literal "game changer". I'm eager to see what people do with the ability to embed an inform "reasoning engine" in other software.

  3. Awesome. The Inter stage -- does it mean you could also target older 8 bit machines with this using e.g. a cross assembler for 6502 or similar? How does this compare to punyinform and the like? The latter is only a library, afaik for creating a game? I tried running Lost Pig on a C16 and it was abysmal, probably because it's librariy is not Puny by any standards. :-D

  4. Very exciting. I was able to compile this on Windows with Cygwin64 courtesy of some tips from Jeff Nyman in a post online. Had no success compiling on Windows with MS Visual Studio 2022.