monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Python scripting


From: Matthew A. Nicholson
Subject: Re: [Monotone-devel] Python scripting
Date: Tue, 12 Oct 2004 02:08:46 -0500
User-agent: Mozilla Thunderbird 0.8 (X11/20040926)

Nathaniel Smith wrote:
On Tue, Oct 12, 2004 at 12:56:22AM -0500, Matthew A. Nicholson wrote:

Is lua the only language monotone is scripted in? Is there by chance a python backend? If not how modular is the scripting backend (aka could python be subed in)?.


Lua is the only language monotone is scripted in.

The scripting interface is quite abstracted from the rest of the code;
I think you'd basically just have to reimplement the class 'lua_hooks'
(defined in "lua.hh").

The actual utility of this is a little dubious, though; Monotone
really doesn't use the hooks for anything tremendously complicated,
and Lua works quite well for the little things Monotone uses it for.
I'm really not sure what you'd gain from the swap, and you'd be adding
complexity (since Lua really is simpler to deal with) and
incompatibility with everyone else.

Im just curious. I have never embedded python and this would be a nice place to start. Also what's the harm in having support for scripting in python instead of/in addition to lua (I know lua is most capable and just fine).

(Now, a high-level interface to the data structures and algorithms
that Monotone exports, like the ancestry tree and merging, would be an
awesome thing to have in Python.  But that's a completely different
project...)

-- Nathaniel



--
Matthew A. Nicholson
Matt-land.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]