A5 implies perl6's real timescale

2002-06-11 Thread Peter Haworth
in some distant future version of Perl, perhaps somewhere > around the year 2168. That's a long time for implementation :-) Well, this is really only a problem for p52p6, I suppose. -- Peter Haworth [EMAIL PROTECTED] "At IBM, we have no hesitation to steal or b

Re: matrix design

2002-06-21 Thread Peter Haworth
hat +%hash will return the number of elements. It should be safe to assume that +@array does the same. -- Peter Haworth [EMAIL PROTECTED] "If you are going to have delusions, you may as well have really good ones" -- Marcus Cole, B5

Re: Continuations for fun and profit

2002-07-09 Thread Peter Haworth
$foo--; > invoke($cont); > } > > When you invoke a continuation you put the call scratchpads and lexical > scratchpads back to the state they were when you took the continuation. If you restore the lexicals, how does this ever finish? -- Peter Haworth [EMAIL P

Re: Continuations for fun and profit

2002-07-09 Thread Peter Haworth
On Tue, 9 Jul 2002 16:42:03 +0100, Peter Haworth wrote: > > When you invoke a continuation you put the call scratchpads and lexical > > scratchpads back to the state they were when you took the continuation. > > If you restore the lexicals, how does this ever finish? Ne

Re: Autovivi

2002-08-16 Thread Peter Haworth
er explictly ask for the other options (of which there are sevaral), we only give them exactly what they want. Perl 5 gives you the most flexible way by default (pass by ref, modifiable), and makes one other option (pass by val, modifiable) easy, but has occassionally surprising results, such as aut

Re: Hypothetical variables and scope

2002-09-03 Thread Peter Haworth
rators used (:= inside the rule, = inside the code) seems a bit confusing to me; I can't see that they're really doing anything different: / $x := (gr\w+) /vs/ (gr\w+) { let $x = $1 } / Shouldn't they both use C< := > ? -- Peter Haworth [EMAIL PROTECTED] > Some more data? No, no more. Please, no more... -- Yanick, examining perl's strange behaviour

Re: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-04 Thread Peter Haworth
# error Bytecode iteration means that this just ends up calling the normal scalar op, and stuffing the result into an array. Looks like I'm in favour of bytecode iteration for hyperoperators after all. -- Peter Haworth [EMAIL PROTECTED] I is for indent, which rarely

Re: Hypotheticals again

2002-09-05 Thread Peter Haworth
spell it wrong? There needs to be some way of indicating whether or not the lexical gets set - that way the strict pragma (or perl6 equivalent) can catch typos. -- Peter Haworth [EMAIL PROTECTED] "To be considered half as good as Microsoft, Linux has to work twice as fast. Fortunately, this is easy."

RE: [netlabs #801] [PATCH] PerlArray in scalar context

2002-09-05 Thread Peter Haworth
user defined operator; it could actually want one scalar and one array operand. Maybe we should have multiple carets to denote hyper-hyper-operators if that's what the user wants: @a = @b ^^* @c; If hyperoperators get transformed into loops behind the scenes, this shouldn't be too hard to implement. -- Peter Haworth [EMAIL PROTECTED] Override self destruct? (y/n@^%i@&$# NO CARRIER

Re: Regex query

2002-09-24 Thread Peter Haworth
ush receives the contents of @b in its @list parameter. 6 is an explicit arrayref, so that's what push gets given. I would argue that 7 is like 6, except that it copies @b's elements. -- Peter Haworth [EMAIL PROTECTED] Reporter: Mr Gandhi, what do you think of Western Civilization? Gandhi: I think it would be a good idea.

Re: Private contracts?

2002-10-04 Thread Peter Haworth
oized is something is pre{ $this <= 42 } is pre{ $that == $this / 2 } { # implementation goes here } is post{ # postcondition 1 } is post{ # postcondition 2 } If you want an abstract method, just omit the implementation block. -- Peter Haworth [EMAIL PR

Re: Private contracts?

2002-10-04 Thread Peter Haworth
ed condition has to be of the form C<< x > 9 >> or any other value lower than 10. C<< a || b >> is weaker than C<< a >> > Are there > other ways to do it, just to mull them over? -- Peter Haworth [EMAIL PROTECTED] "I remember being

Re: Object Instantiation

2002-10-15 Thread Peter Haworth
l marked as such, which (at least so far) Perl6 constructors aren't. -- Peter Haworth [EMAIL PROTECTED] "The Hotmail migration is becoming the IT equivalent of painting-the-Forth- bridge, evidently. Once you've think you've finished migrating one end, more FreeBSD box

Re: [RFC] Perl6 Operator List, Take 5

2002-11-05 Thread Peter Haworth
eans? I really liked the idea that not and xor were just the same operator, but unary/binary. Otherwise, we have ! for boolean negation only, while ^ does the same thing for other types, as well as xor for everything. I don't mind leaving ! in as a synonym. -- Peter Haworth [EMAIL

Re: Perl6 Operator List (REMAINING ISSUES)

2002-11-06 Thread Peter Haworth
," it pretty much can't be the same as any of the other operators, since that introduces ambiguity all over the place. This is unfortunate, since perl seems to use every printable ASCII character for something. Using French quotes gets around this, since they aren't being used for an

Re: Continuations

2002-11-12 Thread Peter Haworth
,$next){ ... if $val ~~ something_or_other() { my $quux = $next(); ... } } -- Peter Haworth [EMAIL PROTECTED] "...I find myself wondering if Larry Ellison and Tim Curry were separated at birth...hmm..." -- Tom Good

Re: Superpositions and laziness

2002-11-13 Thread Peter Haworth
>> but reads better than "same" ("Same as what?"). > > > > Insert obligatory reference to Eiffel here, which IIR uses the word > > "once": But that means "once per system", not "once per unique argument list". -- Pet

Re: Continuations

2002-11-13 Thread Peter Haworth
On Tue, 12 Nov 2002 14:30:24 +, Peter Haworth wrote: > So to get the same yield context, each call to the coroutine has to be from > the same calling frame. If you want to get several values from the same > coroutine, but from different calling contexts, can you avoid the need to >

Re: Nested captures

2005-05-17 Thread Peter Haworth
ber the first capture in one alternative, does that affect the numbering of the other alternatives? # $4$4 rx/ [ $4:=(a) | (b) ] /; > Note that, outside a rule, C<@1> is simply a shorthand for C<@{$1}> Is @/ also a shorthand for @{$/} ? -- Peter Haworth

[ANNOUNCE] Test::SerialFork

2005-07-28 Thread Peter Haworth
lFork only does one fork at a time, where MultiFork does them all at once. It's also much easier to give descriptive labels with SerialFork, so the output of the test program is much clearer. -- Peter Haworth [EMAIL PROTECTED] perl -Mstrict -we '$_ = "goto F.print chop;\n

Re: Exceptuations

2005-10-05 Thread Peter Haworth
# they can do if their order is refused, all they can do is try another # shop, or give up and go home method buy_book($book){ $random_bookshop.order($book); CATCH{ fail Err::BookObviouslyDoesntExist; } } } -- Peter Haworth [EMAIL PROTECTED] Hestons' First Law: I qualify virtually everything I say.

Re: Exceptuations

2005-10-06 Thread Peter Haworth
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: > > > >>Exactly which exception is continued? > > > >

Re: String Literals, take 3

2002-12-05 Thread Peter Haworth
rectly. > > Note that an end-bracket, ], must be escaped within the \qq[] construct. > This allows the parser to correctly parse the construct. Don't embedded qq[] strings obey the normal qq[] rules? That is, will all brackets need escaping, or just unbalanced brackets? I'd hope for

Re: right-to-left pipelines

2002-12-10 Thread Peter Haworth
sort must specify its return type so that part's declaration may be found. That's all fine for the standard/builtin methods on arrays, but its a bit unperl-like to force users to highly specify everything. Of course, if they do declare methods with all the bells and whistles, they get the b

Re: right-to-left pipelines

2002-12-10 Thread Peter Haworth
On 10 Dec 2002 15:34:11 +, Simon Cozens wrote: > [EMAIL PROTECTED] (Peter Haworth) writes: > > To know whether the method takes a block, you need to know how it's been > > declared. In other words, the type of @a needs to be known to find > > grep's declaratio

Re: String Literals, take 3

2002-12-10 Thread Peter Haworth
g whitespace, which is > not the behaivor <<>> will have (if it acts like qw(), at any rate.) I hate this special case. Why is there no way of specifying the removal of leading empty elements with any other separator string? -- Peter Haworth [EMAIL PRO

Re: right-to-left pipelines

2002-12-10 Thread Peter Haworth
On 10 Dec 2002 17:25:34 +, Simon Cozens wrote: > [EMAIL PROTECTED] (Peter Haworth) writes: > > Fair enough; that simplifies things somewhat. However, you can't tell > > how many arguments they take. How do you parse this without the > > programmer specifying a great d

RE: right-to-left pipelines

2002-12-12 Thread Peter Haworth
On Tue, 10 Dec 2002 13:02:18 -0800, Brent Dax wrote: > Peter Haworth: > # @b = @a.grep { /\S/ }, $c; > # > # how does the compiler know whether $c is an argument to grep, > # or another element to be assigned to @b? > > The same way it does when it sees a normal sub? >

Re: String Literals, take 3

2002-12-12 Thread Peter Haworth
On Tue, 10 Dec 2002 16:08:25 -0500, Joseph F. Ryan wrote: > Peter Haworth wrote: > > >On Thu, 05 Dec 2002 15:17:57 -0500, Joseph F. Ryan wrote: > > > >>Again, C<< "STRING".split(' ') >> is different than > >> C<< "STR

Re: Variable Types Vs Value Types

2003-01-09 Thread Peter Haworth
[1]; # array-like $a['1'];# array-like $a{1}; # hash-like $a{'1'};# hash-like Maybe it is the right way round, and I've read your remarks the wrong way. Or maybe it is the value type which determines the type of access at the PMC level, and it

Re: Objects, finally (try 1)

2003-01-10 Thread Peter Haworth
ature), or split if they don't. -- Peter Haworth [EMAIL PROTECTED] Warning! Your Operating System is out of date! It can be replaced by a more memory abusive Operating System. Please contact your System Vendor for details.

Re: Objects, finally (try 1)

2003-01-13 Thread Peter Haworth
On Fri, 10 Jan 2003 11:49:14 -0500, Dan Sugalski wrote: > At 1:37 PM + 1/10/03, Peter Haworth wrote: > >On Thu, 9 Jan 2003 16:40:20 -0500, Dan Sugalski wrote: > >> #10 We do MI, but we don't instantiate a class' attributes multiple > >>times if its i

Re: Objects, finally (try 1)

2003-01-15 Thread Peter Haworth
he method has been redefined in the meantime. We shouldn't prevent something useful just because it's not universally applicable. -- Peter Haworth [EMAIL PROTECTED] "I can talk on this stuff for hours when given insufficient discouragement." -- Dan Sugalski

Re: Objects, methods, attributes, properties, and other related frobnitzes

2003-02-19 Thread Peter Haworth
nt the base class method to be called, just because parrot does things in a peculiar order. Well, I know it's the same order that perl5 does things, but it's still peculiar. -- Peter Haworth [EMAIL PROTECTED] "I'm converting my data to 64-bit signed times, sto

Re: Conditional Cs?

2003-04-02 Thread Peter Haworth
etter to me. I'm going to be surprised by the behaviour of code that works like yours for a long time before I get used to it. -- Peter Haworth [EMAIL PROTECTED] "I have to continue using UUCP for sentimental reasons" -- Ian Lance Taylor

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

2005-03-21 Thread Peter Haworth
piler to figure things out, it's going to be even harder for the programmer. -- Peter Haworth [EMAIL PROTECTED] "I think this is one of those traumatic things eggs have to face to prepare a good omelette." -- Jarkko Hietaniemi

Re: New S29 draft up

2005-03-23 Thread Peter Haworth
e believe that in preference to the operator. Don't we trust the programmer more than the data? I want this code to produce 4660, 22136, 2832, 3394; not 4660, 22136, 4, 42. for '1234','5678','0b10','0d42' { say 0x $_; } -- Peter Haworth [

Re: backticks

2004-04-20 Thread Peter Haworth
t;<>> variant * interpolation allowed in the double quoted variant. That said, I really wish we could keep perl5's $hash{key}. It's obviously a subscript, and I use constant bareword keys much more frequently than zero-arg sub/builtin calls in hash subscripts. -- Peter

Re: Synopsis 4 draft 1

2004-09-03 Thread Peter Haworth
nce > to a closure outside of its official "sub" scope, it is illegal to > return from it. Presumably this illegality only applies to closures not officially declared as subs, methods or submethods? -- Peter Haworth [EMAIL PROTECTED] "Her vocabulary was as bad as, like, whatever."

Re: [RfC] vtable->dump

2003-09-03 Thread Peter Haworth
eezing and DOD, or two freezes). Bear in mind that I have never used threads and can't remember how they work in parrot, so this may be an irrelevant question. -- Peter Haworth [EMAIL PROTECTED] "You're not going to watch the eclipse in yesterday's underpants?"

RE: [RfC] vtable->dump

2003-09-05 Thread Peter Haworth
sh itself to take nearly as much space as the frozen structure; a GC run in the middle of freezing should only be a problem if you run out of *unreclaimable* memory. -- Peter Haworth [EMAIL PROTECTED] "Nothing in the definition of the word `word' says that a word has to be in a dictionary to be called one." -- Anu Garg

Re: Object freezing

2003-10-24 Thread Peter Haworth
mbedded applications or systems) If we make it so freezing > is not a guaranteed possibility at destroy time then this can't happen and > it lessens the utility of the system some. > > We can, if we choose, loosen the restriction later if sufficient reason is > presented. Can

