The MicroVM project

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

The MicroVM project

Etiene Dalcol
Hello,

I'm in a programming language implementation summer camp, and it's going really great so far. Today I learned about a project called MicroVM [1]. It's an alternative / complement of LLVM. I wonder if anyone heard about it before?

It's in early stage and aims to provide minimal things very well. It abstracts hardware and does concurrency, JIT and GC. So its goal is to act as a good small foundation to build languages on the top of it.

Maybe it could be an interesting project to try to implement Lua on the top of this to get a new JIT. What do you think?

Cheers, 
Etiene Dalcol

Software Engineer @ Red Badger 
Lua Space http://lua.space
LuaConf http://luaconf.com

Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Etiene Dalcol
PS: I just talked to the lecturer and I learned that the favorite language of the phd student that made the specifications of MicroVM is Lua :) I'm gonna ping him and ask if there's already work being done on a proof of concept around this

2017-05-22 10:32 GMT+02:00 Etiene Dalcol <[hidden email]>:
Hello,

I'm in a programming language implementation summer camp, and it's going really great so far. Today I learned about a project called MicroVM [1]. It's an alternative / complement of LLVM. I wonder if anyone heard about it before?

It's in early stage and aims to provide minimal things very well. It abstracts hardware and does concurrency, JIT and GC. So its goal is to act as a good small foundation to build languages on the top of it.

Maybe it could be an interesting project to try to implement Lua on the top of this to get a new JIT. What do you think?

Cheers, 
Etiene Dalcol

Software Engineer @ Red Badger 
Lua Space http://lua.space
LuaConf http://luaconf.com




--
Etiene Dalcol

Software Engineer @ Red Badger 
Lua Space http://lua.space
LuaConf http://luaconf.com

Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Javier Guerra Giraldez
In reply to this post by Etiene Dalcol
On 22 May 2017 at 09:32, Etiene Dalcol <[hidden email]> wrote:
> I'm in a programming language implementation summer camp, and it's going
> really great so far. Today I learned about a project called MicroVM [1].
> It's an alternative / complement of LLVM. I wonder if anyone heard about it
> before?


very nice!

another teeny/tiny lang implementation: c4: "C in 4 functions" [1],
and a little fork: c4x86: "JIT compiler for x86 in 86 lines" [2]

[1]: https://github.com/rswier/c4
[2]: https://github.com/EarlGray/c4


--
Javier

Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Pierre Chapuis
In reply to this post by Etiene Dalcol
May 22, 2017 10:32 AM, "Etiene Dalcol" <[hidden email]> wrote:
> Today I learned about a project called MicroVM [1]. It's an alternative / complement of LLVM. I
> wonder if anyone heard about it before?
> Maybe it could be an interesting project to try to implement Lua on the top of this to get a new
> JIT. What do you think?

It is interesting to play with language implementation concepts, but in the current state of the (Scala) reference implementation of the VM there is little chance a Lua written on top of it would be any faster than PUC Lua, let alone LuaJIT.

I think a more interesting target would be the CLR, especially since Microsoft is going Open Source and acquired Xamarin. I know Fabio Mascarenhas and Roberto worked on something like this in 2008 (there is a paper about it behind the ACM paywall: http://dl.acm.org/citation.cfm?doid=1363686.1363743) but I have no idea if those efforts have been pursued by anyone.

--
Pierre Chapuis

Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Javier Guerra Giraldez
On 24 May 2017 at 17:33, Pierre Chapuis <[hidden email]> wrote:
> ......(Scala).......
>
> ....... CLR.....

what's "micro" of either JVM or CLR?

as i understand it, the idea of a JIT is to generate machine code; the
language used to emit that code should be immaterial to the end
result.  apart from the time needed to do the code generation, of
course.

i choose to believe that a JIT written in Scala (for any non-JVM
language) is mostly a prototype scaffold until the final C version.
;-)

--
Javier

Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Etiene Dalcol

i choose to believe that a JIT written in Scala (for any non-JVM
language) is mostly a prototype scaffold until the final C version.
;-)

