Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-24 Thread Joachim Breitner
Hi, Am Mittwoch, den 23.02.2011, 20:06 -0500 schrieb wren ng thornton: On 2/23/11 4:42 PM, Sterling Clover wrote: A quick grep of some of my own source reveals that I've used M.size and S.size only to test for sizes equal to 1. So, for my purposes at least, an O(1) isSingleton operation

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread oleg
The topic of HANSEI in Haskell does come up from time to time. In fact, there was a Haskell edition of the first version of Hansei: http://okmij.org/ftp/kakuritu/probM.hs It was written to see how the code would look in Haskell, and how memoization (inherent in lazy evaluation of GHC)

Re: [Haskell-cafe] Either instance of Monad?

2011-02-24 Thread Yves Parès
I have the same problem with instances of Functor. For instance when I import Control.Applicative, to get the instance Functor ((-) a) I also have to import Control.Monad.Instances. 2011/2/23 Daniel Fischer daniel.is.fisc...@googlemail.com: On Wednesday 23 February 2011 14:14:46, Yves Parès

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-24 Thread Yitzchak Gale
Gwern Branwen wrote: You could look at them yourself; I attached the files. Max Bolingbroke wrote: Frankly I am surprised how much size gets used. It seems that making it fast is more important than I thought. Johan Tibell wrote: IntMap (which shares data structure with HashMap) only hash

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-24 Thread Ross Paterson
On Wed, Feb 23, 2011 at 08:45:47AM +, Max Bolingbroke wrote: 3. Some map combining algorithms work more efficiently when one of their two arguments are smaller. For example, Data.Map.union is most efficient for (bigmap `union` smallmap). If you don't care about which of the two input maps

[Haskell-cafe] GRIN and Urban Boquist's thesis

2011-02-24 Thread John Lato
Hello, Does anyone have a current link to Urban Boquist's thesis? It's no longer available at the Chalmers site. On the LHC blog someone gave a link to a mirror[1], however that link is down for me as well. Thanks, John L. [1]

Re: [Haskell-cafe] GRIN and Urban Boquist's thesis

2011-02-24 Thread Lemmih
On Thu, Feb 24, 2011 at 1:40 PM, John Lato jwl...@gmail.com wrote: Hello, Does anyone have a current link to Urban Boquist's thesis?  It's no longer available at the Chalmers site.  On the LHC blog someone gave a link to a mirror[1], however that link is down for me as well. Thanks, John L.

[Haskell-cafe] SMP parallelism gains inferior than expected

2011-02-24 Thread José Pedro Magalhães
(Forwarding to haskell-cafe) Hi, I have a program that computes a matrix of Floats of m rows by n columns. Computing each Float is relatively expensive. Each line is completely independent of the others, so I thought I'd try some simple SMP parallelism on this code: myFun :: FilePath - IO ()

[Haskell-cafe] Haskell platform installation failure on OS X 10.6.6 (intel)

