Re: 12 hackers hacking...

2008-12-25 Thread Ashley Winters
]] - $ ($key = $value) { ... } - Ashley Winters

Re: Iterator semantics

2008-09-12 Thread Ashley Winters
1 2 3 a b, when did the @hexlike grep block get called? - Ashley Winters

Re: Patterns

2007-01-06 Thread Ashley Winters
. given @something { when $this { ... }# @something ~~ $this against $that { ... }# $that ~~ @something } That would help keep the ~~ DWIM table from trying to guess on which side you really wanted @something on. - Ashley Winters

Re: Nitpick my Perl6 - parametric roles

2006-09-25 Thread Ashley Winters
one(@array) - if they're all the same, it's more than 1, otherwise it's 0. Yeah, that would've been cool. Are we left with asserting Call(.members »=:=« one(.members))? That'd be pretty close to the original elegance. Ashley Winters

Re: underscores in the core lib

2006-08-06 Thread Ashley Winters
(or a standard function which a user reimplemented -- you never know). - Ashley Winters

Re: Synchronized / Thread syntax in Perl 6

2006-06-03 Thread Ashley Winters
to implictly parallelize for us: my @answer = @jobs.»(); Which would run them in parallel automatically, if possible. - Ashley Winters

Re: handling undef better

2005-12-17 Thread Ashley Winters
returns Cnil but E::UndefinedValue or something. Thus completes the circle of definedness. Ashley Winters

Ways to add behavior

2005-10-24 Thread Ashley Winters
-- guessing realistic syntax Base.meta.add_method( do_it = method ($arg) { say doing $arg!; }); # or, just add it to a single instance $x.meta.add_method( do_it = method ($arg) { say doing $arg!; }); Did I miss any good ones? Or bad ones? :) Ashley Winters

Re: Type annotations

2005-10-06 Thread Ashley Winters
you asked Larry how to make a symbolic function call, lately?; dynamic(notcode, static({ $_+1 }, [1,2,3,4,5])); Same. Just my 2¢ Ashley Winters

Re: matching colors (was Stringification, numification, and booleanification of pairs)

2005-09-26 Thread Ashley Winters
~~ color('magenta') Interesting proposal. Is there any motivation for people not to simply flip the argument-order to take advantage of the right-wise determinism? Or is that actually a benefit? '#F0F' ~~ $color ?? 'yes' !! 'no'; Ashley Winters

Re: Allomopherencing

2005-09-26 Thread Ashley Winters
when strict inferencing is in place. That's exactly how I'd want it to work when optimization and/or stricture is in place. It'd be a *very* nice compiler feature. Ashley Winters

Re: numification and stringification of objects

2005-09-26 Thread Ashley Winters
should really be the Interpolation behavior, and Representation should be a lossless but readable version of Serialization, though I'm clearly wrong, since I can't defend it. No worries. I'll come around to see the light. Someday. :) Ashley Winters

Re: Stringification, numification, and booleanification of pairs

2005-09-25 Thread Ashley Winters
presentation Role. Ashley Winters

Re: Allomopherencing

2005-09-25 Thread Ashley Winters
: use sadistic inferencing; either of those declarations can disregard my potential for runtime tomfoolery, and abort the compiliation when there's something illogical. Ashley Winters

Re: Allomopherencing

2005-09-25 Thread Ashley Winters
On 9/25/05, Ashley Winters [EMAIL PROTECTED] wrote: On 9/25/05, Yuval Kogman [EMAIL PROTECTED] wrote: Under strict type inferrencing, i'd expect this to be a compile time error: I quoted but didn't read close enough. You DID say strict type inferencing. Never mind. :) Ashley Winters

Re: Stringification, numification, and booleanification of pairs

2005-09-25 Thread Ashley Winters
On 9/25/05, Yuval Kogman [EMAIL PROTECTED] wrote: On Sun, Sep 25, 2005 at 10:59:38 -0700, Ashley Winters wrote: The Stringification of a UnixEpochTimestamp should probably be the same as its Integerization -- 12345678900. However, the Interpolation of it should be the locale-specific POSIX

