David Megginson wrote:
> So, Andy, here's your challenge -- you wrote YASim to prove how small
> and simple an FDM could be; how about showing us how small and simple
> a JavaScript implementation can be? I'm sure FlightGear isn't the
> only project that would benefit.
Yikes, don't tempt me. Yo
David Megginson wrote:
> Andy Ross writes:
>
> > But the language itself is pretty mild. It's a lot like perl and
> > python -- hashes and vectors are the core data structures, with syntax
> > support for common idioms like regular expressions and function
> > calling. Object naming is repr
> >
> > (I'd love a programming environment on my Palm V, for example)
>
> Hmm.. I sense a potential Python convert lurking in these words :-)
>
> http://pippy.sf.net
>
> Enjoy
>
> Norman
bah...
http://smallbasic.sf.net
mmm.. smells like GW-BASIC... ;)
_
Cameron Moore writes:
> I think it's safe to say that there are two contenders at this point:
> Scheme and Lua. I'd never heard of Lua until this thread, but I've seen
> Scheme. I would expect that we would use Guile for a Scheme
> interpreter. How big is Guile? Has anyone ever used Lua?
David Megginson writes:
>
> (I'd love a programming environment on my Palm V, for example)
Hmm.. I sense a potential Python convert lurking in these words :-)
http://pippy.sf.net
Enjoy
Norman
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http:
Andy Ross writes:
> But the language itself is pretty mild. It's a lot like perl and
> python -- hashes and vectors are the core data structures, with syntax
> support for common idioms like regular expressions and function
> calling. Object naming is represented explicitly as a hash lookup
James Turner writes:
> A couple of comments on the
scripting issue:
> JS is very effective and>
manageable, orders of magnitude moreso than Perl.
This
is good to hear.
> Python is equally> good as the code size grows, but the syntax puts
people off
a simple matter of taste, for
David Megginson wrote:
> Erik Hofman writes:
>
> > > Yes, that stuff. It looks reasonable.
> >
> > Reasonable???
> > It's the same syntax you used for the Java library!
>
> I'm (well) over 18, so from me "reasonable" is higher praise than
> "cool".
Ah, I almost forgot, you're Canadion are
Erik Hofman writes:
> > Yes, that stuff. It looks reasonable.
>
> Reasonable???
> It's the same syntax you used for the Java library!
I'm (well) over 18, so from me "reasonable" is higher praise than
"cool".
All the best,
David
--
David Megginson, [EMAIL PROTECTED], http://www.meggin
A couple of comments on the scripting issue:
JavaScript is a really nice language, but you aren't going to get a very small runtime without losing useful things (like regular expressions). However, the sources are readily available, as has already been noted. My day job is working with Mozilla bas
Erik Hofman wrote:
>
>
> Hi,
>
> I've placed the javascript code on my website at:
No I haven't. Can find the location of my homepages on my ISP's
webserver ... :-(
Erik
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.o
Hi,
I've placed the javascript code on my website at:
http://www.a1.nl/~ehofman/fgfs/download/avascript-20020628.tar.gz
http://www.a1.nl/~ehofman/fgfs/download/fgfs_base_script-20020628.tar.gz
This is very preliminary code, but should give you a hunch.
BTW, this needs the javascript library
Norman Vine wrote:
> Have you looked at SWIG ???
>
> The reason I ask is this looks nearly identical to the code SWIG
> would output for JavaScript from a SWIG interface file for
>
> fgSetString(char * , char *)
Hmm, there is no mention of JavaScript support. They do support Java.
Erik
___
Norman Vine wrote:
>
> Have you looked at SWIG ???
No, I dont know the package.
>
> The reason I ask is this looks nearly identical to the code SWIG
> would output for JavaScript from a SWIG interface file for
>
> fgSetString(char * , char *)
>
> The beauty of using SWIG is that the same in
David Megginson wrote:
> Erik Hofman writes:
>
> > or do you mean:
> >
> > fgfs.set
> > fgfs.setBoolean
> > fgfs.get
> > fgfs.getBoolean
>
> Yes, that stuff. It looks reasonable.
Reasonable???
It's the same syntax you used for the Java library!
:-)
Erik
Erik Hofman writes:
> or do you mean:
>
> fgfs.set
> fgfs.setBoolean
> fgfs.get
> fgfs.getBoolean
Yes, that stuff. It looks reasonable.
All the best,
David
--
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/
___
Flightgear-d
Erik Hofman writes:
>
>David Megginson wrote:
>>
>> Erik -- what do your bindings look like?
>
>You mean the code to bind a JavaScript function to a C function:
>
>static JSBool
>_fgs_set(JSContext *cx, JSObject *obj, uintN argc, jsval
>*argv, jsval *rval)
>{
>const char *node, *str;
>
>
David Megginson wrote:
> Erik Hofman writes:
>
> > We might want to go for js-1.3 then:
> > -rw-rw-r-- 1 22 22481442 Sep 1 1998 js-1.3-1.tar.gz
>
> Could we trim that down by another 75% or so?
A quck look reveiled:
-rw-r--r--1 erik user 338033 Jun 27 21:03 src.
David Megginson wrote:
> Erik Hofman writes:
>
> > -rw-r--r--1 erik user 648823 May 12 2001 js-1.4-2.tar.gz
> > -rw-r--r--1 erik user 1046117 Mar 13 19:12 js-1.5-rc4.tar.gz
>
> What does everyone else think? Should this be bundled unpacked in the
> SimGear source t
Erik Hofman writes:
> We might want to go for js-1.3 then:
> -rw-rw-r-- 1 22 22481442 Sep 1 1998 js-1.3-1.tar.gz
Could we trim that down by another 75% or so?
All the best,
David
--
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/
_
Curtis L. Olson writes:
> I would argue that if we do embed a script interpreter it should be
> really small, tight, and light weight. 1Mb of compressed source seems
> excessive ... this is almost exactly the same size as the entire
> flightgear source, so we'd be roughly doubling the size o
David Megginson wrote:
> Erik Hofman writes:
>
> > -rw-r--r--1 erik user 648823 May 12 2001 js-1.4-2.tar.gz
> > -rw-r--r--1 erik user 1046117 Mar 13 19:12 js-1.5-rc4.tar.gz
> Does anyone know of a smaller ECMAScript implementation?
We might want to go for js-1.3 th
Andy Ross wrote:
> David Megginson wrote:
>
>>Erik Hofman writes:
>>
>>>-rw-r--r--1 erik user 648823 May 12 2001 js-1.4-2.tar.gz
>>>-rw-r--r--1 erik user 1046117 Mar 13 19:12 js-1.5-rc4.tar.gz
>>
>>What does everyone else think?
>
>
> I dunno. That's awfully big. J
Curtis L. Olson wrote:
> I would argue that if we do embed a script interpreter it should be
> really small, tight, and light weight.
Amen. :)
It's possible that the source for the actual interpreter is much
smaller than the full package, though. JavaScript implementations are
likely to be aime
Norman Vine wrote:
> Erik Hofman writes:
>
>
>>Isn't there any trick with the puObject member either (I just need to
>>know which menu entry is causing the callback)?
>
>
> why not just use use the puObject pointer
>
> /* print the 'menu text' of calling menu entry on stdout */
> void t
David Megginson wrote:
> Erik Hofman writes:
> > -rw-r--r--1 erik user 648823 May 12 2001 js-1.4-2.tar.gz
> > -rw-r--r--1 erik user 1046117 Mar 13 19:12 js-1.5-rc4.tar.gz
>
> What does everyone else think?
I dunno. That's awfully big. JavaScript isn't a terribly big
David Megginson wrote:
>
> What does everyone else think? Should this be bundled unpacked in the
> SimGear source tree and built automatically (as with expat, our XML
> parser), bundled as an archive so that users can build it if they
> don't already have it installed (as with metakit and zlib),
David Megginson writes:
> Erik Hofman writes:
>
> > -rw-r--r--1 erik user 648823 May 12 2001 js-1.4-2.tar.gz
> > -rw-r--r--1 erik user 1046117 Mar 13 19:12 js-1.5-rc4.tar.gz
>
> What does everyone else think? Should this be bundled unpacked in the
> SimGear source
Erik Hofman writes:
> -rw-r--r--1 erik user 648823 May 12 2001 js-1.4-2.tar.gz
> -rw-r--r--1 erik user 1046117 Mar 13 19:12 js-1.5-rc4.tar.gz
What does everyone else think? Should this be bundled unpacked in the
SimGear source tree and built automatically (as with
Erik Hofman writes:
>Isn't there any trick with the puObject member either (I just need to
>know which menu entry is causing the callback)?
why not just use use the puObject pointer
/* print the 'menu text' of calling menu entry on stdout */
void tattle_tale_cb( puObject *me)
{
printf("
Jim Wilson <[EMAIL PROTECTED]> said:
> Erik Hofman <[EMAIL PROTECTED]> said:
>
> > Well, I am dynamically generating the menu structure. That means I can't
> > use a per entry callback function. I need just one number/pointer/hint
> > in the callback to get it working.
> >
> Make a child cl
Erik Hofman <[EMAIL PROTECTED]> said:
> Well, I am dynamically generating the menu structure. That means I can't
> use a per entry callback function. I need just one number/pointer/hint
> in the callback to get it working.
>
Make a child class that has all the necessary data in it. And make
David Megginson wrote:
> Erik Hofman writes:
>
> > > and (2) small? We can already do scripting, of course, though
> >
> > -rwxr-xr-x1 erik user 826244 Mar 13 14:19 libjs.so
>
> I'm actually more concerned about the source tree size.
-rw-r--r--1 erik user 648823
Erik Hofman writes:
> > and (2) small? We can already do scripting, of course, though
>
> -rwxr-xr-x1 erik user 826244 Mar 13 14:19 libjs.so
I'm actually more concerned about the source tree size.
All the best,
David
--
David Megginson, [EMAIL PROTECTED], http://www.meggi
David Megginson wrote:
> Erik Hofman writes:
>
> > Good news (if you ask me)! I have an ECMA (Java)Script running in
> > FlightGear, accessable true the menu (actually dynamically controllable
> > trough a scripts.cml file). I now can toggle the sound on and of using
> > JavaScript!
>
> W
Norman Vine wrote:
>>>There is a small problem though, is there any way to pass an
>>>argument to
>>>a PLIB menuBar Callback function?
>>
>>NO
>>
>>use class data members, global variables or functions to get
>>the 'arguments' within the callback()
>
>
> PLIB questions should really be asked
Erik Hofman writes:
> Good news (if you ask me)! I have an ECMA (Java)Script running in
> FlightGear, accessable true the menu (actually dynamically controllable
> trough a scripts.cml file). I now can toggle the sound on and of using
> JavaScript!
Wow -- excellent news. Is the interpret
Norman Vine writes:
>
>Erik Hofman writes:
>>
>>There is a small proble though, is there any way to pass an
>>argument to
>>a PLIB menuBar Callback function?
>
>NO
>
>use class data members, global variables or functions to get
>the 'arguments' within the callback()
PLIB questions should reall
Erik Hofman writes:
>
>There is a small proble though, is there any way to pass an
>argument to
>a PLIB menuBar Callback function?
NO
use class data members, global variables or functions to get
the 'arguments' within the callback()
Norman
___
Hi,
Good news (if you ask me)! I have an ECMA (Java)Script running in
FlightGear, accessable true the menu (actually dynamically controllable
trough a scripts.cml file). I now can toggle the sound on and of using
JavaScript!
There is a small proble though, is there any way to pass an argumen
40 matches
Mail list logo