Interacting with the real world

Old, gray, wizened programmer here, last seen in the IF world attempting to hack the FORTRAN source to Zork on a Burroughs B6810 to make it multiuser (yep, handful of 9600 baud terminals, acoustic coupler modems too expensive so you hoof it to the lab late at night). I stumbled across Inform7 looking for a fun way to introduce programming to my daughters and the beast has been awakened.

Are there extensions to some of these IF engines that allow for RPC calls to external systems? My professional life revolves around building automation and control systems (heating, air conditioning, lighting, metering, monitoring, etc) so having the engine reach out to gather information from the real world and change things would be very interesting.

You are standing beside air conditioning unit one.  The outside air damper is closed, the steam valve and cooling values are closed, the fan is off.

>  open damper
The damper is now open.

> open the steam value to 10 percent
The steam valve remains closed, perhaps it is stuck.

> turn on fan
The fan is driven by a variable speed motor, you have say how fast.

> turn on fan 50 percent
The fan is now running. The discharge air temperature is 73 degrees.

It would be important for the engine to respond to external events as well, so when the discharge temperature rises above 75 degrees and an alarm condition is triggered, the system generates some text. Even something simple, kinda cool to “walk around” in my house, see if somebody left the bathroom fan on upstairs, and turn it off.


TADS 2 had a way to call native functions in a bundled DLL, but it was so universally ignored that I think TADS 3 dropped it. (Not sure of that, though.)

The easiest path (today) is probably to hack one of the Javascript interpreters to add extra Javascript functions.

This example from the Inform 7 manual might interest you:

ohaithere. me be exploring that. python script piping to i7 while checking its stdin for additional commands, and i7 writing to file works nicely. It gets more troubled with timers, cheapglk doesnt have a timer and glkterm does but it seems it doesnt want to allow you to print anything inside a timer event even with the hacks findable around the net…

Anyway let me know how it goes, we can meet in irc or something :confused: