Hacker News new | past | comments | ask | show | jobs | submit login
Inform: Past, Present, Future (emshort.com)
96 points by homarp on Oct 1, 2018 | hide | past | favorite | 10 comments



Since it may not be entirely clear from the title:

- Inform is a language for writing interactive fiction. Inform 7, the current version, is also a really fascinating declarative programming language. Its quasi-English look appears to be just syntactic sugar at first glance, but there's more going on than you might think.

- Even if you're not interested in interactive fiction, per se, this is a really good, thoughtful presentation on programming languages in general from Inform's creator, who is a mathematics fellow at Oxford and an award-winning poet. (It is not surprising at all that he appears to be friends with Donald Knuth.)


Inform is a fun little thing. I have to say, I much prefer the old Inform 6, that was basically C-ish, to Inform 7. Trying to write something feels very squishy and indistinct, and I never am quite sure if what I think I'm instructing is what I think it is. It's a little on the magic side, sort of like other natural language DSLs (e.g. Cucumber).

Guess the verb and satisfying the parser is a time-honored part of playing interactive fiction; I'm not really sold on the idea of it being a core part of authoring it.


Same here. It was straightforward, until I wanted to just make a simple "bank account" concept (you receive credits for completing certain tasks, and then you can spend credits for other purposes). Maybe there is a reasonable way to do it and I just didn't know the language well enough, but because it's English, I found it difficult to even know what else to try, besides arranging my sentence structures to look more like the examples.

It does make reading the source of an IF game really intuitive though. You can basically hand your (structurally finished) game to a writer and they can edit/extend it.


It does support the concept of score, maybe score points + score negative points?


I still think there are brilliant aspects to Inform 7, in particular its rule system and the way it handles predicate dispatch through the S-V-O structure of (controlled) english. Add to that the fact you can define your own adjectives (adverbs?), use prepositional phrases and rely on verb tenses to some extent really gives a twist to the way one usually think about programming. Being able to state something like "Rule to SOME_ACTION for someone who has never ANOTHER_ACTION" just deals at the language level with a lot of stuff that are tediously dealt with by hand, variable declaration after variable declaration just to achieve the same effect.

This S-V-O+adjoints structure is also what deals with one of rule systems biggest hurdle; namely the ordering of these rules. Most of the time I7 works by selecting the most specific rule for the subject/verb/object at hand and execute only that one. Surprisingly (but also because it's tightly coupled to the specific domain of inform (interactive fictions)) it works exceedingly well and only very rarely gets the order wrong.

Since Inform 7 also structures rules/functions through Actions and Activities, in sequential stages (which either work in "execute the most specific rule" mode or "execute all the rules that match" mode), you basically get a finer form of aspect oriented programming in that Inform7 does not rely on methods from some subterraneous object oriented world, it's pure declarative decoration all the way down. In the end this gives a very different feel about the way functions or procedures or rules, namely basic blocks of computation can be thought of. What's very special to Inform 7 is that functions are not conceptual atoms nor black boxes. They are composed of smaller, public elements called rules. And they are agnostic to any polymorphism, dispatch or type system functions are usually tied to: Inform 7 delegates these matters to their constituting rules.

And this is a dream when it comes to modelling business logic, because it gives a common "mental space" so to speak to code that would have been spread throughout the codebase otherwise.

There is a lot to be said about those conceptual aspects of Inform7, but presenting it as a looks-like-english language is not enough. It's also a think-like-english language at the syntaxic level of what a language is : our friend Chomsky would argue that it's the kind of syntax for which we have dedicated hardware (gpu accelerated so to speak). Without it, Inform7 would probably be incredibly hard to grasp.

In short: Inform7 and its rule system is one of the best programming encounter I ever had at the conceptual level (and I'm a lisper), but frankly, writing it, getting english to be just like Inform's version of english is nightmarish.


> And this is a dream when it comes to modelling business logic, because it gives a common "mental space" so to speak to code that would have been spread throughout the codebase otherwise.

To wander down further tangential space, I did briefly wonder at a past job if I7 would have been a good fit for the basis of a business rule engine. At the time the answer was "absolutely not" because there was no way to embed the language, or a subset of it, in another platform and bend some of the IF domain assumptions.

Some of the work in modularizing the tools in the last couple of years seems to head in the direction that it is close to getting technically possible. There's still the problem that I7 is still not "perfect" for non-technical users (rules list oddities like indents and semicolon punctuation) and more importantly that performance guarantees with the I7 rule engine are hard.

I7 itself can work around the performance issues because it typically has complete knowledge of the domain world model at compile time and can memoize a lot of things at compile time and/or shortcut them at run time. If you were to try to build a business rules engine based on I7 you'd have a lot of fun trying to remove all the potential footguns that start to resemble the classic "paradox rules" to take down the system just like every other Shatner-era Star Trek episode.


> The 1990s were a propitious time for this sort of hobby computing. There were really two computing bubbles in this era. The one people talk about was the dot-com boom, when the potential of websites hit the venture capital market, and startups like Amazon got going. The other was an almost ideologically opposite sort of economy, with the rise of Linux, Perl and Apache, a market in which your wealth, in the form of public standing, was proportional to how much you had given to the community, in the form of code. Jeff Bezos got to be a billionaire out of the 90s, but thanks to my software, I got to marry Emily Short, so you could say we both got to be the world’s richest man.

Awwww :-D


"when you have dinner with the Knuths you talk more about quilting and printing Lutheran bibles than programming"

This made me laugh for some reason. I guess everyone needs their hobbies.


As some one who played around with inform and would recommend it to authors looking for new ways to express their creativity, I am glad it looks like it is getting a significant tooling upgrade. Especially important is that this lowers the barrier of entry for new micro-payment strategies (like apps and websites).

It's also really cool because it looks like someone could hook this thing up to ray tracer or modern game engine and render dynamic myst style scenes with it (but with NPCs and significantly more detail in manipulation).


I think with the current indiepocalypse of game development, and Netflix creating CYOA type shows, IF is due for a surge in popularity and demand. Who's going to orchestrate those Netflix shows? They better have a good sense of IF mechanics.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: