Re: Some Things I'd Like To Do With Pod

2007-06-24 Thread Piers Cawley
On 22/06/07, brian d foy <[EMAIL PROTECTED]> wrote: ===Per class documentation, not per file documentation Related to the one above, I'd like to have NAME, SYNOPSIS, etc. for each class, not just per file. Well, what I really want is the Smalltalk class and method browsers, but I know I'm no

Re: Selective String Interpolation

2006-02-18 Thread Piers Cawley
quoting mechanism that returns a parse tree rather than a simple string if we want to deal with interpolating complex values (especially if we don't want to have to worry about what, if any, quotes are needed round some of our interpolated values. -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

perl6-all@perl.org

2006-01-23 Thread Piers Cawley
s (and other tricksy class methods) to be found in the Ruby on Rails framework... -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: relationship between slurpy parameters and named args?

2005-12-30 Thread Piers Cawley
list should only flatten array arguments if there is only one array. And if it doesn't, how do I declare parameter that is 'a slurpy list of arrays' or 'the rest of the arguments, without flattening'. If I *really* want aggressive flattening then I can call, say, @slurpy_param.flatten -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: Journal moved.

2005-12-28 Thread Piers Cawley
tainly make it easier for this summary writer if they appeared in the same inbox as the rest of p6c. -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: relational data models and Perl 6

2005-12-18 Thread Piers Cawley
;t be surprised :) > > Algebra, in general, is a specific form of calculus. So, we're > speaking of the same thing, just in different terms. Umm... I think you have that relationship the wrong way around. -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: statement_control()

2005-11-30 Thread Piers Cawley
nt <<'EOQ' I like witty sayings as much as the next guy, but wit can hurt when misdirected. If people want me to be machine for cranking out quote file fodder, I'll do my best. But I also care about my friends. Larry EOQ -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: Perl6 perlplexities

2005-11-15 Thread Piers Cawley
fairly serious retooling of the call stack if they are to work properly. And one shot continuations are the next best thing to useless. -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: Perl6 perlplexities

2005-11-04 Thread Piers Cawley
of way that, unless my user truly intended to do so, he's not > going to be able to accidentally screw up my internal state. And when your user does want to, essentially say "Nah, you screwed up designing that object protocol, children shouldn't've been protected." it's the

Re: Perl6 perlplexities

2005-11-04 Thread Piers Cawley
idea for named subs, if only for style. > > our &dosomething ::= -> $a, $b { $a blah $b } > > Not really a winner in any perspective. And the return semantics of pointy blocks are different, you have to be careful about doing an explicit return in them because th

Re: "All tests successful" considered harmful

2005-11-01 Thread Piers Cawley
Test::Builder port in PIR. I will move up my plan to port > Parrot::Test to use it. Somewhere I have the beginnings of an xUnit style 'parrotunit' testing framework, but that was written ages ago, so I'd need to start it again, but it wasn't that hard to implement. -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: Proposal to make class method non-inheritable

2005-10-14 Thread Piers Cawley
Stevan Little <[EMAIL PROTECTED]> writes: > Piers, > > On Oct 12, 2005, at 5:22 AM, Piers Cawley wrote: >> We definitely have two instances of A since, B.isa(::A). We also have >> a fragile implementation of count. > > :) > > Sorry, I purposefully made it

Re: Roles and Trust

2005-10-12 Thread Piers Cawley
Ovid <[EMAIL PROTECTED]> writes: > --- Piers Cawley <[EMAIL PROTECTED]> wrote: >> >> How about: >> >> my method SCALAR::attributes($self:) { $$self } >> my method HASH::attributes(%self:) { %self.kv } >> my method ARRAY::attributes(@self:

Re: Proposal to make class method non-inheritable

2005-10-12 Thread Piers Cawley
ur %.instance_count_of method count (Class $c: ?$with_descendents = undef) { my @interesting_classes = $c; if $with_descendents { push @interesting_classes, *($c.all_subclasses); } [+] %.instance_count_of(@interesting_classes) } method BUILD { %.instance_count_of($?SELF.class) } } Where we're assuming that a class can find all its subclasses -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: Roles and Trust

2005-10-10 Thread Piers Cawley
hod _attributes($attrs) { my @attributes = $attrs.attributes return @attributes[0] if @attributes == 1; ... } Assuming it's legal. -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: Exceptuations

2005-10-06 Thread Piers Cawley
"Peter Haworth" <[EMAIL PROTECTED]> writes: > On Wed, 5 Oct 2005 19:24:47 +0200, Yuval Kogman wrote: >> On Wed, Oct 05, 2005 at 16:57:51 +0100, Peter Haworth wrote: >> > On Mon, 26 Sep 2005 20:17:05 +0200, TSa wrote: >> > > Piers Cawley wrote:

Re: Exceptuations

2005-09-30 Thread Piers Cawley
TSa <[EMAIL PROTECTED]> writes: > BTW, I would call *intentional* exceptions terrorism. So that would be all exceptions then. They all get implemented somewhere, even the ones that get thrown by builtins. CATCH Exception { say "Why do you hate freedom?" } -- Piers Cawle

Re: This week's summary

2005-09-27 Thread Piers Cawley
ter productive > hairsplitting? Just a reference to the old philosophical question of how many angels can dance on the head of a pin. That and the fact that I occasionally get curmudgeonly and hit the send button before I have second thoughts. The weird thing is that the syntax I rolled there is soon to be the topic of an original thread, once I've got the thing written up a little more. -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: Exceptuations

2005-09-26 Thread Piers Cawley
TSa <[EMAIL PROTECTED]> writes: > HaloO, > > Piers Cawley wrote: >>>Exactly which exception is continued? >> The bottommost one. If you want to return to somewhere up its call chain, do: >> $!.caller(n).continue(42) > > Whow, how does a higher level

Re: Exceptuations

2005-09-26 Thread Piers Cawley
("say foo()" above). So it's somewhere in between. > Where? Obviously the topmost function should do: sub open(...) { ... CATCH { $!.rethrow } } This assumes that 'rethrow' throws a new exception that delegates to the original exception for lots of its

Re: Sort of "do it once" feature request...

2005-09-26 Thread Piers Cawley
hey know in advance that C can succeed at most once (e.g. foo > could really be C). > > Or another case is this: > > while (<>) { > if (@buffer < MAX) { > push @buffer, $_; > next; > } > # ... > shift @buffer; > push @buffer, $_; > } while <> { if 0..MAX { push @buffer, $_; next } end -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: loadlib and libraries with '.' in the name

2005-09-26 Thread Piers Cawley
st. I am not about to start polluting my mailed summaries with such monstrosities as <http://groups.google.com/[EMAIL PROTECTED]> any time soon. You're welcome to write your own summaries that do use the full URLs of course. Or, if it bothers you that much, write something to run from cron once a month or so that grabs shortened summary URLs and does a simple GET on them. -- Piers Cawley <[EMAIL PROTECTED]> http://www.bofh.org.uk/

Re: Do slurpy parameters auto-flatten arrays?

2005-08-03 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 8/3/05, Aankhen <[EMAIL PROTECTED]> wrote: >> On 8/3/05, Piers Cawley <[EMAIL PROTECTED]> wrote: >> > So how *do* I pass an unflattened array to a function with a slurpy >> > parameter? >> >> G

Re: Elimination of Item|Pair and Any|Junction

2005-08-03 Thread Piers Cawley
Autrijus Tang <[EMAIL PROTECTED]> writes: > On Fri, Jul 22, 2005 at 03:40:34PM -0700, Larry Wall wrote: >> I dunno. I'm inclined to say that it should default to Item|Pair, and >> let people say Any explicitly if they really want to suppress autothreading. >> Otherwise conditionals and switches a

Re: Exposing the Garbage Collector (Iterating the live set)

2005-08-03 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 7/26/05, "TSa (Thomas Sandlaß)" <[EMAIL PROTECTED]> wrote: >> Piers Cawley wrote: >> > I would like to be able to iterate over all the >> > objects in the live set. >> >> My Idea actuall

Re: Do slurpy parameters auto-flatten arrays?

2005-08-03 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 7/26/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: >> Hi, >> >> are the following assumptions correct? >> >> sub foo ([EMAIL PROTECTED]) { @args[0] } >> >> say ~foo("a", "b", "c"); # "a" > > Yep. > >> my @array = ; >> say ~foo(@array);

Re: Exposing the Garbage Collector

2005-07-26 Thread Piers Cawley
"TSa (Thomas Sandlaß)" <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: >> Let's say I have a class, call it Foo which has a bunch of attributes, and >> I've >> created a few of them. Then, at runtime I do: >>eval 'class Foo { has

Exposing the Garbage Collector

2005-07-23 Thread Piers Cawley
Let's say I have a class, call it Foo which has a bunch of attributes, and I've created a few of them. Then, at runtime I do: eval 'class Foo { has $.a_new_attribute is :default<10> }'; Assuming I've got the syntax right for defaulting an attribute, and lets assume I have, the Perl runtime nee

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-20 Thread Piers Cawley
Sam Vilain <[EMAIL PROTECTED]> writes: > Larry Wall wrote: > > > Users of the class includes people subclassing the class, so to them > > > they need to be able to use $.month_0 and $.month, even though there > > > is no "has $.month_0" declared in the Class implementation, only > > > "has $.m

Re: What do use and require evaluate to?

2005-07-14 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > On Tue, Jul 12, 2005 at 08:48:41PM +0300, Gaal Yahas wrote: > : I propose to throw away the filesystem coupling, and map from a more > : general name of the bit of code we are requiring to a more general > : description of which instance of it we actually g

Re: Dependency Injection

2005-07-08 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > On Wed, Jul 06, 2005 at 11:47:47PM +0100, Piers Cawley wrote: > : Or you could use a global, but globals are bad... > > Globals are bad only if you use them to hold non-global values. > In this case it seems as though you're just

Dependency Injection

2005-07-06 Thread Piers Cawley
So, I got to thinking about stuff. One of the more annoying things about writing nicely decoupled objects and applications are those occasions where you want an object to be able to create objects in another class. Say you've provided a singleton interface to your logging system. The naive implemen

Re: Summarizer Suggestion...

2005-07-06 Thread Piers Cawley
Matt Fowles <[EMAIL PROTECTED]> writes: > Will~ > > On 7/6/05, Will Coleda <[EMAIL PROTECTED]> wrote: >> >> It would be nice if the summarizers also summarized the various >> Planet RSS feeds of journal entries, if those entries were >> sufficiently relevant. > > I would be willing to do that, bu

Re: SMD is for weenies

2005-07-06 Thread Piers Cawley
Yuval Kogman <[EMAIL PROTECTED]> writes: > On Fri, Jul 01, 2005 at 13:42:34 +1200, Sam Vilain wrote: >> Yuval Kogman wrote: >> >As I understand it SMD is now not much more than a mechanism to >> >place a constraint on the MMD, saying that there can only be one >> >method or subroutine with the sam

Re: Fwd: [EMAIL PROTECTED]: Re: fixing is_deeply]

2005-07-01 Thread Piers Cawley
Michael G Schwern <[EMAIL PROTECTED]> writes: > On Fri, Jul 01, 2005 at 07:11:26AM +, Smylers wrote: >> > The question you have to ask yourself is why should a reference be >> > treated different from any other value? It is a VALUE. >> >> Except it isn't. Or at least, not all the time: it de

Re: OO magic (at least for me)

2005-06-26 Thread Piers Cawley
BÁRTHÁZI András <[EMAIL PROTECTED]> writes: > Hi, > > I'm wondering, if it's possible with Perl 6 or not? > > class MyClass { > > method mymethod($par) { > say "mymethod called!"; > } > > } > > class ExClass is MyClass { > > mymethod(12); > > } > > #> pugs myprog >

Re: AUTLOAD and $_

2005-06-23 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 6/20/05, chromatic <[EMAIL PROTECTED]> wrote: >> On Mon, 2005-06-20 at 12:11 +0200, Juerd wrote: >> >> > I think there exists an even simpler way to avoid any mess involved. >> > Instead of letting AUTOLOAD receive and pass on arguments, and instead >>

Re: proposal: binding with a function

2005-06-23 Thread Piers Cawley
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes: > As I've said before, Perl supports `alias`--it's just spelled `:=`. Here's a rubyish idiom: my &old_behaviour := &function; &function := sub { try_some_stuff || &old_behaviour } Except, with binding it doesn't work like that, you end up

Re: When can I take given as read?

2005-06-21 Thread Piers Cawley
Carl Franks <[EMAIL PROTECTED]> writes: >> sub factorial (Int $n is topic) { >> return 1 when 0; >> return $n * factorial $n; >> } > > hmm, could we write... > > sub foo (Class $self is topic: +$foo, +$bar) { > .method; > } > > to avoid having to use ./ > ? Yay!

When can I take given as read?

2005-06-16 Thread Piers Cawley
Suppose I have a simple, single argument recursive function: sub factorial (Int $n) { return 1 if $n == 0; return $n * factorial $n; } Can I write that as: sub factorial (Int $n:) { return 1 when 0; return $n * factorial $n; } NB. Yes, I know it's a pathological example.

Re: nested subs

2005-06-16 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 6/16/05, Piers Cawley <[EMAIL PROTECTED]> wrote: >> So, I was about to write the following test for Pugs: >> >> sub factorial (Int $n) { >> my sub factn (Int $acc, $i) { >> return $ac

nested subs

2005-06-16 Thread Piers Cawley
So, I was about to write the following test for Pugs: sub factorial (Int $n) { my sub factn (Int $acc, $i) { return $acc if $i > $n; factn( $acc * $i, $i+1); } factn(1, 1); } When I thought to check the apocalypses and exegeses and, what do you know, I couldn't find an

Re: Binding slices

2005-06-14 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 6/14/05, Piers Cawley <[EMAIL PROTECTED]> wrote: >> Following a conversation with Chip on IRC, is this >> >> my @y := @foo[0..][1]; >> >> legal? > > Definitely not. But it sure would be nice if

Binding slices

2005-06-14 Thread Piers Cawley
Following a conversation with Chip on IRC, is this my @y := @foo[0..][1]; legal?

Re: How much do we close over?

2005-06-13 Thread Piers Cawley
Rod Adams <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: > >>Chip and I have been having a discussion. I want to write: >> >>sub foo { my $x = 1; return sub { eval $^codestring } } >>say foo()("$x"); >> >>I claim that that s

Re: How much do we close over?

2005-06-13 Thread Piers Cawley
Rob Kinyon <[EMAIL PROTECTED]> writes: >> Piers Cawley said: >> in other words, some way of declaring that a subroutine wants to hang onto >> every lexical it can see in its lexical stack, not matter what static >> analysis >> may say. > > I'm not

How much do we close over?

2005-06-12 Thread Piers Cawley
Chip and I have been having a discussion. I want to write: sub foo { my $x = 1; return sub { eval $^codestring } } say foo()("$x"); I claim that that should print 1. Chip claims it should throw a warning about because of timely destruction. My claim is that a closure should close over the

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-12 Thread Piers Cawley
Matt Fowles <[EMAIL PROTECTED]> writes: > Chip~ > > On 6/12/05, Chip Salzenberg <[EMAIL PROTECTED]> wrote: >> I'd like like to note for other readers and the p6i archives that >> Piers has failed to grasp the problem, so the solution seems pointless >> to him. I'm sorry that's the case, but I've

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-12 Thread Piers Cawley
Chip Salzenberg <[EMAIL PROTECTED]> writes: > On Sun, Jun 12, 2005 at 03:15:22PM +0100, Piers Cawley wrote: >> But if you fallow the calling conventions that looks like: >> >>sub foo { >> $a = 1.

Re: Attack of the fifty foot register allocator vs. the undead continuation monster

2005-06-12 Thread Piers Cawley
Chip Salzenberg <[EMAIL PROTECTED]> writes: > On Wed, Jun 08, 2005 at 10:26:59PM +0100, The Perl 6 Summarizer wrote: >> Loop Improvements >> Oh no! It's the register allocator problems again. One of these days I >> swear I'm going to swot up on this stuff properly, work out whether it's

Non-deterministic programming in Perl 6

2005-06-09 Thread Piers Cawley
So, the return in pointy sub thread got me thinking about useful uses of return in pointy subs that involve being able to return multiple times. And this is what I came up with, it's an implementation of 'choose': my &give_up = sub { fail "Ran out of choices" } sub choose ([EMAIL PROTECTE

Re: return() in pointy blocks

2005-06-09 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > On Wed, Jun 08, 2005 at 10:51:34PM +, Luke Palmer wrote: > : Yeah, that's pretty. But that will bite people who don't understand > : continuations; it will bite people who don't understand "return"; it > : will even bite people who understand continuat

Re: return() in pointy blocks

2005-06-09 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 6/8/05, Piers Cawley <[EMAIL PROTECTED]> wrote: >> > In other words, it outputs: >> > >> >Foo >> >Foo >> ># dies > > Yep. My mistake. > >> If that works, then I

Re: return() in pointy blocks

2005-06-08 Thread Piers Cawley
"TSa (Thomas Sandlaß)" <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: >> [..] then I think it means we can write: >> sub call-with-current-continuation(Code $code) { >> my $cc = -> $retval { return $retval } > > For the records: the

Re: return() in pointy blocks

2005-06-08 Thread Piers Cawley
Piers Cawley <[EMAIL PROTECTED]> writes: > "TSa (Thomas Sandlaß)" <[EMAIL PROTECTED]> writes: > >> Piers Cawley wrote: >>> My preference is for: >>> Boo >>> Boo >>> Can't dereferene literal numeric litera

Re: return() in pointy blocks

2005-06-08 Thread Piers Cawley
"TSa (Thomas Sandlaß)" <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: >> My preference is for: >> Boo >> Boo >> Can't dereferene literal numeric literal 42 as a coderef. > > How do you reach the second 'Boo'? Iff ->

Re: return() in pointy blocks

2005-06-08 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 6/7/05, Matt Fowles <[EMAIL PROTECTED]> wrote: >> On 6/7/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: >> > Hi, >> > >> > sub foo (Code $code) { >> > my $return_to_caller = -> $ret { return $ret }; >> > >> > $code($return_to_caller); >> >

Re: return() in pointy blocks

2005-06-07 Thread Piers Cawley
Ingo Blechschmidt <[EMAIL PROTECTED]> writes: > Hi, > > sub foo (Code $code) { > my $return_to_caller = -> $ret { return $ret }; > > $code($return_to_caller); > return 23; > } > > sub bar (Code $return) { $return(42) } > > say foo &bar; # 42 or 23? > > I think

Re: Perl6 and support for Refactoring IDE's

2005-05-26 Thread Piers Cawley
Stevan Little <[EMAIL PROTECTED]> writes: > On May 25, 2005, at 5:39 AM, Piers Cawley wrote: >> One of the 'mental apps' that's been pushing some of the things I've been >> asking for in Perl 6's introspection system is a combined >> refact

Re: Virtual methods

2005-05-25 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Wed, 2005-05-18 at 10:51, Luke Palmer wrote: > >> Except that mixins like this always treat things as "virtual". >> Whenever you mixin a role at runtime, Perl creates an empty, anonymous >> subclass of the current class and mixes the role in that cla

Re: Undef issues

2005-05-25 Thread Piers Cawley
Adrian Taylor <[EMAIL PROTECTED]> writes: > Hi, > > Over the weekend I added some tests on 'undef' behaviour > (t/builtins/undef.t): > > These behave as expected: > > eval_is('undef * 2', undef, 'undef * 2'); That's not what I'd expect. I'd expect it to return 0 and throw a warning about numifica

Re: Perl6 and support for Refactoring IDE's

2005-05-25 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > On 5/6/05, J Matisse Enzer <[EMAIL PROTECTED]> wrote: >> I've become scared that if Perl is to continue to be viable for large, >> complex, multi-developer projects that the tools need to serious >> catch-up with what is available for Java, for example. Th

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: Blocks, continuations and eval()

2005-04-12 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > On Tue, Apr 12, 2005 at 11:36:02AM +0100, Piers Cawley wrote: > : wolverian <[EMAIL PROTECTED]> writes: > : > : > On Fri, Apr 08, 2005 at 12:18:45PM -0400, MrJoltCola wrote: > : >> I cannot say how much Perl6 wi

Re: Blocks, continuations and eval()

2005-04-12 Thread Piers Cawley
wolverian <[EMAIL PROTECTED]> writes: > On Fri, Apr 08, 2005 at 12:18:45PM -0400, MrJoltCola wrote: >> I cannot say how much Perl6 will expose to the high level language. > > That is what I'm wondering about. I'm sorry I was so unclear. > >> Can you tell me what your idea of a "scope" is? I'm thin

Re: return of copies vs references

2005-03-29 Thread Piers Cawley
Darren Duncan <[EMAIL PROTECTED]> writes: > At 7:10 AM +0100 3/29/05, Piers Cawley wrote: >>Doesn't that rather depend on the type of the attribute? Personally, if I get >>an object back from accessor method then I expect that any modifications of >>that object&#x

Re: return of copies vs references

2005-03-28 Thread Piers Cawley
Darren Duncan <[EMAIL PROTECTED]> writes: > At 11:26 PM -0700 3/16/05, Luke Palmer wrote: >> > For each of the above cases, is a copy of or a reference to the >>> attribute returned? For each, will the calling code be able to >>> modify $obj's attributes by modifying the return values, or not?

Re: .method == $self.method or $_.method?

2005-03-28 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > I've been thinking about this in my sleep, and at the moment I think > I'd rather keep .foo meaning $_.foo, but break the automatic binding > of the invocant to $_. Instead of that, I'd like to see a really, > really short alias for $self. Suppose we pick

Re: Objects, classes, metaclasses, and other things that go bump in the night

2004-12-16 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 11:13 AM +0100 12/14/04, Leopold Toetsch wrote: >>Dan Sugalski <[EMAIL PROTECTED]> wrote: >> >>> subclass - To create a subclass of a class object >> >>Is existing and used. > > Right. I was listing the things we need in the protocol. Some of the

Re: continuation enhanced arcs

2004-12-08 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: >> Leopold Toetsch <[EMAIL PROTECTED]> writes: > >>> ... While S registers hold pointers, they have >>> value semantics. > >> Is that guarante

Re: continuation enhanced arcs

2004-12-07 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: > >> Further to my last response. If you have things set up so that you can >> return multiple times from the same function invocation then the return >> continuation s

Re: continuation enhanced arcs

2004-12-06 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: >> Leopold Toetsch <[EMAIL PROTECTED]> writes: > >>> Matt Fowles <[EMAIL PROTECTED]> wrote: >>> >>>> Thanks for the clear explanation. I did

Re: continuation enhanced arcs

2004-12-06 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: >> Leopold Toetsch <[EMAIL PROTECTED]> writes: > >>> Matt Fowles <[EMAIL PROTECTED]> wrote: >>> >>>> Thanks for the clear explanation. I did

Re: continuation enhanced arcs

2004-12-05 Thread Piers Cawley
Luke Palmer <[EMAIL PROTECTED]> writes: > Piers Cawley writes: >> I'd submit that, in the vast majority of cases you're not going to be >> dealing with full continuations, and on the occasions when you are the >> programmer using them will be aware of the

Re: continuation enhanced arcs

2004-12-05 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Matt Fowles <[EMAIL PROTECTED]> wrote: > >> Thanks for the clear explanation. I did not realize that S registers >> could switch pointers, that does make things a little harder. I have >> a recommendation for a possible hybrid solution. Incur the co

Re: continuation enhanced arcs

2004-11-28 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: >> Leopold Toetsch <[EMAIL PROTECTED]> writes: > >>> We don't have a problem WRT register preservation, the problem arises >>> due to register re-using. >

Re: continuation enhanced arcs

2004-11-26 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: >> Okay, I'm confused, I thought that the whole point of a caller saves, >> continuation passing regime was that the caller only saves what it's >> interested in usi

Re: continuation enhanced arcs

2004-11-25 Thread Piers Cawley
Okay, I'm confused, I thought that the whole point of a caller saves, continuation passing regime was that the caller only saves what it's interested in using after the function returns. Exactly *where* that return happens, and whether it happens more than once, is completely irrelevant from the po

Re: Why is the fib benchmark still slow - part 1

2004-11-05 Thread Piers Cawley
Miroslav Silovic <[EMAIL PROTECTED]> writes: > Leopold Toetsch wrote: > >>> I believe that you shouldn't litter (i.e. create an immediately >>> GCable object) on each function call - at least not without >>> generational collector specifically optimised to work with this. >> >> >> The problem isn'

Re: Closures and subs

2004-11-05 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: >> Leopold Toetsch <[EMAIL PROTECTED]> writes: > >>> Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: >>>> Hello, >>> >>>> I've bee

Re: Closures and subs

2004-11-04 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Klaas-Jan Stol <[EMAIL PROTECTED]> wrote: >> Hello, > >> I've been playing with closures and subs but I have a little bit of >> trouble with those. > > newsub $P0, .Closure, _foo > $P0(q) > newsub $P0, .Closure, _foo >

Re: [CVS ci] indirect register frames 14 - cache the register frame

2004-11-02 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 2:30 PM -0500 11/2/04, Matt Fowles wrote: >>All~ >> >>I don't like the idea of having to dig down through the entire return >>chain promoting these guys. Is there a reason not to use DOD/GC to >>recycle continuations? > > Yes. Speed. > > While you can

Re: Are we done with big changes?

2004-11-02 Thread Piers Cawley
Jeff Clites <[EMAIL PROTECTED]> writes: > On Nov 1, 2004, at 6:14 AM, Dan Sugalski wrote: > >> Because I need to get strings working right, so I'm going to be >> implementing the encoding/charset library stuff, which is going to >> cause some major disruptions. > > Please tag cvs before checking t

Re: [OT] Perl 6 Summary for 2004-10-01 through 2004-10-17

2004-10-26 Thread Piers Cawley
Aldo Calpini <[EMAIL PROTECTED]> writes: > Larry Wall wrote: >> I suppose if I were Archimedes I'd have climbed >> back out and shouted "Eureka", but as far as I know Archimedes never >> made it to Italy, so it didn't occur to me... > > well, Archimedes *was* italian. for some meaning of italian,

Re: [pid-mode.el] cannot edit

2004-10-04 Thread Piers Cawley
Stéphane Payrard <[EMAIL PROTECTED]> writes: > On Fri, Oct 01, 2004 at 06:09:37PM +0200, Jerome Quelin wrote: >> Hi, >> >> I tried the pir-mode provided in the editor/ subdir. And when opening a >> .imc file (I've associated .pir with pir-mode + font-lock-mode), I >> cannot type spaces or carriag

Re: Continuation re-invocation

2004-09-27 Thread Piers Cawley
Jeff Clites <[EMAIL PROTECTED]> writes: > Two questions: > > 1) Is it supposed to be possible to invoke a given continuation more > than once, or is it "used up" once invoked? Yes, you should be able to invoke one more than once. > > 2) Am I supposed to be able to "jump down" the stack by invok

Re: towards a new call scheme

2004-09-23 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Dan Sugalski wrote: > >> At 4:15 PM +0200 9/23/04, Leopold Toetsch wrote: >>> get_cc(OUT Px) # 1) get current continuation, i.e. the return cont. >> In a rare, possibly unique burts of opcode parsimoniousness... perhaps >> this would be a good thing

Re: Current state?

2004-09-13 Thread Piers Cawley
Jared Rhine <[EMAIL PROTECTED]> writes: > [Patrick == [EMAIL PROTECTED] on Wed, 8 Sep 2004 11:51:18 -0600] > > Patrick> ...in the immediate future we'll be wanting rules/grammar > Patrick> tests (to test the grammar engine) more than we'll need > Patrick> perl 6 code, although we'll certainl

Re: Current state?

2004-09-09 Thread Piers Cawley
Herbert Snorrason <[EMAIL PROTECTED]> writes: > Since this list has been started, I'd assume that means work on the > final Perl6 compiler is about to start. (Although, with this crowd, > you never do know...) > > In the interest of a layman's curiosity: What's the current status? > > (And I alrea

Re: Iterators and C

2004-09-09 Thread Piers Cawley
Aaron Sherman <[EMAIL PROTECTED]> writes: > On Thu, 2004-09-09 at 13:14, Larry Wall wrote: > >> So whereas Ruby's syntax actually tends to push you toward .each >> iterators, Perl 6's syntax will be fairly neutral on the subject, >> or maybe biased every so slightly away from method iteration by t

Re: Reverse .. operator

2004-09-06 Thread Piers Cawley
"Joe Gottman" <[EMAIL PROTECTED]> writes: > In perl 6, the statement > > @foo = (1.. 5) ; > > is equivalent to > > @foo = (1, 2, 3, 4, 5); > > > > Is there similar shorthand to set @foo = (5, 3, 3, 2, 1) ? I know you can > go > > @foo = reverse (1

Re: S4: Can PRE and POST be removed from program flow?

2004-09-04 Thread Piers Cawley
John Siracusa <[EMAIL PROTECTED]> writes: > On 9/3/04 6:45 PM, Damian Conway wrote: >> John Siracusa wrote: I don't see how we could prevent someone from clobbering the global definitions of PRE and POST to be no-ops if they wanted to. Seems to me that the whole point of putting th

Re: Tight typing by default?

2004-08-25 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > It seems pretty clear that the general opinion is that operations > should produce the tightest reasonable type for an operation--integer > multiplication should produce an integer unless it can't, for example. > > For our purposes I think the typing sh

Re: Numeric semantics for base pmcs

2004-08-25 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Dan Sugalski <[EMAIL PROTECTED]> wrote: >> At 8:45 PM +0200 8/24/04, Leopold Toetsch wrote: >>>Dan Sugalski <[EMAIL PROTECTED]> wrote: > Nope -- we don't have bigints. :) >>> >>>Pardon, sir? > >> We've got the big number code, but I don't see muc

Re: The new Perl 6 compiler pumpking

2004-08-04 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > There's not been a big public announcement, so it's time to change that. > > I'd like everyone to give a welcome to Patrick Michaud, who's > volunteered to officially take charge of getting the Perl 6 compiler > module written. I've put in yet another n

Re: This week's summary

2004-07-29 Thread Piers Cawley
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: >> Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes: >>>Care to explain what those are, O great math teacher? >> What's a math teacher? > > It's th

Re: This week's summary

2004-07-28 Thread Piers Cawley
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes: > The Perl 6 Summarizer wrote: >> The infinite thread >> Pushing onto lazy lists continued to exercise the p6l crowd (or at >> least, a subset of it). Larry said that if someone wanted to hack >> surreal numbers into Perl 6.1 then

Re: String interpolation

2004-07-26 Thread Piers Cawley
Damian Conway <[EMAIL PROTECTED]> writes: > I can't say I'm keen on making {...} special in strings. I felt that the > $(...) and @(...) were a much cleaner and more general solution. The > prospect of backslashing every opening brace in every interpolated > string is not one I relish. Maybe we co

Re: String interpolation

2004-07-26 Thread Piers Cawley
Larry Wall <[EMAIL PROTECTED]> writes: > On Tue, Jul 20, 2004 at 11:00:39PM -0700, chromatic wrote: > : On Tue, 2004-07-20 at 19:35, Luke Palmer wrote: > : > : > The New Way (tm) to do that would probably be sticking a role onto the > : > array object with which you're dealing: > : > > : > m

Re: This week's summary

2004-07-21 Thread Piers Cawley
Austin Hastings <[EMAIL PROTECTED]> writes: > --- The Perl 6 Summarizer <[EMAIL PROTECTED]> wrote: >> Okay, so the interview was on Tuesday 13th of July. >> It went well; I'm going to be a maths teacher. [...] > As we all know, time flies like an arrow, but fruit flies like a > banana. If you

  1   2   3   4   5   6   7   8   >