[Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-06 Thread Bardur Arantsson
Brandon S. Allbery KF8NH wrote: On Feb 5, 2010, at 02:56 , Bardur Arantsson wrote: [--snip--] Broken pipe is normally handled as a signal, and is only mapped to an error if SIGPIPE is set to SIG_IGN. I can well imagine that the SIGPIPE signal handler isn't closing resources properly; a

Re: [Haskell-cafe] a beginner question: decorate-op-undecorate

2010-02-06 Thread Stephen Tetley
Hello Aran Changing to an explicit sum type rather than using Either might subsequent functions that process a Binding cleaner: data Binding = BoundVar Var Value | PossiblyBound Var [Value] Naturally you might want to consider a better constructor name than 'PossiblyBound'.

Re: [Haskell-cafe] cabal fun (not)

2010-02-06 Thread Peter Robinson
On 6 February 2010 03:33, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: If you upgrade a library, it will break all other libraries that depend upon it.  ghc-pkg list will tell you which libraries are broken and need to be rebuilt. I think you mean ghc-pkg check. Peter

Re: [Haskell-cafe] cabal fun (not)

2010-02-06 Thread Ivan Miljenovic
On 6 February 2010 19:23, Peter Robinson thaldy...@gmail.com wrote: I think you mean ghc-pkg check. Yes, I do. Whoops :s -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com Charles de Gaulle - The better I get to know men, the more I find myself loving dogs. -

Re: [Haskell-cafe] Simulation of interconnect network

2010-02-06 Thread Serguey Zefirov
2010/2/5 Roger King rogerking...@yahoo.com: I am building a simulator for an interconnect network for a multiprocessor computer.  I would like to develop it in Haskell as an opportunity to learn Haskell. The network will have a number of routers with input ports and output ports and

Re: [Haskell-cafe] safe lazy IO or Iteratee?

2010-02-06 Thread John Lato
I've put my benchmarking code online at: http://inmachina.net/~jwlato/haskell/research-iteratee.tar.bz2 unpack it so you have this directory structure: ./iteratee ./research-iteratee/ Also download my criterionProcessor programs. The darcs repo is at

Re: [Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-06 Thread Felipe Lessa
On Sat, Feb 06, 2010 at 09:16:35AM +0100, Bardur Arantsson wrote: Brandon S. Allbery KF8NH wrote: On Feb 5, 2010, at 02:56 , Bardur Arantsson wrote: [--snip--] Broken pipe is normally handled as a signal, and is only mapped to an error if SIGPIPE is set to SIG_IGN. I can well imagine that

[Haskell-cafe] Using ShowS or Difference Lists

2010-02-06 Thread Mark Spezzano
Hi, Just wondering whether I can use ShowS or tupling or Difference Lists to speed up the following code? It's basic text processing. It takes in a list of Lines where each Line is a list of Words and intersperses between them then concatenates them into a longer String. Note that there is

Re: [Haskell-cafe] a beginner question: decorate-op-undecorate

2010-02-06 Thread John Lato
From: Aran Donohue aran.dono...@gmail.com Hi Haskell-Cafe, Consider a data type such as data Binding = Binding Var (Either Value [Value]) representing a variable bound either to a fixed value or that has a list of possible values. I'd like to perform an operation on say, the

Re: [Haskell-cafe] Using ShowS or Difference Lists

2010-02-06 Thread Holger Siegel
Am Samstag, den 06.02.2010, 23:12 +1030 schrieb Mark Spezzano: Hi, Just wondering whether I can use ShowS or tupling or Difference Lists to speed up the following code? It's basic text processing. It takes in a list of Lines where each Line is a list of Words and intersperses between

Re: [Haskell-cafe] Using ShowS or Difference Lists

2010-02-06 Thread Felipe Lessa
On Sat, Feb 06, 2010 at 11:12:40PM +1030, Mark Spezzano wrote: -- Function: joinLines -- Joins the Words within Lines together with whitespace and newline characters -- Argument: Lines to pad with whitespace and newlines -- Evaluate: The processed and concatenated String joinLines :: [Line]

Re: [Haskell-cafe] a beginner question: decorate-op-undecorate

2010-02-06 Thread Stephen Tetley
Hi John I'm not sure about making Binding polymorphic to get Functor, Traversable, Foldable... While I think you're correct that partitionEithers might not be a useful example to draw from in this case, I'd assume that Binding would be part of a larger syntax-tree, thus there might not be a

Re: [Haskell-cafe] Using ShowS or Difference Lists

2010-02-06 Thread Daniel Fischer
Am Samstag 06 Februar 2010 13:42:40 schrieb Mark Spezzano: Hi, Just wondering whether I can use ShowS or tupling or Difference Lists to speed up the following code? It's basic text processing. It takes in a list of Lines where each Line is a list of Words and intersperses between them

[Haskell-cafe] Re: cabal fun (not)

2010-02-06 Thread Johann Höchtl
On Feb 6, 3:33 am, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 6 February 2010 01:05, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: so please please please have cabal install fail with some error message if (that is, before) the install would break anything. - J. If you

[Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-06 Thread Bardur Arantsson
Felipe Lessa wrote: On Sat, Feb 06, 2010 at 09:16:35AM +0100, Bardur Arantsson wrote: Brandon S. Allbery KF8NH wrote: On Feb 5, 2010, at 02:56 , Bardur Arantsson wrote: [--snip--] Broken pipe is normally handled as a signal, and is only mapped to an error if SIGPIPE is set to SIG_IGN. I can

[Haskell-cafe] Re: Category Theory woes

2010-02-06 Thread Benjamin L. Russell
On Tue, 02 Feb 2010 09:16:03 -0800, Creighton Hogg wrote: 2010/2/2 Álvaro García Pérez agar...@babel.ls.fi.upm.es You may try Pierce's Basic Category Theory for Computer Scientists or Awodey's Category Theory, whose style is rather introductory. Both of them (I think) have a chapter about

[Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-06 Thread Bardur Arantsson
Bardur Arantsson wrote: (sorry about replying-to-self) During yet another bout of debugging, I've added even more I am here instrumentation code to the SendFile code, and the culprit seems to be threadWaitWrite. I think I've pretty much confirmed this. I've changed the code again. This

Re: [Haskell-cafe] Re: Category Theory woes

2010-02-06 Thread briand
On Sun, 07 Feb 2010 01:38:08 +0900 Benjamin L. Russell dekudekup...@yahoo.com wrote: On Tue, 02 Feb 2010 09:16:03 -0800, Creighton Hogg wrote: 2010/2/2 Álvaro García Pérez agar...@babel.ls.fi.upm.es You may try Pierce's Basic Category Theory for Computer Scientists or Awodey's

[Haskell-cafe] safe-lazy-io on GHC 6.12?

2010-02-06 Thread Tom Tobin
After convincing myself the hard way that you can't be lazy across strict monadic results (by writing myself a foldrM -- yeah, I'm still a beginner), I noticed the recent discussion of safe-lazy-io vs. iteratee with interest. The safe-lazy-io package seems much easier to understand than iteratee,

Re: [Haskell-cafe] safe-lazy-io on GHC 6.12?

2010-02-06 Thread Nicolas Pouillard
On Sat, 6 Feb 2010 11:38:25 -0600, Tom Tobin korp...@korpios.com wrote: After convincing myself the hard way that you can't be lazy across strict monadic results (by writing myself a foldrM -- yeah, I'm still a beginner), I noticed the recent discussion of safe-lazy-io vs. iteratee with

Re: [Haskell-cafe] Using ShowS or Difference Lists

2010-02-06 Thread Ryan Ingram
As other people have mentioned, you are duplicating library functionality. But nobody has actually talked about the performance characteristics of your code. Fortunately for you, the calls to (++) in your recursion are right-associative, so you don't have an asymptotic problem where your program

Re: [Haskell-cafe] a beginner question: decorate-op-undecorate

2010-02-06 Thread Aran Donohue
One way or the other, this has been a very productive question for getting good pointers on what to read about next... Thanks again. Aran On Sat, Feb 6, 2010 at 8:18 AM, Stephen Tetley stephen.tet...@gmail.comwrote: Hi John I'm not sure about making Binding polymorphic to get Functor,

Re: [Haskell-cafe] Re: sendfile leaking descriptors on Linux?

2010-02-06 Thread Thomas Hartman
me too. 2010/2/5 MightyByte mightyb...@gmail.com: I've been seeing a steady stream of similar resource vanished messages for as long as I've been running my happstack app.  This message I get is this: socket: 58: hClose: resource vanished (Broken pipe) I run my app from a shell script

[Haskell-cafe] cannot post to haskellmode-em...@projects.haskell.org

2010-02-06 Thread Jose A. Ortega Ruiz
Hi, all my posts to the haskellmode-emacs list (using the address in the subject) are being rejected with the error: 451 451 Temporary local problem - please try later (state 18) (after several retries by the Google smtp server, which i use as a smarthost). Any idea of what could be causing

Re: [Haskell-cafe] cannot post to haskellmode-em...@projects.haskell.org

2010-02-06 Thread Jens Petersen
On 7 February 2010 07:39, Jose A. Ortega Ruiz j...@gnu.org wrote: all my posts to the haskellmode-emacs list (using the address in the subject) are being rejected with the error:  451 451 Temporary local problem - please try later (state 18) (after several retries by the Google smtp server,

[Haskell-cafe] ANN: data-ordlist-0.2

2010-02-06 Thread Leon Smith
I have released data-ordlist 0.2, with a number of changes: 1. The module name is now Data.List.Ordered, instead of Data.OrdList 2. Three bugfixes: (ack!) insertSet and insertBag assumed reverse-ordered lists, nub failed to remove duplicates. Thanks to Topi Karvonen for reporting the