Re: Proposal: split ternary ?? :: into binary ?? and //

2005-09-05 Thread Ashley Winters
with ?? is !! (cond) ?? (if_true) !! (if_false) Ashley Winters

Re: @array = $scalar

2005-09-01 Thread Ashley Winters
for push? @array ,= $foo ; @array = @array, $foo; Ashley Winters

Re: my $pi is constant = 3;

2005-08-11 Thread Ashley Winters
the = form to: my Str $x is constant('foo'); Why isn't the late binding version my Str $x is ro('foo'); In contrast to the 'is rw' trait? When I say 'is constant', can I be rewarded for all my extra typing with some well-defined compile-time optimization? Ashley Winters

Re: Transparent / Opaque references

2005-05-27 Thread Ashley Winters
On 5/27/05, Juerd [EMAIL PROTECTED] wrote: There is no way to get an anonymous rw scalar, is there? Can't the [] and {} syntaxes be considered aliases for new Array(...) and new Hash(...)? my $x := new int = 10; # looks like it should work Ashley Winters

Re: ./method

2005-05-15 Thread Ashley Winters
inclined to use ./method for $self.method. After a decade of using unix shells, typing ./ is closer to huffman(1.1) than huffman(2). This is a really clean solution. Ashley Winters :voteyea

Re: junctions vs English negatives.

2005-05-15 Thread Ashley Winters
On 5/15/05, Luke Palmer [EMAIL PROTECTED] wrote: multi sub infix:!= (Any|Junction $a, Any|Junction $b) { !($a == $b); } Then it Just Works. Also, that's the right way to provide a working != for any object which defines ==. We all want that, right? Ashley Winters

Re: adverbial blocks: description and examples requested

2005-05-05 Thread Ashley Winters
} { ... } Ashley Winters

Re: Truely temporary variables

2005-04-17 Thread Ashley Winters
{...}; temp $sql = q{...}; (Assuming Ctemp is made to work on lexicals, of course.) How about 'the'? I don't want to Ipossess the variable, I just want to use it. the $sql = q{...}; the $sth = $dbh.prepare($sql); It could be the same as my(), but without the posessiveness (warning) Ashley Winters

Re: [] ugly and hard to type

2005-04-16 Thread Ashley Winters
alternatives as well as the single-character ones, so it seems preferable to me (assuming it could be optimized happily). Ashley Winters

Re: Documentary annotations: $what docwhy

2005-03-31 Thread Ashley Winters
is a('Good Dog!') Ashley Winters

Perl6 Rule library (was: New S29 draft up)

2005-03-18 Thread Ashley Winters
... can you call a rule as a function? rule foo { .* } $x = foo(I am the very model of a modern irregular expression); Or do I not want to know the answer to that? Ashley Winters

Re: The S29 Functions Project

2005-03-13 Thread Ashley Winters
$x = cos :degrees(270); Ashley Winters

Re: The S29 Functions Project

2005-03-13 Thread Ashley Winters
On Sun, 13 Mar 2005 23:42:41 -0600, Rod Adams [EMAIL PROTECTED] wrote: Ashley Winters wrote: For documentary purposes, can we make that $radians? multi sub cos (Num +$degrees) returns Num { return cos :radians($degrees * PI / 180); } my Num $x = cos :degrees(270); I have changed

Set sigils (was: Re: Junction Values)

2005-02-19 Thread Ashley Winters
, why should scalars get all the good secondary sigils? :) Ashley Winters

Re: Junction Values

2005-02-18 Thread Ashley Winters
{ .does(Int) } $y.values; } Ashley Winters

Re: Junction Values

2005-02-18 Thread Ashley Winters
On Fri, 18 Feb 2005 23:12:40 +0100, Eirik Berg Hanssen [EMAIL PROTECTED] wrote: Ashley Winters [EMAIL PROTECTED] writes: On Fri, 18 Feb 2005 12:47:51 -0700, Luke Palmer [EMAIL PROTECTED] wrote: Run through your mind how this would be done with a junction in $x. Particularly focus

