Hello,
zhuangyy wrote:
> can any one suggest me a open source, powerful and flexible
> script engine available for use.
>
All opinions below are mine. They might .. I mean *will* not match
the other people's ones I'm sure ;-D, but at least I provide the
pointers, you can download, learn, and try them for a couple of days
(a couple of month for Perl! ;-), then maybe post your thoughts.
Anyway, here is my list, from "recommended" to "to be avoided":
--- TCL ---
I would suggest to use TCL (Tool Command Language)
see :
http://dev.scriptics.com/
TCL is Open Source, very simple to learn yet very powerful (some kind
of Lisp semantics with a C/Bourne Shell syntax); for new users of your
engine, its syntax makes it very simple to learn. Furthermore, this
langage has really been designed for buidling scripting engines
"arround" a given functinality that has C bindings, for example Tk is
a graphical toolkit built arround X11 (or Mac toolbox, Windoz, etc.
it has been ported), other popular (Open Source) extensions include:
database access, crypto algorithms, pilot of interactive applications
(expect), network management (SNMP etc.), LDAP, SSL, etc. there are
dozens of them. There are also several OO extensions to Tcl, the
most famous being [incr Tcl] (will be integrated in the next version)
See http://dev.scriptics.com/resource/software/extensions/ for more.
Tcl also has a strong community, newsgroups, etc. Tcl's license is BSD
style, like most of its extensions.
If you are going to provide scripting functionality arround a C API,
it's a breeze with Tcl !
Other bets could be:
--- GUILE ---
- GUILE (Guile is the GNU extensibility library)
see :
http://www.gnu.org/software/guile/guile.html
Like TCL, GUILE has also been designed from the very beginning
to be an extension language, to build scripting engines inside
your applications. It has roots in the Elisp engine found inside
the Emacs editor, but has different (and more advanced) technical
characteristics: Elisp is a small lisp-like, while Guile is based on
Scheme; also it lets your users choose between different syntax: lisp,
Scheme, Tcl, Python, etc. that will be translated into scheme.
Guile is of course under GPL.
--- PYTHON ---
- Python is OO and has a weird syntax to my opinion (indentation
is significant) but has a lot of admirers, probably the best
choice if your application is going to be 100.000 lines long and you
need to design good modular libraries, frameworks or applications.
see:
http://www.python.org/
Python is Open Source, its license is (in my view) BSD/X11 style.
If you want to read more detailed and serious (?) review than this
poor mail, have a look at this page:
http://www.python.org/doc/Comparisons.html
they have pointers on articles comparing and characterizing scripting
langages such as Perl, Tcl, Python (of course), Lua, Java, Rexx,
Scheme or Lisp. Maybe more biased towards Python, but that would be
interesting for you. Try to type a few "hello world" to make your
own opinion too :-).
--- PERL ---
- Perl is very good at working on texts but its learning curve is
a bit steep I think, also I'm not sure how simple it is to
implement a new module making native calls to C (I know that in
Tcl and Guile it is very easy and in Java, it is.. a hell ! ;-D).
However, Perl is probably the language with the biggest library
of Open Source modules (most of them in pure Perl), except Java maybe.
see :
http://www.perl.com/pub
Perl license is "Artistic", fully Open Source.
--- MISC. ---
- Rexx, etc. I would suggest to stick with a language with
a big community, maybe not the biggest, but a minimum is
required. I have spend 2 years suffering on LeLisp, a french
proprietary dialect of Lisp, used by nobody in the world, and
then 7 years being helped and having fun with the Tcl community.
Guile (GNU people), Tcl (12 years old), Perl, and Python are ok,
but beware of anything "less mainstream", that's an advice. Very
unfortunately, same goes for C/Java vs Eiffel/Ada/Modula3, etc. :-(
- Also, I would rather avoid interpreted Javas out there, such as
BSH, the BeanShell, which is very good for people working in Java
(like me) but is also very slow and was not designed for building
scripting engines, more to allow Java programmers to develop "the
interpretive" way (which is very appealing).
see:
http://www.beanshell.org/
Cheers,
Christophe.
= Nothing is faster than the speed of light ... =
= To prove this to yourself, try opening the refrigerator =
= door before the light comes on. =
--
-------------------------------------------------------------
[EMAIL PROTECTED] - Gemplus Research Lab
Phone: +33 4-42-36-57-83 | Disclaimer: I don't speak for Gemplus
Gemplus doesn't speak for me... it is better that way!
-------------------------------------------------------------
***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************