Outdated Inform 6 syntax in a language extension

The Swedish language extension for Inform 7 seems very complete. I’ve been trying to make it work in Inform 10.1.2, but some Inform 6 stuff in it seems to need changing, and I don’t know Inform 6.

Problem. In an explicit Inform 6 code insertion, I recognise a few special notations in the form ‘{-command}’. This time, though, the unknown notation {-call} has been used, and this is an error. (It seems very unlikely indeed that this could be legal Inform 6 which I’m misreading, but if so, try adjusting the spacing to make this problem message go away.)

Here’s an example:

{-call:Plugins::Parsing::Verbs::compile_all}

Also:

Problem. In an explicit Inform 6 code insertion, I recognise a few special notations in the form ‘{-command}’. This time, though, the unknown notation {-value} has been used, and this is an error. (It seems very unlikely indeed that this could be legal Inform 6 which I’m misreading, but if so, try adjusting the spacing to make this problem message go away.)

#IFTRUE ({-value:no_verb_verb_defined} == 1);

There are also some instances of this:

Problem. In ‘Include (- Global LR_object = nothing; [ Lan […] lse rfalse; } else rfalse; ]; -) before “Refers” in “Parser.i6t”’ [](source:Extensions\Felix Larsson\Swedish Language.i7xd\Source\Swedish Language.i7x#line2321), you tried to use ‘(+’ and ‘+)’ to expand to a value computed by a phrase, ‘whether or not the indexed name is understood’, but these brackets can only be used with constant values.

Which is caused by stuff like this:

k = (+ whether or not the indexed name is understood +);
if (k>0) {
    parameter_object = po;
    rtrue;
}

and:

if (obj has (+ non-count +)) {

These pieces of syntax are pretty hard to google too. Have they been replaced with some new notation?

Unfortunately yes, this syntax is deliberately kept undocumented except in the compiler source code (because it’s considered an implementation detail rather than something authors should rely on) and it’s changed considerably with the advent of kits.

Okay, thanks. Making it into a kit doesn’t seem hard, but I guess I have to learn some Inform 6 regardless…

This piece of I6 code, which doesn’t work anymore:

k = (+ whether or not the indexed name is understood +);

refers to this piece of I7 code:

To decide if the indexed name is understood:
        let numbawords be the number of words in the indexed name of LR-formal-supposition;
        repeat with wordnumba running from 1 to numbawords:
                if word number wordnumba in the indexed name of the LR-formal-supposition exactly matches the text   "di[n-tt-na for LR-formal-supposition]" and LR-material-supposition exactly matches the text "mi[n-tt-na for LR-    formal-supposition]", case insensitively:
                        decide yes;

Can I refer to those “decide if” routines from I6 in some other way, maybe with a “translates into I6”? Or should I “just” rewrite it in I6?

The Swedish extension is really old (6G60, right ?) and if you want to update it to Inform 10, you’ll have way more issues than just the Inform 6 inclusions.

A lot of things about language extensions changed in 6L38, and even more in the next version of Inform which hasn’t been released yet.

The work needed is really really non-trivial. Not to discourage you, but just to let you know what you’re getting into.

(I’m the maintainer of the French extension, and I might actually be the best resource about translating Inform… I should write down all I know someday but I kind of have no time nor motivation right now…)

1 Like

Yes, I have noticed that a lot of stuff concerning language extensions have changed. That has luckily been documented somewhat, so that’s not as opaque to me; I just didn’t mention them in this post about Inform 6. It’s mainly the Inform 6 changes I’m unfamiliar with.

But in general, and historically, I feel like changes needed to update extensions and code between Inform versions aren’t documented all that well. In this case it’s not so strange, if the syntax that was used in the Swedish extension was deliberately undocumented, but still, the ad hoc way extension versioning and distribution has worked over the decades is a bit of a barrier.

It would be fantastic if you wrote down what you’ve learned about translation! The authors of the Swedish language packs (@fredrik and @Felix_Larsson) have actually been really good about documenting their respective extensions too.

(And since I’ve now tagged a couple of Swedes, I just want to clarify that my end goal here isn’t to write Inform games in Swedish, but in Danish and Norwegian, which are even more outdated… They’re based on Fredrik’s original Swedish Inform 6, but Felix did a lot of work to update that to Inform 7; work that was never done with Danish and Norwegian. Those three languages are similar enough for a lot of the implementation work to carry over though.)

1 Like