2011-02-24 Thread Eugene Kirpichov
Hello, Below is an experience report from Artem (cc'd) on a failed installation of Haskell platform on a Mac. OS: OS X 10.6.6 CPU: Intel Core i5 Platform downloaded from: http://lambda.haskell.org/hp-tmp/2010.2.0.0/haskell-platform-2010.2.0.0.i386.dmg Sequence of actions: Downloaded the file,

Re: [Haskell-cafe] GRIN and Urban Boquist's thesis

2011-02-24 Thread John Lato
On Thu, Feb 24, 2011 at 1:16 PM, Lemmih lem...@gmail.com wrote: On Thu, Feb 24, 2011 at 1:40 PM, John Lato jwl...@gmail.com wrote: Hello, Does anyone have a current link to Urban Boquist's thesis? It's no longer available at the Chalmers site. On the LHC blog someone gave a link to a

Re: [Haskell-cafe] Haskell platform installation failure on OS X 10.6.6 (intel)

2011-02-24 Thread Gregory Collins
Hello, Usually this is because XCode is not installed. I believe the README states that this is a dependency for the install process. I opened a ticket with GHC HQ a while ago re: making this scenario friendlier for users. G. On Thu, Feb 24, 2011 at 3:41 PM, Eugene Kirpichov

Re: [Haskell-cafe] Haskell platform installation failure on OS X 10.6.6 (intel)

2011-02-24 Thread Eugene Kirpichov
Thanks Gregory, Indeed xcode was not installed - however I wonder, why is it a dependency? It seems quite a heavyweight thing to require for installing Haskell, and this requirement may very well be a good reason to *not* install it... Could you please point me to the ticket you opened? I was

[Haskell-cafe] darcs hacking sprint #6 (March, April, or May 2011)

2011-02-24 Thread Eric Kow
Hello Haskellers! We are starting to organising the next Darcs Hacking Sprint, most likely in Paris in this spring. If you fancy a weekend of hacking Haskell on a really neat real world project, come join us! If you'd like to attend, please add yourself to http://wiki.darcs.net/Sprints/2011-04

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Arnaud Clère
On 24/02/2011 09:30, o...@okmij.org wrote: The sort of laziness needed for non-deterministic programming calls for first-class store. It can be emulated, albeit *imperfectly*, for example, as was described in the ICFP09 paper. What do you mean by imperfectly? Do you think implementing

[Haskell-cafe] Terminal library : which ?

2011-02-24 Thread Permjacov Evgeniy
What terminal library you will recomedn? Requirements: crossplatform (win/lin), with direct (i.e. with line/column number pair) cursor positioning and possybly direct symbol output. MUST provide function to get terminal dimensions. (could not find one).

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
Arnaud Clère arnaud.cl...@free.fr wrote in article ik64e9$j6a$1...@dough.gmane.org in gmane.comp.lang.haskell.cafe: On 24/02/2011 09:30, o...@okmij.org wrote: The sort of laziness needed for non-deterministic programming calls for first-class store. It can be emulated, albeit *imperfectly*,

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
Leon Smith leon.p.sm...@gmail.com wrote in article AANLkTikF6EX4U+uTwNcrdFZPj-ijTWb74o2W_RJMGOe=@mail.gmail.com in gmane.comp.lang.haskell.cafe: On Wed, Feb 23, 2011 at 10:52 AM, Chung-chieh Shan ccs...@cs.rutgers.edu wrote: Mostly we preferred (as do the domain experts we target) to write

Re: [Haskell-cafe] Haskell-Cafe Digest, Vol 90, Issue 48

2011-02-24 Thread Louis Wasserman
Another common usage for Map is as a functional integer-indexed random access array. Once I implemented the standard algorithm for random shuffle of a list using Data.Map Int. It was much nicer than the STArray version, in my opinion. But when I tried switching to Data.IntMap, hoping to

Re: [Haskell-cafe] GRIN and Urban Boquist's thesis

2011-02-24 Thread David Waern
2011/2/24 Lemmih lem...@gmail.com: They will also be in the lhc repository once I restore it on code.haskell.org. Lemmih, while you're here, what's the status of LHC? It's an interesting project but we haven't heard much from you lately. David ___

[Haskell-cafe] Fun with the ST monad

2011-02-24 Thread Andrew Coppin
OK, so I had a function that looks like transform :: [Word8] - [Word16] It works nicely, but I'd like to use mutable state inside. No problem! Use the ST monad. Something like transform :: [Word8] - [Word16] transform xs = runST (work xs) where work :: [Word8] - ST s [Word16]

Re: [Haskell-cafe] GRIN and Urban Boquist's thesis

2011-02-24 Thread Lemmih
On Thu, Feb 24, 2011 at 9:36 PM, David Waern david.wa...@gmail.com wrote: 2011/2/24 Lemmih lem...@gmail.com: They will also be in the lhc repository once I restore it on code.haskell.org. Lemmih, while you're here, what's the status of LHC? It's an interesting project but we haven't heard

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Antoine Latter
On Thu, Feb 24, 2011 at 12:57 PM, Chung-chieh Shan ccs...@cs.rutgers.edu wrote: Arnaud Clère arnaud.cl...@free.fr wrote in article ik64e9$j6a$1...@dough.gmane.org in gmane.comp.lang.haskell.cafe: On 24/02/2011 09:30, o...@okmij.org wrote: The sort of laziness needed for non-deterministic

Re: [Haskell-cafe] Fun with the ST monad

2011-02-24 Thread Andrew Coppin
Anybody have any hints on how to get around this? Use a lazy state monad? That's not going to work. It still needs to read the input to determine which monadic action comes next, and hence what the final result will be. So whether it forces the result or not, it still has to scan the

Re: [Haskell-cafe] Fun with the ST monad

2011-02-24 Thread Alexander Solla
On Thu, Feb 24, 2011 at 2:42 PM, Andrew Coppin andrewcop...@btinternet.comwrote: Anybody have any hints on how to get around this? Use a lazy state monad? That's not going to work. It still needs to read the input to determine which monadic action comes next, and hence what the final

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-24 Thread wren ng thornton
On 2/23/11 8:06 PM, wren ng thornton wrote: On 2/23/11 4:42 PM, Sterling Clover wrote: A quick grep of some of my own source reveals that I've used M.size and S.size only to test for sizes equal to 1. So, for my purposes at least, an O(1) isSingleton operation would be just as useful as an O(1)

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-24 Thread wren ng thornton
On 2/24/11 3:05 AM, Joachim Breitner wrote: Hi, Am Mittwoch, den 23.02.2011, 20:06 -0500 schrieb wren ng thornton: On 2/23/11 4:42 PM, Sterling Clover wrote: A quick grep of some of my own source reveals that I've used M.size and S.size only to test for sizes equal to 1. So, for my purposes

Re: [Haskell-cafe] Fun with the ST monad

2011-02-24 Thread wren ng thornton
On 2/24/11 3:45 PM, Andrew Coppin wrote: OK, so I had a function that looks like transform :: [Word8] - [Word16] It works nicely, but I'd like to use mutable state inside. No problem! Use the ST monad. Something like transform :: [Word8] - [Word16] transform xs = runST (work xs) where work ::

Re: [Haskell-cafe] Fun with the ST monad

2011-02-24 Thread Sterling Clover
On Feb 24, 2011, at 3:45 PM, Andrew Coppin wrote: OK, so I had a function that looks like transform :: [Word8] - [Word16] It works nicely, but I'd like to use mutable state inside. No problem! Use the ST monad. Something like transform :: [Word8] - [Word16] transform xs = runST

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
On 2011-02-24T16:20:46-0600, Antoine Latter wrote: On Thu, Feb 24, 2011 at 12:57 PM, Chung-chieh Shan wrote: What we need is a way to tell the garbage collector that the store reference and the cell reference are both needed to access the data so the data can be garbage-collected as soon

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Antoine Latter
On Thu, Feb 24, 2011 at 10:15 PM, Chung-chieh Shan ccs...@cs.rutgers.edu wrote: On 2011-02-24T16:20:46-0600, Antoine Latter wrote: On Thu, Feb 24, 2011 at 12:57 PM, Chung-chieh Shan wrote: What we need is a way to tell the garbage collector that the store reference and the cell reference

[Haskell-cafe] Auto elimination of MVars using a monad or monad transformer.

2011-02-24 Thread Chris Dew
Hello, just like everyone else, I have a question about monads. I've read the tutorials, written one monad myself (not in this email), but I still consider myself a Haskell beginner. * Does GHC eliminate unneeded MVars during compilation? I'm expecting that it doesn't, as that would mean

[Haskell-cafe] ANNOUNCE: htime-0.1

2011-02-24 Thread José Pedro Magalhães
Hello all, I kept being annoyed at the fact that Windows doesn't come with anything similar to the unix time utility, so I created a small Haskell program that does something similar. I thought this could perhaps be useful to others, so it's now available on Hackage: