Categories

Posts in this category

Sun, 03 May 2009

Rakudo's rough edges


Permanent link

Rakudo rocks, it has many cool and convenient features - but it also has its rough edges. Some things really need improvements.

The Rakudo developers know about these, but by shedding a light on these edges I hope that I motivate people to work on them, as well as giving fellow Rakudo users the feeling that they are not alone with their woes.

Here they are:

  • Missing line numbers in error messages
  • Can't initialize attributes in BUILD methods
  • Performance

The first one is pretty obvious: While parse errors show a line number in the error message, other compile time errors and parse errors don't. When debugging a larger application that's really a pain. I've been told that this is very close to being implemented, and maybe it is at the time I get this blog post published, so here is hope.

If you've only toyed around with Rakudo a bit, you might not have hit the second item on my list. Perl 6 has a rather sophisticated object model, and Rakudo implements large parts of it. But in larger applications it still feels a bit hacky because you can't use the BUILD submethod to set up attributes, it dies with a Null PMC access. Therefore one has to revert to custom init methods, and is always in danger of forgetting to call it.

Performance again is very obvious: Rakudo has a startup time of nearly a second, and both execution and compilation is very slow. Thanks to module precompilation it is somewhat manageable in bigger projects, but it's still something that needs improvement. Thankfully Allison Randal is reworking the calling conventions in Parrot, and we can hope for some speedup there.

There are other things that could use some polishing, but which seem of somewhat lower priority to me:

  • Syntax errors could be more specific.
  • The error say requires an argument should only appear for an otherwise syntactically correct statement, not if there's a syntax error later in the code - it is rather misleading in that case.
  • When the user lets his program die(), parrot's stack trace should not be shown - if a stack trace is desirable, then one showing only Perl 6 routines.
  • A mechanism for controlling warnings would be very welcome.

[/perl-6] Permanent link

Comments / Trackbacks:

Trackback URL: /blog-en/perl-6/rakudos-rough-edges.trackback

Shlomi Fish wrote

I agree about the line numbers
The absence of line numbers in Rakudo's error messages is *the* reason why I'm not seriously playing with it yet. I tried to get a program I wrote for pugs back at the time to run there, and could not proceed due to the lack of line numbers.

Klaus wrote


Slightly OT: I watched the videos of the talks that Allison Randal (about Parrot) and Lars Bak (about the V8 javascript engine) gave. They gave me a distinct impression (about performance, ability to deliver and stability). What do you think?

http://www.langnetsymposium.com/2009/talks.aspx
http://video.google.de/videoplay?docid=2900106024749292774

Disclaimer: I don't know nothing about programming and never helped the parrot/perl6/pugs projects ;-)

chromatic wrote

Speed
I optimized a couple of parts of Parrot that were hotspots in Rakudo startup today; the improvement is about 10%. It's not a huge change, but it's simple and free (for Rakudo).

I've found another hotspot, but it'll take more work to improve. Meanwhile we're all waiting for the calling conventions refactoring.

Moritz wrote

Speed and V8
I've looked at Lars Bak's talk, and it seems that most optimizations in V8 are very specific to javascript, and can't be easily generalized.

Moritz wrote

Line numbers
I'm pleased to announce that Rakudo now has gotten line numbers on its error messages, along with much nicer backtraces; Here's Jonathan's blog post about it: http://rakudo.org/node/41

Write a comment

The comments on this blog post have been disabled; the comment form below will not work.

 
Name:
URL: [http://www.example.com/] (optional)
Title: (optional)
Comments:
Save my Name and URL/Email for next time