lua-users home
lua-l archive

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


Title: _javascript_ over Lua as DSL
I think you may be also interested in Parrot from www.parrotcode.org for your project. The difference IMHO is that Parrot is much lower level then Lua and has been specifically designed to be an intermediate (and still human readable) level between source and bytecode, usable for building higher level languages on top of it. In a way it's conceptually close to .NET CLR from what I can tell. I am not sure how its performance would measure against Lua's, but that should be rather easy to test for. In fact it might have been a fun project to write Lua over it and see how that might come out, given the performance of Parrot is good enough:) Also Parrot has an Assembly level that is yet a level below and is still human readable.
 
Anyway, this is just another idea for you to toy with.
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br on behalf of therandthem
Sent: Wed 10/12/2005 11:59
To: lua@bazar2.conectiva.com.br
Cc:
Subject: _javascript_ over Lua as DSL

I would like to implement _javascript_ over Lua.  This
will be the full ECMA-262 specification with the
ECMA-357 E4X XML entension.  Rather than create a
traditional interpreter I will to use Lua to create a
domain specific language (DSL) if that is possible.

One method is Logix found at http://livelogix.net/.
Is the Logix approach, which runs on Python, necessary
in Lua?  Does Lua's meta-mechanisms make this easier
than the Logix approach?

I am posting this because I do not have enough
experience to do this very quickly on my own.  If
others would like to work on this, please let me know.

Here is my reasoning and motivation:
  -The Lua language engine is very fast and it will
get faster.  A co-worker recently commented, "Ruby is
slow because it is interpreted."  I replied, "No, it
is slow because it has a slow interpreter."
  -Because Lua is fast it is a good candidate to use
as a base for other (existing even) languages.  Lua is
not Object Orientated so there is no awkward object
model to object model translation.
  -_javascript_ will always be with us.  The Rhino and
Spidermonkey engines are not fast.  When one needs to
use _javascript_ one should have fast _javascript_.
  -Lua can do prototypes.

So, that's it.  My ultimate hope is that a clear way
to create DSLs in Lua will result from this effort.
If it does then I will move on to implement a DSL for
PHP.  The ultimate goal is that any language with a
slow interpreter can be recreated as a DSL over Lua.

Thanks,

McKinley


               
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs