Re: parrot and refcounting semantics

2005-04-27 Thread Leopold Toetsch
Robin Redeker <[EMAIL PROTECTED]> wrote: > On Wed, Apr 27, 2005 at 02:27:58PM +0200, Leopold Toetsch wrote: >> API's aren't finished yet and are extended more or less on demand. > Ah, ok :) Who will decide what is demanded? A patch on p6l is a good indication for a demand :) > Hm, ok, i guess i

Re: PMC diamond inheritance

2005-04-27 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > I have > Perl5cargo_cult > | > Perl5Base > / \ > Perl5PV Perl5IV > \ / > Perl5PVIV Nice. > perl5pviv.c:45: error: `Parrot_Perl5PV_init' undeclared (first use in this > function) If memory serves me right there is a

Re: parrot and refcounting semantics

2005-04-27 Thread Bob Rogers
From: Dan Sugalski <[EMAIL PROTECTED]> Date: Wed, 27 Apr 2005 15:43:32 -0400 At 5:40 PM +0200 4/27/05, Robin Redeker wrote: >Just for the curious me: What was the design decision behind the GC >solution? Was refcounting that bad? . . . I'll answer this one, since I'm the one res

Re: Overriding Test::Builder::ok

2005-04-27 Thread Michael G Schwern
On Mon, Jan 24, 2005 at 12:56:22PM -0800, Ovid wrote: > Well, OK. So I tried it: > > use Test::More qw/no_plan/; > use Test::Builder; > use Hook::LexWrap; > use Data::Dumper; > > wrap Test::Builder::ok ^ ^ comma mi

Re: Pugs darcs repository not updating?

2005-04-27 Thread Sam Vilain
Glenn Ehrlich wrote: The darcs repository doesn't seem to have been updated for several days now. Is anything wrong, or has it changed location? If that happens again just ask on IRC. I think a synchronisation daemon just needs kicking over. Sam.

Pugs darcs repository not updating?

2005-04-27 Thread Glenn Ehrlich
Hi, The darcs repository doesn't seem to have been updated for several days now. Is anything wrong, or has it changed location? Glenn

Re: [RFC] assign Px, Py

2005-04-27 Thread Brent 'Dax' Royal-Gordon
Just to de-Warnock this thread: Leopold Toetsch <[EMAIL PROTECTED]> wrote: > 3) PIR syntax > > It was already discussed a few times that we might change PIR syntax: > > current: > >Px = Pyset Px, Py alias Px and Py >Px = assign Py assign Px, Py copy values

Re: Sun Fortress and Perl 6

2005-04-27 Thread Sam Vilain
Luke Palmer wrote: `is pure` would be great to have! For possible auto-memoization of likely-to-be-slow subs it can be useful, but it also makes great documentation. It's going in there whether Larry likes it or not[1]. There are so incredibly many optimizations that you can do on pure functions,

This week's summary

2005-04-27 Thread The Perl 6 Summarizer
The Perl 6 Summary for the week ending 2005-04-26 It's my turn again. What fun. "What," I hear you all ask, "has been going on in the crazy mixed up world of Perl 6 design and development"? Read this summary and, beginning with perl6-compiler, I shall tell you. This week in perl6-

Re: turning off warnings for a function's params?

2005-04-27 Thread Piers Cawley
David Storrs <[EMAIL PROTECTED]> writes: > I image we've all written logging code that looks something like this > (Perl5 syntax): > > sub foo { > my ($x,$y) = @_; > note("Entering frobnitz(). params: '$x', '$y'"); > ... > } > > This, of course, throws an 'uninitialized val

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Rod Adams
Luke Palmer wrote: Rod Adams writes: Perhaps the easiest way to explain the difficulty here is to note that executing a relational op (i.e. returning a boolean) value on a junction argument returns a junction of boolean values. Is that so? Does Perl6 have some fundamental law of junctio

Re: use English

2005-04-27 Thread Luke Palmer
Aaron Sherman writes: > > Ever since I stopped caring about speed, I've started to write code > > almost twice as fast. And the code itself isn't slower. > > Ok, so let's separate the premature optimization from removing massive > bottlenecks from code. When I can get a reporting program that t

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Luke Palmer
Rod Adams writes: > >>Perhaps the easiest way to explain the difficulty here is to note that > >>executing a relational op (i.e. returning a boolean) value on a junction > >>argument returns a junction of boolean values. > > > > > >Is that so? Does Perl6 have some fundamental law of junction > >pr

Re: parrot and refcounting semantics

2005-04-27 Thread Dan Sugalski
At 5:40 PM +0200 4/27/05, Robin Redeker wrote: Just for the curious me: What was the design decision behind the GC solution? Was refcounting that bad? Refcounting gives a more global speed hit indeed, but it's more deterministic and you wont run into (probably) long halts during GC. (Java programs

[perl #34999] [TODO] remove more old stuff

2005-04-27 Thread Bernhard Schmalhofer via RT
> > Some outdated files: > > > >lib/Parrot/PackFile/* > >lib/Parrot/PackFile.pm > >lib/Parrot/PackFile2.* > > > > what is: > > > >lib/Parrot/String.pm old packfile code? > >lib/Parrot/Types.pm same? > >lib/Parrot/Key.pm same? > > All the above files appear to be r

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Patrick R. Michaud
On Wed, Apr 27, 2005 at 10:30:35AM -0600, Paul Seamons wrote: > Minor note. > > Would you want this: > >sub &infix:(Str $a, Str $b) { return ($a eq $b) ? $a : ''; } > to be [corrected]: >sub &infix:(Str $a, Str $b) >{ return ($a eq $b) ?? $a but bool::true :: ''; } Perhaps, but I

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Rod Adams
Thomas Sandlaß wrote: Patrick R. Michaud wrote: On Wed, Apr 27, 2005 at 08:46:53AM -0400, Joshua Gatcomb wrote: The problem is that in the regex version I use capturing parens to identify the character matched. For the purposes of the problem I don't need to rely on the first character matched I j

Re: LABELS: block

2005-04-27 Thread Aaron Sherman
On Tue, 2005-04-26 at 17:13, Juerd wrote: > > or you could have a keyword that introduces the label: > > rx/label + + (|)/ > > or you could use some kind of trickery: > > rx/label : $/ > > Or make it a macro. > > label; for 1... { > ... > } This has debugging problems,

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Patrick R. Michaud
On Wed, Apr 27, 2005 at 06:29:46PM +0200, Thomas Sandlaß wrote: > Patrick R. Michaud wrote: > >>my $matches = any( @x_chars ) eq any( @y_chars ); > >>my $match = $matches.pick; > > > >Perhaps the easiest way to explain the difficulty here is to note that > >executing a relational op (i.e. returning

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Luke Palmer
Thomas Sandlaà writes: > Patrick R. Michaud wrote: > >On Wed, Apr 27, 2005 at 08:46:53AM -0400, Joshua Gatcomb wrote: > > > >>The problem is that in the regex version I use capturing parens to > >>identify the character matched. For the purposes of the problem I > >>don't need to rely on the first

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Jonathan Scott Duff
On Wed, Apr 27, 2005 at 10:30:35AM -0600, Paul Seamons wrote: > Minor note. > > Would you want this: > > >sub &infix:(Str $a, Str $b) { return ($a eq $b) ? $a : ''; } > > to be: > >sub &infix:(Str $a, Str $b) { return ($a eq $b) ? $a but bool::true: > ''; } > > (Is that the right way

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Paul Seamons
Minor note. Would you want this: >sub &infix:(Str $a, Str $b) { return ($a eq $b) ? $a : ''; } to be: sub &infix:(Str $a, Str $b) { return ($a eq $b) ? $a but bool::true: ''; } (Is that the right way to do it ?) Paul

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Thomas Sandlaß
Patrick R. Michaud wrote: On Wed, Apr 27, 2005 at 08:46:53AM -0400, Joshua Gatcomb wrote: The problem is that in the regex version I use capturing parens to identify the character matched. For the purposes of the problem I don't need to rely on the first character matched I just need to know 1. Wi

Re: PMC diamond inheritance

2005-04-27 Thread Nicholas Clark
On Wed, Apr 27, 2005 at 04:00:54PM +0100, Nicholas Clark wrote: > There are no Parrot_Perl5PV_init, etc functions. Is this a bug in pmc2c2.pl? Looks like a mistake I made. Too many autogenerated files. Nicholas Clark

Re: parrot and refcounting semantics

2005-04-27 Thread Robin Redeker
On Wed, Apr 27, 2005 at 02:27:58PM +0200, Leopold Toetsch wrote: > Robin Redeker <[EMAIL PROTECTED]> wrote: [...] > > Any hints when looking for functions that 'maybe' go into the API? > > API's aren't finished yet and are extended more or less on demand. > Ah, ok :) Who will decide what is dema

Re: Malfunction Junction, what's your function?

2005-04-27 Thread Patrick R. Michaud
On Wed, Apr 27, 2005 at 08:46:53AM -0400, Joshua Gatcomb wrote: > The problem is that in the regex version I use capturing parens to > identify the character matched. For the purposes of the problem I > don't need to rely on the first character matched I just need to know > 1. > > Without doing a

PMC diamond inheritance

2005-04-27 Thread Nicholas Clark
I have Perl5cargo_cult | Perl5Base / \ Perl5PV Perl5IV \ / Perl5PVIV The bottom 4 PMC classes shown are currently empty, so they genuinely are just: pmclass Perl5base extends Perl5cargo_cult dynpmc group Perl5_group { } pmclass Perl5PV extends Perl5base dynp

Re: morph()ing

2005-04-27 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Tue, Apr 26, 2005 at 08:55:21AM +0200, Leopold Toetsch wrote: >> - morph for scalars is ok: e.g. an Integer transforms itself to a Float >> - morph for arbitrary objects must never be done automatically > So really my morph code ought to check the ne

Re: Sun Fortress and Perl 6

2005-04-27 Thread Matt
On Wed, 27 Apr 2005 03:32:12 -0400, Autrijus Tang <[EMAIL PROTECTED]> wrote: 3. Labels applies to blocks, not statements Instead of this: LABEL: say "Hello!" say "Hi!" One has to write this (essentially creating named blocks): LABEL: { say "Hello!" say "Hi!

Re: parrot and refcounting semantics

2005-04-27 Thread Leopold Toetsch
Robin Redeker <[EMAIL PROTECTED]> wrote: > On Wed, Apr 27, 2005 at 08:09:48AM +0200, Leopold Toetsch wrote: >> albeit it isn't part of the official embedding API (yet). > Ok, thanks, i'll have a look at that. > Any idea when there will be a more complete official embedding API? > Any hints when l

Malfunction Junction, what's your function?

2005-04-27 Thread Joshua Gatcomb
Ok - sorry for the cheesy subject line but I couldn't resist. So I am working on porting some interesting pieces of code I wrote in p5 at the Monastery to p6 for the benefit of others - primarily to show how easy the transition can be. Since Pugs doesn't have p6 rules yet I wanted to show off the

Re: Sun Fortress and Perl 6

2005-04-27 Thread Paul Johnson
On Wed, Apr 27, 2005 at 01:53:11AM -0600, Luke Palmer wrote: > Juerd writes: > > Autrijus Tang skribis 2005-04-27 17:04 (+0800): > > > I can certainly see a `is pure` trait on Perl 6 function that declares > > > them to be safe from side effects. In a sense, `is const` also does that. > > > > `i

Re: Sun Fortress and Perl 6

2005-04-27 Thread Nigel Sandever
On 27 Apr 2005 08:21:27 -, [EMAIL PROTECTED] (Rafael Garcia-Suarez) wrote: > Autrijus Tang wrote in perl.perl6.language : > > > > 4. Software Transaction Memory > > > > Like GHC Haskell, Fortress introduces the `atomic` operator that takes a > > block, and ensures that any code running inside

Re: morph()ing

2005-04-27 Thread Nicholas Clark
On Tue, Apr 26, 2005 at 08:55:21AM +0200, Leopold Toetsch wrote: > - morph for scalars is ok: e.g. an Integer transforms itself to a Float > - morph for arbitrary objects must never be done automatically So really my morph code ought to check the new type to see if it understands it, and if not t

Re: use English

2005-04-27 Thread Aaron Sherman
On Tue, 2005-04-26 at 10:48, Luke Palmer wrote: > Aaron Sherman writes: > > The reasons I don't "use English" in P5: > > > > * Variable access is slower > Hmm, looks to me like $INPUT_RECORD_SEPARATOR is faster. (Actually > they're the same: on each run a different one won, but just barel

Re: Sun Fortress and Perl 6

2005-04-27 Thread Luke Palmer
Juerd writes: > Autrijus Tang skribis 2005-04-27 17:04 (+0800): > > I can certainly see a `is pure` trait on Perl 6 function that declares > > them to be safe from side effects. In a sense, `is const` also does that. > > `is pure` would be great to have! For possible auto-memoization of > likely-

Re: [ANNOUNCE] Test::Simple/More/Builder 0.59_01

2005-04-27 Thread Adrian Howard
On 27 Apr 2005, at 06:03, Michael G Schwern wrote: [snip] This finally allows one to create a second Test::Builder object via Test::Builder->create. Authors of modules which test testing modules may now rejoice, you can use Test::Builder to test Test::Builder! Neato! Adrian

Re: Sun Fortress and Perl 6

2005-04-27 Thread Juerd
Autrijus Tang skribis 2005-04-27 17:04 (+0800): > I can certainly see a `is pure` trait on Perl 6 function that declares > them to be safe from side effects. In a sense, `is const` also does that. `is pure` would be great to have! For possible auto-memoization of likely-to-be-slow subs it can be

Re: Sun Fortress and Perl 6

2005-04-27 Thread Autrijus Tang
On Wed, Apr 27, 2005 at 08:21:27AM -, Rafael Garcia-Suarez wrote: > Autrijus Tang wrote in perl.perl6.language : > > > > 4. Software Transaction Memory > > In Fortress, there is also an `atomic` trait for functions, that > > declares the entire function as atomic. > > Interesting; and this rol

Re: parrot and refcounting semantics

2005-04-27 Thread Robin Redeker
On Wed, Apr 27, 2005 at 08:09:48AM +0200, Leopold Toetsch wrote: > Robin Redeker <[EMAIL PROTECTED]> wrote: [...] > > 1. i wonder how to load bytecode from the memory to parrot when > > embedding it. i've read embed.pod and couldn't find a function that let me > > create a packfile or something i c

Re: Sun Fortress and Perl 6

2005-04-27 Thread Rafael Garcia-Suarez
Autrijus Tang wrote in perl.perl6.language : > > 4. Software Transaction Memory > > Like GHC Haskell, Fortress introduces the `atomic` operator that takes a > block, and ensures that any code running inside the block, in a > concurrent setting, must happen transactionally -- i.e. if some > precondi

Sun Fortress and Perl 6

2005-04-27 Thread Autrijus Tang
Fortress is Sun's project at making a next-generation computer language. I like its technical report very, very much: http://research.sun.com/projects/plrg/fortress0618.pdf (via http://lambda-the-ultimate.org/node/view/673 ) Syntax aside (eg. their `=` and `:=` has the reverse meaning in

Re: parrot and refcounting semantics

2005-04-27 Thread Leopold Toetsch
Robin Redeker <[EMAIL PROTECTED]> wrote: > Hello! > The last weeks i've been in joy to implement a small vm for a > special runtime enviroment. As i'm a regular reader of the perl.perl6.* > mailing lists and know about parrot. I wondered how easy it would be > to throw away my own vm solution and

[SVN ci] a bigger PackFile patch

2005-04-27 Thread Leopold Toetsch
A long overdue change is now committed dicussed around more then a year ago. The short story: * interpreter->code is now a PackFile_ByteCode pointer * the "shortcut" pointers to prederef or jit_info are gone * switching a bytecode segment for a function call or return is now basically just one C i