Neko VM and Parrot VM
jaleto at gmail.com
Wed Jan 20 21:11:53 UTC 2010
I am a Parrot core developer who just recently learned about Neko. I
went to the FAQ on the Neko site and found a very interesting
=begin FAQ snippet
How is Neko different from Parrot ?
Targeting Parrot is quite complex, with different languages at
different levels (low level PASM and medium level PIR). In particular,
it is difficult to differenciate beetween the language and the
libraries. Also, it gives access to more low level bytecode which make
it difficult to change it later without breaking backward
compatibility. OTOH Neko compiler is handling the lowlevel and the
Neko language is as much abstract as possible.
Parrot is written in C while Neko compiler is written... in Neko. The
language is fully bootstrapped right now. Also, Neko is lightweight
Virtual Machine is only 68 KB on Linux and 40 KB on Windows, while
still offering a very good speed.
=end FAQ snippet
I must say that this seems like it is spreading a bit of
misinformation about Parrot. I am sure it is mostly due to being
outdated information, but I would love to clear up any
1) "Targeting Parrot is quite complex, with different languages at
different levels (low level PASM and medium level PIR)"
All High Level Language (HLL) developers should be writing PIR  or
NQP . No human should ever write PASM  unless they are testing
something specific about PASM in the Parrot test suite. NQP is a
subset of Perl 6, which Parrot uses in the parser subsystem. An HLL
dev can choose to use *only* NQP or *only* PIR or a mixture of both,
depending on their requirements. I don't so this as being more
complex, but giving more options to the language implementers.
2) In particular, it is difficult to differenciate beetween the
language and the libraries
Could the Neko community expand on this? I find our core and our
libraries well differentiated. We even have an infrastructure like
Perl 5's CPAN, called Plumage , which allows you to install and
download any Parrot plugin/library from the net.
3) Also, it gives access to more low level bytecode which make it
difficult to change it later without breaking backward compatibility.
Parrot has a versioned bytecode and a strictly enforced deprecation
policy, so I find this statement to be blatantly false. Also, you can
distribute your Parrot code as .pir, which will have no bytecode
4) Parrot is written in C while Neko compiler is written... in Neko.
This is also blatantly false. Neko *does* have a core written in C,
just like Parrot. As much as Neko as possible is implemented in Neko,
and the same goes for Parrot. Parrot is actually written in
"C-with-sugar" and there is a build subsystem (written in Perl 5)
which translates this "C-with-sugar" language into pure C. Parrot also
uses NQP heavily to do parsing, i.e. transforming source to Abstract
Syntax Trees. Also, many Parrot subsystems are pure (or mostly) PIR,
such as our testing framework, test_more.pir . We do have some tests
in Perl 5, but they are being transitioned to PIR.
I hope this clarifies some confusion about the differences between
Neko and Parrot. The Parrot community would greatly appreciate if you
could update your FAQ to more correctly depict the current state of
affairs. Please feel free to contact the parrot-dev list  or
#parrot on irc.parrot.org for any additional clarifications.
 - http://en.wikipedia.org/wiki/Parrot_intermediate_representation
 - http://github.com/perl6/nqp-rx
 - http://en.wikipedia.org/wiki/Parrot_assembly_language
 - http://gitorious.org/parrot-plumage
 - http://lists.parrot.org/mailman/listinfo/parrot-dev
Jonathan "Duke" Leto
jonathan at leto.net
More information about the parrot-dev