Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Jonathan Polley
On Fri, 24 Sep 2004 21:04:52 -0400, Dan Sugalski wrote: > At 7:51 PM -0400 9/24/04, Jonathan Polley wrote: >>On Fri, 24 Sep 2004 14:04:52 -0400, Dan Sugalski wrote: >> >>> ... >>> (Though class names/namespaces seem to be separate) >>> ... >> >>I think Guido might have made things a bit harder

Re: Why lexical pads

2004-09-24 Thread Jeff Clites
On Sep 24, 2004, at 7:32 PM, Dan Sugalski wrote: At 7:28 PM -0700 9/24/04, Jeff Clites wrote: On Sep 24, 2004, at 6:51 PM, Aaron Sherman wrote: However, the point is still sound, and that WILL work in P6, as I understand it. Hmm, that's too bad--it could be quite an opportunity for optimization, i

Re: Why lexical pads

2004-09-24 Thread Dan Sugalski
At 7:28 PM -0700 9/24/04, Jeff Clites wrote: On Sep 24, 2004, at 6:51 PM, Aaron Sherman wrote: However, the point is still sound, and that WILL work in P6, as I understand it. Hmm, that's too bad--it could be quite an opportunity for optimization, if you could use-and-discard lexical information a

Re: Why lexical pads

2004-09-24 Thread Jeff Clites
On Sep 24, 2004, at 6:51 PM, Aaron Sherman wrote: On Fri, 2004-09-24 at 12:36, Jeff Clites wrote: Ha, you're example is actually wrong (but tricked me for a second). Here's a simpler case to demonstrate that you can't look up lexicals by name (in Perl5): You are, of course, correct. If I'd been ig

Re: S5 updated

2004-09-24 Thread Aaron Sherman
On Fri, 2004-09-24 at 16:58, Edward Peschko wrote: > Ok, ok, I'll give you that point ... lets call them 'intimately related' and > leave it at that... if you say "3 foo" and your algorithm goes: > > "3 foo" => 3 => "2" > > then you know something is desperately wrong. Yes, and you know

Re: Why lexical pads

2004-09-24 Thread Aaron Sherman
On Fri, 2004-09-24 at 12:36, Jeff Clites wrote: > Ha, you're example is actually wrong (but tricked me for a second). > Here's a simpler case to demonstrate that you can't look up lexicals by > name (in Perl5): You are, of course, correct. If I'd been ignorant of that in the first place, this w

Re: Switching between versions of $language

2004-09-24 Thread Dan Sugalski
At 11:53 PM +0200 9/24/04, Juerd wrote: Does Parrot make it easy to have different versions of a language engine, say Perl, loaded at the same time? Nope. Modules yes, but perl versions (or any language version) no. I suppose we could, but I'm not sure it'd work as well as you might like, since m

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Dan Sugalski
At 7:51 PM -0400 9/24/04, Jonathan Polley wrote: On Fri, 24 Sep 2004 14:04:52 -0400, Dan Sugalski wrote: ... (Though class names/namespaces seem to be separate) ... I think Guido might have made things a bit harder to separate out than you anticipate, unless I misread you. It appears that module

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Jonathan Polley
On Fri, 24 Sep 2004 14:04:52 -0400, Dan Sugalski wrote: > ... > (Though class names/namespaces seem to be separate) > ... I think Guido might have made things a bit harder to separate out than you anticipate, unless I misread you. It appears that modules and classes are also imported into the sam

Switching between versions of $language

2004-09-24 Thread Juerd
Does Parrot make it easy to have different versions of a language engine, say Perl, loaded at the same time? See also the IRC snippet pasted below (irrelevant conversation removed). I'm not on the list; please CC. Juerd * Juerd hopes Perl 6 will provide an easy portable mechanism for having

Re: S5 updated

2004-09-24 Thread Edward Peschko
> >>>just like the transformation of a string into a number, and from a > >>>number to a string. Two algorithmically different things as well, > >>>but they'd damn-well better be exact inverses of the > >>>other. > >> > >>But they're not: > >> > >> " 3 foo" --> 3 --> "3" > > > >I'd say that tha

