Slashdot Mirror


Lightweight Scripting/Extension Languages?

Andy Tai asks: "Extension languages are designed to be embedded in applications to support customization of the application behavior. Common scripting languages, like Perl and Python, are fairly 'large' with powerful run-time engines and libraries and are widely available and 'script' writers usually assume their stand-alone existences in the deployment environment. However, if one is looking for a language that's small enough so its source can be embedded in the distribution of and built as part of the application, Python and Perl may be 'overweight.' For the real lightweight choices there are Lua and Tinyscheme. Are there others? What are people's preferences and opinions regarding lightweight extension languages?"

41 of 176 comments (clear)

  1. Anything but odd/new language... by cymen · · Score: 2, Insightful

    Is PHP/Perl/Python too big? Just use them. I don't care about a couple more megs of system RAM. RAM is cheap. Learning a new language takes time.

    Unless there are extremely good grounds for using some annoying new/odd language, use something mainstream.

    1. Re:Anything but odd/new language... by awgriff279 · · Score: 2, Insightful

      I would agree with this, except that it makes for somewhat inefficient programs when one blows a couple extra megs of ram. Efficient, small programs are better long run because they are easier to maintain and run faster. However, for a hack, macgyver job nearly anything can be used.

    2. Re:Anything but odd/new language... by Anonymous Coward · · Score: 2, Informative

      Assuming you already know at least one other language, learning LUA takes exactly 1 hour. That's it. Spend an hour on it, and you are a master LUA programmer. That's a big part of its appeal.

    3. Re:Anything but odd/new language... by JohnFluxx · · Score: 2, Insightful

      I agree - especially as python can be really tiny.

      Also, read this:

      Extend vs Embed

      Often people only think of putting python(etc) inside their program, rather than the other way round - putting their program inside of python. Read the above link.

    4. Re:Anything but odd/new language... by JohnFluxx · · Score: 2, Informative

      I think you misunderstand.
      say I have a program, written in C, and I want to add full python scripting support.

      One way would be to try to add in the python interpreter into the program, and this is the way you immediately think of.

      The second way would be to have a small python program that calls your program (so all you rewrite in python is your main() function and the function that does event handling.)

      The link I provided gives reasons on why they consider the second way better.

    5. Re:Anything but odd/new language... by Christopher+Cashell · · Score: 3, Insightful
      There are dozens of available library implementations of reasonably well known languages. The trick is simply finding which one fits best for you. And, depending on the application, and how it's used, you might want to consider created a more generalized plug-in architecture, and allow for multiple scripting languages (possibly using something like CORBA).

      One thing I would strongly urge, is to pick a "real" language that already exists. Ideally, something like those listed below. Even if it's a fairly uncommon language that you personally aren't familiar with, the fact that it's in use in the real world means that more people will be familiar with it, and that it will likely be a more stable and usable solution.

      Creating a brand new language just for your application is a gauranteed way to annoy people because there is no chance that they will know the language before using your application.

      Here are some possibilities, depending on what you're looking for:

      Scheme/Lisp* based:
      • librep, used by Sawfish
      • Guile, the official GNU extension language
      • Elk, designed from the start as a small embeddable library
      • tinyscheme, another small implementation designed for embedded use
      • SIOD, a very small implementation that can be easily customized for your application
      • Kawa, a Scheme enivornment written in Java, that compiles Scheme code to java byte-codes, is an excellent choice for use in a Java application
      • Embeddable Common Lisp, while not as small or lightweight as most Scheme implementations, does a pretty decent job

      For larger (and more common) languages, you can choose from:
      • JavaScript/ECMAScript, this is a great choice as it was designed to be used as an extension language, and there are at least a couple of free/open source implementations available. . . and it's use in web browsers/web pages has made it a very well known language
      • eperl, an embeddable form of Perl
      • Python, though not ideally setup for this, can be embedded in another program
      • tcl, tcl was designed parly for use as an embedded scripting language, and works fairly well in this regard

      Some less well known, but still "real" languages that can make an excellent extension language include:
      • ficl, an implementation of Forth that's designed for embedded use
      • Lua, a language that was designed specifically to provide a small but powerful language for embedded use
      • S-Lang, a progammers library that provides a console GUI library and an extension language (used by jed, slrn, newt, mutt (optional), etc
      • cint, a C language style interpreter could probably be used easily enough
      • ch, another c interpreter
      • Bean Scripting Framework, BSF, is a great choice for java applications, as it provides a framework to use a numer of different languages, providing greater choice
      • Scriptix, an extension language with a C/C++ style syntax that evolved out of MUDix
      • ferite, an interpreter with "similiarities to perl, python, C, Java and pascal", and designed for embedded use
      • bsh, or BeanShell, is a small embeddable Java interpeter, written in Java, and has some extra "bonus" features of particular interest to scripters

      * Scheme, due to it's small size and powerful, easily extendable syntax, seems to be quite common when it comes to extension langauges. A list of programs that use Scheme (or a similar lisp dialect) off the top of my head includes: SIAG Office, The Gimp, Emacs, TeXmacs, Gnumeric, AutoCAD, Sawfish, GnuCash, Snd Sound Editor, etc.
      --
      Topher
    6. Re:Anything but odd/new language... by JudasBlue · · Score: 2, Informative

      "It's a good rant but it's not really very relevent - writing your app in python (at least in the way he describes) simply isn't plausible if you're writing an app for commercial or even mass distribution - you can't rely on an existing Python installation and if you've got to package one with your installer then theres hardly any more work to embed an interperter instead."

      This is old enough it will probably never be read, but that isn't true. There are utilites that do this in a snap, in addition to finding any extension package or dll deps that your python is using automagically in almost all cases. Just today I took a small app written in python using WxWindows ran it through py2exe and it runs on all flavors of windows, without python or wxWindows libs installed on either one. Took me about ten minutes.

      McMillian Installer will do the same trick, tho I haven't used it recently. Mcmillan also does the same thing for Linux, where I wish a lot more people were making packages available as no dep binaries as well as more traditional source packages, but that is just me.

      Now, as for your other points, if you happen to want to write your code in Python, well, that is a different matter. But if you choose to, it is very easy and fast to distibute your program binary without deps.

      --

      7. What we cannot speak about we must pass over in silence.

  2. Guile by crmartin · · Score: 3, Informative

    God knows the words "lightweight" and "Gnu" don't generally go together, but how about Guile?

    1. Re:Guile by aspjunkie · · Score: 3, Funny

      just Guile!? Don't forget Ryu, Chun Li, and Dhalsim! ;)

  3. TinyTCL by the_womble · · Score: 3, Informative
    what about Tiny TCL

    Its easy to learn and use (very good if the people using our embeded language are not programmers). Its mature, supposed to be extensible, and if you decide you need something more powerful later on even the current full verion is not that bloated.

    1. Re:TinyTCL by Twylite · · Score: 4, Informative

      Tcl/Tk proper is not a bad idea either. If one does not need the GUI part (Tk) then Tcl is relatively easy to integrate into a project, and is under 200k.

      HowToEmbed from the Tcl Wiki is a good starting point, and MkTclApp may help.

      Tcl has very consistent and simple syntax (although it can get rather confusing at times), and it is very simple to add new command into your application that are exposed via Tcl. One of the nicest aspects of Tcl is that is it seriously multi-platform.

      Of course this all depends on the requirements: how powerful does the language need to be, what functions must it provide, what types do you need it to be able to handle, how small is "lightweight", etc.

      --
      i-name =twylite [http://public.xdi.org/=twylite], see idcommons.net
    2. Re:TinyTCL by ianezz · · Score: 4, Informative
      One of the nicest aspects of Tcl is that is it seriously multi-platform.

      Another nice aspect of Tcl is that it can easily evaluate code in a different stack frame (example: in the caller's context), and source code can be easily passed to procedures as strings between braces (as it is usually done), so extending/reimplementing the language control structures is as simple as writing a new procedure (and no special/ugly syntax is required).

      That's as close to Lisp macros as you can get.

  4. How much do you need? by Ripsnorter · · Score: 2, Informative

    Just how much customising do you need?

    From my experiance if you only need a little customisation then you can do most of that stuff from a config file, .ini if you want it to be easy to edit, xml if your going to write a gui to do it or your users are compertant. Any more than that your better off going with something like python or perl, they are widely known, and have rich libraries to let the people using the app do some really imaginative things.

    The other thing that you can do is write your app in such a way that it is easy for scripting langs to get there hooks into. For example, on windows you can do this by providing com interfaces to all the things you want to have control over, then you can use any lang you want to control your app.

  5. The need for "extension languages" by be-fan · · Score: 4, Insightful

    Is usually a sign that you are using too low-level a language for the application itself. There is no reason you can't write your whole app in something like Python (or better yet, a compiled high-level language).

    I can see why you might want to stay with C/C++ for a major commercial application (not because of speed reasons, but because the maturity of the implementations of alternative high-level languages) but it pains me to see tons of OSS software, especially non-speed-critical GUI apps, still being written in C!

    --
    A deep unwavering belief is a sure sign you're missing something...
    1. Re:The need for "extension languages" by squiggleslash · · Score: 2, Funny

      Personally, I like C. And to be honest, I always thought the advantage in having a faster CPU was that my programs could run faster.

      --
      You are not alone. This is not normal. None of this is normal.
    2. Re:The need for "extension languages" by ajagci · · Score: 2, Interesting
      I agree: the use of C/C++ for most Linux applications just doesn't make a lot of sense. It's more effort to develop in than a HLL, a lot harder to debug, and usually, it isn't even any faster. Python would probably be a good choice for many desktop apps.

      However, when it comes to statically type checked, non-C/C++ languages on Linux, there isn't much choice:
      • Java: no fully compliant open source implementations; some serious design flaws.
      • C#: not a standard part of major Linux distributions; some concerns (probably unjustified, but still) about Microsoft patents.
      • Eiffel: open source compiler does not support separate compilation; some serious design flaws in its type system.
      • Modula-3, Oberon: not widely used.
      • O'CAML: great language but probably too complex and sophisticated for your average Linux hacker; lacks some facilities essential for high performance computing.

      Overall, C# looks like the most promising to me: it combines the best features and simplicity of Java with most of the efficiency and C-interoperability of C++. Let's hope Mono will make it into all major Linux distributions soon.
    3. Re:The need for "extension languages" by msuzio · · Score: 2, Insightful

      I don't think you're visualizing the situation correctly.

      I don't see how the need for an extension language indicates that at all. An extension language (IMHO) is usually needed so that the end user of the application can script that app and extend it to do things you, the application engine writer, did not supply. The needs of the engine and the needs of the extension language are totally different.

      I'm going to want to write the engine to be fast,
      efficient, and easy for me to maintain. The extension mechanism should be simple, allow for ease of re-use (so the user community can exchange code snippets amongst themselves), and powerful enough to allow the sort of add-ons and control structures I (the app designer) *think* the user will need.

      Perfect example is Neverwinter Nights (although the darn app always crashes on me... but I digress ). Powerful engine, with a scripting language bolted on. You would never try to write that application *in* the scripting language. You might ship a large amount of *content* with the app pre-written using the scripting language, though.

    4. Re:The need for "extension languages" by Webmonger · · Score: 2, Informative

      If you accept the notions that
      1. scripting languages speed development
      2. high-level code does not need to be optimized

      Then for an app like Neverwinter Nights, it would make sense to use a scripting language for the high-level code (e.g. menu handling code), while leaving the performance-critical code (e.g. 3-D rendering) in C, C++ or assembler.

      Coded like this, NN might not crash as frequently because either
      - The crashy code would be implemented in a scripting language, and so memory handling would not be a problem

      - The crashy code would still be in C/C++, but since the other code had been written more quickly, there would be more time to fix it.

      The current issue of the C/C++ Users Journal is all about mixed-language development.

    5. Re:The need for "extension languages" by be-fan · · Score: 3, Insightful

      C programs don't force hardware to resemble a PDP-11, but the C machine model doesn't resemble the actual hardware as much as C programmers like to believe.

      - C is entirely serially, and the compiler has to infer paralellism from the code. Modern hardware is significantly parallel.

      - C is entirely memory-based, while modern hardware does everything it can to avoid referencing memory.

      - C has no primitives to describe branching, to aid things like speculative execution.

      - C has no vector types, while most modern processors have vector units.

      etc,etc,etc.

      C has a very nice, simple machine model, but C programmers don't really understand what the computer is doing "under the hood."

      --
      A deep unwavering belief is a sure sign you're missing something...
    6. Re:The need for "extension languages" by be-fan · · Score: 2, Informative

      I'm not talking about Python. Python is positioned as a scripting language, and hence doesn't have a powerful compilation infrastructure. Although, Pysco does some very cool dynamic optimizations for Python.

      In contrast, there are many high-level languages like Common Lisp, Dylan, Scheme, ML, Ocaml, etc, that have very powerful native compilers. They do optimizations that C/C++ compilers simply cannot do, because of the low-level C memory model. Literally decades of research has gone into making these compilers, and they have optimizations that (while not quite magical) are very impressive.

      Variously:

      - There are type-inference optimizations that eliminate the overhead of dynamic dispatch.
      - There are heap-analysis optimizations that stack-allocate objects whenever possible, to avoid heap allocation.
      - There are analysis that avoid heap-allocating closures.
      - There are analysis that eliminate type checking and array bounds checking.
      - There are analysis that perform large-scale optimization of class heirarchies, to eliminate the over head of OOP.
      - There are memory allocation analysis that reduce the overhead of garbage collection (region inference).
      - They do method specialization, allowing the C++ template advantage of generic functions optimized for a given type, without actually having to deal with explicit type parameters.

      Some useful pointers:

      Apple Dylan Wiki
      Lisp vs Java vs C/C++ performane
      Bigloo Scheme Compiler
      Gwydion Dylan compiler
      CMU Common Lisp Compiler
      UW Vortex Compiler
      MLKit ML Compiler
      Ocaml Compiler

      --
      A deep unwavering belief is a sure sign you're missing something...
  6. Javascript! by Geek+Boy · · Score: 5, Interesting

    ECMAScript/Javascript seems like a logical choice. it was made for just that - embedding. It's quite small to implement, and there are many opensource implementations out there already. It can be procedural or OO, and everyone knows how to use it if they've done some basic web work.

    1. Re:Javascript! by Anonymous Coward · · Score: 5, Informative
      Mozilla implementation of JavaScript in C is available at http://www.mozilla.org/js/ and pure Java implementation is at http://www.mozilla.org/rhino/

      And btw, ECMAScript/JavaScript can be pure functional as well.

  7. ICI by tpv · · Score: 3, Interesting
    ICI is very lightweight and generally quite usable by semi-programmers.

    It's sufficiently C-like to suit anyone who has done C/C++/Java/Perl/... but high level enough to be a feasible extension language.

    Of course it depends on what type of person you expect to use your extension language. Are they programmers?

    --
    Read more of this story at Slashdot.Read more of this story at Slashdot.Read more of this story at Slashdot.
  8. paxscript by glob · · Score: 2, Informative

    i recommend you look at paxscript.

    it's the most complete and quickest of any embedded source stuff that we've investigated.

    supports basic, c, objectpascal (ie delphi) and javascript.

    not free, but you get the source when you purchase it (US$179).

    delphi and borland c++ builder only.

    --
    nostrils
  9. REBOL by the_greywolf · · Score: 3, Informative

    didn't see anyone else mention it, so i thought i would.

    REBOL is a ridiculously simple and easy-to-learn web-oriented language. so easy, in fact, that i wrote a fully-functional IRC dice bot in under 400 lines, overnight. and if that weren't impressive, then might i add that i was running on ZERO caffeine, learning the language for the first time, learning IRC Client protocol for the first time, and came up with a few unusually witty statements and insults to boot?

    now the bad part: REBOL is not open source. poo. (i really was a bit disappointed.) but REBOL/Core is free (for any use, i gather), and the license fees for View and Command seem rather reasonable.

    the nice part: it has been ported to and runs on about 43 platforms, last i checked, and is light enough that the executable weighs in at around 250kb for the win32 release. (haven't used the other platforms, so no comment.)

    it runs on just about every unix i've heard of, on every relatively common configuration, and works beautifully and seamlessly. and, after a quick glance, i see it runs on serveral major embedded systems, including WinCE, QNX, and Linux, and will even run on my friend's dated Amiga.

    enjoy and happy coding. :)
    --
    grey wolf
    LET FORTRAN DIE!
    1. Re:REBOL by swdunlop · · Score: 3, Informative

      I had a very guilty love for REBOL, but it hasn't changed much in the last three years.. Many of the warts on REBOL/View are still there, and it's still not fully documented. They also haven't finished their port to OS X, so it isn't as perfectly cross platform as I would like..

      And.. Finally.. How does one embed REBOL in an open source application?

  10. Developing for windows? by KILNA · · Score: 4, Informative
    --
    Error: PANTS NOT FOUND. Press <F1> to continue.
  11. Object Forth? by samjam · · Score: 4, Informative

    ficl.sourceforge.net

    A portable object oriented forth at less than 100K for a full implementation, able to handle calls from your apps as well as call your apps fgunctions or other dll's.

    Under a BSD-ish license.

    The upside:
    1) Its tiny
    2) The forth code you write will be tinier

    Downsides:
    1) You need to learn forth (I mean properly) to appreciate it.

    Forth is unlike most other languages, it was designed to avoid the debug, recompile cycle that is so common.

    Sam

  12. How about JavaScript? by Rich · · Score: 5, Informative

    I've been working on a system for embedding JS in KDE apps (amongst other reasons it is a about 1/10 the size of a python interpreter). You can find lots of information at http://xmelegance.org/kjsembed. The interpreter in KDE has no dependency on KDE/Qt or anything else so you might find it usable in your app.

  13. Copy of an advogato article by DavidNWelton · · Score: 3, Informative

    I guess atai must have submitted the same question here as well, but the "original" discussion took place on advogato:

    http://www.advogato.org/article/735.html

    It would be useful if he could state what his requirements and limits are, in detail, because that's a very necessary part of evaluating what would work.

  14. Why another language? by Anonymous Coward · · Score: 5, Insightful
    Extension languages are designed to be embedded in applications to support customization of the application behavior. Common scripting languages, like Perl and Python, are fairly 'large' with powerful run-time engines and libraries and are widely available and 'script' writers usually assume their stand-alone existences in the deployment environment.

    Well you're not obligated to provide the libraries. For instance, Blender, which uses Python, did not include Python libraries ; however it was possible for people which really wished it, to set paths to point to libraries. Forcing the users to learn a new language, just to cut the size of the distribution is misguided IMHO. Just provide the extension language (& support) as an optionnal individually downloadable shared library.

  15. Why so many languages? by Futurepower(R) · · Score: 2, Interesting


    "...learning LUA takes exactly 1 hour."

    I couldn't read the reference manual in one hour. I couldn't learn the quirks of co-routines in one hour.

    I think there is a big, big misunderstanding about computer languages. The "quick and dirty" ones are incomplete and limited. The complete languages are necessarily complex. At one time, Perl was like Lua. Then it needed this and that until now it is beginning to be as complex as C++. The same will happen with Lua, I'm guessing, if it remains popular.

    It seems that every self-motivated serious programmer writes at least one editor or one language or one compiler. Even I wrote a language and compiler -- for Hewlett-Packard data acquisition equipment.

    I think Larry Wall didn't foresee the future when he started Perl. Did he begin Perl with the idea that it would eventually be object-oriented? Did he expect that he would spend his entire life developing his "report language"?

    I'm tired of learning new languages. I don't see the point in it. I'll bet there are hundreds of thousands who learned Pascal in college who wish they had not wasted their time; except for Delphi, Pascal is dead.

    For those who want an embedded scripting language, how about a C interpreter? Try Cint or Ch.

  16. EiC? by Futurepower(R) · · Score: 2, Informative

    Or, how about EiC, now hosted at Sourceforge. "EiC is pointer safe."

  17. Consider Ruby by urbangipsy · · Score: 3, Informative

    What about Ruby (ruby-lang.org). It's easy to learn, powerful and has a reasonable set of classes and methods built-in. It's also quiet widespread nowadays, lightweight compared to Python and easy to embed via libruby.so
    see the Ruby book (section Embedding a Ruby Interpreter

  18. Depends on the host programming language and OS by angel'o'sphere · · Score: 2, Interesting

    On Mac OS X you definitly will use AppleScript. Regardless of programming language used for your application. OTOH, you can use any language that offers a library to send high levle events to your apps(not sure about that in our days).

    On Windows you likely will use Visual Basic for Applications or Visual Basic Script or any other Active Scripting language.

    If you write ONLY Java, like I do in our days, its easy: the scripting language will be either Java(Dynamic Java, see: http://koala.ilog.fr/djava/ or Bean Shell, aka bsh, see: http:www.beanshell.org) or Java Script, aka Rhino, see: http://www.mozilla.org/rhino/ or any other language running on a JVM see: http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.ht ml

    If you write your program ina C-ish language I would consider to use CORBA --- yes indeed!! --- to be able to script it with everything.

    If you want to use traditional scripting languages like TCL, PERL etc. you likely will want to look into SWIG, see: http://www.swig.org.

    But ... as soon as you start working with SWIG you will realise that making an application scriptable menas to craft special hook functions to access only the wanted part of the application, likely via strings only arguments and return values.

    The bigger your applicatin gets, the more complex will be the access layer for the scripting languages.

    When you have reached that point you likely regret not to have used something more suiteable, like CORBA or the Java stuff I sketched above or you are to the point where you throw it away and rewrite it in a "embed" approach where you will use a scripting language as development language and write certain modules as plugins into that language.

    Then however you are bind to the scripting language as host language.

    BTW: there are a lot of free mini orbs which make CORBA a toy. And writing IDL is not much harder than writing SWIG config files. If you like to shield your customer from CORBA give him a lib for his scripting language, which hides the fact that CORBA is used.

    Regards,
    angel'o'sphere

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  19. Nasal, a javascript-like language by truth_revealed · · Score: 2, Informative

    Nasal is a very well designed small embeddable language with a Javascript-like syntax and an LGPL license. I prefer it to Lua because I am not fond of Lua's Pascal-style syntax. Be aware that Nasal is not very battle-hardened yet and does not have even a 1/100th of the developer community of Lua.

  20. LUA by schapman · · Score: 2, Informative

    lua is a great scripting language when it's used well. When i was studying game development in school, we were introduced to it as a good way to drive out games. Its easy to add functionality for it... its fast... it simple. I could write all my rendering/sound/network/input code in c++, and just have interfaces for everything from lua... this way, when i wanted to drive a game app, i could do the following: (pseudo lua... hmm... pseudo scripting :) ) load level load char at xyz load enemy at xyz go then, my c++ code could handle all the collision detection/AI/proper sounds for things... it all comes down to good design. Something like lua is great for having somethign high level drive a low level engine.

    --
    Wouldnt you like to be a pepper too?
  21. Nasal by Nevyn · · Score: 2, Informative

    When I was answering this question, I ended up looking at nasal. While not perfect, it was the closest to what I wanted ... and was under a compatible license (LGPL). But then I wanted something small, lua is way too big.

    --
    ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
  22. I'm doing this with Ruby by CatGrep · · Score: 2, Interesting

    Until the 1.8 release the whole Ruby source code and libraries could be distributed on a 1.4MB floppy with room to spare. With 1.8 a lot of libraries have been added so it's about twice as big. (you can always leave out libraries you don't need to keep it light)

    Ruby is also easy to embed as well, but we decided to use swig to wrap our C++ classes so that they're accessable from Ruby and then script the whole thing in Ruby. This offers several advantages for our application since we wanted to allow users to script it anyway.

    Another project involves including Ruby and libs on a CD with a Ruby script that is used for license detection/management and installation. The Ruby script queries the rpm repository (on Linux) or registry (on windoze) and makes certain determinations about the system on which the actual software on the CD is to be installed. Turns out that including Ruby and most of it's libraries on the CD took much less room than the statically linked executables we used to include for doing the same thing (which were developed in C++). At any rate, the potential user of our CD doesn't need to have Ruby installed on their system because we include it on the CDROM and start up the Ruby script from a shell script (or a bat file on Windows.). Oh, and the Ruby code for this particular project that replaced C++ code is about 1/3 as big and only took us 1/4 of the time to develop & debug as compared to the previous C++ solution. And the Ruby-based system is much more flexible than the previous C++ one - when new requirements come in we can usually have the Ruby system updated & tested in a matter of hours as compared to days for the previous C++ based system. The productivity gains alone were well worth the conversion to Ruby.

  23. COM interfaces and stuff like it by Latent+Heat · · Score: 2, Informative
    Multi-language capability gets slammed with the argument that 5 different programming teams within an organization are going to write in 7 different languages, and how do you maintain that mess. To me, multi-language means I write the app in whatever language suits me, and users of my app write scripts and extensions in whatever language suits them.

    COM/ActiveX works swimmingly in this regard in that you have a choice of languages for both producing and consuming COM/ActiveX components, and COM allows you to pass object references across the barrier while ActiveX allows you to work with GUI widgets in this way. And it is true multi-language, not the fake multi-language of the .NET languages.

    On the other hand, COM/ActiveX pretty much limits you to Windows, you have to be careful of the lowest-common-denominator effect of which COM data types work in which languages (the more restrictive set of "Automation" types compared to the wider set of C-compatible types and a more restrictive situation for scripting languages and Web browsers than with Visual Basic 6). Also, COM/ActiveX can get ugly in some environments (C++ and MFC/ATL -- you are really stuck taking the Wizard-generated code at face value unless you really know what you are doing), and as a component developer you have to pick up some IDL basics.

    Is there anything out there that even comes close? With the Python/C-C++ meld, you are pretty much restricted to Python on one end and C++ on the other hand, and the C++ end is, shall we say, a bit lower level than the Python end, although there are things like SWIG that look amazingly like, hey, IDL and Visual Studio Wizard code.

    Another thing I have looked into is the Matlab-Java meld -- a lot of academic engineer and scientists use Matlab as their all-purpose scripting tool, but I wouldn't want to develop high power apps in it. The Matlab-Java meld is surprisingly clean, the Java side can be a Swing app and it runs in its own Swing windows. Again, you are restricted to Matlab on the scripting side, Java on the custom app side, but the interesting thing is that it is pointedly the sort of thing SUN isn't interested in. According to the SUN world view, Java is everything you would ever need and the idea of scripting Java from anything else doesn't enter into their universe.

    Is there anything else out there that scripts Java? I suppose there is Jython. Anything else?

  24. Check out Ferite by FireChipmunk · · Score: 4, Informative

    Ferite is a scripting language and engine all in one managable chunk. It is designed to be easily extended in terms of API, and to be used within other applications making them more configurable and useful to the end user. It has a syntax similiar to a number of other langauges but remains clean and it's own language.

    I love that it was designed from the Start to be Thread Safe and Embeded, unlike PHP or Python.