tag:blogger.com,1999:blog-1343396053838183512023-11-15T11:19:36.522-08:00partclCokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-134339605383818351.post-62758003551990373032009-12-10T13:04:00.000-08:002009-12-15T17:52:06.141-08:00partcl-nqp<div><i><span class="Apple-style-span" style="font-size:x-small;"><br /></span></i></div><div><span class="Apple-style-span" style="font-size:medium;"><a href="http://github.com/pmichaud">pmichaud</a> and <a href="http://github.com/coke">I</a> and a <a href="http://github.com/partcl/partcl-nqp/blob/master/CREDITS">few others</a> are trying out the latest parrot compiler tools to see if we can create up with a version of partcl that is more maintainable, and will benefit more directly from toolchain improvements that target rakudo (Perl 6 on parrot) and other languages. </span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">The base tool for this is <a href="http://github.com/perl6/nqp-rx">NQP-rx</a>; it's a small compiler for a subset of Perl 6 that targets PIR; It provides a much improved syntax over PIR, even when calling PIR itself - it provides a lot more sugar.</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">This means that nearly all of the handrolled PIR that was created is no longer needed. There are few cases where it is, and that is pushing development of NPQ-rx so that we can eliminate that PIR and rewrite it NQP.</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">Currently, there are currently two NQP-rx grammars, one for the language itself, and one for the tcl-specific regular expression language (ARE). </span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">While the ARE is a work in progress (bits are added as needed to pass tests), adding this at all would have been <b>very</b> painful in old partcl (which currently relies on the perl5-like expression engine available via PGE in parrot.) We'll be adding more grammars for globbing, and probably the [format] and [binary] mini-languages as well.</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">The builtins (that are done) are now all written in NQP - and not having to write them in assembly (even macro'd assembly) makes them much shorter, easier to understand and maintain.</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">Big Goals: </span></div><div><ol><li><span class="Apple-style-span" style=" ;font-size:medium;">pass all the tcl based tests written for partcl (Already running 12 of the original all-tcl tests)</span></li><li><span class="Apple-style-span" style=" ;font-size:medium;">start running the spec tests again.</span></li><li><span class="Apple-style-span" style="font-size:medium;">pass almost as many spec tests as partcl...</span></li></ol><div><span class="Apple-style-span" style="font-size:medium;">At which point this new version will become the primary version.</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">If you're interested in Tcl, parrot, or Perl 6, check us out. There are plenty of small bits of NQP that can be written, and I'd be happy for the help. If you know Tcl but not Perl 6, or Perl 6, but not Tcl, doesn't matter, you can contribute. ^_^</span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div></div><div><span class="Apple-style-span" style="font-size:medium;"> </span></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-77259320813991936502009-10-24T20:22:00.000-07:002009-10-24T20:28:27.483-07:00partcl now passing 4,089 spec testsWith the cleanup of several segfaults in parrot and some recent improvements to ::tcl::mathop, partcl is now passing over 4K of the official 8.5.6 test suite!<div><br /></div><div>That leaves expr.test as the last big source of potentially passing tests that aren't being counted; 347 tests in that file pass before an error due to promotion to bigints causes the file to abort.</div><div><br /></div><div>Special thanks to moritz for providing CPU cycles for testing.</div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-18060004273564012622009-10-24T20:18:00.000-07:002009-10-24T20:22:19.967-07:00svn2gitI've moved the repository from svn hosted at googlecode to git at github.<div><br /></div><div>Thanks to dukeleto at parrot.org for doing the heavy lifting on the repository migration.</div><div><br /></div><div>For now, everything else is staying at googlecode, and I have a pointer on the main page to the github repo.</div><div><br /></div><div>I had been using git-svn for a while to interact with the old svn repo, and while I really loved the git-like features it provided, there were enough annoyances with git-svn that making the full switch makes development easier for me.</div><div><br /></div><div>Also, it might encourage Matt to commit some fixes. =-)</div><div><br /></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-53959047612404066232009-09-01T10:40:00.000-07:002009-09-01T10:53:00.511-07:00Now passing 3,363 tcl spec tests<span class="Apple-style-span" style="font-family: 'trebuchet ms', verdana, arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(51, 51, 51); line-height: 18px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><div>Immediately after parrot 1.5.0 was released, many branches were merged back into trunk, which temporarily disrupted our ability to run the spec test suite.</div><div><br /></div><div>Thanks to NotFound++ on the parrot team, all of these new failures have been resolved, and we're now able to run the spec test suite again!</div><div><br />Since the speed of partcl has improved a little since we started tracking spec test results, and to give future segfaults more of an opportunity to present themselves, we're now running every file in the test suite that runs to completion (even if they're all skipped).</div><div><br /></div><div>With various advancements, and a lack of (random) segfaults, we're now running more test files and passing more tests than ever:</div><div><br /></div><div><span class="Apple-style-span" style="font-family:'courier new';">Previous High: Files 67 Total 5145 Passed 2972 Skipped 1352 Failed 821 Time: 4374s </span></div><span class="Apple-style-span" style="font-family:'courier new';">Current: Files 93 </span><span class="Apple-style-span" style="font-family:'courier new';">Total 7397 Passed <b>3363 </b>Skipped 1989 Failed 2045 Time: 6651s</span><br /><br />There are still a few segfaults (but these are repeatable) and out of memory errors remaining, and they're on files with a relatively large set of already passing tests; getting those to run to completion will give us another big bump on the numbers.</span>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-2797848170843051292009-06-27T08:55:00.001-07:002009-06-27T09:01:08.132-07:00Improved interactive modeIn real tcl, you can use interactive mode to run commands like a shell; There's now just enough logic in partcl to do this as well.<div><div><br /></div><div>Most of the infrastructure for this was already in place; just added a minimal version of</div><div><ul><li>[file executable] - only checks executable status for other, not group or owner.</li><li>[file split] - isn't windows-friendly, nor does it deal with potentially confusing chars like '~'</li><li>[exec] - ignores all of the shell metachars and just invokes parrot's spawnw opcode as is.</li></ul></div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';">$ ~/bird/bin/parrot tcl.pbc</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">% ls src</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">binary.c binary.h binary.o class grammar macros.pir mathops.pir ops pmc returncodes.pasm tclsh.pir</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';">% rm src/binary.o</span></div><div><span class="Apple-style-span" style="font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'courier new';">% ls src</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">binary.c binary.h class grammar macros.pir mathops.pir ops pmc returncodes.pasm tclsh.pir</span></div><div><br /></div><div><br /></div><div>Most of the heavy lifting is done by init.tcl from the standard library.</div></div></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-39311431179300205392009-06-12T22:29:00.000-07:002009-06-12T23:03:26.526-07:00Partcl now passing 2,972 tcl spec testsThanks to prompting from kbk on irc (#tcl at freenode), I finally fixed the parsing of string.test.<div><br /></div><div>It had been complaining about the \udead escape in that file; That isn't really a valid codepoint, and while Tcl accepts it as if it were, parrot (which uses ICU internally) throws an exception when trying to create a string that contains it. So, (at kbk's suggestion), I settled for now to convert any codepoints in the \udead range to \ufffd. That allowed the test to parse...</div><div><br /></div><div>... but it then ran out of memory, as several other tests have been doing since I started running the tests again.</div><div><br /></div><div>I've been working with chromatic to try to provide test cases to show where the memory leaks have been coming from, but I've only been going after things I could spot with valgrind. Today, someone on irc (#parrot at irc.parrot.org) posted a very small sample program that eventually ran out of memory... because the garbage collector apparently wasn't.</div><div><br /></div><div>The small PIR example allowed chromatic to identify and fix that issue in parrot, and partcl has now reclaimed several files which had been exhausting a 1/2 gig of memory.</div><div><br /></div><div><a href="http://code.google.com/p/partcl/source/browse/trunk/docs/spectest-current.txt">Current results</a>, over 67 test files that run to completion:</div><div><br /></div><div><div> Total 5145 Passed 2972 Skipped 1352 Failed 821</div><div><br /></div><div>That's the highest number of attempted & passing tests since I <a href="http://code.google.com/p/partcl/source/browse/trunk/docs/spectest-progress.csv">started keeping track</a>. It's an additional 1181 passing since the 8th, when I started running the spec tests again.</div><div><br /></div></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-50895527117932362632009-06-08T15:58:00.000-07:002009-06-08T16:58:57.448-07:00SpecTest updates<span class="Apple-style-span" style="font-size:medium;">It's been about 4 and a half months since the last "official" spec test run -- partcl was offline for most of that time.</span><div><span class="Apple-style-span" style="font-size:medium;"><br /></span></div><div><span class="Apple-style-span" style="font-size:medium;">I've finally caught back up with parrot development, can build against svn-latest, an installed parrot, have added a few minor features.</span></div><div><br /></div><div><div>We've lost several files (See <a href="http://code.google.com/p/partcl/wiki/SpecTestStatus">http://code.google.com/p/partcl/wiki/SpecTestStatus</a>). I'm running the tests on a machine with a 0.5G ram limit - previously these were running on a machine with no virtual memory limit, so they'd be able to complete. I've opened a ticket with the parrot developers for the biggest parrot memory leak I was able to find with a "hello word" in partcl (See <a href="https://trac.parrot.org/parrot/ticket/732">https://trac.parrot.org/parrot/ticket/732</a>). Hopefully they can get that and some other leaks closed.</div><div><br /></div><div>So, since a lot has changed (including the hardware) between those last two runs, there's not much to compare directly. I'll try to get more, regular updates going forward.</div><div><br /></div><div>Edit: Actual <a href="http://code.google.com/p/partcl/source/browse/trunk/docs/spectest-progress.csv">Spectest results</a></div></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-89607194831830469142009-06-01T06:56:00.000-07:002009-06-01T07:01:34.857-07:00NaN supportNow that partcl is passing all tests again, took some time over the weekend to add NaN support.<div><br /></div><div>NaN now parses in expressions, and is represented in bytecode as a TclFloat PMC with a value of NaN; most of the operators and functions now [error] appropriately when presented with NaN as an argument; all the partcl tests for NaN are un-skipped and passing.</div><div><div><br /></div></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-35347147957938171062009-05-28T16:22:00.000-07:002009-05-28T16:28:15.753-07:00Working again after parrot 1.0Partcl once again builds against parrot (tested against r39220), and passes everything in 'make test'!<div><br /></div><div>While there haven't been any functional changes since the last post, we are now building against an installed parrot; that involved quite a few changes to partcl's build process.</div><div><br /></div><div>There have also been some incompatible parrot changes since last we built; we're now tracking all of those changes.</div><div><br /></div><div>Once parrot 1.3 is released, we can switch to just building against an installed monthly release of parrot!</div><div><br /></div><div>Thanks to allison, Infinoid, NotFound, pmichaud, and cotto from #parrot for their fixes to both partcl and parrot to get us afloat again.</div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-19399482088401644782009-03-12T07:18:00.001-07:002009-03-12T07:20:39.527-07:00Distracted, but still here.I've been working with the core parrot team trying to get as much in order as possible for the upcoming 1.0 release.<div><br /></div><div>Once that release is out the door, I'll come back and make sure that we have a version of partcl that runs against parrot 1.0.</div><div><br /></div><div><span class="Apple-style-span" style="font-style: italic;">-Coke</span></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-79196460361775705402009-01-26T06:38:00.000-08:002009-01-26T07:34:40.485-08:00partcl progress, January 2009<div><span class="Apple-style-span" style="font-weight: bold; ">Keeping up with parrot</span></div><div><span class="Apple-style-span" style=" font-weight: bold;font-family:'courier new';"><br /></span></div><div>Lots of commits this month to keep up with changes in parrot trunk; a recent push in that project to finally remove some items marked as deprecated forced me to finally update our code. This should make things go more smoothly once parrot declares a 1.0 release.</div><div><br /></div><div>There is one regression in our core tests at the moment due to a recent change in how parrot handles attributes on PMCs. (C-level data structures resembling objects). </div><div><span class="Apple-style-span" style=" font-weight: bold;font-family:'courier new';"><br /></span></div><div><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-family:'courier new';">[Trace]</span>? Not yet</span></div><div><br /></div><div>I added a basic version of trace that allowed us to parse several specification tests that we previously were unable to; However, the simple version of [<span class="Apple-style-span" style="font-family:'courier new';">trace] </span>involved invoking the tcl compiler with an <span class="Apple-style-span" style="font-family:'courier new';">[uplevel]</span> command (which in turn, invokes the tcl compiler...) on every read access of a traced array; this resulted in about a 4x slowdown in the test suite, so I had to back it out. As we see speedups in other areas, it should be possible to re-enable this.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">Run <span class="Apple-style-span" style="font-family:'courier new';">init.tcl</span></span></div><div><span class="Apple-style-span" style="font-weight: bold;"><br /></span></div><div>Grabbed a copy of <span class="Apple-style-span" style="font-family:'courier new';">init.tcl </span>from the tcl repository (updating to target 8.5.6 while I was at it.). We are now running this on interpreter startup, and getting a few things for free that we had to roll our own for in the past. The biggest remaining thing is to get <span class="Apple-style-span" style="font-family:'courier new';">[unknown]</span> dispatch working to use the unknown defined here. <span class="Apple-style-span" style="font-family:'courier new';">[auto_load]</span> and friends are now working; unknown support is the last stop to getting several builtins written in tcl automatically loadable.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;"><span class="Apple-style-span" style="font-family:'courier new';">[array startsearch]</span></span></div><div><span class="Apple-style-span" style="font-weight: bold;"><br /></span></div><div>Parrot has had iterators for quite some time, and I finally got around to making them accessible to tcl. The implementation for here involved converting the C-based TclArray data structure (which was a simple extension of a parrot Hash) into a PIR-based version. The PIR based code makes it much easier to add per-instance attributes, include information to track open iterators. </div><div><br /></div><div>The only remaining bit to fix is how we reuse the named iterators: start 2 searches; kill the last one; start a new search - the name for that in partcl is off by one from the expected name in Tcl.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">Convert TclList?</span></div><div><br /></div><div>The relative ease of converting TclArray (combined with a suspicion that this would speed up partcl), led me to try to convert the C code for managing lists to PIR as well. The resulting code is much cleaner (PIR doing a lot of the lifting for us).</div><div><br /></div><div>However, the conversion didn't go smoothly. PIR subclasses of C-based PMCs are not fully equivalent; I never did get all tests passing after the conversion even with some workarounds in place, and one of the tests that did pass did not run appreciably faster. So that work in progress was discarded.</div><div><br /></div><div>I was somewhat disappointed to find that there were issues with the PIR subclasses, but was sure to report them back to the parrot project as issues to be tracked.</div><div><br /></div><div>Note to self: Seriously, stop trying to make things go faster if you don't have a profiler. It's not going to be worth it.</div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">Fix stringification of (some) lists</span></div><div><br /></div><div>The Tcl spec test "list.test" was aborting before printing out the results, meaning we couldn't count several passing tests. Tracked this down to two edge cases of stringification of lists elements that we got wrong. There are more, but these two prevented successful execution of the tests. Added them to partcl's core tests to avoid regressions; that's another 64 passing spec tests that we can now count.</div><div><br /></div><div><div><span class="Apple-style-span" style="font-family:'courier new';">$ ./tclsh</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">% list "{ab}xy" "{ab}\\"</span></div><div><span class="Apple-style-span" style="font-family:'courier new';">{{ab}xy} \{ab\}\\</span></div><div><br /></div></div><div><br /></div><div><span class="Apple-style-span" style="font-weight: bold;">Review Tests</span></div><div><br /></div><div>Went through the list of skipped tests and found a few that were able to be re-instated. As always, our spec test <a href="http://code.google.com/p/partcl/source/browse/trunk/docs/spectest-progress.csv">progress </a>is visible, along with <a href="http://code.google.com/p/partcl/source/browse/trunk/docs/spectest-current.txt">current stats </a>on various .test files. Since last month's posting, we're passing another few hundred tests.</div><div><br /></div><div><br /></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-54322777072076512062008-12-21T15:09:00.000-08:002008-12-22T18:56:09.780-08:00some headwayAfter spending some time just treading water with parrot updates, we've made some headway against the spec tests, which is nice. <span class="Apple-style-span" style="font-family: 'courier new';">^_^</span><div><br /></div><div>Thanks to dgp on <span class="Apple-style-span" style="font-family: 'courier new';">#tcl</span> on freenode for his suggestion for a stub for <span class="Apple-style-span" style="font-family: 'courier new';">[interp alias]</span> that let us run basic.test to completion!</div><div><br /></div><div>We regressed on <span class="Apple-style-span" style="font-family: 'courier new';">compile.test</span> 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.</div><div><br /></div><div>I also tracked down the <span class="Apple-style-span" style="font-family: 'courier new';">expected boolean value but got ""</span> error that is blocking many of the spec tests from running any tests; turns out that the constraint framework in <span class="Apple-style-span" style="font-family: 'courier new';">tcltest.tcl</span> (which helps determine if a given test in the file should be run or not) requires a minimal version of <span class="Apple-style-span" style="font-family: 'courier new';">[trace]</span> in order to work. Pulling at this thread, the trace refers to <span class="Apple-style-span" style="font-family: 'courier new';">[</span><span class="Apple-style-span" style="font-family: 'courier new';">namespace code]</span>, which means we also need <span class="Apple-style-span" style="font-family: 'courier new';">[namespace inscope]</span> ; I have a work in progress on each of these, but it's not quite ready for checkin. Thanks to pmichaud on <span class="Apple-style-span" style="font-family: 'courier new';">#parrot</span> for some thoughts on how trace (or tie in p5) might work on parrot.</div><div><br /></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-36133932203847351562008-12-18T16:25:00.000-08:002008-12-18T16:47:01.433-08:00Speedups since parrot 0.8.1I 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.<div><br /></div><div>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:</div><div><br /></div><div><div><span class="Apple-style-span" style="font-family: 'courier new';">"date","revision","parrot revision","files","test","pass","fail","skip","time in seconds"</span></div><div><div><div><span class="Apple-style-span" style="font-family: 'courier new';">"2008-11-19 12:51",159,"v0.8.1",57,4001,2341,1059,601,12550</span></div><div><span class="Apple-style-span" style="font-family: 'courier new';">"2008-12-18 12:15",195,"r34059",57,4001,2341,1059,601,9232</span></div><div><br /></div><div>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.</div><div><br /></div><div>I've also identified a <a href="https://trac.parrot.org/parrot/ticket/66">parrot segfault</a> 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 <a href="http://rakudo.org/">rakudo perl</a>, so hopefully between the two of us we can get a small test case for core parrot developers to resolve the issue.</div></div></div></div><div><br /></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-14434478725605361652008-12-17T17:57:00.001-08:002008-12-17T18:08:58.763-08:00Not 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 <a href="https://www.parrot.org/news/vision-for-1_0">parrot 1.0</a>.); I've ended up turning this requirement sideways a bit: I want a stable version for <span class="Apple-style-span" style="font-style: italic;">users</span> of partcl (All 1.2 of you.)<div><br /></div><div>I've now created a "stable" branch of the partcl svn repository that tracks a released version of parrot (currently 0.8.1). The <a href="http://code.google.com/p/partcl/wiki/PartclSource">download instructions</a> for partcl now show you how to get a combination of parrot & partcl that work together.</div><div><br /></div><div>Hopefully after every parrot release, we'll be able to update our stable branch to track it. Unfortunately, due to <a href="http://code.google.com/p/partcl/wiki/ParrotIssues">some issues</a> that cropped up near the end of the 0.8.2 development lifecycle, we missed that release.<br /></div><div><br /></div><div>I'd definitely be interested in feedback, especially from folks that use tcl on a regular basis.</div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-18770780771006476162008-11-10T19:03:00.001-08:002008-11-10T19:32:56.989-08:00October 2008 roundup<div>Just a brief update…</div><div><br /></div>Done a bit of work since the last post, fixing up as many <a href="http://code.google.com/p/partcl/wiki/SpecTestExplode">blockers</a> as possible running the spec test; <a href="http://code.google.com/p/partcl/wiki/SpecTestStatus">Current status is available on the wiki</a>. Short version: 2182 passing tests.<div><br /></div><div>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 <a href="http://code.google.com/p/partcl/wiki/PartclSource">depending on a newer svn revision</a>. 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.<br /><div><br /></div><div>partcl, while not taking advantage of the <a href="http://www.youtube.com/watch?v=DzpSREpLJY8">Parrot Compiler Toolkit (PCT),</a> still uses the <a href="http://en.wikipedia.org/wiki/Parser_Grammar_Engine">Parser Grammar Engine (PGE)</a> heavily† - looks like a recent <a href="http://www.perlfoundation.org/ian_hague_perl_6_development_grants">Hague grant</a> to Patrick Michaud from <a href="http://www.perlfoundation.org/">The Perl Foundation</a> will <a href="http://news.perlfoundation.org/2008/11/tpf_awards_first_hague_grant_t.html">provide some speedups to PGE</a>, which in turn can only make us go faster. </div><div><br /></div><div><br /></div><div><span class="Apple-style-span" style="font-style: italic;"><span class="Apple-style-span" style="font-size: small;">† You can see this by using the -t4 option to parrot (trace subroutines) and running any small tcl program, even <span class="Apple-style-span" style="font-family: 'courier new';">../../parrot -t4 tcl.pbc -e "puts hi"</span> and sorting through the output.</span></span></div></div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-49683979772615798562008-10-07T16:43:00.000-07:002008-10-07T19:23:45.264-07:00Leaving the nest...I've just moved partcl's main development repository into our <a href="http://code.google.com/p/partcl/">googlecode repository</a>.<div><br /></div><div>If you're interested in contributing, check out our <a href="http://code.google.com/p/partcl/w/list">googlecode wiki</a>.</div><div><br /></div><div>This should help with parrot's 1.0 goals regarding installation, as well as give partcl a slightly more stable development environment.</div><div><br /></div><div>I've created two mailing lists:</div><div><ul><li><a href="http://groups.google.com/group/partcl-commits">partcl-commits:</a> announce only: wiki and svn commit diffs are sent here.<br /></li><li><a href="http://groups.google.com/group/partcl-dev">partcl-dev</a> general dev discussion and ticket updates.<br /></li></ul></div><div> </div>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-1848419745770366602008-09-30T12:30:00.001-07:002008-09-30T12:34:38.017-07:00Spec Test StatusAdded a wiki page to the googlecode site:<br /><br />http://code.google.com/p/partcl/wiki/SpecTestStatus<br /><br />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.Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-1250047839790400022008-09-29T09:12:00.001-07:002008-09-29T10:18:51.074-07:00Running tcl's official test suite...<span class="Apple-style-span" style="font-style: italic;"><div><span class="Apple-style-span" style="font-size: x-small;">(this post rehashes </span><a href="http://use.perl.org/~coke/journal/37536"><span class="Apple-style-span" style="font-size: x-small;">some content</span></a><span class="Apple-style-span" style="font-size: x-small;"> found at the </span><a href="http://use.perl.org/~coke/journal/"><span class="Apple-style-span" style="font-size: x-small;">old blog</span></a><span class="Apple-style-span" style="font-size: x-small;">.)</span></div><div><span class="Apple-style-span" style="font-style: normal;"><br /></span></div><div><span class="Apple-style-span" style="font-style: normal;">With recent updates, partcl can now use the <span class="Apple-style-span" style="font-family:'courier new';"><a href="http://tcl.cvs.sourceforge.net/tcl/tcl/library/tcltest/tcltest.tcl?revision=1.103&view=markup&pathrev=core-8-5-4">tcltest.tcl</a></span> library that comes with tcl 8.5.4 [1]</span></div><div><span class="Apple-style-span" style="font-style: normal;"><br /></span></div><div><span class="Apple-style-span" style="font-style: normal;">For some time, partcl has been limping along with our hand-rolled Test::More analog on a slightly processed version of tcl's <span class="Apple-style-span" style="font-family:'courier new';">.test</span> files [2]. This generated TAP output, and was amenable to running via the standard perl testing tools.</span></div><div><span class="Apple-style-span" style="font-style: normal;"><br /></span></div><div><span class="Apple-style-span" style="font-style: normal;">The current version of 'make spectest' is processing the raw <span class="Apple-style-span" style="font-family:'courier new';">.test</span> 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.</span></div><div><span class="Apple-style-span" style="font-style: normal;"><br /></span></div><div><span class="Apple-style-span" style="font-style: normal;"><span class="Apple-style-span" style="font-family:'courier new';">$ ./tclsh t_tcl/llength.test</span></span></div><div><span class="Apple-style-span" style="font-style: normal; "><span class="Apple-style-span" style="font-family:'courier new';">llength.test: Total 6 Passed 6 Skipped 0 Fa</span><span class="Apple-style-span" style="font-family: 'courier new';">iled 0</span></span><br /></div><div><span class="Apple-style-span" style="font-style: normal;"><br /></span></div><div><span class="Apple-style-span" style="font-style: normal;">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.</span></div><div><span class="Apple-style-span" style="font-style: normal;"><br /></span></div><div><span class="Apple-style-span" style="font-style: normal;"><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;">==== case-3.3 single-argument form for pattern/command pairs FAILED</span></span></span></div><div><span class="Apple-style-span" style="font-style: normal; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;">==== Contents of test case:</span></span></span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-style: normal; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;"> list [catch {case z in {a 2 b}} msg] $msg</span></span></span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-style: normal; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;">---- Result was:</span></span></span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-style: normal; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;">1 {invalid command name "case"}</span></span></span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-style: normal; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;">---- Result should have been (exact matching):</span></span></span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-style: normal; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;">1 {extra case pattern with no body}</span></span></span><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-style: normal; "><span class="Apple-style-span" style="font-family:'courier new';"><span class="Apple-style-span" style="font-size:medium;">==== case-3.3 FAILED</span></span></span><br /></div><div><br /></div><div><span class="Apple-style-span" style="font-style: normal;">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].</span></div><div><br /></div><div><span class="Apple-style-span" style="font-style: normal;">I've checked a file into the repository to <a href="https://svn.perl.org/viewvc/parrot/trunk/languages/tcl/docs/spectest-progress.csv?view=markup">track the progress</a> of the suite. This is analogous to the file rakudo (Perl 6 on parrot) is using.</span></div><div><span class="Apple-style-span" style="font-style: normal;"><br /></span></div><div><span class="Apple-style-span" style="font-style: normal;"><span class="Apple-style-span" style="font-family:'courier new';">"date","revision","files","test","pass","fail","skip"</span></span></div><div><span class="Apple-style-span" style="font-style: normal;"><span class="Apple-style-span" style="font-family:'courier new';">"2008-09-25 00:00",31396,38,1481,743,290,448</span></span></div><div><span class="Apple-style-span" style=" font-style: normal;font-family:'courier new';"><div>"2008-09-26 04:51",31427,56,3659,2463,812,384</div><div><br /></div><div><span class="Apple-style-span" style="font-family:georgia;">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. </span></div><div><span class="Apple-style-span" style="font-family: georgia;"><br /></span></div><div><span class="Apple-style-span" style="font-family:georgia;">We still have a bit of work to do to successfully execute all the test files (and even more to pass all the tests.).</span></div><div><span class="Apple-style-span" style="font-family:georgia;"><br /></span></div><div><span class="Apple-style-span" style="font-family:georgia;">The most individual tests we ever logged passing with the converted version of the files was <a href="http://use.perl.org/~coke/journal/31742">3031</a>; 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. <span class="Apple-style-span" style="font-style: italic;">(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.)</span></span></div></span></div><div><br /></div><div><span class="Apple-style-span" style="font-style: normal;">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.</span></div><div><br /></div><div><ol><li><span class="Apple-style-span" style="font-size: 13px; ">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</span></li><li><span class="Apple-style-span" style="font-size: 13px; ">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.</span><br /></li><li><span class="Apple-style-span" style="font-size: 13px; ">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. </span><br /></li><li><span class="Apple-style-span" style="font-size: 13px; ">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.</span><br /></li></ol></div><div><br /></div></span>Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0tag:blogger.com,1999:blog-134339605383818351.post-10609540846600345992008-09-29T08:01:00.001-07:002008-09-29T08:25:09.704-07:00what is partcl?partcl is a from scratch implementation of <a href="http://www.tcl.tk/">tcl </a>(8.5.4) targeting the <a href="http://www.parrot.org/">parrot virtual machine</a>.<br /><br />The source code is currently <a href="http://www.parrot.org/download">distributed with parrot </a>(in the languages/tcl directory).<br /><br />Issues are recorded at the project's <a href="http://code.google.com/p/partcl/issues/list">googlecode</a> site.<br /><br />There's been sporadic blogging about the project at <a href="http://use.perl.org/%7Ecoke/journal/">Coke's use.perl journal</a> - I'll be posting here going forward.Cokehttp://www.blogger.com/profile/01745512237217656642noreply@blogger.com0