Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Herbert Valerio Riedel
On Sun, 2012-01-29 at 23:47 +0100, Marc Weber wrote: So maybe also the JSON parsing library kept too many unevaluated things in memory. So I could start either writing my own JSON parsing library (being more strict) Jfyi, aeson has been added strict parser variants json' and value' [1] some

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-01-30 Thread Steve Horne
On 30/01/2012 07:09, Donn Cave wrote: ((separate . crack . .smallEnd) egg).yolk (f egg).yolk where f = separate . crack . .smallEnd Scary - that .smallEnd worries me. It's like a field is being referenced with some magical context from nowhere. Obviously I need to read that full proposal.

Re: [Haskell-cafe] space leak when repeatedly calling Control.Monad.State.Strict.modify

2012-01-30 Thread Yves Parès
Have you tried to compile your code with optimisations? I guess GHC's strictness analysis would find strict evaluation is better here. 2012/1/30 Joey Hess j...@kitenet.net Claude Heiland-Allen wrote: Control.Monad.State.Strict is strict in the actions, but the state itself is still lazy,

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Felipe Almeida Lessa
On Mon, Jan 30, 2012 at 6:21 AM, Herbert Valerio Riedel h...@gnu.org wrote: On Sun, 2012-01-29 at 23:47 +0100, Marc Weber wrote: So maybe also the JSON parsing library kept too many unevaluated things in memory. So I could start either writing my own JSON parsing library (being more strict)

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Alexander Bernauer
On Sun, Jan 29, 2012 at 11:25:09PM +0100, Ertugrul Söylemez wrote: First of all, /learning/ to optimize Haskell can be difficult. The optimizing itself is actually fairly easy in my experience, once you understand how the language works. Given the fact that you have obviously mastered the

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-01-30 Thread Paul R
Steve Every programmer has their own favorite editor, usually using the same Steve one to work in many different languages. For the moment, you'd have Steve a hard job separating me from Notepad++. Main editors have very advanced customization features (though incredibly hacky most of the time).

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Malcolm Wallace
On 29 Jan 2012, at 22:25, Ertugrul Söylemez wrote: A strict-by-default Haskell comes with the implication that you can throw away most of the libraries, including the base library. So yes, a strict-by-default Haskell is very well possible, but the question is whether you actually want that.

[Haskell-cafe] Need advice: Haskell in Web Client

2012-01-30 Thread dokondr
**Bardur Arantsson wrote: On 01/26/2012 11:16 AM, dokondr wrote: Ideally, I would be happy to be able to write in Haskell a complete front-end / GUI, so it could be compiled to different back-ends: Javascript to run in the Browser and also a standalone app. In Python world this is already done

[Haskell-cafe] Stuck on HXT basics

2012-01-30 Thread Pēteris Paikens
I'm quite stuck on getting HXT working to do my xml parsing, can you help me to get started? Even in http://www.haskell.org/haskellwiki/HXT#Getting_started:_Hello_world_examples the basic filter example that's given there in section 6: import Text.XML.HXT.Core import

Re: [Haskell-cafe] Stuck on HXT basics

2012-01-30 Thread Michael Snoyman
On Mon, Jan 30, 2012 at 3:06 PM, Pēteris Paikens peter...@gmail.com wrote: I'm quite stuck on getting HXT working to do my xml parsing, can you help me to get started? Even in http://www.haskell.org/haskellwiki/HXT#Getting_started:_Hello_world_examples the basic filter example that's given

[Haskell-cafe] Exceeding OS limits for simultaneous socket connections

2012-01-30 Thread Rob Stewart
Hi, I'm experiencing the accept: resource exhausted (Too many open files) exception when trying to use sockets in my Haskell program. The situation: - Around a dozen Linux machines running my Haskell program, transmitting thousands of messages to each other, sometimes within a small period of

Re: [Haskell-cafe] Stuck on HXT basics