Re: [perl #31682] [BUG] Dynamic PMCS [Tcl]

2004-09-24 Thread William Coleda
oolong:~/research/parrot coke$ uname -a Darwin oolong 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug 5 19:26:16 PDT 2004; root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC Power Macintosh powerpc oolong:~/research/parrot coke$ grep LINK Makefile LINK = c++ LINKFLAGS = -L/usr/local/lib -g Here's the m

Re: S5 updated

2004-09-24 Thread Smylers
Rod Adams writes: > Edward Peschko wrote: > > > Running a regular expression in reverse has IMO the best potential > > for making regexes transparent - you graphically see how they work > > and what they match. > > I have to disagree here. For what it's worth, I agree with your disagreement --

Re: S5 updated

2004-09-24 Thread Patrick R. Michaud
On Fri, Sep 24, 2004 at 11:36:43AM -0500, Rod Adams wrote: > Output would be a step by step graph of the internal logic used to match > / not match the string. I'd break the RE up into the same pieces the > Engine does, then show how that subrule matched char a, then char b, but > failed to matc

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Chip Salzenberg
According to Matt Fowles: > I personally thing that the suggestion of providing a base namespace > PMC and letting each language create their own if they want overrides > is a really nice idea. I can't speak to that. However: > I think the base one should have the maximum number of distinct > su

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Matt Fowles
All~ I personally thing that the suggestion of providing a base namespace PMC and letting each language create their own if they want overrides is a really nice idea. I think the base one should have the maximum number of distinct subspaces with special functions to access them (i.e. function, va

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Chip Salzenberg
According to Dan Sugalski: > I'm fine with mashing functions and variables into a single big mass... Me too (FWIW). And I think it'll work. PS: I've got the Glob Stick where I can reach it. -- Chip Salzenberg - a.k.a. - <[EMAIL PROTECTED]> "I don't really think it is

Why do rules match against strings?

2004-09-24 Thread Aaron Sherman
Pardon if this has already come up. I only found one prior reference in my search. There's a section in S5 about "Matching against non-strings", but it really only addresses matching against strings that are retrieved dynamically from tied values. Some operations in a rule operate on string value

Namespaces, part 1 (new bits)

2004-09-24 Thread Dan Sugalski
Okay, so we've got two points of dispute: 1) Jeff doesn't think the sigil should be part of the variable name 2) Both Jeff and Jonathan have pointed out that languages we care about *do* have a combined function/varname store. (Though class names/namespaces seem to be separate) For point #1, I t

Re: S5 updated: 3 but remainder()?

2004-09-24 Thread Austin Hastings
Juerd wrote: Austin Hastings skribis 2004-09-24 12:05 (-0400): Actually, that raises a good point: Should "3 foo" convert to number 3, or should it convert to C<3 but remainder(" foo")> ? Would the remainder then be dropped when the numeric value changes? I assume that replacing the valu

Re: Hello everybody.

2004-09-24 Thread Dan Sugalski
At 8:37 AM +0200 9/24/04, Christian Aperghis-Tramoni wrote: I am the french teacher who is trying to initiate my students to the pleaasure of assembly language using Parrot. For those who car read french, you can check our site : http://www.dil.univ-mrs.fr/lic.ue.html#L-O3-5 I can't read french,

Re: S5 updated: 3 but remainder()?

2004-09-24 Thread Juerd
Austin Hastings skribis 2004-09-24 12:05 (-0400): > Actually, that raises a good point: Should "3 foo" convert to number 3, > or should it convert to C<3 but remainder(" foo")> ? Would the remainder then be dropped when the numeric value changes? Juerd

Re: S5 updated

2004-09-24 Thread Rod Adams
Edward Peschko wrote: Well, there re two responses to the "that's not a common thing to want to do": 1) its not a common thing to want to do because its not a useful thing to do. 2) its not a common thing to want to do because its too damn difficult to do. I'd say that #2 is what holds. *Ever

Re: Why lexical pads

2004-09-24 Thread Jeff Clites
On Sep 24, 2004, at 8:07 AM, Aaron Sherman wrote: On Fri, 2004-09-24 at 10:03, KJ wrote: So, my question is, why would one need lexical pads anyway (why are they there)? They are there so that variables can be found by name in a lexically scoped way. One example, in Perl 5, of this need is:

Re: Why lexical pads

2004-09-24 Thread Steve Fink
On Sep-24, Aaron Sherman wrote: > On Fri, 2004-09-24 at 10:03, KJ wrote: > > > So, my question is, why would one need lexical pads anyway (why are they > > there)? > > They are there so that variables can be found by name in a lexically > scoped way. One example, in Perl 5, of this need is: > >

