Microsoft DLR and Lua?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Microsoft DLR and Lua?

Erik Cassel

Has anybody been thinking about Microsoft’s DLR?  It will be part of Silverlight. Lua sounds like an excellent language for this kind of thing. Imagine Flash on steroids with Lua in place of clunky ActionScript!

 

Apparently there are Python, _javascript_, Visual Basic and Ruby implementations already built on top of DLR.

 

Of course, this might require a complete re-implementation of the language. Also, Lua generally prides itself in being small, self-contained, pure C, etc, etc.  Still, I think it is intriguing…

 

Here are some links:

 

http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx

 

http://sessions.visitmix.com/default.asp?event=1011&session=2012&pid=DEV02&disc=&id=1511&year=2007&search=DEV02

 

http://arstechnica.com/news.ars/post/20070430-microsoft-reveals-dynamic-language-runtime-for-net.html

 

Your thoughts?

 

-Erik Cassel

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Microsoft DLR and Lua?

Stefan Sandberg
You have my official blessing, go-go-go.. :)

Erik Cassel wrote:

Has anybody been thinking about Microsoft’s DLR? It will be part of Silverlight. Lua sounds like an excellent language for this kind of thing. Imagine Flash on steroids with Lua in place of clunky ActionScript!

Apparently there are Python, JavaScript, Visual Basic and Ruby implementations already built on top of DLR.

Of course, this might require a complete re-implementation of the language. Also, Lua generally prides itself in being small, self-contained, pure C, etc, etc. Still, I think it is intriguing…

Here are some links:

http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx

http://sessions.visitmix.com/default.asp?event=1011&session=2012&pid=DEV02&disc=&id=1511&year=2007&search=DEV02 <http://sessions.visitmix.com/default.asp?event=1011&session=2012&pid=DEV02&disc=&id=1511&year=2007&search=DEV02>

http://arstechnica.com/news.ars/post/20070430-microsoft-reveals-dynamic-language-runtime-for-net.html

Your thoughts?

-Erik Cassel



Reply | Threaded
Open this post in threaded view
|

Re: Microsoft DLR and Lua?

Fabio Mascarenhas
In reply to this post by Erik Cassel
There are semantic mismatches between the DLR and Lua, mostly in the varargs and multi-values department, but also on tail calls, and Lua-style coroutines. The DLR as it is now is fairly flexible on the points where the four languages below have semantic differences, but that is not the case when they agree. But considering the maturity of the platform (basically it's in the anything can change stage yet) that's to be expected. In the future, maybe (especially if Microsoft becomes more open to open source contributions; its developers can't even read the source code of those languages!).

Lua on the CLR is another matter, though, and very doable (although coroutines are still a pain, but possible). And I'm working on that right now. :-) Oh, and about the DLR again, a Lua compiler *could* be implemented, but I believe it would perform badly. But if Silverlight/Moonlight gains traction, and there is no other way...

--
Fabio Mascarenhas

On 6/30/07, Erik Cassel <[hidden email]> wrote:

Has anybody been thinking about Microsoft's DLR?  It will be part of Silverlight. Lua sounds like an excellent language for this kind of thing. Imagine Flash on steroids with Lua in place of clunky ActionScript!

 

Apparently there are Python, _javascript_, Visual Basic and Ruby implementations already built on top of DLR.

 

Of course, this might require a complete re-implementation of the language. Also, Lua generally prides itself in being small, self-contained, pure C, etc, etc.  Still, I think it is intriguing…

 

Here are some links:

 

http://blogs.msdn.com/hugunin/archive/2007/04/30/a-dynamic-language-runtime-dlr.aspx

 

http://sessions.visitmix.com/default.asp?event=1011&session=2012&pid=DEV02&disc=&id=1511&year=2007&search=DEV02

 

http://arstechnica.com/news.ars/post/20070430-microsoft-reveals-dynamic-language-runtime-for-net.html

 

Your thoughts?

 

-Erik Cassel

 

 


 
Reply | Threaded
Open this post in threaded view
|

Re: Microsoft DLR and Lua?

Tony Finch
On Sun, 1 Jul 2007, Fabio Mascarenhas wrote:

> There are semantic mismatches between the DLR and Lua, mostly in the varargs
> and multi-values department, but also on tail calls, and Lua-style
> coroutines.

Does it support arbitrary types as table indexes?

Where is there a technical description of the DLR?

Tony.
-- 
f.a.n.finch  <[hidden email]>  http://dotat.at/
FITZROY SOLE: WEST OR SOUTHWEST 5 OR 6, OCCASIONALLY 7. ROUGH OR VERY ROUGH.
SQUALLY SHOWERS THEN RAIN. MODERATE OR GOOD.

Reply | Threaded
Open this post in threaded view
|

Re: Microsoft DLR and Lua?

Fabio Mascarenhas
On 7/1/07, Tony Finch <[hidden email]> wrote:
On Sun, 1 Jul 2007, Fabio Mascarenhas wrote:

> There are semantic mismatches between the DLR and Lua, mostly in the varargs
> and multi-values department, but also on tail calls, and Lua-style
> coroutines.

Does it support arbitrary types as table indexes?

Python dictionaries can have anything as a key, so I guess yes. But I wouldn't reuse a Pythonic dictionary implementation for Lua, as we would lose the array optimization. That's what I did for my Lua CLR compiler, anyway.
 
Where is there a technical description of the DLR?

Jim Hugunin published a high-level view of somethings in his blog (and there are some slides here: http://compilerlab.members.winisp.net). There's also some documentation in the form of a chm file, but mostly it's "use the source, Luke".
 
Tony.
--

--
Fabio Mascarenhas
 

 
Reply | Threaded
Open this post in threaded view
|

Re: Microsoft DLR and Lua?

Tony Finch
On Sun, 1 Jul 2007, Fabio Mascarenhas wrote:
> On 7/1/07, Tony Finch <[hidden email]> wrote:
> >
> > Does it support arbitrary types as table indexes?
>
> Python dictionaries can have anything as a key, so I guess yes.

The Python reference manual says only immutable types can be used as keys,
which rules out using dictionaries and functions as keys. In Ruby, any
object with a hash function can be used as a key; typically if the
contents of the object change the hash value does as well - i.e. it's not
based on object identity like Lua, so if you change the contents of a
table used as a key then it will no longer index the same location. (Also
Ruby has mutable strings so they have to break this rule for string
indexes on tables. Yuck.)

Tony.
-- 
f.a.n.finch  <[hidden email]>  http://dotat.at/
SOUTH UTSIRE: SOUTHEAST 6 OR 7, OCCASIONALLY GALE 8, DECREASING 4 OR 5.
MODERATE OR ROUGH. SHOWERS. GOOD.