Why no interest in real coding with i7?

Even Inform 6 is a pain to reimplement because of some aspects of the language design. For instance, a word like “class” can be a case-sensitive keyword in some contexts, a case-insensitive keyword in others, and an identifier in yet others. There are also cases where a sequence of expressions can appear with no delimiters in between (array/property initializers, assembly statements) and some expression syntax has to be disabled to avoid ambiguities. Graham was able to make this stuff work with his hand-coded lexer and parser, but it’s not exactly documented, and it’s hard to get working with automated parsing tools such as ANTLR.

But there are other concerns with compiling an I6 game into a .NET application, like what UI are you going to use? The same .z5 file can currently run on a web site, a graphical interpreter, a console interpreter, and a line-oriented MUD bot. If you compile to a standalone app, then either you choose the lowest common denominator or you compile half a dozen different apps, and either way people will complain that it isn’t as good as their favorite interpreter.

I don’t think that’s exactly the point, though. It’s not exactly that a game could be coded in Inform 7’s natural language then compiled to whatever .NET can output, but wouldn’t it be cool to have a natural language programming language that could write whatever you can do in .NET?

No. Different languages for different purposes.

This comment makes me sad. :cry:

Why?

It’s defeatest. It’s like telling someone they can’t write an operating system using Perl, then someone goes out and does it to prove it can be done.

I’m not saying that it can’t be done, or that you shouldn’t do it. I’m saying that if you did I won’t think it’s cool.

I disagree in that I think it’s always cool to see a language strecthed out beyond its capacity.

But ultimately, I agree in that for serious projects… well, you CAN hammer a nail in with the butt of a screwdriver, if you really, really want to…

Looking at extensions like GLIMMR and Flexible Windows with g-this, g-that and set a graphlink in the graphics-window identified as the g-window, I think we’ve already seen the language stretched beyond its capacity, and it’s not pretty. While there probably are some programming tasks which would benefit from Inform’s natural language, regular windows .NET programming isn’t one of them.

Perhaps one thing which might be better in I7ese would be an alternative to SQL…

It will probably be one of those technologies that I’d love to see in action, but will not be something I’d want to use personally. (NB: I’m not well-versed in SQL, either.)

The StoreOrders is a table inside the XyzzyStore database. Inside StoreOrders is a primary key named "PID". The StoreLocation is a column in the StoreOrders table. It can hold a string of 20 characters consisting of letters and numbers, and cannot be set to null.
Oh, brother. :smiley:

Well, maybe someone could take a similar language that already exists in something like .NET and add some natural language commands to it.

Indeed, relations would be a good fit for relational databases.

select * from orders, customers where orders.customer_id=customers.id and orders.shipped=1 and customers.state='CA'

becomes

every shipped order placed by a customer from the state "CA"

Well, if you put it that way…

It really comes down to efficiency and clarity of code. I’m reminded of Ron Edwards’ old essay, “System Does Matter”. I won’t link it here because it’s bogged down in jargon from a largely unrelated field, bet I think the underlying ideas are applicable.

Mainly because of the “no” to this:

I’ve never been terribly fond of our [computer science’s] imported-from-mathematics-and-spatchcocked syntaxes.

Neither do I, which is why I love Python. Most of the time its syntax makes me fairly happy. But as I said, UI code in I7 is ugly already, and it would only get worse if you wanted full access to all of .NET.

UI code in I7 is ugly when you’re using something like GLIMMR that operates within the confines of what I7 was designed to do. It doesn’t have to be ugly if you can lose the dependency on the standard Inform library and build process. For instance, I think this could be made to work with some serious abuse of the Inform compilers:

[code]Detonator is a form.

The status label is a label on Detonator with caption “Earth status: not destroyed”, left 10, top 10, width 100, and height 13.

Destroy is a button on Detonator with caption “&Destroy”, left 10, top 40, width 80, and height 30.

Repair is a disabled button on Detonator with caption “&Repair”, left 100, top 40, width 80, and height 30.

After clicking Destroy:
now the caption of the status label is “Earth status: destroyed!”;
now Destroy is disabled;
now Repair is enabled.

After clicking Repair:
now the caption of the status label is “Earth status: not destroyed”;
now Destroy is enabled;
now Repair is disabled.[/code]

Yes that is nicer, and is close to what I’d want code using Vorple to look like.

Maybe it would be easier if more naming collisions were allowed in I7. I think part of the problem is that each kind of value must have unique values, which is why you end up with all the prefixes.

Dijkstra

Well, I’m in the same situation. I cannot program anymore without ending up wanting to set up rules in the system I design.

I have a lot of ideas about using Inform7 in ‘real’ programming projects. This ranges from agent oriented programming, distributed systems and hyperspatial programming (cf IbM’s HyperJ) to meta object and meta-compiler protocols (the latters do not even exist). I won’t expose my ideas here in details, because what I have in mind is insane qnd fuzzy but I can try to sum it up here : as of now inform7 is a meta-language and I’d like to turn it into a middle-language. For instance, that’d imply the possibility to modify the way inform7 is ‘compiled’ using inform7 itself.
Insane, insane…

For now, I’d just like to implement inform7 in objective-c : I don’t mean to rewrite inform7 so that it is translated to objective-c code, but to be able to use inform7 within objective-c (or any other dynamic language, but I’ll stick to objective-c which I know pretty well).
I have already semi-implemented a rule framework in objective-c on top of which I built an aspect-oriented framework (executing code before or after a certain method, and in a non-invasive way). Then I started to program a framework that allows you to do role-oriented programming and last time I was working on this project(s) I was wondering how I could do subject-oriented programming elegantly, that without mutilating objective-c native coding style.

You might think : this guys mad. Well sort of, what I described :

  • fits in a couple thousands lines.
  • is just a proof of concept, no unit tests, few comments. No documentation.
  • the whole stuff relies on the fact objective-c allows you to catch method invocations in order to redirect them.

Is it efficient ?
Well I compared cocoa’s native observer pattern (using the NsNotificationCenter class) to my own observer pattern (I think I built it on top of the aspect-oriented framework I made, or what is the role-oriented one, can’t really remember…) and it turns out mine is around 20% faster (and it has a nasty memory leak I wasn’t able to fix).

Anyway, as cool/insane as it sounds, it has a huge drawback : it looks ugly.
So I was hopping that if I added a bit of Inform7’s magic, that would look better. Since the stuff I described above is entirely dynamic, I was thinking about implementing a parser for Inform7 in objective-c. I don’t think I want to reproduce inform7 in its entirety, just the part that concerns rules.

So here I am, asking questions :
How does NI work ? I know the code is private, but could someone (graham Nelson itself maybe ?) drop the name of the technology/concept it relies on ?
Is there any formalization of the concept of rule around ?

Thank you.

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.