Re: [perl #31695] Crash in libpcre.imc

2004-09-24 Thread Leopold Toetsch
Andy Dougherty <[EMAIL PROTECTED]> wrote: > I'm getting a crash if I try to run parrot on libpcre.imc. The debugger > output is shown below. The crash occurs because > imcc/instructions.c:ins_writes2() is somehow passed a type t == 'K'. Oops and ins->opnum == -1 too. While I can't reproduce the

Re: S5 updated: 3 but remainder()?

2004-09-24 Thread Austin Hastings
Jeff Clites wrote: (B (B> On Sep 23, 2004, at 5:27 PM, Edward Peschko wrote: (B> (B>> On Thu, Sep 23, 2004 at 08:15:08AM -0700, Jeff Clites wrote: (B>> (B (B just like the transformation of a string into a number, and from a (B number to a string. Two algorithmically different t

Re: Why lexical pads

2004-09-24 Thread Dan Sugalski
At 4:03 PM +0200 9/24/04, KJ wrote: So, my question is, why would one need lexical pads anyway (why are they there)? Pads do three things. First, as has been pointed out, they store sufficient metadata so string evals (that's where code gets compiled on the fly and accesses the surrounding envir

Re: [perl #31706] strstart and bufstart out of sync

2004-09-24 Thread Dan Sugalski
At 7:58 AM -0700 9/24/04, Dan Sugalski (via RT) wrote: # New Ticket Created by Dan Sugalski # Please include the string: [perl #31706] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=31706 > Something in parrot's letting strs

Re: Why lexical pads

2004-09-24 Thread Aaron Sherman
On Fri, 2004-09-24 at 10:03, KJ wrote: > So, my question is, why would one need lexical pads anyway (why are they > there)? They are there so that variables can be found by name in a lexically scoped way. One example, in Perl 5, of this need is: my $foo = 1; return sub { $foo ++

[perl #31706] strstart and bufstart out of sync

2004-09-24 Thread via RT
# New Ticket Created by Dan Sugalski # Please include the string: [perl #31706] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=31706 > Something in parrot's letting strstart and bufstart get out of sync for some strings

Re: Why lexical pads

2004-09-24 Thread Stéphane Payrard
On Fri, Sep 24, 2004 at 04:03:46PM +0200, KJ wrote: > Hello, > > I've been wondering for some time about this, so I thought, why not ask. > > The thing is, I've been playing a few times with (Parrot, but also .NET) > compilers, and my conclusion was that the most difficult part is getting > assi

Why lexical pads

2004-09-24 Thread KJ
Hello, I've been wondering for some time about this, so I thought, why not ask. The thing is, I've been playing a few times with (Parrot, but also .NET) compilers, and my conclusion was that the most difficult part is getting assignments right (when by value, when by ref, etc.). (that is, any cons

Re: Hello everybody.

2004-09-24 Thread Leopold Toetsch
Christian Aperghis-Tramoni <[EMAIL PROTECTED]> wrote: > I am the french teacher who is trying to initiate my students to the > pleaasure of assembly language using Parrot. Great. Thanks for the note. leo

bits of introspection

2004-09-24 Thread Leopold Toetsch
With: .sub foo .include "interpinfo.pasm" $P0 = interpinfo .INTERPINFO_CURRENT_SUB $S0 = $P0# "foo" we can now extract the current subroutine's name or print it like in the tests t/pmc/sub_{74,75}.pasm. I've implemted the get_string() vtable for Sub PMCs - could be get_repr() too, dun

[perl #31695] Crash in libpcre.imc

2004-09-24 Thread via RT
# New Ticket Created by Andy Dougherty # Please include the string: [perl #31695] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=31695 > I'm getting a crash if I try to run parrot on libpcre.imc. The debugger output is s

Re: S5 updated

2004-09-24 Thread Edward Peschko
From: Edward Peschko <[EMAIL PROTECTED]> To: Jeff Clites <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Bcc: Subject: Re: S5 updated Message-ID: <[EMAIL PROTECTED]> Reply-To: In-Reply-To: <[EMAIL PROTECTED]> ok, I'm going to answer both you and Luke in the same message to save tim

Re: Namespaces, part 1

2004-09-24 Thread Jonathan
On Wed, 22 Sep 2004 23:13:37 -0400, Dan Sugalski wrote: > At 7:32 PM -0700 9/22/04, Jeff Clites wrote: >>On Sep 22, 2004, at 10:58 AM, Dan Sugalski wrote: >> >>>*) There are three things that can be in a namespace: Another >>>namespace, a method or sub, and a variable. >>> >>>*) The names of name

Re: towards a new call scheme

2004-09-24 Thread Leopold Toetsch
Piers Cawley <[EMAIL PROTECTED]> wrote: > I could be wrong here, but it seems to me that having a special > 'tailinvoke' operator which simply reuses the current return > continuation instead of creating a new one would make for rather faster > tail calls than fetching the current continuation out