Re: IO Multiplexing

2010-11-13 Thread Ben Goldberg
On Nov 12, 2:21 pm, stefa...@cox.net (Stefan O'Rear) wrote: On Thu, Nov 11, 2010 at 05:47:46PM -0800, Ben Goldberg wrote: I would like to know, is perl6 going to have something like select (with arguments created by fileno/vec), or something like IO::Select (with which the user doesn't need

Packed arrays and assignment vs binding

2010-11-13 Thread Jonathan Worthington
Hi, Per S09, we can write in Perl 6: my int @x; And the idea is that we get a packed array - conceptually, a single lump of memory allocated and and storing a bunch of ints contiguously. Contrast this to: my Int @x; Where we get an array of scalar containers, each of which is only

Re: Packed arrays and assignment vs binding

2010-11-13 Thread Carl Mäsak
Jonathan (): Per S09, we can write in Perl 6: my int @x; And the idea is that we get a packed array - conceptually, a single lump of memory allocated and and storing a bunch of ints contiguously. Contrast this to: my Int @x; Where we get an array of scalar containers, each of which is

Re: Packed arrays and assignment vs binding

2010-11-13 Thread Stefan O'Rear
On Sat, Nov 13, 2010 at 06:09:00PM +0100, Jonathan Worthington wrote: ... With packed arrays, however, I'm less clear what they mean. Since the point of a packed array is compact storage, there's no chance to actually have containers. Thus does assignment to a slot in a compact array ever make

Re: IO Multiplexing

2010-11-13 Thread Stefan O'Rear
On Fri, Nov 12, 2010 at 06:59:59PM -0800, Ben Goldberg wrote: (snip plea to paint the bikeshed fuchsia) The design of the I/O system will be chosen by the first person to implement it. If you want any say in the matter, you need to be that person. Bonus points if you also port at least one app

Re: Packed arrays and assignment vs binding

2010-11-13 Thread Moritz Lenz
On 11/13/2010 06:09 PM, Jonathan Worthington wrote: With packed arrays, however, I'm less clear what they mean. Since the point of a packed array is compact storage, there's no chance to actually have containers. Thus does assignment to a slot in a compact array ever make sense? There's not

Re: Packed arrays and assignment vs binding

2010-11-13 Thread Jon Lang
Jonathan Worthington wrote: In the latter case, it's fairly clear how these differ: @x[0] = 1; @x[0] := 1; In the first, we look up the container in slot 0 or the array and assign a 1 into it. In the second, we bind a 1 directly into the slot. There's no container any more (so any future

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

2010-11-13 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/7/10 23:19 , Jon Lang wrote: 1 -- 2 -- 3 Would be a Bag containing three elements: 1, 2, and 3. Personally, I wouldn't put a high priority on this; for my purposes, Bag(1, 2, 3) works just fine. Hm. Bag as [! 1, 2, 3 !] and

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

2010-11-13 Thread Jon Lang
Brandon S Allbery KF8NH wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/7/10 23:19 , Jon Lang wrote:     1 -- 2 -- 3 Would be a Bag containing three elements: 1, 2, and 3. Personally, I wouldn't put a high priority on this; for my purposes,    Bag(1, 2, 3) works just fine.

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

2010-11-13 Thread Carl Mäsak
Jonathan Lang (): As well, my first impression upon seeing [! ... !] was to think you're negating everything inside?  That said, I could get behind doubled brackets:    [[1, 2, 3]] # same as Bag(1, 2, 3)    {{1, 2, 3}} # same as Set(1, 2, 3) AFAIK, this would cause no conflicts with

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

2010-11-13 Thread Jon Lang
Carl Mäsak wrote: Jonathan Lang (): That saves a singlr character over Bag( ... ) and Set( ... ), respectively (or three characters, if you find decent unicode bracket choices).  It still wouldn't be a big enough deal to me to bother with it. +1. Let's leave it at that. That said, I do

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

2010-11-13 Thread Darren Duncan
Jon Lang wrote: That saves a singlr character over Bag( ... ) and Set( ... ), respectively (or three characters, if you find decent unicode bracket choices). It still wouldn't be a big enough deal to me to bother with it. As well, my first impression upon seeing [! ... !] was to think you're

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

2010-11-13 Thread The Sidhekin
On Sun, Nov 14, 2010 at 12:12 AM, Jon Lang datawea...@gmail.com wrote: Carl Mäsak wrote: Jonathan Lang (): That saves a singlr character over Bag( ... ) and Set( ... ), respectively (or three characters, if you find decent unicode bracket choices). It still wouldn't be a big enough deal

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 back

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

2010-11-13 Thread Jon Lang
Darren Duncan wrote: Jon Lang wrote: That saves a singlr character over Bag( ... ) and Set( ... ), respectively (or three characters, if you find decent unicode bracket choices).  It still wouldn't be a big enough deal to me to bother with it. As well, my first impression upon seeing [!