lua-users home
lua-l archive

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


Adolf Mathias <dolfi@zkm.de> wrote:
> I've done some evolutionary programming in Scheme (a Lisp dialect), but
> don't think it's that easy in Lua, because you don't have a simple
> program representation other than text. In Scheme, you can implement the
> basic operations, mutation and cross-over, by means of simple list
> operations, whereas cross-over on a text-based representation of
> programs involves syntactical analysis. A syntax-tree representation of
> programs
> in Lua would be the solution, but this is essentially the same as with
> most other programming languages, except that the interpretation of a
> generated piece of code with Lua's dostring is particulary simple.

It would be cool if Lua held the parse tree of compiled code and had
an API for manipulating it. Is this what Scheme can do?

I'm currently working on some genetic algorithms in Python but I want
to move it to Lua(once I get the Lua socket libraries compiling on 
NeXTstep).

Steve