intfiction.org

The Interactive Fiction Community Forum
It is currently Sat May 25, 2013 3:03 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
PostPosted: Fri Jun 29, 2012 6:34 pm 
Offline
User avatar

Joined: Fri Jul 15, 2011 2:46 pm
Posts: 230
Location: Cental Ohio
Eleas wrote:
punkasaurus wrote:
I think what's being asked is, "why no interest in using inform (or a language like it) to make a wide variety of programs?"

It is an interesting idea to use a language that looks more like spoken sentences to try and make computer programs, but for things more complicated than IF games, that gets tricky, and for more detailed programs, the advantages that come from an easy to learn syntax like Inform's are no longer important.

It's easier to learn to make an IF game in Inform, but even if a language with a more linguistic syntax existed to make "real" programs as you put it, I would probably still rather use Python.


At the risk of descending into pedantry, I'm not so sure Inform's syntax is 'easy to learn' at all. Yes, it does look easy, but that's illusory; I'm well past the point when I thought I could rely on raw I7 code without testing it thoroughly.

(So why use it? Well, because it confers other benefits, such as being easy to read and conceptualize in, or being damn fun. A language being enjoyable is nothing to sneeze at.)


I propose that Inform 7's simplicity is found mostly in reading and understanding code, rather than the writing part.

If you want to learn a high-level language that can create a variety of types of applications, I suggest you look into learning C#. With a visual IDE like Visual Studio or Mono, it's surprisingly easy to create applications and the coding learning curve is similar to learning Inform. Also, with the right libraries you can create games that you can sell on the Xbox marketplace.

_________________
David Good
http://david-good.com/portfolio/interactive-fiction/
http://www.facebook.com/duodave


Top
 Profile Send private message  
 
PostPosted: Sun Jul 01, 2012 6:31 am 
Offline
User avatar

Joined: Sun Nov 22, 2009 12:58 pm
Posts: 399
Location: Malmö, Sweden
duodave wrote:
I propose that Inform 7's simplicity is found mostly in reading and understanding code, rather than the writing part.

Depends. I'd contend that the ability to read and understand one's code confers benefits while writing. I still remember struggling with AMOS back during the Amiga days after one evening of programming, and trying vainly to pick up where I left up, all the while wondering what the idiot who wrote that code had even been thinking.

For a big project, clarity and readability pays dividends.

duodave wrote:
If you want to learn a high-level language that can create a variety of types of applications, I suggest you look into learning C#. With a visual IDE like Visual Studio or Mono, it's surprisingly easy to create applications and the coding learning curve is similar to learning Inform. Also, with the right libraries you can create games that you can sell on the Xbox marketplace.


I would definitely recommend the C family (particularly C++), but while C# is legitimately impressive, I'd say it's too platform specific to Windows machines to be considered truly general.

_________________
~Björn Paulsen


Top
 Profile Send private message  
 
PostPosted: Sun Jul 01, 2012 8:05 am 
Offline
User avatar

Joined: Sun May 02, 2010 8:27 am
Posts: 126
Location: London
Eleas wrote:
I would definitely recommend the C family (particularly C++), but while C# is legitimately impressive, I'd say it's too platform specific to Windows machines to be considered truly general.


Not really, there's always Mono for running C# code on Mac/Linux.

Also these days most software being web-based, you should be thinking about writing code that will run on a server anyway.

_________________
Quest - create and play text adventure games in your browser


Top
 Profile Send private message  
 
PostPosted: Sun Jul 01, 2012 9:02 am 
Offline
User avatar

Joined: Sun Nov 22, 2009 12:58 pm
Posts: 399
Location: Malmö, Sweden
Alex wrote:
Not really, there's always Mono for running C# code on Mac/Linux.

Also these days most software being web-based, you should be thinking about writing code that will run on a server anyway.


Huh. I didn't know. Thanks.

_________________
~Björn Paulsen


Top
 Profile Send private message  
 
PostPosted: Sun Jul 01, 2012 10:52 pm 
Offline

Joined: Sat May 03, 2008 11:32 pm
Posts: 156
I've thought about this a bit... I7's rulebook nature seems like it'd be a good fit for the event-driven model that's common in GUI and network applications. It also has some features like relations (more specifically, the relative clause syntax for stringing together relations) that don't appear in mainstream languages, and it'd be interesting to see if those end up being widely applicable.

However, I7's current implementation is not well-suited for this. The I7 compiler is tightly coupled to I6, so if you want to turn I7 into machine code, probably Plan A would be to translate the I6 code to C, or patch the I6 compiler to generate LLVM code. I think it'd be impractical to translate it to Java, C#, or any other language with a strict type system. (Plan B would be to compile to Glulx as usual, then embed a Glulx interpreter into the finished program and come up with some way for it to shuffle requests between the VM and the native library, which would hurt performance but save you a ton of time. This is how Guncho works.)

