Sunday, December 21, 2008

some headway

After spending some time just treading water with parrot updates, we've made some headway against the spec tests, which is nice. ^_^

Thanks to dgp on #tcl on freenode for his suggestion for a stub for [interp alias] that let us run basic.test to completion!

We regressed on  compile.test with the recent updates, but added five more spec test files that run to completion. That's 320 more passing tests, include a few extras in already completing files.

I also tracked down the expected boolean value but got "" error that is blocking many of the spec tests from running any tests; turns out that the constraint framework in tcltest.tcl (which helps determine if a given test in the file should be run or not) requires a minimal version of [trace] in order to work. Pulling at this thread, the trace refers to [namespace code], which means we also need [namespace inscope] ; I have a work in progress on each of these, but it's not quite ready for checkin. Thanks to pmichaud on #parrot for some thoughts on how trace (or tie in p5) might work on parrot.

Thursday, December 18, 2008

Speedups since parrot 0.8.1

I got partcl's trunk working with parrot's trunk again, catching up with some changes in parrot that we couldn't deal with because of segfaults we were seeing.

With the updates, 'make test' now passes again in trunk, and 'make spectest' completes, giving the same results it did against 0.8.1; Here's a snippet from our progress tracker:

"date","revision","parrot revision","files","test","pass","fail","skip","time in seconds"
"2008-11-19 12:51",159,"v0.8.1",57,4001,2341,1059,601,12550
"2008-12-18 12:15",195,"r34059",57,4001,2341,1059,601,9232

So, with no functional changes, we've gone from 3.5 hours to run the tests to 2.6 hours. Which is still terribly slow, but down from horrifically slow.

I've also identified a parrot segfault that is blocking completion of the spec test "expr-old.test"; which would get us at least 254 more passing tests. This particular segfault is also impacting rakudo perl, so hopefully between the two of us we can get a small test case for core parrot developers to resolve the issue.

Wednesday, December 17, 2008

Not just for developers anymore?

When we moved partcl out of parrot's svn repository, one of the goals was to target a stable version of parrot so that we could work without having things break underneath us. (One of the reasons I'm looking forward to parrot 1.0.); I've ended up turning this requirement sideways a bit: I want a stable version for users of partcl (All 1.2 of you.)

I've now created a "stable" branch of the partcl svn repository that tracks a released version of parrot (currently 0.8.1). The download instructions for partcl now show you how to get a combination of parrot & partcl that work together.

Hopefully after every parrot release, we'll be able to update our stable branch to track it. Unfortunately, due to some issues that cropped up near the end of the 0.8.2 development lifecycle, we missed that release.

I'd definitely be interested in feedback, especially from folks that use tcl on a regular basis.

Monday, November 10, 2008

October 2008 roundup

Just a brief update…

Done a bit of work since the last post, fixing up as many blockers as possible running the spec test; Current status is available on the wiki. Short version: 2182 passing tests.

Eliminated some unused code, added minor cleanups and a bit of new functionality still hidden by the aforementioned blockers. Got partcl working with parrot 0.8.0, and then rapidly depending on a newer svn revision. Convinced Matt Diephouse to write some code (yay!), got a patch from julian notfound to fix the build using C++, and some documentation updates from Jerry Gay.

partcl, while not taking advantage of the Parrot Compiler Toolkit (PCT), still uses the Parser Grammar Engine (PGE) heavily† - looks like a recent Hague grant to Patrick Michaud from The Perl Foundation will provide some speedups to PGE, which in turn can only make us go faster. 


† You can see this by using the -t4 option to parrot (trace subroutines) and running any small tcl program, even ../../parrot -t4 tcl.pbc -e "puts hi"  and sorting through the output.

Tuesday, October 7, 2008

Leaving the nest...

I've just moved partcl's main development repository into our googlecode repository.

If you're interested in contributing, check out our googlecode wiki.

This should help with parrot's 1.0 goals regarding installation, as well as give partcl a slightly more stable development environment.

I've created two mailing lists:
  • partcl-commits: announce only: wiki and svn commit diffs are sent here.
  • partcl-dev general dev discussion and ticket updates.
 

Tuesday, September 30, 2008

Spec Test Status

Added a wiki page to the googlecode site:

http://code.google.com/p/partcl/wiki/SpecTestStatus

This document will track the issues with the various spec tests. If you're interested in contributing to partcl, helping keep this list updated would be very helpful; just need to be able to run the tests and see how each test ends.

Monday, September 29, 2008

Running tcl's official test suite...

(this post rehashes some content found at the old blog.)

With recent updates, partcl can now use the tcltest.tcl library that comes with tcl 8.5.4 [1]

For some time, partcl has been limping along with our hand-rolled Test::More analog on a slightly processed version of tcl's .test files [2]. This generated TAP output, and was amenable to running via the standard perl testing tools.

The current version of 'make spectest' is processing the raw .test files from the CVS repository. [3] tcl's test output format isn't TAP [4] but it's easily understood: output is bad. Here's a clean run with partcl of a single test file.

$ ./tclsh t_tcl/llength.test
llength.test: Total 6 Passed 6 Skipped 0 Failed 0

Here's some output from a failing test for comparison - we haven't implemented [case] in partcl because it's deprecated, so our failure mode here doesn't match the spec.

==== case-3.3 single-argument form for pattern/command pairs FAILED
==== Contents of test case:
    list [catch {case z in {a 2 b}} msg] $msg
---- Result was:
1 {invalid command name "case"}
---- Result should have been (exact matching):
1 {extra case pattern with no body}
==== case-3.3 FAILED

It will also report on differences in return value, making it very obvious what needs fixing from the development side. For example, This allowed me to easily update some exceptions being thrown by partcl that were using a default parrot type instead of the specific one that corresponds to tcl's [error].

I've checked a file into the repository to track the progress of the suite. This is analogous to the file rakudo (Perl 6 on parrot) is using.

"date","revision","files","test","pass","fail","skip"
"2008-09-25 00:00",31396,38,1481,743,290,448
"2008-09-26 04:51",31427,56,3659,2463,812,384

Most of the gains in the first day are from small improvements to code invoked by the test suite, rather than any new real features, though there are a few improvements there as well. 

We still have a bit of work to do to successfully execute all the test files (and even more to pass all the tests.).

The most individual tests we ever logged passing with the converted version of the files was 3031; With the 700 or so passing tests in test files that don't run to completion yet (and therefore aren't in that listing above), we've already exceeded that. (I don't want to add those passes to the tracking file yet because they're harder to count if the test file doesn't pass. Plus it feels like cheating.)

Next to come is a document describing the failing test files, or (hopefully) the failing individual tests. This will be used to drive whatever tuits I have available, hopefully getting the biggest number of passing tests per tuit. This will also point anyone interested in contributing at some hopefully small effort that give us a concrete result.

  1. Not exactly a pristine copy: one of the core features of tcltest (where should I send my output?) requires some relatively advanced functionality - tcl's tests are not designed like perl6's to allow new implementations to ease into things. I've tacked on 2 replacement subs in our copy of tcltest that for now always say "just print to stdout/stderr". Still, that's two oneline procedures compared to the original 3375 lines of tcltest.tcl
  2. The additional processing consisted of loading our version of Test::More that had a  stripped down version of [test]. It only let us run the very basic tests, though; now that we are running the native tests, we can now at least try to run some of the more complicated ones, which should help bring up our passing ratio.
  3. The 'spectest' target checks out a copy of the test directory from 8.5.4 tagged release of tcl's CVS repository, and then uses a small script to execute only those tests that we know run to completion. 
  4. Adding an option to tcltest that generated TAP is something that could be done upstream in tcl itself, and would allow that project to integrate with any TAP based testing tool.

what is partcl?

partcl is a from scratch implementation of tcl (8.5.4) targeting the parrot virtual machine.

The source code is currently distributed with parrot (in the languages/tcl directory).

Issues are recorded at the project's googlecode site.

There's been sporadic blogging about the project at Coke's use.perl journal - I'll be posting here going forward.