Re: string api

2002-04-08 Thread Melvin Smith
At 01:48 AM 4/9/2002 -0400, Michel J Lambert wrote: > > the malloc()/free() situation which is one of the primary reasons we > > use garbage collection in the first place, so why reinvent the same > > situation with different syntax? > >Generally, malloc/free are used in more complex situations th

Re: string api

2002-04-08 Thread Michel J Lambert
> I agree we need an overall architectural solution. Setting and clearing > bits manually is error-prone but fast, as you said. Its identical to > the malloc()/free() situation which is one of the primary reasons we > use garbage collection in the first place, so why reinvent the same > situation

Re: Worst-case GC Behavior?

2002-04-08 Thread Melvin Smith
At 01:17 AM 4/9/2002 -0400, Michel J Lambert wrote: The first example is the following code, which calls parrot_allocate to >create the string each time. Might both of these be solved by using arenas? -Melvin

Re: macros (was Re: string api)

2002-04-08 Thread Melvin Smith
At 10:30 PM 4/8/2002 -0700, Robert Spier wrote: >>Keep track of global (or interpreter local) scope with a macro >>upon entry. > >I shudder every time someone says "macro" on p6i. > >perl5 has several thousand macros defined. (grep for ^#define) (over 8000 >if you include all the embedding macr

macros (was Re: string api)

2002-04-08 Thread Robert Spier
> Keep track of global (or interpreter local) scope with a macro > upon entry. I shudder every time someone says "macro" on p6i. perl5 has several thousand macros defined. (grep for ^#define) (over 8000 if you include all the embedding macros. it's down to ~4000 if you cut out embedding, co

Worst-case GC Behavior?

2002-04-08 Thread Michel J Lambert
I think I know of two potential performance problems with the GC code. They could be problems in my head, or real problems, as I haven't done any profiling. We also don't have any real test cases. :) The first example is the following code, which calls parrot_allocate to create the string each

Re: string api

2002-04-08 Thread Melvin Smith
At 11:40 PM 4/8/2002 -0400, Michel J Lambert wrote: > > 2) I'm thinking of an internal stack not visible to user code that we use > > for temporary PMCs and Buffers and a simple macro for entry and > > exit of GC sensitive routines. I think I might have mentioned this. > >What defines a

Re: Bracekets

2002-04-08 Thread Luke Palmer
> As to the inspring issue about using [] for hashes, I say go for it if > (and only if) it is a signifigant improvement for the parser. I would imagine it's not. The braces are one of the things that make Perl "feel" like Perl. My original post that inspired this gigantic discussion was simp

Re: Bracekets

2002-04-08 Thread Erik Steven Harrison
> >$a is a hash key >$b is an array index >$c is another hash key > >So, if I try: > >@multi_dim[$b][$a][$c] > >then it's obviously going to break. But how can I, the >programmer, easily spot that? It's not as clear as: > >@multi_dim{$a}[$b]{$c} > >where I can see what I'm getting as I work thr

Re: string api

2002-04-08 Thread Steve Fink
On Mon, Apr 08, 2002 at 11:40:28PM -0400, Michel J Lambert wrote: > However, if we can't find all the places we do buffer manipulation to mark > them immortal, how are we going to properly identify all the GC-sensitive > functions? Ack! Sorry for being anal, but I finally decided the 'immortal' n

Re: string api

2002-04-08 Thread Michel J Lambert
> >This message does remind me of how empty the TODO list is. Surely we > >can think of many more things to be done? > > Speaking of.. > > 1) Bugfix release please, we banged quite a few stack and GC bugs out. > Don't we get any dessert? Peter has already stated he'd like his parrot_realloca

[netlabs #500] disassemble fails with errors and garbage

2002-04-08 Thread Clinton A. Pierce
# New Ticket Created by "Clinton A. Pierce" # Please include the string: [netlabs #500] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=500 > Compiling BASIC into out.pbc: C:\projects\parrot\parrot>basic.pl [produces o

Re: string api

2002-04-08 Thread Melvin Smith
At 06:10 PM 4/8/2002 -0700, Steve Fink wrote: >On Mon, Apr 08, 2002 at 07:01:44PM -0400, Melvin Smith wrote: > > At 05:49 PM 4/8/2002 -0400, Roman Hunt wrote: > > >find the definition for the string_vtable it is not in > > > > Try classes/perlstring.pmc > > > > Keep in mind there is the pr

Re: string api

2002-04-08 Thread Steve Fink
On Mon, Apr 08, 2002 at 07:01:44PM -0400, Melvin Smith wrote: > At 05:49 PM 4/8/2002 -0400, Roman Hunt wrote: > >find the definition for the string_vtable it is not in > > Try classes/perlstring.pmc > > Keep in mind there is the primitive STRING type which is the S* registers, > and then

Re: Unary dot

2002-04-08 Thread Damian Conway
> : I thought that was maxim was: "Igorance is blithth". > > That's not a maxim, that's a minim. No need to get all crotchet-y. Damian

Re: Unary dot

2002-04-08 Thread Larry Wall
Damian Conway writes: : > Fortunately, Igority is transitive... : : I thought that was maxim was: "Igorance is blithth". That's not a maxim, that's a minim. Larry

Re: Bracekets

2002-04-08 Thread Larry Wall
Aaron Sherman writes: : On Mon, 2002-04-08 at 13:01, Jonathan E. Paton wrote: : : > I'm I beating this point to death, or do I have to write : > the RPC: : > : > "Keep the {} and [] notation for hashes and arrays" : > : > or : > : > "Save our array!" : : Let's boil this RFC down to one short

Re: Unary dot

2002-04-08 Thread Damian Conway
Larry wrote: > : > > use invocant 'self'; > > Hmm. My first inclination is to say it should be something like: > > macro self { '%MY.frame.arg[0]' } > > But suppose you want all .foo to refer to self and not to the current > topic. It would be problematic to have a macro whose name

Re: Unary dot

2002-04-08 Thread Larry Wall
Damian Conway writes: : > > use invocant 'self'; Hmm. My first inclination is to say it should be something like: macro self { '%MY.frame.arg[0]' } But suppose you want all .foo to refer to self and not to the current topic. It would be problematic to have a macro whose name is "". S

Re: string api

2002-04-08 Thread Melvin Smith
At 05:49 PM 4/8/2002 -0400, Roman Hunt wrote: >hello: > and importance, but I feel up to the task. (Read: "Please, be > patient with the newbie"). I have begun work on The more the merrier, its been too quiet this last week. > find the definition for the string_vtable i

Re: Bracekets

2002-04-08 Thread Nicholas Clark
On Mon, Apr 08, 2002 at 06:01:57PM +0100, Jonathan E. Paton wrote: > To make the symbols {} and [] aggregate you'd have to > default [] to using hashes - and force it back to > arrays using explicit syntax. You can't automagically > decide that it's never going to be used like a hash. > > I'm I

string api

2002-04-08 Thread Roman Hunt
hello: I am interested in contributing to the project. (Thank Dan's cross-country tour :) This is my first project of this size and importance, but I feel up to the task. (Read: "Please, be patient with the newbie"). I have begun work on string_nprintf()

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 15:12, Piers Cawley wrote: > "Mark J. Reed" <[EMAIL PROTECTED]> writes: > > > On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: > >> > $_[_][EMAIL PROTECTED] _=_0_-_ > > $_.[_()] _ @_._() _= _0_() - _() [...] > > This is where my interpretation fails because t

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 15:09, Mark J. Reed wrote: > On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: > > > Also, just wondering: > > > > > > $_[_][EMAIL PROTECTED] _=_0_-_ > > > > > > does that work the way I expect it to? > > > > Dunno, what do you expect it to do?. To my way of th

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 14:56, Piers Cawley wrote: > Aaron Sherman <[EMAIL PROTECTED]> writes: > > Also, just wondering: > > > > $_[_][EMAIL PROTECTED] _=_0_-_ > > > > does that work the way I expect it to? > > Dunno, what do you expect it to do?. To my way of thinking there's > going to be a

Re: library assumptions

2002-04-08 Thread Russ Allbery
Melvin Smith <[EMAIL PROTECTED]> writes: > I would expect that should be fine, stdarg is one of the 4 headers that > are guaranteed by ANSI C89 even on a free standing environment (read > embedded targets, etc.) > Its integral to C, and if you don't have it, I suppose the question > would be why

Re: Bracekets

2002-04-08 Thread Piers Cawley
"Mark J. Reed" <[EMAIL PROTECTED]> writes: > On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: >> > Also, just wondering: >> > >> >$_[_][EMAIL PROTECTED] _=_0_-_ >> > >> > does that work the way I expect it to? >> >> Dunno, what do you expect it to do?. To my way of thinking ther

Re: Bracekets

2002-04-08 Thread Mark J. Reed
On Mon, Apr 08, 2002 at 07:56:11PM +0100, Piers Cawley wrote: > > Also, just wondering: > > > > $_[_][EMAIL PROTECTED] _=_0_-_ > > > > does that work the way I expect it to? > > Dunno, what do you expect it to do?. To my way of thinking there's > going to be a syntax error at the third '_'. B

Re: Bracekets

2002-04-08 Thread Jonathan Scott Duff
On Mon, Apr 08, 2002 at 02:50:55PM -0400, Aaron Sherman wrote: > Also, just wondering: > > $_[_][EMAIL PROTECTED] _=_0_-_ > > does that work the way I expect it to? Well, my internal Perl 6 parser hadn't been used all that much, but if you expect this to be a syntax error, then I think yo

Re: Bracekets

2002-04-08 Thread Jonathan E. Paton
> > I'm I beating this point to death, or do I have to write > > the RPC: > > > > "Keep the {} and [] notation for hashes and arrays" > > > > or > > > > "Save our array!" > > Let's boil this RFC down to one short phrase: > > If {} goes away in Perl6, then everything you've heard > about Perl6

Re: Bracekets

2002-04-08 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Mon, 2002-04-08 at 13:01, Jonathan E. Paton wrote: > >> I'm I beating this point to death, or do I have to write >> the RPC: >> >> "Keep the {} and [] notation for hashes and arrays" >> >> or >> >> "Save our array!" > > Let's boil this RFC down to

Re: Bracekets

2002-04-08 Thread Aaron Sherman
On Mon, 2002-04-08 at 13:01, Jonathan E. Paton wrote: > I'm I beating this point to death, or do I have to write > the RPC: > > "Keep the {} and [] notation for hashes and arrays" > > or > > "Save our array!" Let's boil this RFC down to one short phrase: If {} goes away in Perl6, then everyt

Re: Bracekets

2002-04-08 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 2:33 PM +0100 4/7/02, Piers Cawley wrote: >>"Jonathan E. Paton" <[EMAIL PROTECTED]> writes: >>> but wait, there's more... what does: >>> >>> @multi_dim[$a][$b][$c] >>> >>> give? >> >>Who cares? So long as the intermediate results in >>@multi_dim.[$

Re: library assumptions

2002-04-08 Thread Dan Sugalski
At 6:32 PM -0400 4/7/02, Roman Hunt wrote: >Hello all: > I was just begining work on the string api and was wondering what > libraries are allowed for use inside the interpreter. Mainly > I want to know if I can use As Melvin's said, that's fine. Pretty much everything else needs a Confi

Re: Bracekets

2002-04-08 Thread Jonathan E. Paton
> >> but wait, there's more... what does: > >> > >> @multi_dim[$a][$b][$c] > >> > >> give? > > > >Who cares? So long as the intermediate results in > >@multi_dim.[$a].[$b].[$c] respond to []. > > Hrm. Will they need to? That could arguably pass a three > element key ($a,$b,$c) to @multi_dim w

Re: Bracekets

2002-04-08 Thread Dan Sugalski
At 2:33 PM +0100 4/7/02, Piers Cawley wrote: >"Jonathan E. Paton" <[EMAIL PROTECTED]> writes: >> but wait, there's more... what does: >> >> @multi_dim[$a][$b][$c] >> >> give? > >Who cares? So long as the intermediate results in >@multi_dim.[$a].[$b].[$c] respond to []. Hrm. Will they need to?

Re: library assumptions

2002-04-08 Thread Melvin Smith
At 06:32 PM 4/7/2002 -0400, Roman Hunt wrote: >Hello all: > I was just begining work on the string api and was wondering what > libraries are allowed for use inside the interpreter. Mainly > I want to know if I can use I would expect that should be fine, stdarg is one of the 4 headers tha

library assumptions

2002-04-08 Thread Roman Hunt
Hello all: I was just begining work on the string api and was wondering what libraries are allowed for use inside the interpreter. Mainly I want to know if I can use --Roman

Re: Ex4 smart match question

2002-04-08 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > Incidentally, the table of C<=~> comparisons (Table 1) at: > > http://dev.perl.org/perl6/apocalypse/4 > > suggests that hash/hash matching is equivalent to: > > match if grep exists $a{$_}, $b.keys > > I hope to convince Larry that it would b