Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2009 14:39:30 -1000
From:      Clifton Royston <cliftonr@lava.net>
To:        Linda Messerschmidt <linda.messerschmidt@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Embedded scripting language advice sought
Message-ID:  <20090119003929.GC26150@lava.net>
In-Reply-To: <237c27100901181541n412f66c3v24ebae43b9efc313@mail.gmail.com>
References:  <237c27100901181541n412f66c3v24ebae43b9efc313@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 18, 2009 at 06:41:59PM -0500, Linda Messerschmidt wrote:
> For a project I'm working on, I need to find an scripting language, and I
> have a long wishlist:
> 
> - able to be "easily" embedded in a C++ application
> 
> - "real" object-oriented with inheritance (preferably multiple inheritance)
> 
> - able to implement object methods in C++ where needed
> 
> - "sandbox" operation (e.g. ability to suppress any file I/O & system
> libraries, but keep math and string libraries)
> 
> - thread-safe, or, at least able to have multiple coexisting execution
> contexts in one running process
> 
> - relatively user-friendly syntax (i.e. (not (lisp (based))))
> 
> - has to build and embed on FreeBSD
> 
> This is a mathematical model, and the goal is to write certain
> high-performance parts in C++, but to provide the user a command-line style
> interface where they can "explore" interactively, examine/tweak data values,
> etc, and then override certain behavior by subclassing from the C++ base
> classes using the scripting language to see how it affects the next model
> iteration.  One thread is handling the model calculations, and one handles
> the user's exploration, with appropriate synchronization when changes are
> made.  (We are doing this already, but since the code is C++, only the data
> can be edited while it's running and inspection is limited to our hacky
> pseudo-language.)

  Some of these criteria seem to match TCL's design criteria (easy
embeddability, relatively user friendly, able to implement methods in a
compiled language) but core TCL falls down on the object-orientation
side.  However there is actually a choice of object models in TCL, with
at least one of them [incr TCL] closely modeled on C++'s object model.

  You might find this worth looking into.

  I'm not a TCL maven, just worked with it a bit on a past employer's
project where it was the primary scripting language for a large
commercial hardware-test system. 

  -- Clifton

-- 
    Clifton Royston  --  cliftonr@iandicomputing.com / cliftonr@lava.net
       President  - I and I Computing * http://www.iandicomputing.com/
 Custom programming, network design, systems and network consulting services



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090119003929.GC26150>