This seems closer to being the case, since the idea behind the MicroVM is that it is an specification, not a particular implementation.  

--
Etiene Dalcol

Software Engineer @ Red Badger 
Lua Space http://lua.space
LuaConf http://luaconf.com

Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Fabio Mascarenhas
In reply to this post by Pierre Chapuis
On Wed, May 24, 2017 at 1:33 PM, Pierre Chapuis <[hidden email]> wrote:
>
> I think a more interesting target would be the CLR, especially since Microsoft is going Open Source and acquired >Xamarin. I know Fabio Mascarenhas and Roberto worked on something like this in 2008 (there is a paper about it >behind the ACM paywall: http://dl.acm.org/citation.cfm?doid=1363686.1363743) but I have no idea if those efforts >have been pursued by anyone.

There is NeoLua (https://github.com/neolithos/neolua). It should be at
least as fast as the Lua interpreter, and might be faster for some
workloads once the DLR caches have warmed up, even if you do not use
its optional typing (it can use optional type annotations like Ravi).

With Truffle the JVM should be a better platform for dynamic
languages. There is a partial Lua implementation
(https://github.com/lucasallan/LuaTruffle) that is complete enough to
run the mandelbrot benchmark as fast as LuaJIT, once it has warmed up.
:-)

LuaVermelha (https://github.com/Leonardo2718/lua-vermelha) is chugging
along, and the best bet if you want an implementation of Lua 5.3 right
now that is faster than the Lua interpreter.

Roberto has a student working on using LLVM as a backend for a tracing
JIT, maybe he will chime in.

> --
> Pierre Chapuis
>

--
Fabio Mascarenhas

Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Leonardo
Since Lua Vermelha got mentioned :) , I'll make a note that it's built
using Eclipse OMR (https://github.com/eclipse/omr), which has some
similarities with MicroVM that are worth comparing (for those interested
in language implementations).

The goal of Eclipse OMR is to provide reusable components for building
language runtimes. This includes components providing platform and
hardware abstractions and concurrency. It also includes components for
building GCs and JIT compilers. In this sense, MicroVM and OMR provide
similar value.

However, a big difference is that OMR is an implementation; not a
specification. In this sense, OMR is closer to LLVM than MicroVM (though
still very different than LLVM). The technology in OMR is also quite
scalable. It's been used to build things as small as Lua Vermelha (still
larger than PUC Lua though) and as large as IBM's JVM (which is being
opensourced sometime this year, in case anyone is interested).

Lua Vermelha is still in it's very early stages. There's plenty of room
for improvements and optimization. I've really enjoyed working on it so
far though and I will try to spend more time working on it.

--
Leonardo

On 2017-05-24 03:40 PM, Fabio Mascarenhas wrote:

> On Wed, May 24, 2017 at 1:33 PM, Pierre Chapuis <[hidden email]> wrote:
>>
>> I think a more interesting target would be the CLR, especially since Microsoft is going Open Source and acquired >Xamarin. I know Fabio Mascarenhas and Roberto worked on something like this in 2008 (there is a paper about it >behind the ACM paywall: http://dl.acm.org/citation.cfm?doid=1363686.1363743) but I have no idea if those efforts >have been pursued by anyone.
>
> There is NeoLua (https://github.com/neolithos/neolua). It should be at
> least as fast as the Lua interpreter, and might be faster for some
> workloads once the DLR caches have warmed up, even if you do not use
> its optional typing (it can use optional type annotations like Ravi).
>
> With Truffle the JVM should be a better platform for dynamic
> languages. There is a partial Lua implementation
> (https://github.com/lucasallan/LuaTruffle) that is complete enough to
> run the mandelbrot benchmark as fast as LuaJIT, once it has warmed up.
> :-)
>
> LuaVermelha (https://github.com/Leonardo2718/lua-vermelha) is chugging
> along, and the best bet if you want an implementation of Lua 5.3 right
> now that is faster than the Lua interpreter.
>
> Roberto has a student working on using LLVM as a backend for a tracing
> JIT, maybe he will chime in.
>
>> --
>> Pierre Chapuis
>>
>
> --
> Fabio Mascarenhas
>


Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Leonardo
PS: forget to mentioned that I'm rather biased re OMR because of how
much I've worked with it.

Leonardo

On 2017-05-25 06:39 PM, Leonardo wrote:

> Since Lua Vermelha got mentioned :) , I'll make a note that it's built
> using Eclipse OMR (https://github.com/eclipse/omr), which has some
> similarities with MicroVM that are worth comparing (for those interested
> in language implementations).
>
> The goal of Eclipse OMR is to provide reusable components for building
> language runtimes. This includes components providing platform and
> hardware abstractions and concurrency. It also includes components for
> building GCs and JIT compilers. In this sense, MicroVM and OMR provide
> similar value.
>
> However, a big difference is that OMR is an implementation; not a
> specification. In this sense, OMR is closer to LLVM than MicroVM (though
> still very different than LLVM). The technology in OMR is also quite
> scalable. It's been used to build things as small as Lua Vermelha (still
> larger than PUC Lua though) and as large as IBM's JVM (which is being
> opensourced sometime this year, in case anyone is interested).
>
> Lua Vermelha is still in it's very early stages. There's plenty of room
> for improvements and optimization. I've really enjoyed working on it so
> far though and I will try to spend more time working on it.
>
> --
> Leonardo
>
> On 2017-05-24 03:40 PM, Fabio Mascarenhas wrote:
>> On Wed, May 24, 2017 at 1:33 PM, Pierre Chapuis <[hidden email]> wrote:
>>>
>>> I think a more interesting target would be the CLR, especially since Microsoft is going Open Source and acquired >Xamarin. I know Fabio Mascarenhas and Roberto worked on something like this in 2008 (there is a paper about it >behind the ACM paywall: http://dl.acm.org/citation.cfm?doid=1363686.1363743) but I have no idea if those efforts >have been pursued by anyone.
>>
>> There is NeoLua (https://github.com/neolithos/neolua). It should be at
>> least as fast as the Lua interpreter, and might be faster for some
>> workloads once the DLR caches have warmed up, even if you do not use
>> its optional typing (it can use optional type annotations like Ravi).
>>
>> With Truffle the JVM should be a better platform for dynamic
>> languages. There is a partial Lua implementation
>> (https://github.com/lucasallan/LuaTruffle) that is complete enough to
>> run the mandelbrot benchmark as fast as LuaJIT, once it has warmed up.
>> :-)
>>
>> LuaVermelha (https://github.com/Leonardo2718/lua-vermelha) is chugging
>> along, and the best bet if you want an implementation of Lua 5.3 right
>> now that is faster than the Lua interpreter.
>>
>> Roberto has a student working on using LLVM as a backend for a tracing
>> JIT, maybe he will chime in.
>>
>>> --
>>> Pierre Chapuis
>>>
>>
>> --
>> Fabio Mascarenhas
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: The MicroVM project

Emeka
In reply to this post by Etiene Dalcol
Hello,

Is this "I'm in a programming language implementation summer camp" open to public? Is it possible to read your code base? I am currently learning language implementation.

Regards, e

On Mon, May 22, 2017 at 9:32 AM, Etiene Dalcol <[hidden email]> wrote:
Hello,

I'm in a programming language implementation summer camp, and it's going really great so far. Today I learned about a project called MicroVM [1]. It's an alternative / complement of LLVM. I wonder if anyone heard about it before?

It's in early stage and aims to provide minimal things very well. It abstracts hardware and does concurrency, JIT and GC. So its goal is to act as a good small foundation to build languages on the top of it.

Maybe it could be an interesting project to try to implement Lua on the top of this to get a new JIT. What do you think?

Cheers, 
Etiene Dalcol

Software Engineer @ Red Badger 
Lua Space http://lua.space
LuaConf http://luaconf.com




--
P.S Please join our groups:  [hidden email]
 or [hidden email]  These are platforms for learning and sharing  of knowledge.                                                                                      www.satajanus.com | Satajanus  Nig. Ltd