Re: Junction Values

2005-02-18 Thread Ashley Winters
On Fri, 18 Feb 2005 14:35:53 -0800, Ashley Winters [EMAIL PROTECTED] wrote: 1 .. sqrt(10) - LazyList of (1..3) 1 .. sqrt(10|20) - Junction of any(1,2,3, 1,2,3,4) LazyList does Iterator, but Junction does not. You'd have to use (1 .. sqrt(3|6)).values to iterate through the possible values

Re: Junction Values

2005-02-16 Thread Ashley Winters
On Wed, 16 Feb 2005 14:29:14 -0600, Rod Adams [EMAIL PROTECTED] wrote: Larry Wall wrote: That, and we'd like a novice to be able to write given $x { when 1 | 2 | 3 {...} when 4 | 5 | 6 {...} } Or just change Cwhen to accept a list of things to compare against,

Re: Pop a Hash?

2005-02-11 Thread Ashley Winters
On Thu, 10 Feb 2005 08:59:04 -0800, David Storrs [EMAIL PROTECTED] wrote: On Wed, Feb 09, 2005 at 05:13:56AM -0600, Rod Adams wrote: Does ($k, $v) == pop %hash; or ($k, $v) == %hash.pop; make sense to anyone except me? ... the only time it's useful is if you want to process

Re: Junctive puzzles.

2005-02-07 Thread Ashley Winters
On Tue, 8 Feb 2005 11:12:40 +0800, Autrijus Tang [EMAIL PROTECTED] wrote: On Mon, Feb 07, 2005 at 05:33:06PM +0100, Miroslav Silovic wrote: my $a = (0 | 6); say 4 $a and $a 2; Yup. My mathematic intuition cannot suffer that: 4 X 2 to be true in any circumstances -- as it

Re: Possible syntax for code as comment

2005-01-08 Thread Ashley Winters
On Sat, 8 Jan 2005 21:05:20 +0100, Stéphane Payrard [EMAIL PROTECTED] wrote: Anyway the particular length of variables names was not the subject of my mail, but a good syntax for aliasing name in signatures. Hmm... how about abducting the - operator and using default variable initialization?

Re: strictness and fully qualified global vars

2004-12-28 Thread Ashley Winters
through stringification due to singletons. Well, on second thought, you could make $foo.meta (or whatever) start answering to CLASS(0xDEADBEEF) style classnames. Those are probably needed for debugging or something anyways. Ashley Winters

Re: strictness and fully qualified global vars

2004-12-28 Thread Ashley Winters
On Tue, 28 Dec 2004 22:31:47 -0700, Luke Palmer [EMAIL PROTECTED] wrote: Ashley Winters writes: sub foo (Class $who) { my $thing := $who$var; my func := $whofunc; # how would I do this otherwise? } In current Perl 6: sub foo (Class $who) { my $thing := $::($who

Re: S05 question

2004-12-08 Thread Ashley Winters
+) -? ./ and specify the vars I want to save directly in my own scope. Ashley Winters

Re: S05 question

2004-12-08 Thread Ashley Winters
On Wed, 8 Dec 2004 16:07:43 -0700, Luke Palmer [EMAIL PROTECTED] wrote: Ashley Winters writes: For a grammar, that works perfectly! Yep. In a one-liner, I'd rather just use: $datetime ~~ /$year := (\d+) -? $month := (\d+) -? ./ Then go ahead and use that. If you're going

Lexical scope of parametric declaration blocks

2004-12-07 Thread Ashley Winters
] {...} Would that be valid/mean anything? Okay, that enough curiosity for today. :) Thanks, Ashley Winters

Re: pull put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Ashley Winters
On Mon, 6 Dec 2004 11:34:24 -0800, Larry Wall [EMAIL PROTECTED] wrote: Though it's awfully tempting to fill in the holes in the periodic table: ($a, $b, $c) = @foo * 3; And then just say all the corresponding unaries default to 1 (or the arity of the left): $bit = + $number;

Re: Premature pessimization

