Re: [Haskell-cafe] What is the role of $!?

2007-11-18 Thread Andrew Coppin
PR Stanley wrote: Hi okay, so $! is a bit like $ i.e. the equivalent of putting parentheses around the righthand expression. I'm still not sure of the difference between $ and $!. Maybe it's because I don't understand the meaning of strict application. While we're on the subject, what's meant

Re: [Haskell-cafe] Stream fusion for Hackage

2007-11-18 Thread Tom Schrijvers
On Sat, 17 Nov 2007, Don Stewart wrote: Just a quick announce: the stream fusion library for lists, that Duncan Coutts, Roman Leshchinskiy and I worked on earlier this year is now available on Hackage as a standalone package:

Re: [Haskell-cafe] Stream fusion for Hackage

2007-11-18 Thread Andrew Coppin
Don Stewart wrote: Just a quick announce: the stream fusion library for lists, that Duncan Coutts, Roman Leshchinskiy and I worked on earlier this year is now available on Hackage as a standalone package: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/stream-fusion-0.1.1 As

Re: [Haskell-cafe] Letting the darcs test fail, if QuickCheck tests fail

2007-11-18 Thread Henning Thielemann
On Tue, 30 Oct 2007, David Roundy wrote: On Tue, Oct 30, 2007 at 05:24:21PM +0100, Henning Thielemann wrote: When following the description on http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program#Add_some_automated_testing:_QuickCheck then darcs will run the QuickCheck

Re: [Haskell-cafe] New demo/test program for Yhc Javascript backend

2007-11-18 Thread Bit Connor
This is very cool! I will definitely be playing with this. Safari 3.0.2 for windows gives an error though: Maximum call stack size exceeded. http://darcs.haskell.org/yhc/web/jsdemos/HsWTKDemo.html Line: 87 Sometimes it gives the same error but instead of line 87 with line 314, and other

Re: [Haskell-cafe] New demo/test program for Yhc Javascript backend

2007-11-18 Thread Dimitry Golubovsky
Bit, On Nov 18, 2007 8:41 AM, Bit Connor [EMAIL PROTECTED] wrote: Safari 3.0.2 for windows gives an error though: Maximum call stack size exceeded. http://darcs.haskell.org/yhc/web/jsdemos/HsWTKDemo.html Line: 87 This is in fact a huge progress for Safari ;) Year ago, Safari on Mac

Re: [Haskell-cafe] What is the role of $!?

2007-11-18 Thread Paul Johnson
Andrew Coppin wrote: PS. There is a technical distinction between the terms lazy and non-strict, and also the opposite terms eger and strict. I couldn't tell you what that is. As I understand it, the distinction is between the mathematical term non-strict and the implementation method of

Re: [Haskell-cafe] What is the role of $!?

2007-11-18 Thread David Menendez
On Nov 18, 2007 9:23 AM, Paul Johnson [EMAIL PROTECTED] wrote: Obviously there is a strong correspondance between a thunk and a partly-evaluated expression. Hence in most cases the terms lazy and non-strict are synonyms. But not quite. For instance you could imagine an evaluation engine on

Re: [Haskell-cafe] What is the role of $!?

2007-11-18 Thread Lauri Alanko
Please note that if you're using GHC, bang patterns are often much more convenient than $! or seq when you want to enforce strictness: http://www.haskell.org/ghc/docs/latest/html/users_guide/bang-patterns.html Lauri ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: Knot tying vs monads

2007-11-18 Thread apfelmus
Brent Yorgey wrote: but isn't there a short text that describes in detail why foldl' is different from foldl and why foldr is better in many cases? I thought this faq would have been cached already :) Perhaps you're thinking of http://haskell.org/haskellwiki/Stack_overflow ? Ah, that looks

[Haskell-cafe] Re: What is the role of $!?

2007-11-18 Thread apfelmus
Paul Johnson wrote: Andrew Coppin wrote: PS. There is a technical distinction between the terms lazy and non-strict, and also the opposite terms eger and strict. I couldn't tell you what that is. As I understand it, the distinction is between the mathematical term non-strict and the

[Haskell-cafe] Properties of monads

2007-11-18 Thread Radosław Grzanka
Hello, I am writing some toys programs to learn and try to apply Monads properties (without success, I must say). Although I spent half a day on this code: http://hpaste.org/3957 I couldn't simplify (shorten) getStrip function. After reading Doing it with class (

Re: [Haskell-cafe] Properties of monads

2007-11-18 Thread Radosław Grzanka
Hi Benja, You can find MaybeT here: http://www.haskell.org/haskellwiki/New_monads/MaybeT Thank you, that you spent some time figuring this out. This is exacly what I have expected. (This print was debug leftovers). Now I will try to understand how exacly this works. My big thanks to you

Re: [Haskell-cafe] Properties of monads

2007-11-18 Thread Benja Fallenstein
Hi Radosław, You should be able to write this with MaybeT as follows: getStrip :: IO ( Maybe String ) getStrip = runMaybeT $ do pageContent - liftIO $ downloadFile mainPageAddress let x = patternForStrip pageContent print x z - x liftIO $ downloadFile $ mainPageAddress ++ z

Re: [Haskell-cafe] What is the role of $!?

2007-11-18 Thread Andrew Coppin
Lauri Alanko wrote: Please note that if you're using GHC, bang patterns are often much more convenient than $! or seq when you want to enforce strictness: http://www.haskell.org/ghc/docs/latest/html/users_guide/bang-patterns.html Wait, so... f x = x + 1; f $! (a + b) and f !x = x + 1;

Re: [Haskell-cafe] Properties of monads

2007-11-18 Thread Benja Fallenstein
On 11/18/07, Benja Fallenstein [EMAIL PROTECTED] wrote: Hi Radosław, You should be able to write this with MaybeT as follows: Correction, sorry. The code in my original mail doesn't take care of converting the 'Maybe's returned by the functions you're calling into 'MaybeT's. The following

Re[2]: [Haskell-cafe] What is the role of $!?

2007-11-18 Thread Bulat Ziganshin
Hello Andrew, Sunday, November 18, 2007, 10:04:15 PM, you wrote: Wait, so... f x = ... g = f $! x and f !x = ... g = f x mean the same thing? in both cases, x is evaluated before evaluating body of x. but of course, this happens only at the moment when value of (f x) itself is required

Re: [Haskell-cafe] Stream fusion for Hackage

2007-11-18 Thread Don Stewart
Tom.Schrijvers: On Sat, 17 Nov 2007, Don Stewart wrote: Just a quick announce: the stream fusion library for lists, that Duncan Coutts, Roman Leshchinskiy and I worked on earlier this year is now available on Hackage as a standalone package:

Re: [Haskell-cafe] Network.HTTP problem

2007-11-18 Thread Radosław Grzanka
Hello again Bjorn, This is now fixed and a new release with the fix is available from http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HTTP-3001.0.1 You have left debug flag on in the library code. Thanks, Radek. -- Codeside: http://codeside.org/ Przedszkole Miejskie nr 86 w

Re: [Haskell-cafe] Network.HTTP problem

2007-11-18 Thread Bjorn Bringert
On Nov 18, 2007, at 22:08 , Radosław Grzanka wrote: Hello again Bjorn, This is now fixed and a new release with the fix is available from http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ HTTP-3001.0.1 You have left debug flag on in the library code. Thanks, Radek. Dammit. I

[Haskell-cafe] Performance problems with parallelizing QuickCheck using channels (Control.Concurrent.Chan)

2007-11-18 Thread Gwern Branwen
(My previous email showed up as mangled in http://www.haskell.org/pipermail/haskell-cafe/2007-November/034717.html; I think the PGP signature was the problem; I removed it and sent it again, but it was put into moderation for size, and hasn't been released yet - so I'm sending this a third time

Re: [Haskell-cafe] Performance problems with parallelizing QuickCheck using channels (Control.Concurrent.Chan)

2007-11-18 Thread Don Stewart
gwern0: (My previous email showed up as mangled in http://www.haskell.org/pipermail/haskell-cafe/2007-November/034717.html; I think the PGP signature was the problem; I removed it and sent it again, but it was put into moderation for size, and hasn't been released yet - so I'm sending this a

[Haskell-cafe] An interesting monad: Prompt

2007-11-18 Thread Ryan Ingram
(This message is a literate haskell file. Code for the Prompt monad is preceded by ; code for my examples is preceded by ] and isn't complete, but intended for illustration.) I've been trying to implement a few rules-driven board/card games in Haskell and I always run into the ugly problem of

[Haskell-cafe] Scheme in Haskell, Parsec Example, how to add scheme comments

2007-11-18 Thread Berlin Brown
I am sure many of you have looked at the scheme in haskell example that is on the web by Jonathan Tang. If you are familiar with the code, I need a little help trying to add scheme style comments: ; This is my comment I added this code here and I think it works (I replaced the name

[Haskell-cafe] Re: Scheme in Haskell, Parsec Example, how to add scheme comments

2007-11-18 Thread Berlin Brown
On Nov 18, 2007 7:32 PM, Berlin Brown [EMAIL PROTECTED] wrote: I am sure many of you have looked at the scheme in haskell example that is on the web by Jonathan Tang. If you are familiar with the code, I need a little help trying to add scheme style comments: ; This is my comment I added

Re: [Haskell-cafe] Re: Scheme in Haskell, Parsec Example, how to add scheme comments

2007-11-18 Thread Thomas Schilling
On Sun, 2007-11-18 at 19:37 -0500, Berlin Brown wrote: On Nov 18, 2007 7:32 PM, Berlin Brown [EMAIL PROTECTED] wrote: I am sure many of you have looked at the scheme in haskell example that is on the web by Jonathan Tang. If you are familiar with the code, I need a little help trying to add