Re: Lists vs sets

2010-10-25 Thread Mason Kramer
That sounds like a subclass of Bag to me. But I don't think that thinking about who is subclassing whom is is how to think about this in Perl 6. All of these types are capable of doing the Iterable role, and that is what methods that could operate on a List, Array, Bag, or Set, should be calli

Re: Lists vs sets

2010-10-25 Thread Mason Kramer
Sorry: I meant capable *in theory*. It's not in the spec right now for Sets or Bags. On Oct 25, 2010, at 08:41 PM, Mason Kramer wrote: > That sounds like a subclass of Bag to me. > > But I don't think that thinking about who is subclassing whom is is how to > think abou

Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-07 Thread Mason Kramer
I just implemented Bag to the point where it passes the spectests. (https://github.com/masonk/rakudo/commit/2668178c6ba90863538ea74cfdd287684a20c520) However, in doing so, I discovered that I'm not really sure what Bags are for, anymore. The more I think about Bags and Sets, the more my brain

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-08 Thread Mason Kramer
I'm honored that my letter generated so much activity, and thank you all for your thoughtful responses. I'd like to address a few points. > On Monday, 8. November 2010 17:20:43 Jon Lang wrote: >> Solomon Foster wrote: >>> Well, hyperoperators work fine on Hashes, they operate on the values, >>>

Re: New Perl 6 Advent Calendar: call for ideas

2010-11-09 Thread Mason Kramer
A natural language data/time parser could show off grammars. On Nov 9, 2010, at 06:03 AM, Paweł Pabian wrote: > One of the subjects can be I/O, which was completly redesigned in P6. > - where did diamond operator go, how can I do "while (<>) {}" in P6? > - how to auto-iterate over STDIN, "perl -

Re: Packed arrays and assignment vs binding

2010-11-13 Thread Mason Kramer
I understand everything you've written except the following: On Nov 13, 2010, at 12:09 PM, Jonathan Worthington wrote: > Hi, > ... > > my Int @x; > > Where we get an array of scalar containers, each of which is only allowed to > contain an Int (strictly, something that Int.ACCEPTS(...) hands

Re: exponentiation of Duration's

2010-11-17 Thread Mason Kramer
I still have uses for Durations. For instance, I want to dispatch a different .Stringy method to Durations than to Nums. It's convenient to me that the difference between two Instants has a different type than the difference between 1654321681.123 and 1654321021.65438. I just think Durations

Re: Q: Is there a reason why I can't do this?

2010-12-27 Thread Mason Kramer
One method-like thing that's come in handy for me as I've tinkered with the language is .WHAT. { ... }.WHAT Block() AFAIK, you can use .WHAT on *any* term, because every term in Perl6 is an object that is implemented by a class, and every class has a corresponding type object (which is what .

Re: Q: Is there a reason why I can't do this?

2010-12-27 Thread Mason Kramer
ls the story, even in the repl. But seriously, congrats on breaking .WHAT in 60 seconds flat ;) On Dec 27, 2010, at 06:49 PM, Daniel Carrera wrote: > On Tue, Dec 28, 2010 at 12:38 AM, Mason Kramer wrote: > One method-like thing that's come in handy for me as I've tinkered with

RE: FOSDEM - perl 6 critic

2011-02-22 Thread Mason Kramer
I don't grant the premise. Perl 6 is less complex than Perl 5. Number of operators is not remotely a measure of complexity. Neither is "size of the interpreter at runtime". "Number of things that the language does for you in a standardized way" is actually a measure of simplicity, not complexity