Skip to content

Instantly share code, notes, and snippets.

@timo
Forked from sergot/poll_perl6_vms
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timo/9952041 to your computer and use it in GitHub Desktop.
Save timo/9952041 to your computer and use it in GitHub Desktop.
Hey!
This is a poll about VMs for Perl 6. It would be awesome if you fill it,
just write a comment with your answers.
I need it because I work on a huge summary (including, among the others, statistics, tests)
of VMs and Perl 6 itself.
Thank you very much in advance!
sergot
THE POLL
Your knowledge
1. What VMs for Perl 6 do you know?
I know of Parrot, the JVM (only the "official" one, not Dalvik and not Avian) and MoarVM;
There's code in the works to let JavaScript VMs (v8 in particular) run Perl 6, too, but
it's not finished yet. In addition, you can get Perl 6 to run on the CLR (.net) via niecza.
2. What are their defects (e.g. too long execution)?
* Parrot has an annoying tendency to not do any garbage collection until a certain
percentage of system RAM is in use. Also, not all objects we use on it are based on
6model, so sometimes weird error messages leak out from the PMC level of classes. There
has been a somewhat long period of very low development activity in Parrot, but it's
quite stable. Perl 6's concurrency capabilities have not been ported onto Parrot's
concurrency model.
* The JVM takes quite a long while to start up and sometimes when running the test
suite using the "eval server" (to reduce the impact of long startup) after a certain
point all tests will fail.
* MoarVM is quite young still and a few aspects of it are not yet very stable.
Most notably, the concurrency code still features bugs. There are also a few known
and however many unknown bugs that cause modules to not work any more when they
are precompiled. Support for asynchronous I/O - while supported by libuv, which
MoarVM uses for I/O under the hood - is completely missing at this point.
* I cannot comment much on the v8 backend (currently only for JS)
because I have never used it.
* The CLR itself is nice, but Niecza - the backend that targets it - has not been
worked on in a while now and thus it doesn't follow the Perl 6 specification
as closely.
3. What is the worst and the best thing about those VMs?
* Parrot:
+ Proven, mature & stable
- Not terribly much development going on in the recent past and
possibly the near future. Unless someone steps up, no "full"
concurrency support will happen this year.
* JVM
+ runs very fast once the JIT has had some time to analyze the program
- Long startup time
* MoarVM
+ Small-ish and clean code-base → nice to hack on
- Buggy in many areas
* CLR
+ The Perl 6 implementation is blazing fast
- It does not adhere to the Perl 6 spec very well any more.
4. Which VM do you use most often?
Nowadays, I much prefer the MoarVM backend.
5. Why do you use this VM? (please write all known advantages and disadvantages)
+ very nice speed (time it takes to compile NQP & Rakudo, running a full spectest suite)
+ sane (and strict) closure model (which is due to be backported to the JVM backend)
+ presence of concurrency primitives (without having to pay for the JVM's performance characteristics)
+ basic familiarity with the source code (knowledge how to debug the backend itself, how to hack on it, how it could be embedded, ...)
+ memory footprint (more aggressively collects garbage than both Parrot and the JVM)
+ exciting short-term developments (bytecode specializer, async I/O, JIT compiler, ...)
+ Excellent Unicode support (and database)
- Can run into problems caused by the back-end (most notable at the moment: precompilation)
- Can sometimes find problems in the compiler implementation of Rakudo for it
- There's not yet very firm knowledge on where exactly problems can arise/come from. A lot more "real-world" testing has to be done (as opposed to spec testing).
6. Do you know any bugs in this VM?
Yes, a few have been hinted at in the previous questions
7. How do you think, which VM would have the greatest future? Which one would be "the chosen one"?
If things continue the same way they currently are, MoarVM and JVM will be most
commonly used. MoarVM will give excellent speed (both start-up and - when the
bytecode specializer and JIT compiler get more advanced - run-time) and memory
usage combined with a good feature-set (NativeCall, concurrency) and the JVM
will let Perl 6 reach places where only JVM-based languages are allowed to be
deployed and it will possibly be unbeatable for performance of long-running
applications due to the incredible amount of Person-Hours invested in its JIT.
8. You can write some useful information about VMs, links etc.
don't really know what to put here yet.
Do not hesitate to criticize this poll, suggest new questions, correct any mistakes and so on.
Thank you! :)
PS.
If you want to contact me, you can find me on:
#perl (irc.perl.org)
#perl6 (irc.freenode.net)
my nickname is "sergot".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment