Nasal for C++ programmers: Difference between revisions

Jump to navigation Jump to search
m
some more history
mNo edit summary
m (some more history)
Line 1: Line 1:
{{Template:Nasal Navigation}}
{{Template:Nasal Navigation}}
== Some History on Scripting in FlightGear ==
{{cquote|<nowiki>Actually It didn't start with Nasal.
I first implemented JavaScript (ECMAScript) for FlightGear but everybody thought the library was too large so it never was committed. Then Steve Baker put his PSL scripting language in plib and David (Megginson) added the first implementation of that to FlightGear.
At that time we were (theoretically) able to run both JavaScript and PSL scripts from within one single XML file</nowiki><ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg22496.html|title=<nowiki>Re: [Flightgear-devel] Trademark violations could be a problem</nowiki>|author=<nowiki>Erik Hofman</nowiki>|date=<nowiki>Fri, 26 Mar 2004 01:24:44 -0800</nowiki>}}</ref>|<nowiki>Erik Hofman</nowiki>}}
{{cquote|<nowiki>I'd caution against a special-purpose language; these things are
almost always just as hard to write as real languages are, and never
quite do as much as you hoped.  I'd stick with a general purpose
language, whatever you do.
And now the plug. :) I wrote a scripting language of my own at one
point (http://www.plausible.org/nasal) which is closer to Perl or
Javascript.  It's semantically richer than PSL, supporting all the
stuff you expect like vectors, hashes/objects, garbage collection,
et. al.  It's also quite small; a little over 100k of source code
these days.  No work has been done to integrate it into
FlightGear/SimGear (I wrote it for my own game project last spring),
but I'd be happy to do so if there was interest.
Languages are like religions though.  Some people are going to hate
the idea, some people are going to like it except for one or two
things that *have* to be fixed first, some will want to use a
different language.  No one seems to want to use PSL yet, though, so
it seems to me like the door is still open for alternatives. :)</nowiki><ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg18508.html|title=<nowiki>[Flightgear-devel] ACScript RFC (or FGScript ??)</nowiki>|author=<nowiki>Andy Ross</nowiki>|date=<nowiki>Thu, 13 Nov 2003 08:54:46 -0800</nowiki>}}</ref>|<nowiki>Andy Ross</nowiki>}}
{{cquote|<nowiki>Some will remember a few months back when the subject of scripting
languages came up that I mentioned that someday I'd love to write my
own language.  Existing embeddable languages are either too limited or
too large, and that I though there was a sweet spot for a small,
simple language that still managed to support the "standard" list of
features programmers have come to expect.</nowiki><ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg12157.html|title=<nowiki>[Flightgear-devel] Nasl (not another scripting language)</nowiki>|author=<nowiki>Andy Ross</nowiki>|date=<nowiki>Mon, 17 Feb 2003 15:30:41 -0800</nowiki>}}</ref>|<nowiki>Andy Ross</nowiki>}}
{{cquote|<nowiki>It was later that Nasal replaces psl because it was already much more integrated with FlightGear (thanks to Andy).</nowiki><ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@flightgear.org/msg22496.html|title=<nowiki>Re: [Flightgear-devel] Trademark violations could be a problem</nowiki>|author=<nowiki>Erik Hofman</nowiki>|date=<nowiki>Fri, 26 Mar 2004 01:24:44 -0800</nowiki>}}</ref>|<nowiki>Erik Hofman</nowiki>}}
<references/>
== Nasal Scripting ==


If you are familiar with web browsers and JavaScript, then FlightGear scripting should be pretty straightforward:  
If you are familiar with web browsers and JavaScript, then FlightGear scripting should be pretty straightforward:  

Navigation menu