From owner-freebsd-questions@FreeBSD.ORG Mon Jan 19 00:39:31 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC7CD1065675 for ; Mon, 19 Jan 2009 00:39:31 +0000 (UTC) (envelope-from cliftonr@lava.net) Received: from outgoing02.lava.net (pie.lava.net [IPv6:2001:1888:0:1:230:48ff:fe5b:3b8c]) by mx1.freebsd.org (Postfix) with ESMTP id 3441C8FC0C for ; Mon, 19 Jan 2009 00:39:31 +0000 (UTC) (envelope-from cliftonr@lava.net) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by outgoing02.lava.net (Postfix) with ESMTP id A14FF170788; Sun, 18 Jan 2009 14:39:30 -1000 (HST) Received: by malasada.lava.net (Postfix, from userid 102) id 56D81153882; Sun, 18 Jan 2009 14:39:30 -1000 (HST) Date: Sun, 18 Jan 2009 14:39:30 -1000 From: Clifton Royston To: Linda Messerschmidt Message-ID: <20090119003929.GC26150@lava.net> Mail-Followup-To: Linda Messerschmidt , freebsd-questions References: <237c27100901181541n412f66c3v24ebae43b9efc313@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <237c27100901181541n412f66c3v24ebae43b9efc313@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: freebsd-questions Subject: Re: Embedded scripting language advice sought X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2009 00:39:32 -0000 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