2012-01-30 Thread Johannes Waldmann
Couldn't match expected type `Data.Tree.NTree.TypeDefs.NTree XNode' with actual type `hxt-8.5.4:Data.Tree.NTree.TypeDefs.NTree hxt-8.5.4:Text.XML.HXT.DOM.TypeDefs.XNode' perhaps you have installed several (conflicting) versions of

Re: [Haskell-cafe] Stuck on HXT basics

2012-01-30 Thread Pēteris Paikens
Yep, that does seem to be the case - cabal shows Versions installed: 8.5.4, 9.1.6. The module referenced in the website example - Text.XML.HXT.DOM.XmlTreeFilter and function isXText - has only old packages, so when installing hxt I got version 9.1.6, but from hxt-filter I got hxt 8.5.4, so that's

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Jan-Willem Maessen
On Mon, Jan 30, 2012 at 6:24 AM, Malcolm Wallace malcolm.wall...@me.comwrote: On 29 Jan 2012, at 22:25, Ertugrul Söylemez wrote: A strict-by-default Haskell comes with the implication that you can throw away most of the libraries, including the base library. So yes, a strict-by-default

Re: [Haskell-cafe] Exceeding OS limits for simultaneous socket connections

2012-01-30 Thread Marc Weber
What you can try - reduce amount of threads running at the same time - thus accept less connections. AFAIK the OS has a buffer caching the connection request for a while - thus this may just work. Using STM it would be trivial to implement it: try incrementing a var, if it is 100 fail.

Re: [Haskell-cafe] [Haskell] ANNOUNCE multiarg - parser combinators for command line parsing

2012-01-30 Thread Henning Thielemann
On Sun, 29 Jan 2012, Simon Meier wrote: I'm currently using Neil Mitchell's cmdargs package [1]. How does your package compare to that? Last time I checked cmdargs it was not referential transparent. Is multiarg better in this respect? ___

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Ertugrul Söylemez
Alexander Bernauer alex-hask...@copton.net wrote: On Sun, Jan 29, 2012 at 11:25:09PM +0100, Ertugrul Söylemez wrote: First of all, /learning/ to optimize Haskell can be difficult. The optimizing itself is actually fairly easy in my experience, once you understand how the language works.

Re: [Haskell-cafe] Some thoughts on Type-Directed Name Resolution

2012-01-30 Thread Donn Cave
Quoth Steve Horne sh006d3...@blueyonder.co.uk, On 30/01/2012 07:09, Donn Cave wrote: ((separate . crack . .smallEnd) egg).yolk (f egg).yolk where f = separate . crack . .smallEnd Scary - that .smallEnd worries me. It's like a field is being referenced with some magical context from

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Marc Weber
Replying to all replies at once: Malcolm Wallace At work, we have a strict version of Haskell :-) which proofs that it is worth thinking about it. Ertugrul If you want to save the time to learn how to write efficient Haskell programs, you may want to have a look into the Disciple language.

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Felipe Almeida Lessa
On Mon, Jan 30, 2012 at 2:12 PM, Marc Weber marco-owe...@gmx.de wrote: @ Felipe Almeida Lessa  (suggesting conduits and atto parsec) I mentioned that I already tried it. Counting lines only was a lot slower than counting lines and parsing JSON using PHP. Then please take a deeper look into my

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Roman Leshchinskiy
Marc Weber wrote: Replying to all replies at once: Malcolm Wallace At work, we have a strict version of Haskell :-) which proofs that it is worth thinking about it. But doesn't necessarily prove that it's a good idea. Just (Item id ua t k v) -

[Haskell-cafe] [Haskell Cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Doug McIlroy
Is there any document describing why there is no ghc --strict flag making all code strict by default? Wouldn't such a '--strict' flag turn Haskell/GHC into a better C/gcc compiler? I agree that a strict flag would turn Haskell into C--but that's a perversion of Haskell. Almost all Haskell

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Roman Leshchinskiy
Marc Weber wrote: Replying to all replies at once: Malcolm Wallace At work, we have a strict version of Haskell :-) which proofs that it is worth thinking about it. But doesn't necessarily prove that it's a good idea. Just (Item id ua t k v) -

Re: [Haskell-cafe] Some thoughts on Type-Directed Name

2012-01-30 Thread Simon Peyton-Jones
| What would really, really help me is for someone to have a look at the 'solution' I | posted to the difficulties SPJ saw with the SORF approach. (I ref'd it in my reply to In response to your plea, I took a look at your post

Re: [Haskell-cafe] space leak when repeatedly calling Control.Monad.State.Strict.modify

2012-01-30 Thread Joey Hess
Yves Parès wrote: Have you tried to compile your code with optimisations? I guess GHC's strictness analysis would find strict evaluation is better here. The original code I saw this happen to the wild was built with -O2. I didn't try building the test case with optimisations. -- see shy jo

Re: [Haskell-cafe] Exceeding OS limits for simultaneous socketconnections

2012-01-30 Thread Donn Cave
Quoth Marc Weber marco-owe...@gmx.de, ... - replace getContents conn by something strict and close the handle yourself? (not sure about this.) That's an easy one to try, right? Just force evaluation of the getContents return value, in getMsg. If lazy I/O is the culprit here, it wouldn't be

Re: [Haskell-cafe] ANN: combinatorics

2012-01-30 Thread Balazs Komuves
-- combinatorics 0.1.0 The combinatorics package offers efficient *exact* computation of common combinatorial functions like the binomial coefficients and factorial. (For fast *approximations*, see the

[Haskell-cafe] Speculative Parallelism

2012-01-30 Thread Burak Ekici
Dear List, my question is in which cases, I could understand the speculative parallelism in parallel Haskell? Does the case in which all and the same number of created sparks are converted by both original and second generation strategies, speak of the speculative parallelism effect? If it does

Re: [Haskell-cafe] help with safecopy + acid-state

2012-01-30 Thread Johannes Waldmann
Felipe Almeida Lessa felipe.lessa at gmail.com writes: data T_orig = T_orig Foo $(deriveSafeCopy 0 'base ''T_orig) data T = T Foo Bar $(deriveSafeCopy 0 'extension ''T) instance Migrate T where type MigrateFrom T = T_Orig ... As you can read from deriveSafeCopy's documentation [1],

Re: [Haskell-cafe] help with safecopy + acid-state

2012-01-30 Thread Felipe Almeida Lessa
On Mon, Jan 30, 2012 at 4:46 PM, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: Thanks - which zero? (there are two of them.) You should not change the deriveSafeCopy of your old data type. The only allowed change is renaming your data type (see below). You should increment the version

Re: [Haskell-cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Joachim Breitner
Hi, Am Montag, den 30.01.2012, 10:52 +0100 schrieb Alexander Bernauer: On Sun, Jan 29, 2012 at 11:25:09PM +0100, Ertugrul Söylemez wrote: First of all, /learning/ to optimize Haskell can be difficult. The optimizing itself is actually fairly easy in my experience, once you understand how

Re: [Haskell-cafe] TCP Server

2012-01-30 Thread Mario Blažević
On 12-01-28 06:56 AM, Felipe Almeida Lessa wrote: On Sat, Jan 28, 2012 at 9:40 AM, Yves Parèsyves.pa...@gmail.com wrote: I think there is still no consensus on which iteratee library is the one to use. There are at least iteratee, enumerator, iterIO, conduit, and pipes. The reusability of your

Re: [Haskell-cafe] ANN: combinatorics

2012-01-30 Thread Roman Cheplyaka
* wren ng thornton w...@freegeek.org [2012-01-29 17:30:34-0500] On 1/29/12 5:48 AM, Roman Cheplyaka wrote: * wren ng thorntonw...@freegeek.org [2012-01-28 23:06:08-0500] * Math.Combinatorics.Primes: provides the prime numbers via Runciman's lazy wheel sieve algorithm. Provided here since

Re: [Haskell-cafe] [Haskell Cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Richard O'Keefe
On 31/01/2012, at 5:47 AM, Doug McIlroy wrote: Is there any document describing why there is no ghc --strict flag making all code strict by default? Wouldn't such a '--strict' flag turn Haskell/GHC into a better C/gcc compiler? I agree that a strict flag would turn Haskell into C--but

Re: [Haskell-cafe] [Haskell Cafe] strict version of Haskell - doesit exist?

2012-01-30 Thread Donn Cave
Quoth Richard O'Keefe o...@cs.otago.ac.nz, ... On the other hand, a designed-to-be-strict language-and-libraries with close-to-Haskell *syntax* would be nice. I recently described F# as combining the beauty of Caml with the functional purity of C# -- both of course are like the snakes of

Re: [Haskell-cafe] [Haskell] ANNOUNCE multiarg - parser combinators for command line parsing

2012-01-30 Thread Omari Norman
On Mon, Jan 30, 2012 at 03:19:47PM +0100, Henning Thielemann wrote: On Sun, 29 Jan 2012, Simon Meier wrote: I'm currently using Neil Mitchell's cmdargs package [1]. How does your package compare to that? Last time I checked cmdargs it was not referential transparent. Is multiarg better

[Haskell-cafe] Invitation to connect on LinkedIn

2012-01-30 Thread Sunny Basi
LinkedIn I'd like to add you to my professional network on LinkedIn. - Sunny Sunny Basi Software Development Engineer Intern at Amazon.com Greater Seattle Area Confirm that you know Sunny Basi: