Hello Claus,
Thursday, June 25, 2009, 11:50:12 AM, you wrote:
> PS. You could, of course, rebase your array indices to make
> use of the negatives, so the address space isn't wasted, just
> made difficult to use.
no, he can't - internally indexes are always counted from 0, so array
canno
It's too bad that indexes are `Int` instead of `Word` under
the hood. Why is `Int` used in so many places where it is
semantically wrong? Not just here but also in list indexing...
Indices/offsets can only be positive and I can't see any good
reason to waste half the address space -- yet we e
Jason Dusek wrote:
Why is `Int` used in so many places where it is
semantically wrong? Not just here but also in list indexing...
Indices/offsets can only be positive and I can't see any good
reason to waste half the address space -- yet we encounter
this problem over and over again.
Hello Jason,
Wednesday, June 24, 2009, 10:15:14 PM, you wrote:
>> particular, in windows 32-bit program cannot alloc memory
>> block larger than 2gb
> But on everything but Windows...
well, people never thought about such things until they really get
into using 4gb RAM with 32-bit systems :)
So now I get to write a blog post called "Compact Bit Arrays
in Haskell" or some such.
--
Jason Dusek
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
2009/06/24 Bulat Ziganshin :
> Wednesday, June 24, 2009, 9:51:59 PM, you wrote:
> > It's too bad that indexes are `Int` instead of `Word` under
>
> actually, it doesn't matter too much except for Bools. 2gb
> array is a way too much for most 32-bit systems, in
> particular, in windows 32-bit progra
Hello Jason,
Wednesday, June 24, 2009, 9:51:59 PM, you wrote:
> It's too bad that indexes are `Int` instead of `Word` under
actually, it doesn't matter too much except for Bools. 2gb array is a
way too much for most 32-bit systems, in particular, in windows 32-bit
program cannot alloc memory b
2009/06/24 Daniel Fischer :
> Am Mittwoch 24 Juni 2009 18:50:49 schrieb Jason Dusek:
> > 2009/06/24 Ketil Malde :
> > > So in effect, you have a zero-length underlying array, but
> > > the array implementation still keeps track of the real
> > > indices and tries to print some contents. (Correct?)
Hello Jason,
Wednesday, June 24, 2009, 8:50:49 PM, you wrote:
>> Aren't you asking for a 4G element array here, so with a 32bit
>> wraparound the array will be some multiple of 4GB
> It's a bit array. It'd be 512MiB.
internally it's indexed by plain Int :)
when library checks index boundary,
Am Mittwoch 24 Juni 2009 18:50:49 schrieb Jason Dusek:
> 2009/06/24 Ketil Malde :
> > Bulat Ziganshin writes:
> >>> array ((0,0),(65535,65535)) [((0,0),*** Exception: Error in array
> >>> index
> >>
> >> i think that it may be a bit too large for internal Int indicies:
> >
> > Aren't you askin
2009/06/24 Ketil Malde :
> Bulat Ziganshin writes:
>
>>> array ((0,0),(65535,65535)) [((0,0),*** Exception: Error in array index
>
>> i think that it may be a bit too large for internal Int indicies:
>
> Aren't you asking for a 4G element array here, so with a 32bit
> wraparound the array will
Bulat Ziganshin writes:
>> array ((0,0),(65535,65535)) [((0,0),*** Exception: Error in array index
> i think that it may be a bit too large for internal Int indicies:
Aren't you asking for a 4G element array here, so with a 32bit
wraparound the array will be some multiple of 4GB, and be tru
Hello Jason,
Wednesday, June 24, 2009, 1:55:24 PM, you wrote:
> array ((0,0),(65535,65535)) [((0,0),*** Exception: Error in array index
> What do I need to do to debug this?
i think that it may be a bit too large for internal Int indicies:
safeIndex :: Ix i => (i, i) -> Int -> i -> Int
s
I'm using tuples to index into a `UArray` created like this:
fromList :: [(Word16, Word16)] -> UArray (Word16, Word16) Bool
fromList list= runSTUArray $ do
arr <- empty
return arr
empty :: ST s (STUArray s (Word16, Word1
14 matches
Mail list logo