Second try: Builtins

2002-09-05 Thread Aaron Sherman
This is still a monolith, but it's getting better. It's now stored in P6C/Builtins/CORE.p6m in my tree. More functions are coded, and I now differentiate between the functions that need external support (e.g. POSIX/libc functions) and those that just need to be written (e.g. sort). I think I've c

Re: Second try: Builtins

2002-09-06 Thread Nicholas Clark
On Fri, Sep 06, 2002 at 01:34:56AM -0400, Aaron Sherman wrote: > # INTERNAL q, qq, qw > # XXX - how do I do quote-like operators? I know I saw someone say... > # Need to do: qr (NEVER("qr")) and qx presumably the way the perl5 tokeniser does them - by parsing the string into a series of concaten

Re: Second try: Builtins

2002-09-06 Thread Aaron Sherman
On Fri, 2002-09-06 at 09:29, Nicholas Clark wrote: > On Fri, Sep 06, 2002 at 01:34:56AM -0400, Aaron Sherman wrote: > > > # INTERNAL q, qq, qw > > # XXX - how do I do quote-like operators? I know I saw someone say... > > # Need to do: qr (NEVER("qr")) and qx > > presumably the way the perl5 toke

Re: Second try: Builtins

2002-09-07 Thread Chuck Kulchar
>> # INTERNAL q, qq, qw >> # XXX - how do I do quote-like operators? I know I saw someone say... >> # Need to do: qr (NEVER("qr")) and qx >presumably the way the perl5 tokeniser does them - by parsing the string >into a series of concatenated constants and variables, with some optionally >fed thr

Re: Second try: Builtins

2002-09-07 Thread Sean O'Rourke
On Sat, 7 Sep 2002, Chuck Kulchar wrote: > Also, how do these perl6 builtins in perl6 work with the current > P6C/Builtins.pm? (also, why are some that are already defined in pure > pasm/part of the parrot core redefined as perl6 code?) For the moment, "they don't". Eventually, I expect there w

Re: Second try: Builtins

2002-09-08 Thread Smylers
Aaron Sherman wrote: > sub chomp($string is rw){ > my $irs = ${"/"}; # XXX What is $/ now? > if defined $irs { > if $irs.isa(Object) { > return undef; > } elsif $irs.length == 0 { > $string =~ s/ \n+ $ //; Should

Re: Second try: Builtins

2002-09-09 Thread Aaron Sherman
On Sat, 2002-09-07 at 14:22, Smylers wrote: > Aaron Sherman wrote: > > sub chomp($string is rw){ [...] > > } elsif $irs.length == 0 { > > $string =~ s/ \n+ $ //; > > Should that C<+> be there? I would expect chomp only to remove a single > line-break. Note that

Re: Second try: Builtins

2002-09-09 Thread Aaron Sherman
On Sat, 2002-09-07 at 10:53, Sean O'Rourke wrote: > On Sat, 7 Sep 2002, Chuck Kulchar wrote: > > Also, how do these perl6 builtins in perl6 work with the current > > P6C/Builtins.pm? (also, why are some that are already defined in pure > > pasm/part of the parrot core redefined as perl6 code?) >

Re: Second try: Builtins

2002-09-09 Thread Nicholas Clark
On Mon, Sep 09, 2002 at 05:36:42PM -0400, Aaron Sherman wrote: > Correct in as far as it goes. The more general answer is that one of the > goals of this re-write (as I was lead to believe) was that the Perl > internals would be maintainable. If we write the well over 150 Perl 5 > builtins in Parr

Re: Second try: Builtins

2002-09-09 Thread Aaron Sherman
On Mon, 2002-09-09 at 17:52, Nicholas Clark wrote: > On Mon, Sep 09, 2002 at 05:36:42PM -0400, Aaron Sherman wrote: > > Correct in as far as it goes. The more general answer is that one of the > > goals of this re-write (as I was lead to believe) was that the Perl > > internals would be maintainab

Re: Second try: Builtins

2002-09-09 Thread Leopold Toetsch
Aaron Sherman wrote: > Of these, about 30-50% will probably be pure Perl. Another small > percentage will be assembly wrappers that call a one-for-one parrot > function (e.g. exit). The rest will be a complex mix of Perl and > assembly (e.g. sprintf which is mostly Perl, but needs assembly for >

Re: Second try: Builtins

2002-09-11 Thread Smylers
Aaron Sherman wrote: > On Sat, 2002-09-07 at 14:22, Smylers wrote: > > > Should that C<+> be there? I would expect chomp only to remove a > > single line-break. > > Note that this is in paragraph (e.g. C<$/=''>) mode Ah, yes. I quoted the wrong case above. The final branch deals with t