The Inform library is another issue. Most of the "traditional" Inform library, the IF stuff, is not going to be useful for general-purpose apps and would need to be stripped out. The newer stuff that was added to support I7 features like rulebooks and heap values would still be useful, but for performance reasons you might want to reimplement a lot of it. For example, I7's memory manager is kind of wasteful and bizarre, and although its regular expression functionality is impressive for being written in I6, in a real app you'd want a fast, standard library like PCRE.

One more issue is I7's data structures. The ones it has are mostly fine for what they are: tables are like SQL tables, dynamic relations are typed hash tables, lists are typed vectors, indexed text is mutable strings. But there are no trees, linked lists, records/tuples, or even floating-point numbers (yet). The dynamic structures like lists are always copied by value, which is a huge restriction on their usefulness (not to mention wasteful). Objects and tables are the only ways to combine more than one data type in a single entity, but neither of them are dynamically allocated; my extensions address that problem, but only partly.

Also, unless your name is Graham Nelson, you'd have to make all these changes without touching the I7 source code. A lot of them can be done by editing the template files, but the compiler still generates a lot of I6 code programmatically, which puts constraints on how radical your changes to the template and runtime environment can be.

...

Actually, this suggests a Plan C: don't directly compile the generated I6 code, just treat it as an intermediate representation. Read everything I7 generates, including comments and the index, to reconstruct the type info that gets lost in translation to I6. Then generate new code based on what I7 already generated, but modify it as you go, rewriting snippets of code to fit your needs regarding performance, readability, types, memory model, linking to native code, etc. Benefits: you could work around nearly every problem above. Drawbacks: it's a lot of work and it breaks compatibility with low-level I7 extensions (though you likely wouldn't use those anyway).


Top
 Profile Send private message  
 
PostPosted: Mon Jul 02, 2012 3:48 pm 
Offline
User avatar

Joined: Fri Jul 15, 2011 2:46 pm
Posts: 230
Location: Cental Ohio
So, rather than try to fit existing Inform 7 onto say, a C compiler, it would be easier to take an existing environment like .NET and write an Inform 7-like interpreter onto it from scratch.

An advantage of doing it that way would be you could, for example, code interface things in whatever .NET language you like, then code other segments in your natural language system.

_________________
David Good
http://david-good.com/portfolio/interactive-fiction/
http://www.facebook.com/duodave


Top
 Profile Send private message  
 
PostPosted: Mon Jul 02, 2012 7:24 pm 
Offline

Joined: Mon Jun 09, 2008 8:58 pm
Posts: 679
Location: Seattle
duodave wrote:
So, rather than try to fit existing Inform 7 onto say, a C compiler, it would be easier to take an existing environment like .NET and write an Inform 7-like interpreter onto it from scratch.


This. And everything vaporware said.

My current project is an English-like general-purpose programming language, but it starts from square one rather than ports Inform 7 in any way. I believe I'm targeting Flash as the initial platform, partly since a mangled Flash program won't endanger the OS like a .exe might, and partly cause we use Flash at work.

_________________
Blog at Gamasutra :: Programmer's Guide to Inform 7 :: Seattle I-F


Top
 Profile Send private message  
 
PostPosted: Mon Jul 02, 2012 8:44 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 2086
Quote:
So, rather than try to fit existing Inform 7 onto say, a C compiler, it would be easier to take an existing environment like .NET and write an Inform 7-like interpreter onto it from scratch.


Writing an I7-like compiler from scratch is likely to be hard, because I7 does a lot of things that are hard.

It will probably be *easier* to attach I7 (or parts of I7) to a different problem domain and environment than to recreate it. But, unfortunately, only after Graham does a source release.


Top
 Profile Send private message  
 
PostPosted: Tue Jul 03, 2012 11:45 pm 
Offline

Joined: Sat May 03, 2008 11:32 pm
Posts: 156
zarf wrote:
Writing an I7-like compiler from scratch is likely to be hard, because I7 does a lot of things that are hard.

Indeed. And if you skip the hardest parts (e.g. all the predicate logic behind object definitions, conditions, and "now" statements) and simplify the grammar to the point where it can be handled by straightforward parsing techniques, what's left is not much different from, say, AppleScript.

zarf wrote:
It will probably be *easier* to attach I7 (or parts of I7) to a different problem domain and environment than to recreate it. But, unfortunately, only after Graham does a source release.

It'd be easier even before then, I think. The more I think about "Plan C", the less crazy it sounds -- or at least the more it sounds like a couple other crazy things that have already been done.


Top
 Profile Send private message  
 
PostPosted: Wed Jul 04, 2012 12:33 am 
Offline
User avatar

Joined: Fri Jul 15, 2011 2:46 pm
Posts: 230
Location: Cental Ohio
According to http://en.wikipedia.org/wiki/List_of_CLI_languages, there are numerous Common Language Infrastructure languages that work with the .NET framework. Surely it wouldn't be too hard to write a CLI version of Inform, or something like it. Wouldn't that be awesome to have the ability to compile Inform games into standalone applications that wouldn't require a seperate parser?

Considering the number of projects listed there, I can't imagine it would be that daunting to explore such a project.

_________________
David Good
http://david-good.com/portfolio/interactive-fiction/
http://www.facebook.com/duodave


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group