MaW’s Blog

Monday, 23rd August 2004

Of Parrot, Haskell, Triangle and Final-Year Projects

Filed under: Programming — MaW @ 20:54

The last few days I’ve been reading ‘Perl 6 and Parrot Essentials’, 2nd Edition, in order to get a better handle on this whole Perl 6 design issue. A lot of the language design I kind of knew, but bits of it have changed since I last looked at them, and it’s nice to have everything set out in a book, although I know for a fact that some of the bits of the book have now changed as well, because Larry Wall was talking about them on perl6-language the other day. But that’s life when you’re following an under-development language.

Anyway, I mostly got the book to get a decent introduction to Parrot, the Perl 6 runtime, and such it is. Such a good introduction in fact that I’ve decided that, just for fun and to do something different and because I’m pining to write code in a functional language, I’d pick up my final-year project (a compiler for a toy language called Triangle, written in Haskell), rip out the code generator (which doesn’t work very well anyway), and replace it with one which produces Parrot assembly.

Remarkably, this is turning out surprisingly well. I suspect I’m going to have to delve into Parrot’s object definition system in order to simulate records accurately, but most of the rest of it is quite easy — easier than generating C was. Wish I’d done this to start with, I might have actually finished the generator in time for hand-in. I couldn’t have got more than a first for the project of course, but I could have got a higher grade anyway. I like playing with languages, and I like high grades too.

Forgotten how much fun it can be. I know I should really be working on Towel or Westlands, but neither of those really enthuse me at the moment. Towel’s in C++, which I do a lot at work, and Westlands is in PHP, which after doing Perl so much at work is just confusing. Programming professionally has its drawbacks.

If I get all the Triangle compiler up and running to target Parrot, I think I’ll send it over to Graham Hutton, who was my dissertation supervisor. Just to prove I’m still doing things. Maybe I should do that PhD after all…

No comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by WordPress