Computers extension, v2

“Computers” is an extension I wrote some time ago, but the hiatus of the extension website meant that it wasn’t posted, so I didn’t announce it. However, it’s available now, and may interest some people.

The extension provides kinds for generic computers, as well as more specific implementations for desktops and laptops; some generic support for removable storage devices such as USB drives, CDs, and disks; and several kinds of software, including email and search engine programs, menus and operating systems, and password locks. (The behavior of the email and search portions are similar to those of the computers in Floatpoint.)

So, for example, we could set up a laptop with a password lockdown and an email delivery system thus:

Include Computers by Emily Short.

Conference room is a room. The conference table is a thing in the Conference Room. The small laptop is a laptop on the conference table.

The small laptop runs a password lock program called laptop security. Laptop security is privately-named. The password of laptop security is “mulderxox”.

The small laptop runs an email program called laptop email. Laptop email is privately-named.

The message table of laptop email is Table of Laptop Messages.

Table of Laptop Messages
topic message arrival time read answered description
“memo” “Memo” 9:00 AM false false “Your boss would like to see you in his office right away.”
“SPAM” “SPAM” — false false “Money for you from Nigeria!”
with 10 blank rows.

At 9:10 AM:
deliver “SPAM” to laptop email.

Test me with “turn on laptop / x laptop / x screen / type mulderxox / read memo / read spam / z / z / z / z / z / x screen / read spam / reply to spam”.

Version 2 fixes a couple of stupid little bugs and also introduces two new examples, one simple one demonstrating a computer with a removable drive, where the drive’s presence adjusts what can be found with the search engine, and a more complex one demonstrating the implementation of an ATM that must be accessed using both a debit card and a PIN, and has several different input modes.

Version 2 is available here.

10 thoughts on “Computers extension, v2”

    1. Yes, you’re allowed to use it — extensions are generally allowed to be used and/or modified freely, as long as you acknowledge them. Inform does the acknowledgement part automatically, because if you include an extension, afterward typing “VERSION” will list that extension as part of the game.

      So really, if you include the extension, unless you go out of your way to *disable* the version listing, you’re in compliance with the rules of use.

  1. I’m trying to write a back command similar to the quit command in the extension but i need to know what the currently loaded aka what the active piece of software is called. so i can do an if statement sort of like this if x is email, do something. where x is what ever the active running program is called.

    1. You can refer at any time in your program to “the controlling program of [whatever computer is running said software]”.

      If you’re emulating the quit command from the “Operations” example, though, it’s simpler than that: the “input handling rule” *already* knows what software it’s handling input for. Notice the way the rule begins

      A first input handling rule for quittable software (called chosen software):

      This is because we’re calling the input handling rulebook and sending it the name of the specific software we want to handle input for.

      That might be a confusing explanation if you haven’t done much with rulebooks yet. To boil it down:

      If you write an input handling rule, you can construct it in the same way as the input handling rule for “quit” in the example. Include the “(called chosen software)” portion, and then for the rest of the rule you can refer back to that item as “chosen software”, without any more complicated syntax.

    1. Played around a bit more and looks like I’ve worked out a way of doing but would still be interested to hear how you would go about doing this.

Leave a comment