Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

coke (5373)

coke
  (email not shown publicly)
http://www.coleda.com/

Journal of coke (5373)

Tuesday July 05, 2005
11:03 PM

more test cleanups for partcl

Did a lot of low hanging fruit - builtins that we had already implemented, but needed slightly different error messages, or that we hadn't yet written a test for, or were otherwise borked.

Also committed some udpates to the script that generates our tcl tests, making it more verbose so one might figure out what's going on while it's running.

Oddly enough, we're passing a test here or there for builtins we haven't implemented. That can't be right. =-)

Matt is going to implement [lindex], which would give us some more easy passes.

I've pinged the list about getting PGE to support character classes, which will help any failing [string match] tests.

Current passing percentage of tcl's tests (not including [clock]): 12.00%

12:02 AM

tcl-interactive, avoiding the real work.

Whee. partcl now passes along unknown commands to the shell as its big brother does:

$ make tclsh
(cd ../../ && ./parrot --output=languages/tcl/tcl.pbc languages/tcl/tcl.imc)
(cd ../../ && ./parrot --gc-debug languages/tcl/tcl.pbc)
% echo "whee"
whee

This done as I've committed a per6 grammar for [expr], which when run through the demo for PGE seems to work just fine: problem is being able to get at this data programmatically afterward. it's a bit convoluted, hopefully I can build on what autrijus has done in PGE.hs

Thursday June 30, 2005
11:24 AM

YAPC::NA aftermath

It was nice actually *meeting* some of the people that I've been interacting with since beginning working on/targetting parrot several years ago.

It's too bad that Matt Diephouse couldn't go - I suspect we'd have been able to advance partcl quite a bit.

Matt's currently working on a patch to improve list to string shimmering, which should raise our test percentage quite a bit. I'm working on updating [expr] handling. When I started writing this, parrot was in its infancy - the only real way to write a parser was to do it externally (and I didn't want to introduce any external dependencies), or by rolling your own in PIR or C: so I rolled my own parser.

With Patrick Michaud's latest work on PGE, however, it looks like I'll be able to rewrite these bits into a Perl 6 grammar. I'm in progress on this, though after 3 days in Toronto, I have some real work to get done first. ^_^.
Thursday March 03, 2005
03:10 PM

Inching towards parrot 0.1.2

Looks like we're getting very close to another point release of parrot, which will include Dan's string patch, as well as Leo's new generational GC system. use guest/guest as an RT login

The other items that were scheduled for the 0.1.2 release are mainly design-related TODOs which are getting bumped until at least the next point release, until we get Dan back -- Dan's been offlist for a few months now. Jesse is working on getting some information out of him regarding the TPF grant, hopefully that'll generate some movement soon.
Wednesday October 13, 2004
06:49 PM

ParTcl: Dynamic Tcl PMCs

A few months ago, I put together a cargo cult version of basic PMC types for Tcl based on their Perl counterparts. I ripped out all reference to PerlUndef, and made sure the shimmering (automatic conversion of datatypes) was working between the various types.

After posting this to the list, I was told that this was good, but these PMCs needed to be dynamic. That is, rather than being types that are shipped with the basic parrot core, they should be available as a dynamically loadable library. Makes sense. (Note: This also means that Perl's PMCs should also be moved to a dynamic library, especially now that parrot has its own, non-Perl base types.).

Things sat for a bit after that. Thanks to Mattia Barbon who provided a way to group related pmcs together into a single library to load (Before this, interrelated pmcs were uncompilable, as each depended on another that hadn't been compiled yet.). Also thanks to Steve Fink, who got that working under OS X, which is my primary development environment.

Now, if you

cd dynclasses && make

you get runtime/parrot/dynext/tclgroup.so (or something like it.) (If you don't, there's a bug, and please report it to the perl6 internals list. )

Now, at the top level parrot directory, you can create foo.imc containing:

.sub main
  loadlib $P0, "tclgroup"    # Load combined tcl lib
  $I0 = find_type "TclInt"   # Find ID for a TclInt *
  $P0 = new $I0              # Instantiate
  $P0 = "asdf"               # Assign
  print $P0
  print "\n"
  $S0 = typeof $P0           # Get the type description.
  print $S0
  print "\n"
  end
.end

This snippet prints out

asdf
TclString

Note that the type of the PMC has shimmered (morphed, if you prefer) to the appropriate data type. I need to do more work to nail down the appropriate reactions for each kind of shimmer for Tcl.

Next steps:

  1. Remove any dependence in Tcl's PIR on the Perl* PMCs.
  2. Provide the ability to generate Tcl Lists from within Tcl
    (that is, write [list]), and insure that the right thing happens when shimmering between a list and a string. For example, insure that:

    puts '[string range [list 1 2 3] 0 2]'

    Actually generates

    '1 2'

    which will have been shimmered from a TclList (returned by [list]) to a TclString

[*] - these steps are, of course, unnecessary with built in types. They're necessary here because when parrot started, we didn't know anything about Tcl. We have to load the pmcs, and then, because the pmc types were created at runtime, we have to use a runtime check to get our class ID. (As opposed to the builtin type String, which you can, thanks to runtime/parrot/include/pmctypes.pasm, just create with $P0 = new String)

Tuesday October 12, 2004
12:03 PM

ParTcl

I'm working on implementing Tcl (http://www.tcl.tk/) from scratch on top of parrot (http://www.parrotcode.org/). The code so far is available as part of the parrot distribution.

I've spoken briefly with some of the folks on the Tcl Core team, who suggested that this version of Tcl be called "ParTcl" ... which is so bad, I'm going to have to use it.

Right now, I've got a big chunk of the interpreter working. Next two big steps are overhauling [expr], and swapping out the generic (and Perl) PMCs for dynamically loaded Tcl PMCs. Now that Parrot 0.1.1 is released, I should be able to switch over to the dynamic PMCs without a problem.

Once those are done, I can add in/flesh out all the tcl builtins that rely on lists and arrays. (Or, if you speak perl, arrays and hashes. Mostly).

Volunteers welcome. ^_^