Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Open Source

Interactive Fiction Compiler 'Inform 7' Is Now Open Source (intfiction.org) 22

New submitter Mononymous writes: Created by Graham Nelson, Inform 7 compiles a powerful object-oriented language resembling English into a working text adventure. Friendly GUIs for various platforms have been open source for many years, but the core compiler remained proprietary. Now, 16 years after its initial freeware release, Nelson has released the source code under the Artistic License 2.0 in a public GitHub repo. Inform 7 is one of the largest "literate programs" ever released.
This discussion has been archived. No new comments can be posted.

Interactive Fiction Compiler 'Inform 7' Is Now Open Source

Comments Filter:
  • Politician 2.0 ?

  • by StevenMaurer ( 115071 ) on Friday April 29, 2022 @11:20PM (#62491024) Homepage

    COBOL was supposed to be the first "program in plain English" programming languages. It failed at that for various reasons. But the main one was due to an effect that prompted this quote from one of the designers: "If you ever could create a language that let you solve problems in plain English, you'd find that most English speakers can't speak English."

    That stuck with me even though I now don't remember who said it.

    • COBOL was supposed to be the first "program in plain English" programming languages. It failed at that for various reasons. But the main one was due to an effect that prompted this quote from one of the designers: "If you ever could create a language that let you solve problems in plain English, you'd find that most English speakers can't speak English."

      That stuck with me even though I now don't remember who said it.

      Inform is not a general purpose language though, it's a very specific DSL for building interactive fictions.

      It's easier to learn the few language quirks and minimal syntax, which are mainly for control flow and assigning simple variables; and the majority of "code" is story content anyway; not unlike writing a wiki with hyperlinks for navigating between pages (the main complexity is writing guards to fence-off sections that currently don't make sense storywise).

      • wasn't COBOL a development platform for this at least early on? it's hard to imagine not using COBOL for something like this years ago.... FORTRAN as well...

        • by jd ( 1658 )

          I know of no IF developed with COBOL. BCPL was used for MUD1. Colossal Cave was in Fortran. Dungeon was written in MDL, later converted to Fortran and then to C.

    • by mark-t ( 151149 )
      COBOL ultimately failed because programs developed in it were described with a syntax that did not obscure the initial underlying implementation details, reflective of mainframes of the era. This meant that most older programs, written at a time when computing demands were much smaller, could often not readily be adapted to evolving functional requirements without all but completely rewriting the code, which could often be expressed more concisely and rapidly using more modern languages that were emerging
      • by jmccue ( 834797 ) on Saturday April 30, 2022 @08:53AM (#62491588) Homepage

        COBOL ultimately failed

        I do not know why you said COBOL "failed". It used in Business and still used in Business for over 60 years. But if you mean "no longer popular", then I agree.

        It fell out of favor for only 1 reason, its price. When PCs came out, there was hugh demand for COBOL on DOS/Windows and even in the early days of Linux. But the vendors wanted hundreds (some even thousands) of USD for COBOL (including a fee for runtime licenses). So people moved on to free compilers, c was available and was quite cheap so that was where many people went to back then.

        If a cheap/free COBOL Compiler came out in the mid to late 80s, we would probably be living in another world.

      • COBOL did not fail.

        It is still the most widely language in use on the planet.

        You have no clue about the topic. I suggest to read a book about COBOL. Especially data structures and IO are amazing.

        could often not readily be adapted to evolving functional requirements without all but completely rewriting the code, which could often be expressed more concisely and rapidly using more modern languages that were emerging at the time.
        That is complete nonsense. The only thing you can blame on COBOL is: it is a litt

  • by account_deleted ( 4530225 ) on Friday April 29, 2022 @11:23PM (#62491030)
    Comment removed based on user account deletion
  • Remarkable fellow (Score:4, Interesting)

    by tgibson ( 131396 ) on Saturday April 30, 2022 @02:04AM (#62491236) Homepage

    Awhile back when I was investigating Inform 7, I went down the rabbit hole of learning about the programmer behind it. Graham Nelson is a remarkable person. A mathematician at Oxford and poet. Read through his 2020 Narrascope talk: http://inform7.com/talks/2020/... [inform7.com]
    Fascinating stuff

  • by Krishnoid ( 984597 ) on Saturday April 30, 2022 @03:05AM (#62491286) Journal
    Graham Nelson wrote a white paper [tufts.edu] on the Inform 7 language and covers how writing interactive fiction in an English-like language can make sense.
  • Literate C? (Score:4, Informative)

    by TuringTest ( 533084 ) on Saturday April 30, 2022 @07:44AM (#62491498) Journal

    I'm browsing through the code, and the .w files seem to be written in some kind of "literate C" where the file root is written as commentary, but then it escapes the file to insert C code which in turn contains some natural descriptions as expressions defined elsewhere ((see example). [github.com] Quite interesting.

    Lameness filter won't allow me to put one example here, but look at "property *ConditionsOfSubjects::parse" for what I'm talking about.

    I wonder if that's because the project is still released only as pseudo-code, or are those .w files actually weaved and compiled into .c code?

    • Re:Literate C? (Score:4, Informative)

      by tlhIngan ( 30335 ) <slashdot.worf@net> on Saturday April 30, 2022 @11:18AM (#62491858)

      I'm browsing through the code, and the .w files seem to be written in some kind of "literate C" where the file root is written as commentary, but then it escapes the file to insert C code which in turn contains some natural descriptions as expressions defined elsewhere ((see example). Quite interesting.

      Lameness filter won't allow me to put one example here, but look at "property *ConditionsOfSubjects::parse" for what I'm talking about.

      I wonder if that's because the project is still released only as pseudo-code, or are those .w files actually weaved and compiled into .c code?

      That is the source code, it seems.

      It requires two more tools - inweb and intest, and I think inweb is the compiler itself.

      So the first step is to build the compiler which looks like it starts off with a huge 1MB C source file called inweb.c (inweb/Tangled/inweb.c) that's compiled with a traditional C compiler. That file is a huge mess and I assume it's the autogenerated output of... something.

      That compiler is then used to compile inweb w files so perhaps it's a self-hosting compiler and inweb.c is used to serve as a bootstrap compiler (the output of running inweb to compile all the inweb code). After all, if you need inweb to build inweb from source, you need something that will compile it to bootstrap yourself.

      It is one of the more stranger languages and build systems though, definitely reminds me how building it or working on the source code is a maze of twisty passages, all alike.

  • Oh joy! Now I can look forward to being eaten by a gru well into the 21st century.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...