Why no interest in real coding with i7?

I’ve often thought the same of those who listen too closely to Dijkstra. :nerd: Also, did you hear about the latest programming paradigm to come down the line? It’s called orientation-orientated programming. It’s super-metaffective!

Agreed: Macro-Lisp programmers are insane. Or aliens masquerading as human.

This I doubt. Painting a convoluted algorithm with natural language doesn’t make it any less convoluted. If you believe otherwise I have a fresh parser extension I can show you. (With concessions to zarf.)

C++. The only non-straightforward thing about it is how rules are ordered based on specificity. The manual describes these “laws of sorting rules” and if you look at the auto.inf file generated by compiling an Inform7 game file, there’s comments in there saying why one rule was put before another.

For GUI-related stuff, I’d declare a percent unit, or even coordinate units:

Destroy is a button on Detonator with caption "&Destroy", at 10% by 90%. blah,blah,blah.

I was just considering implementing inform7 way of naming rules (to make things clearer, i’m talking about the rule header). The body of the rule would still be objective-c code.

Joke aside, I’m well aware of the rule-ordering mechanism, and anyway, if I want to achieve my goal, I’d need to go meta and declare some kind of RuleOrderer interface, because rules are ordered according to concepts specific to the domain inform7 investigates : interactive fictions. It does not fit well with general-purpose programming.

In my humble opinion, the real challenge lies in parsing inform7 code, not ordering rules. This is just a guess based on the fact NI’s code is not public. I suppose its mechanics must have something special. Do you know whether it relies on some specific, well determined theory or is it very specific to inform7 syntax. Can you quickly define new declarative phrase grammars (I mean lines like : A man is a kind of person. Joe is a man in the attic.) or do you have to implement specific heuristics for each new phrase-grammar ? In short, does it have a META layer ? If so what is it ?

I was thinking about using some kind of grammar like lambek or pregroup calculus. I’m probably talking out of my ass (can’t find my source anymore) but it seems (according to my fuzzy memory) they can be processed with a low complexity.

From what I’ve seen, it has lots of heuristics, lots of passes analyzing and annotating the source code, and lots of test cases. NI is written in inweb, which is Graham’s “literate programming” preprocessor for C, and it includes special syntax for common tasks of matching sequences of source text against patterns of words. There are some general language concepts like “what is the main verb of this sentence?”, but NI mostly does not rely on a unified theory of natural language.

(However, the code I saw is many versions old by now, and I didn’t get too familiar with it at the time. Things may have changed.)

Where NI does use more general theories, I think, is in compiling expressions and conditions. It uses predicate calculus to turn a condition like “the player is holding a switched on flashlight that contains a battery” into a logical expression like “exists(X : in(X, player) && ofclass(X, flashlight) && switched-on(X) && exists(Y : in(Y, X) && ofclass(Y, battery) ) )”, which is then reordered to take advantage of various efficient looping options. You can see the results of this in the generated I6 code.

That said, if you were looking for a suitable`` meta’’ algorithm, you could do worse than a CYK parser (or more probably, one of its variants that doesn’t need the grammar boiled all the way down to Chomsky normal form). The twist is that any Inform-like language might allow the source text to introduce parsemes (by declaring kinds) and productions (by declaring phrases), which would then apply to the source text itself. But probably not in a circular way: an I7 author can’t, for instance, affect the syntax for declaring phrases by declaring a phrase. As long the non-circularity is there, a compiler can get away with a fixed number of passes, maybe one for collecting declarations and building the full grammar and another for digesting the statements in rules and phrases.

In fact, Inform has a nice rule forbidding phrases without fixed words, which means that the grammar is always free of self-productions. So you could even use a fully dynamic version of CYK, which would be handy if you wanted things like on-the-fly syntax highlighting.

I know this might not be a popular thing to say, but I just have to lay it out here. Inform7 should be renamed. It is such a radically different language from Inform6 that to call it an upgrade, enhancement, or whatever is just plain wrong. It seems that since Inform7 came out, Inform6 was left to wither. I really don’t want this to happen.

Changing the name wouldn’t make people flock back to Inform 6 again.

Not to mention that Inform 6 is still at the core of Inform 7, though invisible.

Not to mention that it’s been Inform 7 for six years now. Renaming it would cause huge confuszlement.

So what will happen when Inform 8 comes out?

What makes you think there will be an Inform 8? It seems sensible to not change the number again unless yet another new language is invented. (Sort of like how OS X stopped at 10 when the OS was radically redesigned.)

I’m having good success with this in my project, but I don’t have any over-arching design pattern other than, “I want the result to look like this.”

Granted, I may hit a wall later on for not studying enough theory, but as far as i’m concerned, there’s nothing magical about compilers. It transforms data from format A to format B like many other pieces of code.

I guess I should have said “if Inform 8 comes out” rather than “when Inform 8 comes out”. The point is if Inform 6 were revamped in the same way Inform 5 was to create Inform 6 then logically it should be called Inform 7, but since this is taken, it may then be called Inform 8. Similarly, if Inform 7 were revamped in a similar way then logically it should be called Inform 8. So here we have a clash.

There is also the final and most likely option that neither Inform 6 and Inform 7 undergo such a revamp and remain as they are for thousands of years to come.

The way I see it, Inform 7 is not actually Inform 7 yet, but a hybrid of Inform 6 and Inform 7. I’m assuming that this is so that Inform 7 could be brought out sooner and to lessen the wordload on those creating Inform 7. Also, Inform 7 could be thought of as still in beta. I guess that over time, the Inform 6 template layer will eventually be converted into Inform 7 code.

If there’s a major update to Inform 6, it’ll be called Inform 6.4. There’s a bend in the version-numbering curve, but so what.

Anyhow, nobody is planning a major update to Inform 6 as a language. (The I6 library has its own numbering system.)

Eh, I wouldn’t put too much weight on that view. Shifting more template code to I7 is an ongoing goal, but I’ve never heard that there’s any master plan in which that reaches 100% someday. Anyhow, that has nothing to do with the name, which is solidly established.

If you want an evolution of I6, there’s my Typed Inform patch. It didn’t catch on at the time.

Sounds interesting.

Jumping on this thread a little belatedly, the numbering between I6 and I7 is confusing. (Much like the relationship between Infocom, Inform, ZIL, and Z-code…) A higher version number always seems to indicate a newer and more powerful release, thus if somebody released I6.1, my (naive) assumption would be that this is still outdated in respect to I7.

I would have preferred it if I6 was called “Inform”, and I7 “Inform Script” or such. This would keep the relationship between the two threads somewhat clear*) and would allow for independent version numbering of the two.

But I reckon it’s a little late for that…?

Cheers,

syzygy

*) Please don’t mention Java and JavaScript.

Why not? People mix up Java and JavaScript constantly. Why would Inform and InformScript (which would be doubly bad choice since I7 is not a scripting language) be any different?

Because Java and JavaScript were given similar namens despite having little in common, as opposed to I6/7.

“InformScript” was not a serious suggestion, just something I came up with on the spot. Perhaps “InformTalk” or such would be better.

Personally I would also like “Inform I” and “Inform II”, but of course that would give a very messy version numbering.

syzygy

This old thread at raif has a bit to say about I6/7.