During last year I’ve discovered the Parrot VM project, if you haven’t heard about it, Parrot it’s a register based VM targeted for dynamic languages.

Basically a VM is an abstraction layer between the Hardware/OS and a High Level Language(HLL) like Java, .Net, Smalltalk, Perl6 and others. The benefits are that same compiled code can run in different platforms without (almost) any modification - part of what made Java successful.

The difference between stack-based VM and register-based VM is that the first group push the parameters into the stack before calling a subroutine and the subroutine has to unwind the stack to read the parameters and wind it back with the results. That operation is performed a lot during a normal execution of a program wasting precious CPU cycles to wind/unwind the stack, if you want to read more about register-based and stack-based machines there is an interest paper here.

The vision that the people from Parrot have is that anyone should be able to create a language and quickly implement it without worrying much about the VM, garbage collection, JIT, etc. Also part of the vision is that different languages would be able to talk to each other and share libraries,What a small ideal, huh?

So I decide to give it a try and I started my own prototype-based language which is publicly available through GitHub, it is called mantra ( I’m still not 100% convinced of the name ) and to give you an idea of how it feels like it is inspired in Smalltalk, Perl and Javascript - wierd combination, I know. Basically I took things from each one of those languages that I’d liked, i.e. I think nothing beats Smalltalk in readability, so I’ve borrowed part of the syntax from there, or Perl’s dynamism that everything can be changed in run time, or the fact that in Javascript you don’t have classes and meta-classes.

There are many other cool things about it that I’ll to share, but it is still at an embryonic level, meaning that is not yet usable and I’m still changing the specs. At this point I need a little more help with it, so if you willing to spend time in a cool project drop me an email


comments powered by Disqus