Hacker News new | past | comments | ask | show | jobs | submit login

I use Inform 7 as the very first case study language for a class I teach in programming language design theory for a uni CS program.

* It's very well documented. The entire compiler design and language grammar is detailed to near text-book standards.

* It's a language that none of my students have ever heard of before

* The syntax of the language is an English-like syntax which weirdly trips up most CS students the first time they see it

* It's a great example of a language used for specialty purposes. No kitchen-sink language here.

Students at first hate it...but many have told me later that they really like coding an IF game using Inform 7 once they get the hang of it.




An example of the syntax, from a version of Dijkstra's algorithm[0]:

    The current node is a node that varies.
    A node can be found, examined, or unreached.
    A node has a number called the total distance.  
    Definition: a node is near if its total distance is 10 or less.
    Following relates various nodes to one node (called the precedent).
    The verb to follow (he follows, they follow, he followed, it is followed, he is following) implies the following relation.
[0] https://literateprograms.org/dijkstra_s_algorithm__inform_7_...


It looks like classic mathematical demonstrations in old books, before they learned to use algebra for everything :-)


> Students at first hate it...but many have told me later that they really like coding an IF game using Inform 7 once they get the hang of it.

A sign you're pushing them out of their comfort zones. Probably one of the bigger gifts a teacher can give their students


> but many have told me later that they really like coding an IF game using Inform 7 once

TIL a programming language purpose built for text adventure games, Is there any example of a famous game written using it with source? I wonder whether inform is specifically useful where there's meta programming within the game.

Also, You seem to take extra care and effort in teaching your students and I appreciate it.

Edit: It seems like there are several inform 7 games at itch.io - https://itch.io/games/tag-inform-7 .

Bonus: While searching about how the games are published on web, I found the following snippet -

   Release along with an interpreter.
Apparently that creates a web page and encodes the game as a Parchment (Javascript) file!


> Is there any example of a famous game written using it with source?

Here's a page of links to Inform source for a number of games including Zork. Obviously it's a rewrite of Zork using Inform as Infocom predate Inform by many years.

https://ifarchive.org/indexes/if-archive/games/source/inform...


Excellent, Thank you. Considering there's no use in protecting the source of web games, I guess most would be inclined to release it anyways.


Thanks for the unique perspective!

What’s an IF game? Very difficult to search that; Google prioritizes matches containing the English word ‘if’.


As many have said, it stands for Interactive Fiction.

Since there seems to be some interest in it, the assignment I give my students is on Github here: https://github.com/agiacalone/cecs-342-lab-inform7

I have more info on IF/text adventures there as well.


Here is a reasonable starting point: https://ifcomp.org/about/if


> What’s an IF game? Very difficult to search that; Google prioritizes matches containing the English word ‘if’.

Replace "IF" with "text adventure" and you'll get better results. Their heyday was pre-Windows and the classic names to look for are Infocom (US), Scott Adams (US), and Level 9 (UK).

Edit: To add, just download Inform and try it, alongside https://ganelson.github.io/inform-website/book/WI_1_1.html which takes you step by step through stuff.


Interactive Fiction


Note well that people who enjoy Interactive Fiction (what we used to call "text adventures") ought to be the most likely people to forgive the fact that a pseudo-natural language interface is, in fact, much pickier with regard to accepted input than actual natural language. (what we used to call tolerance for "guess the verb")




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: