Various ^

change how we run parrot

Right now we cd up to parrot's root directory and then path down to tcl

Leo has asked to change this to instead do ../../parrot tcl.pbc foo.tcl

This is fine by me but didn't work as of a year ago. =-)

interactive tclsh

simple interactive mode now exists. Still have to:

 o Should catch any real_exceptions thrown.
 o respect tcl_prompt1, tcl_prompt2
 o deal with incomplete input (needs better error handling)
 o give invalid commands to the system.
[interpinfo name]

how to do this from inside parrot? [ there's a RT ticket for this now, someone should put the # here.]

migrate all these issues to RT or TODO tests

update docs [will]

(including add pod to all .imc)

Programming Issues ^

C-level tasks ^

string to list

Should be moved to tcllist's set_string method. ... except that it turns out this is non-trivial.

PIR-level tasks ^

subcommand processing

Convert any commands that use subcommands to [info] style dispatch to ease maintenance. Subcommands invoked in this style get a single container PMC with all their args, but *NOT* the invoking command. so, given the tcl:

  info args foo
Tcl::info is called with (args, foo), which then dispatched to:

_Tcl::builtins::info::args ((foo)).

implement default globals, etc.

global variables provided by tcl libary. tclvars.

global variables provided by tcl interpreter. tclsh

source per-user settings. tclsh

unimplemented commands/subcommands

[after] [array get] [array names] [array unset] [array statistics] [array anymore] [array donesearch] [array nextelement] [array startsearch] [bgerror] [binary] [case] [clock] [close] [cd] [dde] [encoding] [eof] [exec] [fblocked] [fconfigure] [fcopy] [file] [fileevent] [flush] [gets] [glob] [http] [interp] [library] [lindex] [load] [lreplace] [lsearch] [lset] [lsort] [memory] [msgcat] [namespace] [open] [package] [pid] [pwd] [read] [registry] [regexp] [regsub] [resource] [safe] [scan] [seek] [socket] [subst] [string replace] [string tolower] [string totitle] [string toupper] [string trim] [string trimleft] [string trimright] [string compare] [string equal] [string last] [string bytelength] [string is] [string map] [string wordstart] [string wordend] [switch] [tcltest] [tell] [update] [variable] [vwait] [trace]

Tests ^

standards

Any future tests, write more like t/tcl_var_subst.t. Eventually cleanup tests so they're consistent.

Add tests for...

info

tclversion, body, args, exists

[expr]'s precedence and parens and missing functionality.

[puts]'s ability to write to other channels

[uplevel]

[upvar]

[lrange]

Add tcl tests to tcl, and remove from partcl

Add tcl tests to the tcl test suite, which is currently run by partcl, and remove duplicated tests from the partcl test suite. The partcl test suite should only test parrot-related functionality.

Uncategorized Issues ^

provide a way to access existing library PIR from Tcl.

Perhaps via [namespace import]? Can fake it right now with [inline]

multiple level lists

[expr]

Clean up [expr]. MUUUUCH room for improvement there. [expr] is the source of most of our abysmal performance in bench.tcl.

the expr AST could use a rework. Be nice if it just passed around something invokable.

clean up expr so that it's not passing around type indicators. - just use PMCs everywhere. (Though we may still need to have CONST vs. VARIABLE types.)

The type indicator is also used to disambiguate operators and function calls from operands. We can easily remove it for operands, but how to cleanly remove this for operators?

TBD: strings, floats as operands - (many of the math funcs return floats but you can't specify them, and not everything takes them (try, for example, [expr sin(1) + sin(1)] vs [expr sin(1) * sin(1)].)

TBD: blocks, commands, and strings as operands

TBD: logical binary ops & ternary op (need deferred evaluation) ; unary ops; ops that work on strings only.

TBD: functions that take > 1 arg.

TBD: Argument type requirements - Currently works ONLY on bitand - esp need to get any that require int-only args, as we can now /generate/ floats, even if we cannot specify them. This is all supportable by MMD - we just need to specify the correct errors to throw.

misc

complete [error]


parrot