[Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-01 Thread Mark Spezzano
Hi, Can someone please give me a _lucid_ and _simple_ explanation of exactly how continuations can be used in Haskell? I've already had a look at most of the tutorials and explanations on the web, but I'm still confused. Continuations and CPS have me baffled. (I have most of the Haskell

Re: [Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-01 Thread Heinrich Apfelmus
Mark Spezzano wrote: Can someone please give me a _lucid_ and _simple_ explanation of exactly how continuations can be used in Haskell? I've already had a look at most of the tutorials and explanations on the web, but I'm still confused. Continuations and CPS have me baffled. (I have most of

Re: [Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-01 Thread Mark Spezzano
Hi Heinrich, I'm really looking to use the Cont monad itself--but the link you gave me is also helpful, so thank you. If anyone else has words of wisdom to add to this thread please feel free to pitch in. Thanks, Mark On 01/10/2011, at 5:08 PM, Heinrich Apfelmus wrote: Mark Spezzano

[Haskell-cafe] Haskell Cloud and Closures

2011-10-01 Thread Fred Smith
I've built a little program to compute the plus function remotely by using Cloud Haskell: http://pastebin.com/RK4AcWFM but i faced an unfortunate complication, what i would like to do is to send a function to another host, no matter if the function is locally declared or at the top level. In

Re: [Haskell-cafe] Haskell Cloud and Closures

2011-10-01 Thread Erik de Castro Lopo
Fred Smith wrote: I've built a little program to compute the plus function remotely by using Cloud Haskell: http://pastebin.com/RK4AcWFM but i faced an unfortunate complication, what i would like to do is to send a function to another host, no matter if the function is locally declared or

Re: [Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-01 Thread Yves Parès
Having worked with the operational-package, I only can recommend it. In fact I was trying to do the same thing you are now. The only thing is that operational needs the use of GADTs, which come as an extension, but still are a useful and heavily used feature. BTW Heinrich, the evalState

Re: [Haskell-cafe] Haskell Cloud and Closures

2011-10-01 Thread Yves Parès
I'm curious, what are the advantages of Cloud Haskell over pakages like rpc? Why isn't Cloud Haskell on Hackage? 2011/10/1 Erik de Castro Lopo mle...@mega-nerd.com Fred Smith wrote: I've built a little program to compute the plus function remotely by using Cloud Haskell:

Re: [Haskell-cafe] Haskell Cloud and Closures

2011-10-01 Thread Fred Smith
On 1 Ott, 12:03, Erik de Castro Lopo mle...@mega-nerd.com wrote: I was at the Haskell Symposium where this paper was presented. This limitation is a known limitation and cannot currently be worked around other than my moving whatever is required to the top level. Erik -- do you know if

Re: [Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-01 Thread Ozgur Akgun
Hi. On 1 October 2011 11:55, Yves Parès limestr...@gmail.com wrote: BTW Heinrich, the evalState (sequence . repeat . State $ \s - (s,s+1)) 0 at the end doesn't work anymore. It should be replaced by : evalState (sequence . repeat . StateT $ \s - Identity (s,s+1)) 0 Or equivalently:

Re: [Haskell-cafe] Build local-gc branch of GHC

2011-10-01 Thread Andreas Voellmy
Thanks to Simon Marlow for helping me resolve this problem. After step 2, delete the following directories from the source tree: libraries/dph libraries/vector libraries/primitive then proceed with step 3 and 4 (boot, configure, make). This worked for me. Regards, Andreas On Mon, Sep 26, 2011

[Haskell-cafe] Parameters and patterns

2011-10-01 Thread José Romildo Malaquias
Hello. When studing programming languages I have learned that parameter is a variable (name) that appears in a function definition and denotes the value to which the function is applied when the function is called. Argument is the value to which the function is applied. The parameter allows the

Re: [Haskell-cafe] Parameters and patterns

2011-10-01 Thread Yves Parès
I think every people will have different terms. For instance, for my teachers, argument and parameter were synonyms, and : in the definition : f x = x + 3 x was a _formal_ parameter (or argument) and in f 32 32 was the _effective_ parameter. So, short answer: don't bother. Context makes things

Re: [Haskell-cafe] Haskell Cloud and Closures

2011-10-01 Thread Chris Smith
On Sat, 2011-10-01 at 02:16 -0700, Fred Smith wrote: In seems to me that in cloud haskell library the function's closures can be computed only with top-level ones, is it possible to compute the closure at runtime of any function and to send it to another host? The current rule is a bit overly

Re: [Haskell-cafe] Haskell Cloud and Closures

2011-10-01 Thread David Barbour
On Sat, Oct 1, 2011 at 4:54 AM, Fred Smith ilikequot...@katamail.comwrote: do you know if there is another way either to compute the closure of a function or to serialize it in order to send the computation to another host? You'll need to capture the functions as serializable data while it

Re: [Haskell-cafe] Parameters and patterns

2011-10-01 Thread Wolfgang Braun
Hello, I think you have to remember that is x in f x = 2 * x + 1 is just a name for the parameter and not the parameter itself. If you look at g (_:xs) = xs (_:xs) is something similar as a name. You might say '(_:xs)' stands for the parameter (you can't say it is the name of the

[Haskell-cafe] ANN: hledger 0.16

2011-10-01 Thread Simon Michael
I'm pleased to announce version 0.16 of the hledger packages. This is a stability/bugfix/polish release (which may become the pattern for even-numbered releases in future.) hledger is a library and set of user tools for working with financial data (or anything that can be tracked in a

[Haskell-cafe] Installing hledger-web

2011-10-01 Thread Arnaud Bailly
Hello, I installed hledger and tried installing hledger-web but got the following error: [2 of 8] Compiling Hledger.Web.Settings.StaticFiles ( Hledger/Web/Settings/StaticFiles.hs, dist/build/hledger-web/hledger-web-tmp/Hledger/Web/Settings/StaticFiles.o ) Hledger/Web/Settings/StaticFiles.hs:1:1:

Re: [Haskell-cafe] ANN: Peggy 0.2.1

2011-10-01 Thread Roman Cheplyaka
* Hideyuki Tanaka tan...@preferred.jp [2011-09-29 04:53:59+0900] Hello, all. I have released 'Peggy' a new parser generator . It is based on Parsing Expression Grammer (PEG) [1], and generates efficient packrat parsers. How does it compare to frisby?

Re: [Haskell-cafe] ANNOUNCE: GA-1.0, a library for working with genetic algorithms

2011-10-01 Thread Kenneth Hoste
Hi Thomas, On 30 Sep 2011, at 03:42, Thomas DuBuisson wrote: This is neat - thanks for putting in the time and effort (and releasing the work to Hackage). My pleasure. :) Happy to share the stuff I come up with during my daily commutes. ;-) A few questions: * What GA-nerdy things does

Re: [Haskell-cafe] Installing hledger-web

2011-10-01 Thread Simon Michael
Thanks for the report Arnaud. Can you try again with cabal install hledger-web -fproduction ? That flag is supposed to be default but it sounds like I messed up. -Simon On 10/1/11 1:42 PM, Arnaud Bailly wrote: Hello, I installed hledger and tried installing hledger-web but got the following

Re: [Haskell-cafe] Really Simple explanation of Continuations Needed

2011-10-01 Thread wren ng thornton
Hello, Oleg has a introduction for delimited continuations which he presented during ICFP: http://okmij.org/ftp/continuations/index.html#tutorial Of course, it's worth mentioning that the Cont monad is actually doing delimited continuations, cf.:

Re: [Haskell-cafe] Parameters and patterns

2011-10-01 Thread wren ng thornton
On 10/1/11 10:27 AM, José Romildo Malaquias wrote: But in the definition g (_:xs) = xs what is the parameter of the function g? Is it the pattern (_:xs)? If so then a parameter is not necessarily a variable anymore, and that seems very strange. And what is xs? Is it a parameter, although it

[Haskell-cafe] ByteString install issues with GHC 7.0.3 on Windows 7

2011-10-01 Thread Ralph Hodgson
This morning I was successfully running BlazeHtml on Windows 7. Then I installed some libraries from other packages and BlazeHtml broke. I then decided to go from ghc 6.12.1 to ghc 7.0.3 and reinstall everything. BlazeHtml installed OK. But my program also needed ByteString. So I did the

Re: [Haskell-cafe] ByteString install issues with GHC 7.0.3 on Windows 7

2011-10-01 Thread Ivan Lazar Miljenovic
On 2 October 2011 14:31, Ralph Hodgson rhodg...@topquadrant.com wrote: This morning I was successfully running BlazeHtml on Windows 7. Then I installed some libraries from other packages and BlazeHtml broke. I then decided to go from ghc 6.12.1 to ghc 7.0.3 and reinstall everything.

Re: [Haskell-cafe] Installing hledger-web

2011-10-01 Thread Arnaud Bailly
Thanks Simon. Unfortunately, I got the same error. On Sun, Oct 2, 2011 at 2:50 AM, Simon Michael si...@joyful.com wrote: Thanks for the report Arnaud. Can you try again with cabal install hledger-web -fproduction ? That flag is supposed to be default but it sounds like I messed up. -Simon