Re: [Haskell-cafe] Big Arrays

2010-10-06 Thread Hemanth Kapila
Thanks for the response. That sounds sequence comparison seems very impressive On Wed, Oct 6, 2010 at 2:23 PM, Ketil Malde ke...@malde.org wrote: Hemanth Kapila saihema...@gmail.com writes: Let us say, we are using a bit-array of size 2^43 (that is, a byte array of size 2^40) to store

Re: [Haskell-cafe] Lazy evaluation from Why Functional programming matters

2010-10-05 Thread Hemanth Kapila
Hi, Let us try to rewrite the code in a more java-esque syntax: It translates to something like the below generic method. Correct? static T T function(IBoundsCheckT within, DeltaT eps, IteratorT iterator, T initValue){ T currVal = initVal; while(iterator.hasNext()){ T nextVal

Re: [Haskell-cafe] Lazy evaluation from Why Functional programming matters

2010-10-05 Thread Hemanth Kapila
I see ... I think I understand now. hmmm ... I am little disappointed though - does that mean that all the laziness cool stuffs can actually be done using iterators(generators)? As in, but for the inconvenient syntax, you can do it all in - say java? Yes. It would slightly easier in, say,

Re: [Haskell-cafe] Big Arrays

2010-10-05 Thread Hemanth Kapila
Thanks Ketil. On Wed, Oct 6, 2010 at 1:36 AM, Ketil Malde ke...@malde.org wrote: Just out of curiosity, may I know a use case of such huge arrays? Bloom filters? Am probably dense - I still did not get an idea of where would one use such a big array. Let us say, we are using a bit-array of

Re: Re[2]: [Haskell-cafe] Big Arrays

2010-10-04 Thread Hemanth Kapila
Just out of curiosity, may I know a use case of such huge arrays? At such sizes, I thought, the array would not have the expected array properties (constant access time) due to thrashing. thanks, Hemanth ___ Haskell-Cafe mailing list

[Haskell-cafe] Embedded scripting Language for haskell app

2010-08-17 Thread Hemanth Kapila
Hi, Can some one please give me a suggestion on the best choice for an embedded scripting Language for a haskell application? I mean, something like guile/lua for c/c++ and groovy/jruby for java. For quite some time, I've been using a lisp-like interpreter that I implemented myself. But this is

Re: [Haskell-cafe] Embedded scripting Language for haskell app

2010-08-17 Thread Hemanth Kapila
thanks to all for the responses. I tried hint and hslua and haskell and both are very nice. My sincere thanks and kudos to the developers and maintainers of the packages (and to Bulat for the tutorial on hslua). FWIW, a couple of observations: 1. haskell indeed makes a great scripting

Re: [Haskell-cafe] unboxed arrays restricted to simple types (Int, Float, ..)

2009-11-11 Thread Hemanth Kapila
On Wed, Nov 11, 2009 at 5:28 PM, Tillmann Vogt tillmann.v...@rwth-aachen.de wrote: Hi, I tried to use unboxed arrays for generating an antialiased texture. To make it easier to understand, here is the stripped down code that produces an error: import Control.Monad.ST import Data.Array.ST

[Haskell-cafe] Storable Vector as a Storable record?

2009-11-04 Thread Hemanth Kapila
Hi, Is it possible to somehow make a StorableVector of a StorableVector via store-record or something? If yes, could some one please provide me with some hint? I need a very fast and efficient array of a large number of $ arrays of *Int *s. And the storableVector seems to be extremely nice.

[Haskell-cafe] Suggestions for simulating Object ID

2009-06-30 Thread Hemanth Kapila
Hello all, Can some one please suggest something on simulating some sort of object-Ids in Haskell? I mean, something like the following relation will hold: a1 == a2 = (objectID a1) == (objectID a2) Currently I have something like import Data.Hash import qualified Data.ByteString.Char8 as B

Re: [Haskell-cafe] Leksah works!

2009-06-30 Thread Hemanth Kapila
Hi, Thanks for the update. I just tried it and it is quite cool.Atlhough I am too addicted to emacs and can't imagine leaving it (at least before hIDE), I still think leksah is quite useful. Thanks again On Tue, Jun 30, 2009 at 10:45 AM, Eugene Kirpichov ekirpic...@gmail.comwrote: Hi.

Re: [Haskell-cafe] Suggestions for simulating Object ID

2009-06-30 Thread Hemanth Kapila
, Felipe Lessa felipe.le...@gmail.com wrote: On Tue, Jun 30, 2009 at 03:25:26PM +0530, Hemanth Kapila wrote: Can some one please suggest something on simulating some sort of object-Ids in Haskell? Data.Unique[1]? [1] http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data

[Haskell-cafe] Ensuring Type Class instances follow the 'rules'

2009-05-29 Thread Hemanth Kapila
Hi all, Recently, I participated in a coding competition. As part of it, I had to write a program wherein I had to make my data-type an instance of Ord. An error in my implementation of compare resulted in me losing quite a bit of valuable time. As I wrote it, I had tested it out on the ghci and

Re: [Haskell-cafe] Ensuring Type Class instances follow the 'rules'

2009-05-29 Thread Hemanth Kapila
Thanks Eugene and wren. Serves me right, actually. The one chapter I skipped in RWH was the 11th one called Testing and Quality Assurance thinking it is too boring. On Fri, May 29, 2009 at 12:44 PM, wren ng thornton w...@freegeek.orgwrote: Eugene Kirpichov wrote: Use QuickCheck. Also use