Re: [Haskell-cafe] Re: ANNOUNCE: GotoT-transformers version 1.0

2010-09-12 Thread Gregory Crosswhite
On 9/11/10 10:36 PM, Ertugrul Soeylemez wrote: It should print the string, if the computation isn't aborted, i.e. if the last continuation, which you specify as an argument to runContT is reached. Greets, Ertugrul That's true, it just seems to me like at that point the spirit of the

[Haskell-cafe] Small question on concurrency

2010-09-12 Thread Arnaud Bailly
Hello Haskellers, Having been pretty much impressed by Don Stewart's Practical Haskell (http://donsbot.wordpress.com/2010/08/17/practical-haskell/), I started to write a Haskell script to run maven jobs (yes, I know...). In the course of undertaking this fantastic endeavour, I started to use the

[Haskell-cafe] benchmarking c/c++ and haskell

2010-09-12 Thread Vo Minh Thu
Hi, I would like to benchmark C/C++ and Haskell code. The goal is to improve the Haskell port[0] of smallpt[1]. To make sure my approach was reliable, I got the code of two programs (one in C, the other in Haskell) from a post[2] by Don. The code is reproduced below. When timing the execution of

Re: [Haskell-cafe] benchmarking c/c++ and haskell

2010-09-12 Thread Andrew Coppin
Vo Minh Thu wrote: Hi, I would like to benchmark C/C++ and Haskell code. The goal is to improve the Haskell port[0] of smallpt[1]. To make sure my approach was reliable, I got the code of two programs (one in C, the other in Haskell) from a post[2] by Don. The code is reproduced below. When

Re: [Haskell-cafe] benchmarking c/c++ and haskell

2010-09-12 Thread Vo Minh Thu
2010/9/12 Andrew Coppin andrewcop...@btinternet.com: Vo Minh Thu wrote: Hi, I would like to benchmark C/C++ and Haskell code. The goal is to improve the Haskell port[0] of smallpt[1]. To make sure my approach was reliable, I got the code of two programs (one in C, the other in Haskell)

Re: [Haskell-cafe] Cost: (:) vs head

2010-09-12 Thread Henning Thielemann
michael rice schrieb: Which of these would be more costly for a long list? f :: [Int] - [Int] f [x] = [x] f (x:xs) = x + (head xs) : f xs f :: [Int] - [Int] f [x] = [x] f (x:y:xs) = x + y : f (y:xs) What about empty lists? How about zipWith (+) xs (drop 1 xs ++ [0]) ? Since I often

Re: [Haskell-cafe] Cost: (:) vs head

2010-09-12 Thread michael rice
Hi Henning, Thanks for the tip, I'll check it out. A related but more general question: on average, what's more efficient, pattern matching or function calls? Michael --- On Sun, 9/12/10, Henning Thielemann schlepp...@henning-thielemann.de wrote: From: Henning Thielemann

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-12 Thread Tillmann Rendel
Hi Paolo, Paolo Giarrusso wrote: - when recompiling a package with ABI changes, does cabal always update dependent packages? It never recompiles them. Recompilation should not be needed, because different versions of packages exports different symbols, so a package can never be linked

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-12 Thread Tillmann Rendel
Hi Paolo, Paolo Giarrusso wrote: $ cabal install --dry cabal-install leksah-0.8.0.6 [... does not work ...] However, trying to install cabal-install and leksah separately works quite well. So do install them separately. cabal install p1 p2 is supposed to find a single consistent install

Re: [Haskell-cafe] Fwd: Type families - how to resolve ambiguities?

2010-09-12 Thread Dominique Devriese
Paolo, The problem with mult is that k is not specified unambiguously. You either need v to determine k (which is probably not what you want, at a guess), mult to take a dummy argument that determines what k is: [...] or, to make Tensor a data family instead of a type family. What is the

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-12 Thread Paolo Giarrusso
On Sun, Sep 12, 2010 at 15:30, Tillmann Rendel ren...@mathematik.uni-marburg.de wrote: Paolo Giarrusso wrote: $ cabal install --dry cabal-install leksah-0.8.0.6 [... does not work ...] However, trying to install cabal-install and leksah separately works quite well. So do install them

[Haskell-cafe] Re: A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-12 Thread Paolo G. Giarrusso
On Sep 12, 2:51 am, wren ng thornton w...@freegeek.org wrote: On 9/11/10 3:43 PM, Daniel Fischer wrote: - is there a specification of which are the core packages? core as in *do not update*? Basically, what comes with GHC shouldn't be updated. Though I heard updating Cabal was okay. I

Re: [Haskell-cafe] Re: ANNOUNCE: GotoT-transformers version 1.0

2010-09-12 Thread Antoine Latter
On Sun, Sep 12, 2010 at 1:19 AM, Gregory Crosswhite gcr...@phys.washington.edu wrote: That's true, it just seems to me like at that point the spirit of the continuation monad is being violated since the final continuation is never actually called.  That isn't necessarily a big deal, but it is

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-12 Thread Paolo Giarrusso
Hi! First, sorry for some confusion - I wanted to post further details needed for the analysis in the mail I lost, and I had excluded them from my summary to keep it short. On Sun, Sep 12, 2010 at 15:26, Tillmann Rendel ren...@mathematik.uni-marburg.de wrote: Hi Paolo, Paolo Giarrusso wrote:

Re: [Haskell-cafe] Disable LINE Pragma handling in GHC

2010-09-12 Thread JP Moresmau
Users may not want to edit the files directly, but they'll be happy to be able to open them with proper syntax highlighting, for example. JP On Sat, Sep 11, 2010 at 7:57 PM, Henning Thielemann schlepp...@henning-thielemann.de wrote: JP Moresmau schrieb: Hello fellow Haskellers, In

[Haskell-cafe] darcs in 2010: talk/video online

2010-09-12 Thread Eric Kow
Dear Haskellers, Derek asked me if I could give a 5 minute talk at AngloHaskell last Friday about the Darcs project. It took an hour and a half. I've redone the talk on YouTube, basically just stepping through the slides and talking over them. It's about an hour long and you can watch it here:

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-12 Thread Tillmann Rendel
Hi Paolo, Paolo Giarrusso wrote: cabal install p1 p2 is supposed to find a single consistent install plan for p1 and p2 and the transitive dependencies of either of them. This is useful if you plan to use p1 and p2 in a single project. Ahah! Then it's a feature. The need for consistency stems

[Haskell-cafe] Data.Text performance problem

2010-09-12 Thread Petr Prokhorenkov
I experienced a following problem while dealing with some text processing. I have a text and want to get the same text with parts enclosed into {} or [] stripped away. Substituting them with a ' ' would also work. Here is the code I wrote (T is Data.Text): stripBrackets :: T.Text - T.Text

[Haskell-cafe] Re: darcs in 2010: talk/video online

2010-09-12 Thread Eric Kow
On Sun, Sep 12, 2010 at 19:33:56 +0100, Eric Kow wrote: PS: the talk segments are: I missed a segment! 1. http://www.youtube.com/watch?v=iUytayyTGTU 2. http://www.youtube.com/watch?v=ZXjTmWD81JA 3. http://www.youtube.com/watch?v=1lXOD3fLwU8 4. http://www.youtube.com/watch?v=aueSoZShobo 5.

Re: [Haskell-cafe] Data.Text performance problem

2010-09-12 Thread Daniel Fischer
On Sunday 12 September 2010 21:23:50, Petr Prokhorenkov wrote: I experienced a following problem while dealing with some text processing. I have a text and want to get the same text with parts enclosed into {} or [] stripped away. Substituting them with a ' ' would also work. Here is the

Re: [Haskell-cafe] ANN: ecu-0.0.0

2010-09-12 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/11/10 13:46 , Henning Thielemann wrote: Would it be better to write canlib in a way that works on both Windows and Unix? Otherwise all packages that import canlib have to add this switch. The phrasing of the original request leads me to

Re: [Haskell-cafe] A new cabal odissey: cabal-1.8 breaking its own neck by updating its dependencies

2010-09-12 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/11/10 15:43 , Daniel Fischer wrote: On Saturday 11 September 2010 20:38:21, Paolo Giarrusso wrote: - is there a specification of which are the core packages? core as in *do not update*? Basically, what comes with GHC shouldn't be updated.

Re: [Haskell-cafe] Data.Text performance problem

2010-09-12 Thread Bryan O'Sullivan
On Sun, Sep 12, 2010 at 12:23 PM, Petr Prokhorenkov prokhoren...@gmail.comwrote: I experienced a following problem while dealing with some text processing. Thanks for the report and the test case. There's nothing wrong with your code - read on for details. You ran into one of the few

Re: [Haskell-cafe] Data.Text performance problem

2010-09-12 Thread Felipe Lessa
On Sun, Sep 12, 2010 at 10:06 PM, Bryan O'Sullivan b...@serpentine.com wrote: text 0.8.1.0 is now up on hackage, with the fix included. Enjoy! Wow! That was fast! =) -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Subcategories in Hackage

2010-09-12 Thread Daniel Díaz
Hi, all! Now, with the approaching new Hackage server, I thought that to organize packages into subcategories would be useful. Categories like System or Text, with almost 200 packages, make more difficult to find what you want. Data category has currently 326 packages, many of them with very

Re: [Haskell-cafe] Subcategories in Hackage

2010-09-12 Thread Evan Laforge
Perhaps, this is madness, but I wanted to read other opinions on this topic. Packages already have multiple tags, right? So how about a search box that uses ANDed tags (in addition to description etc), and a browsing interface where you can see tags of packages matching the current search, and

Re: [Haskell-cafe] Subcategories in Hackage

2010-09-12 Thread Ivan Lazar Miljenovic
On 13 September 2010 11:37, Evan Laforge qdun...@gmail.com wrote: Perhaps, this is madness, but I wanted to read other opinions on this topic. Packages already have multiple tags, right?  So how about a search box that uses ANDed tags (in addition to description etc), and a browsing interface

Re: [Haskell-cafe] Subcategories in Hackage

2010-09-12 Thread Daniel Díaz
El Lun, 13 de Septiembre de 2010, 3:37 am, Evan Laforge escribió: That might be easier than trying to fit everything into one hierarchy. Some packages can go in more than one place. I have not contradicted that. A package can go somewhere. For example: CAT. A * SUBCAT. A1 ** Pack. 1 *

[Haskell-cafe] Cleaning up threads

2010-09-12 Thread Mitar
Hi! I run multiple threads where I would like that exception from any of them (and main) propagate to others but at the same time that they can gracefully cleanup after themselves (even if this means not exiting). I have this code to try, but cleanup functions (stop) are interrupted. How can I