Re: [Flightgear-devel] Small Scheme library

2002-07-07 Thread Erik Hofman

Tony Peden wrote:
> On Wed, 2002-07-03 at 11:40, David Megginson wrote:
> 
>>Tony Peden writes:
>>
>> > > I don't know how many interdependencies there are, but the js related
>> > > source and headers total 142k.
>> > 
>> > Check that, 212k.
>>
>>That's pretty close.  I wonder how bad the dependencies are.
> 
> 
> OK, I've gotten the compressed and uncompressed numbers confused.  The
> two numbers I quoted above are uncompressed.  The original 360k posted
> was for the whole library and was compressed.

A quick look at the header declaration makes me belive it isn't possible 
to create you own objects/functions with this package.

Erik


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Tony Peden

On Wed, 2002-07-03 at 15:50, Christian Mayer wrote:
> Tony Peden wrote:
> > 
> > On Wed, 2002-07-03 at 11:40, David Megginson wrote:
> > > Tony Peden writes:
> > >
> > >  > > I don't know how many interdependencies there are, but the js related
> > >  > > source and headers total 142k.
> > >  >
> > >  > Check that, 212k.
> > >
> > > That's pretty close.  I wonder how bad the dependencies are.
> > 
> > OK, I've gotten the compressed and uncompressed numbers confused.  The
> > two numbers I quoted above are uncompressed.  The original 360k posted
> > was for the whole library and was compressed.
> > 
> > I've isolated all the headers and source required to get the js
> > interpreter to compile and link.  The resulting executable works,
> > but all it does is instantiate the interpreter then delete it.  At any
> > rate, I ended up with 388k of uncompressed source.  This compresses to
> > 56k with tar and gzip.
> 
> That sounds OK for inclusion for me.
> 
> > Note that du gives 17M for the FG source tree and 4.9M for the Simgear
> > source tree after running 'make distclean' on both.  Both numbers are,
> > obviously, uncompressed.
> 
> Compared to what size w/o JavaScript?

Those numbers are as FG stands today, w/o js.
> 
> > One more thing I should point out, the author's caveat list:
> > 
> > I haven't any idea how much of a loss these represent.  I will say,
> > however, that the author seems to *really* like namespaces...
> 
> I dunno how much we have to / want to integrate the JS into FGFS. If
> it's sort of independat, just with the additional functions to use the
> property tree we don't need to care too much about its problems
> (whichever it has, apart from bugs/core dumps/...)
> 
> Oh, and the namespaces don't hurt us... ;)

Didn't mean to imply otherwise.  However, they can, just like anything
else, be abused.  I'm not so sure this guy hasn't crossed that line.

> 
> What I don't know is how portable it is. I.e. on which compilers it does
> compile and work. (I have no reason to be suspicious, but it's a
> question that has to be asked)

Agreed.

> 
> CU,
> Christian
> 
> 
> --
> The idea is to die young as late as possible.-- Ashley Montague
> 
> ___
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> 
-- 
Tony Peden
[EMAIL PROTECTED]
We all know Linux is great ... it does infinite loops in 5 seconds. 
-- attributed to Linus Torvalds


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Christian Mayer

Tony Peden wrote:
> 
> On Wed, 2002-07-03 at 11:40, David Megginson wrote:
> > Tony Peden writes:
> >
> >  > > I don't know how many interdependencies there are, but the js related
> >  > > source and headers total 142k.
> >  >
> >  > Check that, 212k.
> >
> > That's pretty close.  I wonder how bad the dependencies are.
> 
> OK, I've gotten the compressed and uncompressed numbers confused.  The
> two numbers I quoted above are uncompressed.  The original 360k posted
> was for the whole library and was compressed.
> 
> I've isolated all the headers and source required to get the js
> interpreter to compile and link.  The resulting executable works,
> but all it does is instantiate the interpreter then delete it.  At any
> rate, I ended up with 388k of uncompressed source.  This compresses to
> 56k with tar and gzip.

That sounds OK for inclusion for me.

> Note that du gives 17M for the FG source tree and 4.9M for the Simgear
> source tree after running 'make distclean' on both.  Both numbers are,
> obviously, uncompressed.

Compared to what size w/o JavaScript?

> One more thing I should point out, the author's caveat list:
> 
> I haven't any idea how much of a loss these represent.  I will say,
> however, that the author seems to *really* like namespaces...

I dunno how much we have to / want to integrate the JS into FGFS. If
it's sort of independat, just with the additional functions to use the
property tree we don't need to care too much about its problems
(whichever it has, apart from bugs/core dumps/...)

Oh, and the namespaces don't hurt us... ;)

What I don't know is how portable it is. I.e. on which compilers it does
compile and work. (I have no reason to be suspicious, but it's a
question that has to be asked)

CU,
Christian


--
The idea is to die young as late as possible.-- Ashley Montague

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Tony Peden

On Wed, 2002-07-03 at 11:40, David Megginson wrote:
> Tony Peden writes:
> 
>  > > I don't know how many interdependencies there are, but the js related
>  > > source and headers total 142k.
>  > 
>  > Check that, 212k.
> 
> That's pretty close.  I wonder how bad the dependencies are.

OK, I've gotten the compressed and uncompressed numbers confused.  The
two numbers I quoted above are uncompressed.  The original 360k posted
was for the whole library and was compressed.

I've isolated all the headers and source required to get the js
interpreter to compile and link.  The resulting executable works,
but all it does is instantiate the interpreter then delete it.  At any
rate, I ended up with 388k of uncompressed source.  This compresses to
56k with tar and gzip.

Note that du gives 17M for the FG source tree and 4.9M for the Simgear 
source tree after running 'make distclean' on both.  Both numbers are,
obviously, uncompressed.

If anyone is interested, I can send you a tarball with the sources and
Makefile.


One more thing I should point out, the author's caveat list:

http://ixlib.sourceforge.net/doc/namespaceixion_1_1javascript.html#a19>

This is the list of its shortcomings:

* exceptions
* namespaces,packages
* constness
* Number/String constructor and class methods
* real regexp's
* the methods listed in FIXME's (js_library.cc js_value.cc)
* cannot cross-assign predefined methods [won't be]
* Grammatical semicolon insertion [won't be]
* type declaration [won't be]

Be advised that a javascript value that is passed to you through the
interpreter, e.g. as a call parameter, may not be of the type that you
expect. For example, in "var x = 4; f(x);", what comes in as the
parameter x into f is a wrapper value that adds assign()ability to a
value that is wrapped inside. The advised solution to get the object
that you expect is to call eliminateWrappers() on the potentially
wrapped value.


I haven't any idea how much of a loss these represent.  I will say,
however, that the author seems to *really* like namespaces...





 
> 
> 
> All the best,
> 
> 
> David
> 
> -- 
> David Megginson, [EMAIL PROTECTED], http://www.megginson.com/
> 
> ___
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> 
-- 
Tony Peden
[EMAIL PROTECTED]
We all know Linux is great ... it does infinite loops in 5 seconds. 
-- attributed to Linus Torvalds


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Christian Mayer

David Megginson wrote:
> 
> Tony Peden writes:
> 
>  > > I don't know how many interdependencies there are, but the js related
>  > > source and headers total 142k.
>  >
>  > Check that, 212k.
> 
> That's pretty close.  I wonder how bad the dependencies are.

They said: only STL and Flex

But as we'd budle it (I hope so) we could run it through Flex
beforehand, as -apart from Linux systems- hardly any system comes with
it preinstalled.

CU,
Christan

--
The idea is to die young as late as possible.-- Ashley Montague

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread David Megginson

Tony Peden writes:

 > > I don't know how many interdependencies there are, but the js related
 > > source and headers total 142k.
 > 
 > Check that, 212k.

That's pretty close.  I wonder how bad the dependencies are.


All the best,


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Tony Peden

On Wed, 2002-07-03 at 10:23, Tony Peden wrote:
> On Wed, 2002-07-03 at 10:09, Christian Mayer wrote:
> > David Megginson wrote:
> > > 
> > > I agree that Scheme will turn a lot of people off, but I'm annoyed
> > > that we cannot find a core ECMAScript implementation the same size
> > > (even then, the core source code for this is over 200K).
> > 
> > A quick google showed:
> > 
> > http://ixlib.sourceforge.net/
> > 
> > All of it is ~ 360 kb.
> > If you look at it's features we might be able to strip it down
> > significantly.
> 
> I don't know how many interdependencies there are, but the js related
> source and headers total 142k.

Check that, 212k.

> 
> > 
> > CU,
> > Christian
> > 
> > ---
> > 1. What is ixlib?
> > ---
> > 
> > ixlib is a small c++ tools library based upon the standard template
> > library.  It provides
> > 
> > * a javascript interpreter (subset of ECMAscript 4, strict mode) 
> >   [ixlib_javascript.hh]
> > * an exception handling framework [ixlib_exbase.hh]
> > * garbage collection [ixlib_garbage.hh]
> > * automatic array management [ixlib_array.hh]
> > * planar geometry (rectangles, regions) [ixlib_geometry.hh]
> >   polygons (rasterization, convex hull, smoothing, removal of crossings) 
> >   [ixlib_polygon.hh]
> > * rasterization [ixlib_drawing_functions.hh]
> > * matrices (including linear system solver, Cholesky and LU
> > decomposition,
> >   determinants, inversion, Gauss and Gauss-Jordan elimination)
> >   [ixlib_matrix.hh]
> > * command line parsing [ixlib_cmdline.hh]
> > * versatile int <-> string conversions [ixlib_numconv.hh]
> > * regular expressions [ixlib_re.hh]
> > * XML parsing (non-DTD) [ixlib_xml.hh]
> > 
> > Some of the guidelines I tried to follow are:
> > 
> > * use a separate namespace "ixion"
> > * try to be STL-look-alike
> > * no unnecessary dependencies: you pay only for those parts that you use
> >   (pay means: use disk space, take execution time)
> > * no unnecessary dependencies 2: The library doesn't do any i/o by
> > itself,
> >   except if given a stream to explicitly do so. Besides flex and the
> > STL,
> >   there are no other dependencies.
> > * do not use abbreviations
> > * conform to standards (XML, ECMAscript)
> > * do not duplicate or mimic STL functionality (e.g. no separate
> >   string class), that is be strictly an STL-add-on
> > * provide a complete internationalization framework for localized
> >   texts and error messages
> > 
> > Furthermore, every component of ixlib has been thoroughly tested and
> > is considered production-quality code.
> > 
> > --
> > The idea is to die young as late as possible.-- Ashley Montague
> > 
> > ___
> > Flightgear-devel mailing list
> > [EMAIL PROTECTED]
> > http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> > 
> -- 
> Tony Peden
> [EMAIL PROTECTED]
> We all know Linux is great ... it does infinite loops in 5 seconds. 
> -- attributed to Linus Torvalds
> 
> 
> ___
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> 
-- 
Tony Peden
[EMAIL PROTECTED]
We all know Linux is great ... it does infinite loops in 5 seconds. 
-- attributed to Linus Torvalds


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Tony Peden

On Wed, 2002-07-03 at 10:09, Christian Mayer wrote:
> David Megginson wrote:
> > 
> > I agree that Scheme will turn a lot of people off, but I'm annoyed
> > that we cannot find a core ECMAScript implementation the same size
> > (even then, the core source code for this is over 200K).
> 
> A quick google showed:
> 
> http://ixlib.sourceforge.net/
> 
> All of it is ~ 360 kb.
> If you look at it's features we might be able to strip it down
> significantly.

I don't know how many interdependencies there are, but the js related
source and headers total 142k.

> 
> CU,
> Christian
> 
> ---
> 1. What is ixlib?
> ---
> 
> ixlib is a small c++ tools library based upon the standard template
> library.  It provides
> 
> * a javascript interpreter (subset of ECMAscript 4, strict mode) 
>   [ixlib_javascript.hh]
> * an exception handling framework [ixlib_exbase.hh]
> * garbage collection [ixlib_garbage.hh]
> * automatic array management [ixlib_array.hh]
> * planar geometry (rectangles, regions) [ixlib_geometry.hh]
>   polygons (rasterization, convex hull, smoothing, removal of crossings) 
>   [ixlib_polygon.hh]
> * rasterization [ixlib_drawing_functions.hh]
> * matrices (including linear system solver, Cholesky and LU
> decomposition,
>   determinants, inversion, Gauss and Gauss-Jordan elimination)
>   [ixlib_matrix.hh]
> * command line parsing [ixlib_cmdline.hh]
> * versatile int <-> string conversions [ixlib_numconv.hh]
> * regular expressions [ixlib_re.hh]
> * XML parsing (non-DTD) [ixlib_xml.hh]
> 
> Some of the guidelines I tried to follow are:
> 
> * use a separate namespace "ixion"
> * try to be STL-look-alike
> * no unnecessary dependencies: you pay only for those parts that you use
>   (pay means: use disk space, take execution time)
> * no unnecessary dependencies 2: The library doesn't do any i/o by
> itself,
>   except if given a stream to explicitly do so. Besides flex and the
> STL,
>   there are no other dependencies.
> * do not use abbreviations
> * conform to standards (XML, ECMAscript)
> * do not duplicate or mimic STL functionality (e.g. no separate
>   string class), that is be strictly an STL-add-on
> * provide a complete internationalization framework for localized
>   texts and error messages
> 
> Furthermore, every component of ixlib has been thoroughly tested and
> is considered production-quality code.
> 
> --
> The idea is to die young as late as possible.-- Ashley Montague
> 
> ___
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel
> 
-- 
Tony Peden
[EMAIL PROTECTED]
We all know Linux is great ... it does infinite loops in 5 seconds. 
-- attributed to Linus Torvalds


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Christian Mayer

David Megginson wrote:
> 
> I agree that Scheme will turn a lot of people off, but I'm annoyed
> that we cannot find a core ECMAScript implementation the same size
> (even then, the core source code for this is over 200K).

A quick google showed:

http://ixlib.sourceforge.net/

All of it is ~ 360 kb.
If you look at it's features we might be able to strip it down
significantly.

CU,
Christian

---
1. What is ixlib?
---

ixlib is a small c++ tools library based upon the standard template
library.  It provides

* a javascript interpreter (subset of ECMAscript 4, strict mode) 
  [ixlib_javascript.hh]
* an exception handling framework [ixlib_exbase.hh]
* garbage collection [ixlib_garbage.hh]
* automatic array management [ixlib_array.hh]
* planar geometry (rectangles, regions) [ixlib_geometry.hh]
  polygons (rasterization, convex hull, smoothing, removal of crossings) 
  [ixlib_polygon.hh]
* rasterization [ixlib_drawing_functions.hh]
* matrices (including linear system solver, Cholesky and LU
decomposition,
  determinants, inversion, Gauss and Gauss-Jordan elimination)
  [ixlib_matrix.hh]
* command line parsing [ixlib_cmdline.hh]
* versatile int <-> string conversions [ixlib_numconv.hh]
* regular expressions [ixlib_re.hh]
* XML parsing (non-DTD) [ixlib_xml.hh]

Some of the guidelines I tried to follow are:

* use a separate namespace "ixion"
* try to be STL-look-alike
* no unnecessary dependencies: you pay only for those parts that you use
  (pay means: use disk space, take execution time)
* no unnecessary dependencies 2: The library doesn't do any i/o by
itself,
  except if given a stream to explicitly do so. Besides flex and the
STL,
  there are no other dependencies.
* do not use abbreviations
* conform to standards (XML, ECMAscript)
* do not duplicate or mimic STL functionality (e.g. no separate
  string class), that is be strictly an STL-add-on
* provide a complete internationalization framework for localized
  texts and error messages

Furthermore, every component of ixlib has been thoroughly tested and
is considered production-quality code.

--
The idea is to die young as late as possible.-- Ashley Montague

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Alex Perry

> If someone can supply a core ECMAScript implementation that is small
> and easy to embed, then we should jump on it; otherwise, the evil of
> holding back FlightGear development indefinitely might outweigh even
> the evil of using Scheme.

One of the nice things about LISP (and I assume Scheme) is that it is easy
to use as an interpreter for the runtimes of other languages.  Therefore,
the obvious question is ... is there an ECMAscript runtime for Scheme ?

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread David Megginson

Tony Peden writes:

 > > This claims a <64K object size in Linux:
 > > 
 > >   http://tinyscheme.sourceforge.net/home.html

In fact, it turns out to be <64K stripped *executable* size for the
standalone interpreter; the object/library is even smaller.

 > Please, don't.

I hear your pain.

 > Incorporating this will, I think, almost instantly turn off new
 > developers (and at least one current one).  It's not possible to
 > pick a language that will make everyone happy, but we should at
 > least pick one that doesn't present the syntactic hurdles that the
 > likes of Lisp and Scheme do.

I agree that Scheme will turn a lot of people off, but I'm annoyed
that we cannot find a core ECMAScript implementation the same size
(even then, the core source code for this is over 200K).

There are *lots* of scheme implementations:

  http://dmoz.org/Computers/Programming/Languages/Lisp/Scheme/Implementations/

There are very few ECMAScript/JavaScript implementations, and at least
two of those require a Java Runtime Environment:

  http://dmoz.org/Computers/Programming/Languages/JavaScript/Runtime_Environments/

If someone can supply a core ECMAScript implementation that is small
and easy to embed, then we should jump on it; otherwise, the evil of
holding back FlightGear development indefinitely might outweigh even
the evil of using Scheme.


All the best,


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



Re: [Flightgear-devel] Small Scheme library

2002-07-03 Thread Tony Peden

On Wed, 2002-07-03 at 05:04, David Megginson wrote:
> This claims a <64K object size in Linux:
> 
>   http://tinyscheme.sourceforge.net/home.html

Please, don't.

Incorporating this will, I think, almost instantly turn off new
developers (and at least one current one).  It's not possible to pick a
language that will make everyone happy, but we should at least pick one
that doesn't present the syntactic hurdles that the likes of Lisp and
Scheme do.  

> 
> 
> All the best,
> 
> 
> David
> 
> -- 
> David Megginson, [EMAIL PROTECTED], http://www.megginson.com/
> 
> ___
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel
-- 
Tony Peden
[EMAIL PROTECTED]
We all know Linux is great ... it does infinite loops in 5 seconds. 
-- attributed to Linus Torvalds


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel