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

2010-11-07 Thread Moritz Lenz
On 11/08/2010 01:51 AM, Darren Duncan wrote: > Mason Kramer wrote: > >> I want to propose one major change to the Bag spec: When a Bag is used as an >> Iterable, you get an Iterator that has each key in proportion to the number >> of times it appears in the Bag. > > > You present some interest

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

2010-11-07 Thread Jon Lang
Mason Kramer wrote: > I'd like to anticipate one objection to this - the existence of the 'hyper' > operator/keyword.  The hyper operator says, "I am taking responsibility for > this particular code block and promising that it can execute out of order and > concurrently".  Creating a Bag instead

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

2010-11-07 Thread Jon Lang
Darren Duncan wrote: > However, if the above proposal is done, I would still want an easy way to > get the value-count pairs from a bag if I wanted them. I don't see any problem there. Mason's suggestion only deals with the Bag as seen through the the lens of the Iterable role; when viewed as a h

Re: Problem with NativeCall

2010-11-07 Thread Darren Duncan
Arthur, I don't know if this would be useful in your situation, but Rudy Lippan is working to make a Perl 5 DBI driver to MongoDB. Since your challenges are related he might know something that could help. -- Darren Duncan ARTHUR WOLF wrote: Hello list ! So, I'm trying to make a MongoDB driv

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

2010-11-07 Thread Darren Duncan
Mason Kramer wrote: I want to propose one major change to the Bag spec: When a Bag is used as an Iterable, you get an Iterator that has each key in proportion to the number of times it appears in the Bag. You present some interesting thoughts here. But I don't have enough time to think ab

Problem with NativeCall

2010-11-07 Thread ARTHUR WOLF
Hello list ! So, I'm trying to make a MongoDB driver for Perl6. I was advised at #perl6to use NativeCall ( https://github.com/jnthn/zavolaj). I did this, by copying the MySQL driver in examples : use NativeCall; sub mongo_connect( OpaquePointer $client, OpaquePointer $options) returns OpaquePoin

Re: Ruby Fibers (was: threads?)

2010-11-07 Thread Mark J. Reed
On Fri, Oct 15, 2010 at 10:22 AM, B. Estrade wrote: > Pardon my ignorance, but are continuations the same thing as > co-routines, or is it more primitive than that? Continuations are not the same thing as coroutines, although they can be used to implement coroutines - in fact, continuations can b

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

[perl #78896] [BUG] Duration disallows some numeric operations with a number as the other argument in Rakudo

2010-11-07 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #78896] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=78896 > I just got "Can't exponentiate a Duration" in real-world code. could someone explain to

Re: New Perl 6 Advent Calendar: call for ideas

2010-11-07 Thread Leon Timmermans
2010/11/6 Tadeusz Sośnierz : > As I accidentally volunteered for managing a list of topics and writers > for this year's Advent Calendar [1], I started to collect some ideas of > things it'd be nice to write about. There's a gist [2] with the list of > things from the top of my head. If you have an

Re: Ruby Fibers (was: threads?)

2010-11-07 Thread Ben Goldberg
On Oct 15, 9:57 am, markjr...@gmail.com ("Mark J. Reed") wrote: > On Fri, Oct 15, 2010 at 7:42 AM, Leon Timmermans wrote: > > Continuations and fibers are incredibly useful and should be easy to > > implement on parrot/rakudo but they aren't really concurrency. They're > > a solution to a differen