2004-12-05 Thread Ashley Winters
to compensate for the belief that not explicitly caching would be hopelessly slow? Ahh. I'm learning much. :) Ashley Winters

Container method calls

2004-12-04 Thread Ashley Winters
() That way, we get: ((1|2)|(34)).values ~~ (1|3,2|4) # (1,2)|(3,4) I presume ((1|2)|(34)).\values ~~ (1|2, 34) @foo.\elems would work the same as @foo.elems, since @foo in scalar context *is* the container object in the first place. Comments? Ashley Winters

Re: Container method calls

2004-12-04 Thread Ashley Winters
? Or does something like this: 3.14159 + 1|2; try to MMD-dispatch to: multi sub *infix:+ (Num $foo, Str|Int $bar) instead of (or before) threading? Ashley Winters

Re: Angle quotes and pointy brackets

2004-11-30 Thread Ashley Winters
':standard'; And won't we just be doing: use CGI :standard; anyway? Indeed. Also, someone *ahem* will make the following work, with or without the C. %hash.:foo:bar:baz = 10; Ashley Winters

Re: RFC - Hashing PMC's albie@halfarrabio.di.uminho.pt

2002-07-23 Thread Ashley Winters
MUST return the same hash code. foo = (); %hash{@foo} = 10; push foo, 'This would change the hash key for foo?'; print ok 1 if exists %hash{ [] }; print ok 2 if exists %hash{ [10] }; print ok 3 if exists %hash{@foo}; What's going to get printed from that? Ashley Winters -- When you do

Re: RFC - Hashing PMC's albie@halfarrabio.di.uminho.pt

2002-07-23 Thread Ashley Winters
On Tuesday 23 July 2002 08:27 am, Ashley Winters wrote: push foo, 'This would change the hash key for foo?'; print ok 1 if exists %hash{ [] }; print ok 2 if exists %hash{ [10] }; Err, I meant: print ok 2 if exists %hash{ ['This would change the hash key for foo?'] }; Also, the same

Re: RFC - Hashing PMC's albie@halfarrabio.di.uminho.pt

2002-07-23 Thread Ashley Winters
On Tuesday 23 July 2002 08:44 am, Alberto Manuel Brandão Simões wrote: On Tue, 2002-07-23 at 09:27, Ashley Winters wrote: foo = (); %hash{@foo} = 10; push foo, 'This would change the hash key for foo?'; print ok 1 if exists %hash{ [] }; print ok 2 if exists %hash{ ['This would change

Re: PARROT QUESTIONS: Keyed access

2002-07-21 Thread Ashley Winters
On Sunday 21 July 2002 06:46 pm, Scott Walters wrote: 2. PMCs return iterators allocated on a stack that allow them to function as KEY *s allocating a single fixed size peice of memory rather than all of the parts of a linked list. In other words, factor out the part of PMCs that index a

Re: Perl6 grammar (take V)

2002-07-15 Thread Ashley Winters
constructor, just like {}. Ashley Winters -- When you do the community's rewrite, try to remember most of us are idiots.

Re: Perl6 grammar (take V)

2002-07-15 Thread Ashley Winters
On Monday 15 July 2002 07:52 am, Brent Dax wrote: Ashley Winters: # You've got a point. There's an easy way to say I want a sub: # # my $sub = - { ... } # # But I can't think of a similarly punctuation-intensive way # to say I # want a hash. (someone please step in and correct me

Re: Grammar ambiguities again (was: Perl 6 Summary for week ending 20020714)

2002-07-15 Thread Ashley Winters
have my vote on %() as a hash constructor in addition to {}. :) Ashley Winters -- When you do the community's rewrite, try to remember most of us are idiots.

Re: PARROT QUESTIONS: Use the source, Luke

2002-07-15 Thread Ashley Winters
in excess is bad, and all that mumbo jumbo. Ashley Winters -- When you do the community's rewrite, try to remember most of us are idiots.

Re: Grammar ambiguities again (was: Perl 6 Summary for week ending

2002-07-15 Thread Ashley Winters
those pairs. My argument is that %{} already represents 'HASH' context, and we don't need %() for that as well. Instead, we need a punctuation-happy hash constructor. Ashley Winters -- When you do the community's rewrite, try to remember most of us are idiots.

PARROT QUESTIONS: Use the source, Luke

2002-07-14 Thread Ashley Winters
to have source, it definitely needs a comment saying this is not the file you are looking for, see test_main.c and embed.c. /nitpick I think that's all for today, Ashley Winters -- When you do the community's rewrite, try to remember most of us are idiots.

Re: PARROT QUESTIONS: Use the source, Luke

2002-07-14 Thread Ashley Winters
what docs? 4. Where can I find out what embed.c is doing? 5. Why is parrot.c empty? Ashley Winters

Re: PARROT QUESTIONS: Use the source, Luke

2002-07-14 Thread Ashley Winters
foresee that becoming annoying. (Which seems better to you, Parrot_sprintf or misc_sprintf?) c. parrot_sprintf Ashley Winters -- When you do the community's rewrite, try to remember most of us are idiots.

PARROT QUESTIONS: The PDDs

2002-07-14 Thread Ashley Winters
implemented in resources.c? It's a non-obvious name, and the top-of-file comment doesn't say so. Okay, that's all of the PDDs. I learned quite a bit from them, hopefully some of it was accurate useful. :) Discuss. Ashley Winters -- When you do the community's rewrite, try to remember most of us

Re: Parrot contribution

2002-07-13 Thread Ashley Winters
haven't even compiled Parrot before, so you'd be getting genuine n00b questions. Be warned. Is there a complete description, or even listing, of command-line switches outside of parrot -h or whatever? running.pod doesn't quite do it for me. Ashley Winters -- When you do the community's rewrite, try

Re: Mutable vs immutable strings

2002-07-11 Thread Ashley Winters
welcome } } Wouldn't it be great to have something so incredibly slow? Code morphing is so 80's! Okay, I've had my headache-inducing thought for the evening. bow/ Yes, my Scheme interpreter written in Perl6 is coming along nicely. Muahaha! (kidding, obviously) Ashley Winters

Re: What's MY.line?

2002-07-11 Thread Ashley Winters
'};# hypothetical syntax } { my $x = 1; my $y; # Might be able to BEGIN { violate_me() } instead violate_me(); print $y; } Ashley Winters -- When you do the community's rewrite, try to remember most of us are idiots.

Re: Mutable vs immutable strings

2002-07-10 Thread Ashley Winters
for nums {}# will $_ be smart enough to 'int' itself? I hope so Yes, people will have to think about optimizing their code. It's not great, but it's not that onerous. It might be nice if the current topic would type itself based on its initializer, when obvious. Ashley Winters

Re: what's new continued

2002-07-07 Thread Ashley Winters
On Sunday 07 July 2002 02:19 pm, Damian Conway wrote: Ashley Winters asked: It *might* possibly work to hyper the constructor: my ($a, $b) = ^new Foo Would prefix ^ always return 'wanted' number of repetitions? Like a smart Cx Inf? This does bother me about the above

Re: what's new continued

2002-07-07 Thread Ashley Winters
On Sunday 07 July 2002 03:05 pm, Damian Conway wrote: Ashley Winters wrote: How about: $_ = new Doberman for my Dog ($spot, $rover) is rw; grin I don't think so. In Perl 6 you'd just need: $_ = new Doberman for $spot, $rover; Hmm, I thought the for topic was made ro at some

Re: what's new continued

2002-07-07 Thread Ashley Winters
On Sunday 07 July 2002 04:10 pm, Ashley Winters wrote: given my Doberman $sis is female = .dog[0] but pregnant - $mother { for my Doberman puppies = new Doberman x $mother.littersize In hindsight, I probably meant for my Doberman puppies = ^new Doberman x $mother.littersize It's hard

Re: what's new continued

2002-07-07 Thread Ashley Winters
On Sunday 07 July 2002 05:33 pm, Ashley Winters wrote: my($foo, $bar) = for { $_ = new Stuff } Err, the parser would die if I did that, never mind. Can I have each, perhaps? *@foo = each { undef } I shouldn't be programming on Sunday, Ashley Winters

greedy/non-greedy regex assertions

2002-07-04 Thread Ashley Winters
to be discussion on the list about adding more possibilities, but I didn't follow it. Thanks, Ashley Winters

Re: greedy/non-greedy regex assertions

2002-07-04 Thread Ashley Winters
On Thursday 04 July 2002 10:47 am, Larry Wall wrote: On Thu, 4 Jul 2002, Ashley Winters wrote: So I'd guess that we just don't talk about :-1, but rather say that *$min..$max is naturally greedy, and as with any quantifier you write *$min..$max? to get minimal matching. I would

Re: what's new continued

2002-07-03 Thread Ashley Winters
high - $x; $y { # foo, one # bar, too high # baz, too high } Ashley Winters

Re: Perl 6 Summary

2002-07-02 Thread Ashley Winters
}. for instance: pass_by_name { sub { use scope 'caller'; print $a } } Perhaps something simpler which implies the same thing? sub is iterator { print $a } I'm just shooting in the dark, good luck. :) Ashley Winters

Re: Perl 6 grammar progress?

2002-07-01 Thread Ashley Winters
On Sunday 30 June 2002 09:09 pm, Sean O'Rourke wrote: On Sun, 30 Jun 2002, Ashley Winters wrote: I don't know how the grammars are going, and I'm not fit to write one myself, Hey, neither am I, but that hasn't stopped me from taking a stab or two, figuring that through pain comes fitness

Re: Perl 6 grammar progress?

2002-07-01 Thread Ashley Winters
On Monday 01 July 2002 02:30 pm, Uri Guttman wrote: AW == Ashley Winters [EMAIL PROTECTED] writes: AW Also, where does $() come in? Is statement scalarification ever AW useful outside a string? it is the same as scalar() in perl5. it provides scalar context if used outside a string

Re: Perl 6 grammar progress?

2002-06-30 Thread Ashley Winters
not fit to write one myself, but I wrote a list of variables I'll try to parse using any grammars which go by. Are all of these legal? I suppose that's more of a -language question. Ashley Winters # Variable access you will want to parse # standard variables $foo; foo; %foo; foo; # need more

Re: FIRST, BETWEEN, etc.. (was Re: Loop controls)

2002-05-16 Thread Ashley Winters
, e.g.: my $pi2k = @pi_digits[2000]; In this case, I'd expect @pi_digits.length == Inf, not undef. I'd agree with that. Perhaps you want *@lazy.length to work? Ashley Winters

Re: Loop controls

2002-05-06 Thread Ashley Winters
operator? condition else expr. Like operator::or, but doesn't try to return a value. die unless foo; foo else die; Ashley Winters

Re: Fisher-Yates shuffle

2002-04-13 Thread Ashley Winters
, you can get around that if%foo{key}-{printHello} # - and \s{ are kinda equivalent if%foo-{key};{printHello} Using - like that would be evil. We should put it in the test suite now... Ashley Winters

Re: How to default? (was Unary dot)

2002-04-12 Thread Ashley Winters
? sub printRec { given { # $_ is now the caller's topic in this scope } } Perhaps Cgiven caller.topic {} would work as well. Ashley Winters

RE: parrot rx engine

2002-01-31 Thread Ashley Winters
--- Brent Dax [EMAIL PROTECTED] wrote: Tim Bunce: # On Thu, Jan 31, 2002 at 05:15:49PM +, Graham Barr wrote: # # Especially as the perl6 rx engine will have to be able to # work directly on # non-trivial things like streams and generators ans suchlike. I have a suggestion similar to

parrot rx engine

2002-01-30 Thread Ashley Winters
(xxabbBBcdcdcdzz); __END__ Am I fool, or an idiot? Discuss. Mostly, I'd like to hear how either Unicode character-ranges aren't deterministic at compile-time (I doubt that) or how crippling to performance this would be (and by implication how slow parrot will be) in either time or space. Ashley