Re: [perl #17035] [PATCH] chr support = strange behavior

2002-09-09 Thread Steve Fink
On Sun, Sep 08, 2002 at 11:50:10AM +0200, Peter Gibbs wrote: Jerome Quelinm wrote: In fact, I tried to change S0, and whatever S0 value is (I tried with several values: , , A, 0, ), I always get a 60 as its ordinal value... I forgot to tell you: it doesn't work when I try to

Re: [perl #17071] [PATCH] string_index COW bug (and test)

2002-09-09 Thread Steve Fink
On Sun, Sep 08, 2002 at 10:35:16AM +, Peter Gibbs wrote: Attached patch fixes a problem with ord reported by Jerome Quelin. It also includes a test case in string.t. Oops, I thought this patch was for something else. Oh well, I've applied the fix already, with an equivalent test case, so

Re: [perl #17067] [PATCH] Buffers shouldn't remain free after being allocated

2002-09-09 Thread Steve Fink
On Sat, Sep 07, 2002 at 09:17:38AM +, Peter Gibbs wrote: Mike's changes to integrate the external and selfpoolptr flags have resulted in the on_free_list flag remaining set when a buffer header is reallocated. This breaks life, so I have had to fix it to be able to compare timings

Re: Suggestion for perl 6 regex syntax

2002-09-09 Thread David Helgason
Yeay! Golf... Adam D. Lopresto wrote: [...golf...] /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/ #50 chars [...more golf...] Of course, that's because we use perl6's strengths. :i/^(+|-)?(\d*[\.\d*]?)($2=~/./)[E([+|-]?\d+)]?$/ #51 Clever! But If we are allowed to use

Re: More A5/E5 questions

2002-09-09 Thread David Helgason
Jonathan Scott Duff wrote: Question #3: Related to question #2, if I didn't use hypotheticals, how would I access the Nth match of a repitition? For instance, in E5, there's an example that looks like this: rule file { ^ adonises := hunk* $ } If I didn't have the

Re: More A5/E5 questions

2002-09-09 Thread Damian Conway
Nicholas Clark wrote: Related, I think: no-one answered my question about what happens when I define sub dumb ($var, var) { ... } and then call it with the pair var=$thing Exception, probably. Perhaps the error would be something like: Dumb ambiguous binding of dumb named parameter

Re: reduce via ^ again

2002-09-09 Thread Damian Conway
John Williams wrote: Back in October I suggested that $a ^+= b would act like reduce, but in discussion it was decided that it would act like length I now pose the question: Is ^+= a hyper assignment operator or an assignment hyper operator? with a scalar involved the method and

Re: Argument aliasing for subs

2002-09-09 Thread Damian Conway
Erik Steven Harrison wrote: Just found this hidden in my inbox. I didn't think anyone was paying attention ;-). Oh, we *always* pay attention. We just don't always respond. ;-) What I most like about the Cis syntax is (like methods in OO Perl), it associates a meaningful *name* with each

Re: Argument aliasing for subs

2002-09-09 Thread Damian Conway
Erik Steven Harrison wrote: But still, what counts as a runtime property, other than true or false, as in the delightful '0 but true'? What other kind of runtime labels can I slap on a value? Here's ten to start with... for but tainted(0) {...} # note that external data is

Re: [perl #16937] Cygwin testers needed

2002-09-09 Thread Andy Dougherty
On Sat, 7 Sep 2002, Markus Laire wrote: On 6 Sep 2002 at 11:15, Andy Dougherty wrote: I've been told that my patch #16937 (which changes ld_shared from the hard-wired wrong value of -shared to $Config{lddlflags}, which is the variable designed in perl5 for this precise use) breaks

Porting C to Parrot

2002-09-09 Thread Ramesh Ananthakrishnan
Er... it is a silly thing to ask, but is there any way to write C code that comes out assembled in Parrot? Has C been targeted at parrot? Is it a logical thing to do? Does it make sense. (I tried this in my brain for three days and am still confused over whether it is a sensible thing to

[perl #17084] [PATCH] Fix order of linking in lib/Parrot/Test.pm

2002-09-09 Thread via RT
# New Ticket Created by Andy Dougherty # Please include the string: [perl #17084] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=17084 Under traditional Unix loaders (ld), the order in which items are specified in

Throwing lexicals

2002-09-09 Thread Aaron Sherman
I was thinking about regular expressions and hypotheticals again this weekend, and something was bothering me quite a lot. How do rules create hypotheticals? Since a rule behaves like a closure, I can see how it could gain access to existing lexicals, if it's declared inside of the same scope:

Re: Argument aliasing for subs

2002-09-09 Thread Steve Canfield
From: Uri Guttman [EMAIL PROTECTED] that is not a variable property so it should be a compile time error. I was under the impression that compile time properties, like runtime properties, can be arbitrarily invented and/or assigned. If that is correct, why would my $var is true, meaningless

Re: Argument aliasing for subs

2002-09-09 Thread Damian Conway
Steve Canfield wrote: I was under the impression that compile time properties, like runtime properties, can be arbitrarily invented and/or assigned. Yes, but not purely lower-case ones. They're reserved for Perl 6 itself. (i.e. only Larry can invent/assign them ;-) If that is correct, why

Re: Porting C to Parrot

2002-09-09 Thread Aaron Sherman
On Mon, 2002-09-09 at 09:07, Ramesh Ananthakrishnan wrote: Er... it is a silly thing to ask, but is there any way to write C code that comes out assembled in Parrot? Has C been targeted at parrot? Is it a logical thing to do? Does it make sense. (I tried this in my brain for three days

Re: [perl #17039] [PATCH] intarray aka integer dequeue PMC

2002-09-09 Thread Josef Hook
On Sun, 8 Sep 2002, Steve Fink wrote: On Thu, Sep 05, 2002 at 07:46:38PM -0400, John Porter wrote: Steve Fink wrote: Here is the new PMC I keep babbling about. Before I commit it, any comments? Like, does anybody think this should be named differently? It's really a dequeue

Re: Argument aliasing for subs

2002-09-09 Thread Erik Steven Harrison
-- On Sun, 08 Sep 2002 22:24:11 Damian Conway wrote: Think of it as punctuation. As a necessary alternative to the poor overworked colon. Or the poor overworked dot? it all looks the same to me. And I like different things to look different. A fair point. My counterargument is

Re: More A5/E5 questions

2002-09-09 Thread Damian Conway
David Helgason wrote: [worry #1] The hypothetical 'variables' we bind to aren't really variables but keys to a hash. Welcome to Perl 6. Where *no* variable is really a variable, but all are keys to a hash (which is known as the symbol table) ;-) Thus they shouldn't have sigils in their

Re: More A5/E5 questions

2002-09-09 Thread Nicholas Clark
On Sun, Sep 08, 2002 at 09:50:45PM +0200, Damian Conway wrote: Nicholas Clark wrote: Related, I think: no-one answered my question about what happens when I define sub dumb ($var, var) { ... } and then call it with the pair var=$thing Exception, probably. Perhaps the

Re: More A5/E5 questions

2002-09-09 Thread David Helgason
Damian Conway Wrote: [worry #1] The hypothetical 'variables' we bind to aren't really variables but keys to a hash. Welcome to Perl 6. Where *no* variable is really a variable, but all are keys to a hash (which is known as the symbol table) ;-) Ok, you're obviously right. But

Re: Goal call for 0.0.9

2002-09-09 Thread Andy Dougherty
On Mon, 9 Sep 2002, H.Merijn Brand wrote: On Mon 02 Sep 2002 22:25, Andy Dougherty [EMAIL PROTECTED] wrote: Similarly, it may be a good time to revisit our core platforms and see if they all work. A lot of the library stuff, especially the shared library stuff, is rather

Re: [perl #17084] [PATCH] Fix order of linking in lib/Parrot/Test.pm

2002-09-09 Thread Andy Dougherty
I wrote, The t/src/intlist test still fails for me -- I just got t/src/intlist...# Failed test (t/src/intlist.t at line 108) # got: 'Step 1: 0 # Failed: # ' # expected: 'Step 1: 0 # Step 2: 1 # Step 3: 2 # Step 4: 255 # Step 5: 256 # Step 6: 257 # Done. # '

Re: Goal call for 0.0.9

2002-09-09 Thread H.Merijn Brand
On Mon 09 Sep 2002 17:39, Andy Dougherty [EMAIL PROTECTED] wrote: On Mon, 9 Sep 2002, H.Merijn Brand wrote: On Mon 02 Sep 2002 22:25, Andy Dougherty [EMAIL PROTECTED] wrote: Similarly, it may be a good time to revisit our core platforms and see if they all work. A lot of the

Re: More A5/E5 questions

2002-09-09 Thread Damian Conway
David Helgason wrote: Coming to think of it, why have a named variable at all? If the match object gets returned anyhow there is no need for a cleverly named magical variable ($0, $MATCH, ...). Probably for the same reason that we have $1, $2, $_, etc. Because people are lazy. :-) Damian

Re: vi modelines for the boilerplate (was Re: [PATCH] COW for ithreads (was Re: what copies scalars in ithreads?))

2002-09-09 Thread Andy Dougherty
On Sun, 8 Sep 2002, Nicholas Clark wrote: from perl5-porters: Are we going to assimilate what parrot is doing in all its C files - * vim: expandtab shiftwidth=4: For most vi versions the portable vi modeline would be * vi: set expandtab shiftwidth=4: Would changing the

Re: vi modelines for the boilerplate (was Re: [PATCH] COW for ithreads (was Re: what copies scalars in ithreads?))

2002-09-09 Thread H.Merijn Brand
On Mon 09 Sep 2002 18:36, Andy Dougherty [EMAIL PROTECTED] wrote: On Sun, 8 Sep 2002, Nicholas Clark wrote: from perl5-porters: Are we going to assimilate what parrot is doing in all its C files - * vim: expandtab shiftwidth=4: For most vi versions the portable vi

Re: More A5/E5 questions

2002-09-09 Thread Jonathan Scott Duff
On Mon, Sep 09, 2002 at 03:52:30PM +0200, Damian Conway wrote: Hi Scott, You asked (off-list): Oops, that should've been on-list so that everyone can benefit from my ignorance :-) Then how do I tell ^^ and $$ to only match just after and just before my platform specific newline

Re: vi modelines for the boilerplate (was Re: [PATCH] COW for ithreads (was Re: what copies scalars in ithreads?))

2002-09-09 Thread Andy Dougherty
On Mon, 9 Sep 2002, H.Merijn Brand wrote: On Mon 09 Sep 2002 18:36, Andy Dougherty [EMAIL PROTECTED] wrote: On Sun, 8 Sep 2002, Nicholas Clark wrote: from perl5-porters: Are we going to assimilate what parrot is doing in all its C files - * vim: expandtab

Re: Goal call for 0.0.9

2002-09-09 Thread Sean O'Rourke
On Mon, 9 Sep 2002, Andy Dougherty wrote: Thanks for running the tests. If you're really ambitious, you could cd languages/perl6 make and see what happens, but unless you've got bison and flex installed, don't bother (I submitted a patch to pregenerate the files, but it's

Re: [perl #17030] [PATCH] Implementation of Lists for languages/scheme

2002-09-09 Thread Juergen Boemmels
Piers Cawley [EMAIL PROTECTED] writes: [...] Cool, applied. How far from real scheme are we? I think its quite far. The first thing is symbols and strings. But how do I represent them at parrot-level. PerlString maybe, but then how will they be distinct from each other. Or just

chr, ord etc

2002-09-09 Thread Aaron Sherman
I'd like to start a dialog about the P[arrot|erl] interface on the matter of converting low-level types. ord and chr are Perl functions for doing two very specialized conversions, but I'm thinking Parrot needs to provide a general-purpose number/[bit]?string conversion ala Perl's pack/unpack so

Re: Goal call for 0.0.9

2002-09-09 Thread Andy Dougherty
On Mon, 9 Sep 2002, Sean O'Rourke wrote: On Mon, 9 Sep 2002, Andy Dougherty wrote: Now why that [languages] isn't part of the default build, I don't know. None of the stuff in languages/ is part of the default build, and I think it should stay that way. It seems like bad form to, by

Re: Goal call for 0.0.9

2002-09-09 Thread Markus Laire
On 9 Sep 2002 at 15:02, Andy Dougherty wrote: On Mon, 9 Sep 2002, Sean O'Rourke wrote: None of the stuff in languages/ is part of the default build, and I think it should stay that way. It seems like bad form to, by default, build parts of a package that the user may not want to use.

Re: Throwing lexicals

2002-09-09 Thread Luke Palmer
Going back to patterns, this gives us an added bonus. It not only explains the behavior of hypotheticals, but also of subexpression placeholders, which are created when the pattern returns: $self but lexicals(0=$self, 1= $self.{1}, 2= $self.{2}, etc...) That yields the side

Re: Throwing lexicals

2002-09-09 Thread Me
I may be missing your point, but based on my somewhat fuzzy understanding: Oh. Duh. Why don't we have such a mechanism for matches? m/ my $date := date / is ambiguous to the eyes. But I think it's necessary to have a lexical scoping mechanism for matches The above would at least have

Re: Suggestion for perl 6 regex syntax

2002-09-09 Thread Aaron Sherman
[Moved over from p6i, to more appropriate p6l] On Sat, 2002-09-07 at 12:03, Mr. Nobody wrote: While Apocolypse 5 raises some good points about problems with the old regex syntax, its new syntax is actually worse than in perl 5. Most regexes, such as this one to match a C float

[PATCH] chr support in Befunge interpreter.

2002-09-09 Thread Jerome Quelin
Attached is a patch for the Befunge interpreter: - support of the chr instruction instead of Clinton's hack - a Changes file Oh, btw, I'm now using cvs diff in order to create my patches (thanks Leon) - it rocks! I hope they are still valid patches. Jérôme -- [EMAIL PROTECTED] Index:

Lexicals

2002-09-09 Thread Juergen Boemmels
Hi, I have several questions regarding lexicals. There is a discrepancy between parrot_assembly.pod and core.ops parrot_assembly.pod says that find_lex will return a pointer, where as core.ops uses find_lex to retrive a value and store_lex to set this value. Which of this is correct?

Re: Goal call for 0.0.9

2002-09-09 Thread Nicholas Clark
On Mon, Sep 09, 2002 at 03:02:55PM -0400, Andy Dougherty wrote: On Mon, 9 Sep 2002, Sean O'Rourke wrote: On Mon, 9 Sep 2002, Andy Dougherty wrote: Now why that [languages] isn't part of the default build, I don't know. None of the stuff in languages/ is part of the default

Re: [perl #16937] Cygwin testers needed

2002-09-09 Thread Andy Dougherty
On 6 Sep 2002 at 11:15, Andy Dougherty wrote: I've been told that my patch #16937 (which changes ld_shared from the hard-wired wrong value of -shared to $Config{lddlflags}, which is the variable designed in perl5 for this precise use) breaks cygwin. But in the current state of

Re: Throwing lexicals

2002-09-09 Thread Andrew Wilson
On Mon, Sep 09, 2002 at 02:14:25PM -0500, Me wrote: Hence the introduction of let: m/ { let $date := date } / which makes (a symbol table like entry for) $date available somewhere via the match object. Somewhere? where it appears in in the namespace of the caller. Apparently there

Re: Throwing lexicals

2002-09-09 Thread Luke Palmer
On Mon, 9 Sep 2002, Andrew Wilson wrote: On Mon, Sep 09, 2002 at 02:14:25PM -0500, Me wrote: Hence the introduction of let: m/ { let $date := date } / which makes (a symbol table like entry for) $date available somewhere via the match object. Somewhere? where it appears in

Re: Goal call for 0.0.9

2002-09-09 Thread Andy Dougherty
On Mon, 9 Sep 2002, H.Merijn Brand wrote: [HP-UX 11.00, GNU gcc-3.2] cd languages/perl6 make For gcc (which was the last I used) I got :( /usr/bin/ld -o imcc imcparser.o imclexer.o imc.o stacks.o symreg.o instructions.o cfg.o sets.o debug.o anyop.o ../../platform.o -lcl

[perl #17090] [PATCH] imcc needs to be built with LINK, not LD.

2002-09-09 Thread via RT
# New Ticket Created by Andy Dougherty # Please include the string: [perl #17090] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=17090 The subject says it all. diff -r -u parrot-orig/config/gen/makefiles/imcc.in

[perl #17091] 64-bit-int builds broken

2002-09-09 Thread via RT
# New Ticket Created by Andy Dougherty # Please include the string: [perl #17091] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=17091 Not OK: This is a failure report for parrot. 64-bit-int builds appear to be

Re: Throwing lexicals

2002-09-09 Thread Andrew Wilson
On Mon, Sep 09, 2002 at 02:13:55PM -0600, Luke Palmer wrote: Err.. I don't think so. # Date.pm grammar Date; my $date; rule date_rule { $date := something } # uses_date.p6 (hmm.. I wonder what a nice extension would be...) use Date; my

Re: Throwing lexicals

2002-09-09 Thread Aaron Sherman
On Mon, 2002-09-09 at 15:12, Luke Palmer wrote: Going back to patterns, this gives us an added bonus. It not only explains the behavior of hypotheticals, but also of subexpression placeholders, which are created when the pattern returns: [...] I think this is a very clean and simple way

Re: Suggestion for perl 6 regex syntax

2002-09-09 Thread Aaron Sherman
On Mon, 2002-09-09 at 06:05, David Helgason wrote: Yeay! Golf... If we are allowed to use all of perl6 in this particular (golf-)course, I suggest: Clearly I've missed a reference at some point. Presumably golf is used here to mean something like stupid question. Perl6 will be a *great*

Re: Suggestion for perl 6 regex syntax

2002-09-09 Thread Mark J. Reed
On Mon, Sep 09, 2002 at 05:02:18PM -0400, Aaron Sherman wrote: On Mon, 2002-09-09 at 06:05, David Helgason wrote: Yeay! Golf... If we are allowed to use all of perl6 in this particular (golf-)course, I suggest: Clearly I've missed a reference at some point. Presumably golf is used

Re: [perl #17091] 64-bit-int builds broken

2002-09-09 Thread Andy Dougherty
On Mon, 9 Sep 2002, Andy Dougherty wrote: 64-bit-int builds appear to be broken. This is from Linux/SPARC with INTVAL='long long'. This configuration used to work quite recently. I've at least figured out why it core dumps -- do_panic() assumes we've got a valid interpreter, and tries to

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 this is in

Re: Suggestion for perl 6 regex syntax

2002-09-09 Thread Uri Guttman
AS == Aaron Sherman [EMAIL PROTECTED] writes: AS On Mon, 2002-09-09 at 06:05, David Helgason wrote: Yeay! Golf... If we are allowed to use all of perl6 in this particular (golf-)course, I suggest: AS Clearly I've missed a reference at some point. Presumably golf AS is used

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?) For

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 Parrot

Re: chr, ord etc

2002-09-09 Thread Clinton A. Pierce
At 03:01 PM 9/9/2002 -0400, Aaron Sherman wrote: I'd like to start a dialog And since this thread is quiet, I'll throw some uneducated opinions on it to help it along. about the P[arrot|erl] interface on the matter of converting low-level types. ord and chr are Perl functions for doing two

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 maintainable. If

Re: chr, ord etc

2002-09-09 Thread Aaron Sherman
On Mon, 2002-09-09 at 21:42, Clinton A. Pierce wrote: Should these conversions be individual instructions (e.g. uint2string) or should there be a single-target pack analog in the PBC? I like the idea of having a single pack/unpack instruction, with some kind of argument mechanism to

Re: Goal call for 0.0.9

2002-09-09 Thread Will Coleda
Any particular reason not to have a specific make target for the tinderboxen? Nicholas Clark wrote: On Mon, Sep 09, 2002 at 03:02:55PM -0400, Andy Dougherty wrote: On Mon, 9 Sep 2002, Sean O'Rourke wrote: On Mon, 9 Sep 2002, Andy Dougherty wrote: Now why that [languages] isn't part of the

Re: [PATCH] chr support in Befunge interpreter.

2002-09-09 Thread Jerome Quelin
On Lundi 9 Septembre 2002 21:44, Jerome Quelin wrote : Attached is a patch for the Befunge interpreter: - support of the chr instruction instead of Clinton's hack - a Changes file Uh, cvs diff does not handle new files (and cvs add needs write access to the repository). So attached is the

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: [perl #17084] [PATCH] Fix order of linking in lib/Parrot/Test.pm

2002-09-09 Thread Steve Fink
On Mon, Sep 09, 2002 at 11:42:23AM -0400, Andy Dougherty wrote: I wrote, The t/src/intlist test still fails for me -- I just got ... and here's the simple fix: Doh! Thanks, sheepishly applied. I want a flag -fwhen_behavior_is_undefined_do_the_worst_possible_thing.

Re: [perl #17084] [PATCH] Fix order of linking in lib/Parrot/Test.pm

2002-09-09 Thread Steve Fink
On Mon, Sep 09, 2002 at 01:28:37PM +, Andy Dougherty wrote: Under traditional Unix loaders (ld), the order in which items are specified in the command line matters. Without this patch, -lm appears before libparrot.a, so at the time libm is encountered, no symbols are needed and nothing