lua-users home
lua-l archive

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

On Fri, Sep 25, 2009 at 5:01 PM, Casey Hawthorne <> wrote:

You might want to try implementing the LUA VM in Haskell, since
Haskell was used to implement Perl 6.

My main goal is to implement a Lua VM where C is unavailable.  Right now my main areas of focus are browsers and XNA (for xbox community games).
Parsers have a lot of abstraction levels which a pure functional
language excels at.

If you insist on using the .NET platform, you might want to chose F#
over C#.

I wouldn't mind doing it in F# if I had more time to learn the language.  The VM as it stands now is about 1200 lines of code and C# 3 is good/functional enough for me to write clean code.

On re-reading your post, it seems like you want to write a language
that runs on the LUA VM.

Yes, ultimately I want my language to target the Lua VM and I will have portability to any platform that supports it.  There are many VMs out there but none of them truly run everywhere and depend on their vendors of a large open source effort to port.  I can't run Java on the XNA platform and I can't run C# in Flash.  I am looking at the LuaVM as a way for me to make my code portable at only a small cost of reimplementing the Lua VM and the standard library on whatever platform I need.  So far the effort to do this in C# is only a couple of days.

>I really like the idea of a language being built up from a small core which
>can be easily implemented anywhere it is not supported.

You are asking for a small as possible VM and as small as possible
language kernel, I believe.

Just recently there was an O/S written for embedded applications that
was proven correct.
Written in a functional style?
Implemented in a functional language?

You might want to look into that.

On Fri, 25 Sep 2009 16:38:38 -0700, you wrote:

>Hello All,
>I've been playing around with the idea of implementing a Lisp-like language
>that targets the LuaVM.   The reasons why I chose the Lua VM are 1) It seems
>to be faster than several other VMs and 2) The VM has a very minimalistic
>approach, which makes it very easy to implement.   I want my language to run
>on several platforms that do not support C code, including rich web clients
>like Flash and Silverlight and game development environments like XNA.   I
>really like the idea of a language being built up from a small core which
>can be easily implemented anywhere it is not supported.
>I have started a VM implementation in C#, and it passes many lua unit tests
>at this point.  I can compile lua files using luac and run them in both
>Silverlight and XNA.   I have really only spent a couple of days doing this
>and I'm surprised at how straightforward this is.  Setting my Lisp language
>idea aside, I was wondering if this VM might be of any value to others, as
>an alternative way to run Lua code in .NET?  I see there is LuaInterface but
>that doesnt seem to support my requirements because it is a bridge to Lua's
>C VM.
>I will probably end up writing a native action script Lua VM as well so I
>can easily develop games that work in both silverlight and flash.  Either
>that or I could use Lua-Alchemy but I am curious about how a native action
>script VM would perform against the c->llvm solution that alchemy is using.
>Any thoughts on this are appreciated.