[perl #40748] [TODO] Tcl - catch exceptions and return appropriate error message in runtime/builtin/inline.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40748]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40748 


From the comment in the file languages/tcl/runtime/builtin/inline.pir:

Should catch exceptions in the code and return the error message

This ticket is in response to cage task #39704.


[perl #40749] [TODO] Tcl - dictionary, command etc necessary in runtime/builtin/lsort.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40749]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40749 


From the TODO comment in the file languages/tcl/runtime/builtin/lsort.pir:

dictionary, command etc necessary

This ticket is in response to cage task #39704.


[perl #40750] [TODO] Tcl - deal with defaults when saving proc args in runtime/builtin/proc.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40750]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40750 


From the TODO comment in the file languages/tcl/runtime/builtin/proc.pir:

 # Save the args for the proc for [info args]
  # XXX When dealing with defaults, this will have to be updated.

This ticket is in response to cage task #39704.


[perl #40751] [TODO] Tcl - factor out code from Tcl::list in runtime/builtin/proc.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40751]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40751 


From the TODO comments in the file languages/tcl/runtime/builtin/proc.pir:

  # Convert the remaining elements returned by foldup into a TclList
  # XXX This code lifted from Tcl::list - eventually factor this out.

This ticket is in response to cage task #39704.


[perl #40752] [TODO] Tcl - fix trans_charset issue in runtime/builtin/proc.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40752]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40752 


From the TODO comment in the file languages/tcl/runtime/builtin/proc.pir:

  # (see note on trans_charset in lib/parser.pir) XXX

Unfortunately, the file 'parser.pir' doesn't seem to exist in the
parrot tree anymore (as of r15218), so one thing to do is to work out
the issue this actually points to.

This ticket is in response to cage task #39704.


[perl #40754] [TODO] Tcl - rename temporary variables in runtime/builtin/split.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40754]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40754 


Rename temporary variables occurring in languages/tcl/runtime/builtin/split.pir

This ticket is in response to cage task #39704.


[perl #40755] [TODO] Tcl - make 'splitchars' variable the default whitespace splitchars in runtime/builtin/split.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40755]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40755 


In the file languages/tcl/runtime/builtin/split.pir, replace the
splitchars variable with the default whitespace splitchars.

This ticket is in response to cage task #39704.


[perl #40753] [TODO] Tcl - implement 'which' sub in runtime/builtin/namespace.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40753]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40753 


The 'which' sub in languages/tcl/runtime/builtin/namespace.pir needs
to be implemented.

This ticket is in response to cage task #39704.


[perl #40756] [TODO] Tcl - recode TclList truncation hack in runtime/builtin/split.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40756]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40756 


In the file languages/tcl/runtime/builtin/split.pir, replace the hack
which truncates a TclList to the right number of elements with a
proper implementation.

This ticket is in response to cage task #39704.


[perl #40757] [TODO] Tcl - runtime/builtin/error.pir only handles one arg form of error

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40757]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40757 


From the TODO comment in the file languages/tcl/runtime/builtin/error.pir:

# XXX only handles the one arg form of error right now.
# need global vars before setting errorInfo, and stack tracing isn't
# ready yet.
# (So, the usage statement lies)

This ticket is in response to cage task #39704.


[perl #40758] [TODO] Tcl - handle options in runtime/builtin/regsub.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40758]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40758 


Handle options to regular expressions in
languages/tcl/runtime/builtin/regsub.pir

This ticket is in response to cage task #39704.


[perl #40759] [TODO] Tcl - respect special characters in runtime/builtin/regsub.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40759]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40759 


Need to respect special characters when handling regular expressions
in languages/tcl/runtime/builtin/regsub.pir

This ticket is in response to cage task #39704.


[perl #40760] [TODO] Tcl - use tcl instead of perl5 regular expressions in runtime/builtin/regsub.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40760]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40760 


Use tcl instead of perl5 regular expressions in
languages/tcl/runtime/builtin/regsub.pir

This ticket is in response to cage task #39704.


[perl #40761] [TODO] Tcl - missing a field specifier implementation

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40761]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40761 


From the TODO comment in languages/tcl/runtime/builtin/binary.pir:

XXX This error should never occur: must be missing a field specifier
implementation.

This ticket is in response to cage task #39704.


[perl #40762] [TODO] Tcl - remove hack to avoid blowing up when using binary in runtime/builtin/binary.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40762]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40762 


There is a hack in languages/tcl/runtime/builtin/binary.pir to avoid
blowing up when using binary.  This issue needs to be fixed.

This ticket is in response to cage task #39704.


[perl #40763] [TODO] Tcl - remove hack to avoid parsing errors for tcl tests in runtime/builtin/binary.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40763]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40763 


Fix issue associated with hack workaround to avoid parsing errors for
tcl tests in the 'scan' sub of
languages/tcl/runtime/builtin/binary.pir.

This ticket is in response to cage task #39704.


Re: How do I associate methods with a compiler?

2006-11-09 Thread Adriano Rodrigues

On 11/9/06, Patrick R. Michaud [EMAIL PROTECTED] wrote:

Opinions welcome.  Personally I think I favor the a compiler is
an object with a 'compile' method model, and that Ccompreg gives
us back a compiler object as opposed to a subroutine-like thing.


Would it not be possible to support both? A compiler compiles, so it
seems natural to write quick-and-dirty compilers as simple
subroutines. Also for wrappers around other compiler codes, they still
could be useful if they compile/execute, while there is not a
full-blown implementations in terms of the Parrot compiler API .

The usage patterns could be something like:

  .local string perl6_source
  .local pmc perl6_compiler
  perl6_compiler = compreg 'Perl6'
  $P0 = perl6_compiler(perl6_source)

(Yes, the same as Patrick's first snippet.) And then

  perl6_compiler = compreg 'Perl6', OBJ # OBJ is some constant
  $P0 = perl6_compiler.'compile'(perl6_source)

compreg S would be short for compreg S, SUB or something (and it
could be always required). While compreg S, OBJ may blow with a non
implemented feature for some compilers. It would be easy for object
compilers to provide a sub implementation. But on the other hand it
could also be easy for subroutine compilers to provide an object
implementation with the help of a wrapper object (with not very useful
methods besides 'compile').

My $0.02 cents.

Adriano Ferreira.


[perl #40764] [TODO] Tcl - make splice work on TclList - TclList

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40764]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40764 


From the TODO comment in the file languages/tcl/runtime/builtin/linsert.pir:

  # XXX workaround, splice doesn't work on TclList - TclList.
  # Until that's fixed, splice Arrays, then post-covert to a TclList
  # This is a hideous hack.

This ticket is in response to cage task #39704.


[perl #40767] [TODO] Tcl - no longer create pad in 'foreach'

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40767]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40767 


From the TODO comments in the file languages/tcl/runtime/builtin/foreach.pir:

  # Loop until all elements are consumed. If any of the lists that were
  # provided are already consumed, then simply assign the empty string.
  # create a new pad in which our variables will run.
  # XXX This should probably not create a new pad, exactly

This ticket is in response to cage task #39704.


[perl #40768] [TODO] Tcl - 'done' label missing in 'range' sub of runtime/builtin/string.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40768]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40768 


Add the goto label 'done' in the 'range' sub of languages/tcl/builtin/string.pir

This ticket is in response to cage task #39704.


[perl #40769] [TODO] Tcl - implement 'map' sub in runtime/builtin/string.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40769]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40769 


Implement the stub 'map' sub in languages/tcl/runtime/builtin/string.pir

This ticket is in response to cage task #39704.


[perl #40770] [TODO] Tcl - 'is' sub doesn't currently respect -options

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40770]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40770 


Make the 'is' sub in languages/tcl/runtime/builtin/string.pir respect -options.

This ticket is in response to cage task #39704.


[perl #40771] [TODO] Tcl - handle -options with a hash-dispatch in 'is' sub of runtime/builtin/string.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40771]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40771 


Handle -options with a hash-dispatch in 'is' sub of
languages/tcl/runtime/builtin/string.pir

This ticket is in response to cage task #39704.


[perl #40773] [TODO] Tcl - tie string index into --failvar in 'is' sub of runtime/builtin/string.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40773]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40773 


In the cclass_check branch of the 'is' sub of
languages/tcl/runtime/builtin/string.pir the string index needs to be
tied into --failvar.

This ticket is in response to cage task #39704.


[perl #40774] [TODO] Tcl - use tcl regexps instead of perl 5 regexps in runtime/builtin/regexp.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40774]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40774 


Use tcl regular expressions instead of perl 5 ones in
languages/tcl/runtime/builtin/regexp.pir

This ticket is in response to cage task #39704.


[perl #40777] [TODO] Tcl - check return value of exit in t/cmd_exit.t

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40777]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40777 


Check return value of exit in languages/tcl/t/cmd_exit.t

This ticket is in response to cage task #39704.


[perl #40772] [TODO] Tcl - implement ascii_check branch of 'is' sub in runtime/builtin/string.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40772]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40772 


Implement the ascii_check branch of 'is' sub in
languages/tcl/runtime/builtin/string.pir - at present this just
branches to 'bad_args'

This ticket is in response to cage task #39704.


[perl #40776] [TODO] Tcl - test eof condition in t/cmd_eof.t

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40776]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40776 


Create test files and read from them, testing the eof condition in
languages/tcl/t/cmd_eof.t

This ticket is in response to cage task #39704.


[perl #40775] [TODO] Tcl - reduce occurrence of .HLL in runtime/tcllib.pir and .included files

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40775]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40775 


Reduce the occurrence of .HLL in languages/tcl/runtime/tcllib.pir and
.included files.

This ticket is in response to cage task #39704.


[perl #40779] [TODO] Tcl - implement 'subst' more completely in runtime/builtin/subst.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40779]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40779 


Completely implement 'subst' in languages/tcl/runtime/builtin/subst.pir

This ticket is in response to cage task #39704.


[perl #40780] [TODO] Tcl - implement more options to 'open' in runtime/builtin/open.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40780]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40780 


Only r and w are implemented as options to 'open' at present in
languages/tcl/runtime/builtin/open.pir.  Complete the implementation
of the sub.

This ticket is in response to cage task #39704.


[perl #40781] [TODO] Tcl - handle options in 'subst' in runtime/builtin/subst.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40781]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40781 


Handle options in 'subst' sub in languages/tcl/runtime/builtin/subst.pir

This ticket is in response to cage task #39704.


[perl #40766] [TODO] Tcl - check error condition of 'unset' sub in runtime/builtin/array.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40766]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40766 


Check the not_array error condition of the 'unset' sub in
languages/tcl/runtime/builtin/array.pir

This ticket is in response to cage task #39704.


[perl #40765] [TODO] Tcl - check tcl error condition in 'get' sub of runtime/builtin/array.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40765]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40765 


Check the not_array error condition in the 'get' sub of
languages/tcl/runtime/builtin/array.pir

This ticket is in response to cage task #39704.


Re: How do I associate methods with a compiler?

2006-11-09 Thread Patrick R. Michaud
On Thu, Nov 09, 2006 at 09:55:05AM -0200, Adriano Rodrigues wrote:
 On 11/9/06, Patrick R. Michaud [EMAIL PROTECTED] wrote:
 Opinions welcome.  Personally I think I favor the a compiler is
 an object with a 'compile' method model, and that Ccompreg gives
 us back a compiler object as opposed to a subroutine-like thing.
 
 Would it not be possible to support both?  

Sure, it's possible to support both -- we can even handle both
types within the existing Parrot framework.  I think I'm basically 
asking which model will be considered the Parrot standard?

 The usage patterns could be something like:
 
   .local string perl6_source
   .local pmc perl6_compiler
   perl6_compiler = compreg 'Perl6'
   $P0 = perl6_compiler(perl6_source)
 
 (Yes, the same as Patrick's first snippet.) And then
 
   perl6_compiler = compreg 'Perl6', OBJ # OBJ is some constant
   $P0 = perl6_compiler.'compile'(perl6_source)

We could do this now without requiring an additional parameter
to Ccompreg, by adding suffixes to the compiler name.  For example:

$P0 = compreg 'Perl6_sub'# get subroutine view of compiler
$P0 = compreg 'Perl6_obj'# get object

But I find the suffix (or the use of an extra parameter) a bit
overblown.  I'd rather come up with a standard API for compilers
that supports all of this, and then individual compiler subs can
deviate from that standard if it's really appropriate.

I've also just written a HLLCompiler base class (I would've called
it 'Compiler', but that name is currently taken in Parrot) that 
makes it easy to wrap a sub into a compiler object.  Thus 
registering a new compiler becomes:

load_bytecode 'Parrot/HLLCompiler.pbc'
   
.local pmc compile_object, compile_sub
compile_object = new [ 'HLLCompiler' ]
compile_sub = get_global 'name_of_compile_sub'
compile_object.'compsub'(compile_sub)
compreg 'MyCompiler', compile_object

Using the compiler is then:

.local pmc mycompiler
mycompiler = compreg 'MyCompiler'
$P0 = mycompiler.'compile'(source)

Thanks for the excellent comments!

Pm


[perl #40782] [TODO] Tcl - refactor code to avoid overallocation in runtime/builtin/split.pir

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40782]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40782 


Things are being over allocated in the 'split' sub in
languages/tcl/runtime/builtin/split.pir; this needs to be refactored.

This ticket is in response to cage task #39704.


[perl #40783] [CAGE] get fixme.t to check for an RT ticket number after TODO items

2006-11-09 Thread via RT
# New Ticket Created by  Paul Cochrane 
# Please include the string:  [perl #40783]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40783 


Currently t/codingstd/fixme.t only searches for, and reports error on,
the strings: FIXME|XXX|TODO.  The test should check for an RT ticket
number following the FIXME|XXX|TODO string and *not* report this as an
error since the item is already known and in the RT queue.


[perl #39704] [CAGE] Tcl - Convert TODO/XXX comments to RT tickets

2006-11-09 Thread Paul Cochrane via RT
I did it!  Yay :-)  This will hopefully reduce the noise on parrot-
porters.


[perl #40788] Tcl - bug in interactive tclsh

2006-11-09 Thread via RT
# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #40788]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40788 


% cd languages/tcl
% make tclsh
hit enter

Rather than get %, you get:

program doesn't match grammar




[perl #40217] Parrot_autoload_class() knows about Python and Tcl

2006-11-09 Thread Will Coleda via RT
Here's a patch which simply remove this function.

No new tests fail, either in parrot or tcl.

Going once...

On Tue Aug 22 17:40:27 2006, chip wrote:
 Hard-coded language names in Parrot are ... well ... bad.
 Very bad.





40217.patch
Description: Binary data


[perl #40783] [CAGE] get fixme.t to check for an RT ticket number after TODO items

2006-11-09 Thread Will Coleda via RT
Done in r15324.