Re: Object freezing

2003-10-24 Thread Peter Haworth
more complex than a native type is inherently recursive. Either you use up call stack space recursing over the PMCs, or you need an explicitly manage a stack/queue of PMCs not yet serialised. Have I missed some wonder of modern computing, or just something so obvious I can't see it? --

Ignore (was Re: Object freezing)

2003-10-24 Thread Peter Haworth
On Fri, 24 Oct 2003 17:33:17 +0100, Peter Haworth wrote: > [stuff he didn't mean to send] Sorry. Looks like I hit Send instead of Cancel. -- Peter Haworth [EMAIL PROTECTED] "this system is slightly less secure than putting your IP address and root password in big le

Re: Some namespace notes

2004-01-28 Thread Peter Haworth
erl5? We can obviously invent suitable syntax for perl6, so that it can cope with arbitrarily named packages, but we don't have that luxury with most of the other languages we want to support. Then the question becomes, "What about namespace clashes?", which Tim has already addres

PDD15: per-class attribute offsets

2004-03-12 Thread Peter Haworth
te values, this isn't thread safe (please excuse my lack of PASM syntax knowledge): classoffset Ioff, Pobj, Sclass # Some other thread calls addattribute on Pobj's class getattribute Pattr,Pobj,Ioff # Now we have the value of the wrong attribute in Pattr -- Peter Haworth

Re: Thoughts on constancy/currying

2001-11-12 Thread Peter Haworth
t the carets, like $got and $expected do, or are they required, like &^sub ? -- Peter Haworth [EMAIL PROTECTED] In Cyberspace no one can hear you scream, unless they have a sound card.

Re: Thoughts on constancy/currying

2001-11-08 Thread Peter Haworth
a decade ago, and my memory may be faulty. Anyway, couldn't you say this? &assert_wth_func := sub(&^sub is constant, $^expected is constant, $^got, $message){ &^sub($^expected, $^got, $message); }; I'm not sure if that still curries appropriately, though. --

Re: Some Apocalypse 4 exception handling questions.

2002-01-23 Thread Peter Haworth
e how references to sub arguments are compiled anyway, in which case there's no problem. -- Peter Haworth [EMAIL PROTECTED] "Master, does Emacs have the Buddha nature?" the novice asked. The Chief Priest had been in the temple for many years and could be relied upon to

Re: Apocalypse 4 : The Strange Case of the STRANGE CASE

2002-01-24 Thread Peter Haworth
's another > argument for case differentiation. By this argument, the rethink should > go in the opposite direction, giving us catch/CATCH. I like that, especially because it makes the try with no CATCH read better: try { ... } # But what happens if we fail? catch { ... } # Implicit CAT

Re: parrot rx engine

2002-01-31 Thread Peter Haworth
eady be case-folded for speed. > > Hm, is that going to work ? What about a rx like /^a(?i:b)C/ where the > case insensitivity only applies to part of the pattern ? Or worse, in /^a(b)c/i, where you want to capture the original character, not the case-folded version? -- P

Re: Non-vtable functionality on PMCs?

2002-05-23 Thread Peter Haworth
le methods have to be defined? If the latter, where do we stop? > >In particular, I was wondering about shift/unshift, push/pop on the > >PerlArray PMC. Am I missing something obvious? > > Ah, those. In that case you use the vtable methods I've forgotten. :) Will these all map t

Re: McNamara's C<$#> as a property of any array element

2000-08-25 Thread Peter Haworth
[Apologies for the late reply. Still catching up] On Thu, 17 Aug 2000 20:51:01 -0500, David L. Nicol said: > What if its a method of anything in an array? $_ is already > a reference to the object on the array in for loops rather > than a copy of it. What if we make change be not something a