Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-28 Thread Albert Y. C. Lai
There are two flavours of MonadState, Control.Monad.State.Lazy and Control.Monad.State.Strict. There are two flavours of ByteString, Data.ByteString.Lazy and Data.Bytestring (whose doc says strict). There are two flavours of I/O libraries, lazy and strict. There are advices of the form: the

Re: [Haskell-cafe] How hard is it to start a web startup using Haskell?

2011-12-28 Thread Gracjan Polak
Haisheng Wu freizl at gmail.com writes: Turns out that those guys doing start-up with Haskell are already expert at Haskell. Hence choosing Haskell is more straightforward. We hope to become experts while doing Haskell. I'm thinking of using Haskell since it looks cool and beautiful.

Re: [Haskell-cafe] MIDI-controlled application

2011-12-28 Thread Tim Baumgartner
Hi Tom! [...] Currently I'm using a monad that combines Parsec (with MIDI event stream) and a Writer (that writes commands that should result in IO). It's done in a way that during running the monad, many parses can be done and failing parses roll back the parser state so that a new

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-28 Thread Yves Parès
When I explain to people what strict/lazy/eager mean, I often say something like : - Adjectives eager and lazy apply *only* to a global evaluation method: * eager* is C evaluation style and *lazy* is that of Haskell. - Adjective strict can be applied *both* to a global evaluation method and a

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-28 Thread Yves Parès
- Adjective strict can be applied *both* to a global evaluation method and a specific function: if applied to an eval method then it's a synonym of strict I of course meant a synonym of *eager*. Sorry. I admit this definition might be a little liberal, but it helps understand. 2011/12/28 Yves

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2011-12-28 Thread AUGER Cédric
Le Mon, 26 Dec 2011 19:30:20 -0800, Alexander Solla alex.so...@gmail.com a écrit : So we give meaning to syntax through our semantics. That is what this whole conversation is all about. I am proposing we give Haskell bottoms semantics that bring it in line with the bottoms from various

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-28 Thread Thiago Negri
I got a glimpse of understanding of what you are talking about after reading the wiki [1]. Still difficult to reason about the difference between lazy and non-strict without taking a look at the text. I hope somebody will make an effort to better explain the differences and persist it in the

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-28 Thread Thiago Negri
I did read other wiki pages, and I guess I finally got it. Anyone who still feel lost, take a look at them [1,2,3,4]. If the HaskellWiki is right, then the Wikipedia article for evaluation strategies [5] is a bit misleading, as it classifies optimistic evaluation under nondeterministic strategies

Re: [Haskell-cafe] Reifying case expressions [was: Re: On stream processing, and a new release of timeplot coming]

2011-12-28 Thread Brent Yorgey
On Mon, Dec 26, 2011 at 12:32:13PM +0400, Eugene Kirpichov wrote: 2011/12/26 Gábor Lehel illiss...@gmail.com On Sun, Dec 25, 2011 at 9:19 PM, Eugene Kirpichov ekirpic...@gmail.com wrote: Hello Heinrich, Thanks, that's sure some food for thought! A few notes: * This is

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-28 Thread Jon Fairbairn
Thiago Negri evoh...@gmail.com writes: Lazy evaluation is one implementation of non-strict semantics, where the arguments are evaluated only when they are needed. I would say this: * non-strict semantics require that no argument is evaluated unless needed. * lazy evaluation is an

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-28 Thread Thiago Negri
2011/12/28 Jon Fairbairn jon.fairba...@cl.cam.ac.uk: * non-strict semantics require that no argument is evaluated  unless needed. That's not the case on optimistic evaluation. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] strict, lazy, non-strict, eager

2011-12-28 Thread Jon Fairbairn
Thiago Negri evoh...@gmail.com writes: 2011/12/28 Jon Fairbairn jon.fairba...@cl.cam.ac.uk: * non-strict semantics require that no argument is evaluated  unless needed. That's not the case on optimistic evaluation. Oops, yes. I should have said something like “non-strict semantics require

[Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Steve Horne
This is just my view on whether Haskell is pure, being offered up for criticism. I haven't seen this view explicitly articulated anywhere before, but it does seem to be implicit in a lot of explanations - in particular the description of Monads in SBCs Tackling the Awkward Squad. I'm entirely

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread AUGER Cédric
Le Wed, 28 Dec 2011 17:39:52 +, Steve Horne sh006d3...@blueyonder.co.uk a écrit : This is just my view on whether Haskell is pure, being offered up for criticism. I haven't seen this view explicitly articulated anywhere before, but it does seem to be implicit in a lot of explanations -

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Heinrich Apfelmus
Steve Horne wrote: This is just my view on whether Haskell is pure, being offered up for criticism. I haven't seen this view explicitly articulated anywhere before, but it does seem to be implicit in a lot of explanations - in particular the description of Monads in SBCs Tackling the Awkward

Re: [Haskell-cafe] Haskell meta-programming

2011-12-28 Thread Heinrich Apfelmus
John Lato wrote: From: Heinrich Apfelmus apfel...@quantentunnel.de * Meta-programming / partial evaluation. When designing a DSL, it is often the case that you know how to write an optimizing compiler for your DSL because it's usually a first-order language. However, trying to squeeze that into

[Haskell-cafe] [ANNOUNCE] HaskellNet-0.3 released

2011-12-28 Thread Jonathan Daugherty
Hi all, I'm pleased to announce the release of HaskellNet, version 0.3. Get it on Hackage: http://hackage.haskell.org/package/HaskellNet-0.3 This release has quite a few changes; to get a comprehensive summary, see the CHANGELOG included in the package. My aim with this release was to get

[Haskell-cafe] space-efficient, composable list transformers [was: Re: Reifying case expressions [was: Re: On stream processing, and a new release of timeplot coming]]

2011-12-28 Thread Sebastian Fischer
Hello Heinrich, On Tue, Dec 27, 2011 at 1:09 PM, Heinrich Apfelmus apfel...@quantentunnel.de wrote: Sebastian Fischer wrote: all functions defined in terms of `ListTo` and `interpret` are spine strict - they return a result only after consuming all input list constructors. Indeed, the

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Steve Horne
On 28/12/2011 20:44, Heinrich Apfelmus wrote: Steve Horne wrote: This is just my view on whether Haskell is pure, being offered up for criticism. I haven't seen this view explicitly articulated anywhere before, but it does seem to be implicit in a lot of explanations - in particular the

[Haskell-cafe] Windows: openFile gives permission denied when file in use

2011-12-28 Thread Michael Snoyman
Hi all, I just received a bug report from a client that, when an input file is open in FrameMaker, my program gives a permission denied error. This bug is reproducible with a simple Haskell program: import System.IO main = do putStrLn here1 h - openFile filename.txt ReadMode

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Jerzy Karczmarczuk
Le 28/12/2011 22:45, Steve Horne a écrit : Yes - AT COMPILE TIME by the principle of referential transparency it always returns the same action. However, the whole point of that action is that it might potentially be executed (with potentially side-effecting results) at run-time. Pure at

[Haskell-cafe] [ANNOUNCEMENT] SBV 0.9.24 is out

2011-12-28 Thread Levent Erkok
Hello all, SBV 0.9.24 is out: http://hackage.haskell.org/package/sbv In short, SBV allows for scripting SMT solvers directly within Haskell, with built-in support for bit-vectors and unbounded integers. (Microsoft's Z3 SMT solver, and SRI's Yices can be used as backends.) New in this release

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Steve Horne
On 28/12/2011 22:01, Jerzy Karczmarczuk wrote: Le 28/12/2011 22:45, Steve Horne a écrit : Yes - AT COMPILE TIME by the principle of referential transparency it always returns the same action. However, the whole point of that action is that it might potentially be executed (with potentially

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Bernie Pope
On 29 December 2011 10:51, Steve Horne sh006d3...@blueyonder.co.uk wrote: As Simon Baron-Cohen says in Tackling the Awkward Squad... I think you've mixed up your Simons; that should be Simon Peyton Jones. Cheers, Bernie. ___ Haskell-Cafe mailing

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Steve Horne
On 28/12/2011 23:56, Bernie Pope wrote: On 29 December 2011 10:51, Steve Hornesh006d3...@blueyonder.co.uk wrote: As Simon Baron-Cohen says in Tackling the Awkward Squad... I think you've mixed up your Simons; that should be Simon Peyton Jones. Oops - sorry about that. FWIW - I'm diagnosed

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Thiago Negri
We can do functional programming on Java. We use all the design patterns for that. At the very end, everything is just some noisy, hairy, side-effectfull, gotofull machinery code. The beauty of Haskell is that it allows you to limit the things you need to reason about. If I see a function with

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Steve Horne
Sorry for the delay. I've written a couple of long replies already, and both times when I'd finished deleting all the stupid stuff there was nothing left - it seems I'm so focussed on my own view, I'm struggling with anything else today. Maybe a third try... On 28/12/2011 19:38, AUGER Cédric

Re: [Haskell-cafe] Windows: openFile gives permission denied when file in use

2011-12-28 Thread Antoine Latter
On Wed, Dec 28, 2011 at 3:52 PM, Michael Snoyman mich...@snoyman.com wrote: Hi all, I just received a bug report from a client that, when an input file is open in FrameMaker, my program gives a permission denied error. This bug is reproducible with a simple Haskell program: import System.IO

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Antoine Latter
On Wed, Dec 28, 2011 at 3:45 PM, Steve Horne sh006d3...@blueyonder.co.uk wrote: On 28/12/2011 20:44, Heinrich Apfelmus wrote: Steve Horne wrote: This is just my view on whether Haskell is pure, being offered up for criticism. I haven't seen this view explicitly articulated anywhere before,

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Steve Horne
On 29/12/2011 00:57, Thiago Negri wrote: We can do functional programming on Java. We use all the design patterns for that. At the very end, everything is just some noisy, hairy, side-effectfull, gotofull machinery code. The beauty of Haskell is that it allows you to limit the things you need

Re: [Haskell-cafe] Windows: openFile gives permission denied when file in use

2011-12-28 Thread Chris Wong
On Thu, Dec 29, 2011 at 2:45 PM, Antoine Latter aslat...@gmail.com wrote: [...] When GHC opens files for reading, it asks windows to disallow write access to the file. I'm guessing that Framemaker has the file open for writing, so GHC can't get that permission. In fact, this is required

Re: [Haskell-cafe] Windows: openFile gives permission denied when file in use

2011-12-28 Thread Steve Schafer
On Thu, 29 Dec 2011 16:10:03 +1300, chris...@gmail.com wrote: In fact, this is required behavior according to the Haskell Report: Implementations should enforce as far as possible, at least locally to the Haskell process, multiple-reader single-writer locking on files. That is, there may

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Steve Horne
On 29/12/2011 01:53, Antoine Latter wrote: The beauty of the IO monad is that it doesn't change anything about purity. Applying the function bar :: Int - IO Int to the value 2 will always give the same result: Yes - AT COMPILE TIME by the principle of referential transparency it always

Re: [Haskell-cafe] Windows: openFile gives permission denied when file in use

2011-12-28 Thread Antoine Latter
On Wed, Dec 28, 2011 at 3:52 PM, Michael Snoyman mich...@snoyman.com wrote: Hi all, I just received a bug report from a client that, when an input file is open in FrameMaker, my program gives a permission denied error. This bug is reproducible with a simple Haskell program: This bug and its