Day 68: First cut at ITypes.

autrijus on 2005-04-09T18:44:53

As promised, today I worked on ITypes with abandon, rewriting most of the variable handling code in the process; see my post on P6C for details.

The entire patchset is nearly 1000 lines long. That number may look small, but the entirety of core pugs source, including comments, is still less than 10000 lines long, so the work is indeed nontrivial. Unsurprisingly, it is still failing many tests, but I expect to fix them commit it tomorrow, shortly after I wake up.

rgs pointed me to this MJD interview on Higher Order Perl, so far the only Perl book on the Pugs READTHEM list. I feel honoured upon reading this passage:

TPR: Are you surprised that after a couple of years of working on a book about functional programming in Perl, Autrijus Tang has lit a fire under the community by using Haskell to write a Perl 6 compiler?

MJD: Everything Autrijus says and does astonishes me.

On the code front, today is another busy day with over 40 commits. Some of the notable changes are:

  • ovid started porting the Perl Cookbook examples from the PLEAC project. We need more people hacking on that!
  • stevan added a tested and working port of CGI.pm to Pugs.
  • stevan and me replaced several split() invocations with s:perl5/.../{ ... }/ form, then into the even more readable braceless form.
  • corion tested and fixed sleep to use GHC's threadDelay primitive, so a sleeping thread will not block the others.
  • corion worked on many other tests as well, including a TODO for Win32's $*PID support.
  • I finally made map { ... } @list to parse; corion happily changed the tests to use that style.
  • cognominal reported that the infinite loop form, loop { ... }, was broken. It's now fixed.
  • putter worked on lots of tests, including a parsefail on the if {...} {...} form.
  • asavige and putter added even more pugsbugs tests.
  • asavige also updated his tsanta.p6 golf validation program to use nested data structure.
  • ninereasons discovered that the implicit $_ is not as read-write topical as the spec mandated, and added lots of tests for that.
  • Since three days ago, int(3) + 4 was incorrectly parsed as int((3) + 4); that is now fixed.

That's it for today. Expect a fully working IType subsystem tomorrow!