Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  FW: question (Benjamin Edwards)
   2. Re:  Monads in javascript (Ertugrul Soeylemez)
   3. Re:  Monads in javascript (Tony Morris)
   4. Re:  FW: question (Roelof Wobben)
   5. Re:  Monads in javascript (Ertugrul Soeylemez)


----------------------------------------------------------------------

Message: 1
Date: Thu, 14 Jul 2011 09:25:33 +0100
From: Benjamin Edwards <[email protected]>
Subject: Re: [Haskell-beginners] FW: question
To: Luca Ciciriello <[email protected]>
Cc: [email protected]
Message-ID:
        <CAN6k4nhzT6dA4fDh=-fr_jtegnzkmtau9jt0ki2euhsxkm-...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

The first problem I see is that "x <--" is wrong... it should be just x <-,
a single hyphen.

On 14 Jul 2011 09:18, "Luca Ciciriello" <[email protected]> wrote:

Hi.
On wich system are you using GHCi ? Probably I missed this information from
the previous mail.

I'm using GHC 7.0.4 on MacOS X 10.6.8 (Xcode 4) and all works fine with [x^2
| x <- [1..10]].

You can try to see if you installation of ghc is ok typing "ghc-pkg list"
from a console, or using the command ghc -v to see if there are some strange
notification.

Luca.



On Jul 14, 2011, at 9:55 AM, Roelof Wobben wrote:

>
> Oke,
>
>
> I tried with Ghci 7.03 on the...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110714/299727ea/attachment-0001.htm>

------------------------------

Message: 2
Date: Thu, 14 Jul 2011 11:01:22 +0200
From: Ertugrul Soeylemez <[email protected]>
Subject: Re: [Haskell-beginners] Monads in javascript
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Mats Rauhala <[email protected]> wrote:

> I'm trying to grok continuation passing style, but for now it just
> seems to complicate and/or slow down code (stack)

In general CPS will even improve efficiency, in some cases
asymptotically [1,2,3], but that's not their main point.  Delimited
continuations are the mother of all control constructs, so you can
implement many kinds of control flow like concurrency (coroutines),
resumable exceptions (or basic exceptions for that matter), forks and
reunions, etc.

Many Haskell abstractions make use of them; iteratees to name one, on
which I rely heavily.  Also most of the libraries I upload to Hackage
use continuations a lot.

For a web application continuations help a lot with some of the
difficulties of the stateless HTTP, for example form processing and
session management.  Along with every link goes a continuation, which is
the logical future of the computation.  This enables you to write your
web application almost totally disregarding the statelessness, like your
application would talk to a local user on a terminal.  The user session
becomes a coroutine of the web server.

[1] http://www.iai.uni-bonn.de/~jv/mpc08.pdf
[2] http://hackage.haskell.org/package/monad-ran
[3] http://comonad.com/reader/2011/free-monads-for-less/


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110714/b4333c92/attachment-0001.pgp>

------------------------------

Message: 3
Date: Thu, 14 Jul 2011 19:19:57 +1000
From: Tony Morris <[email protected]>
Subject: Re: [Haskell-beginners] Monads in javascript
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/07/11 19:01, Ertugrul Soeylemez wrote:
> Also most of the libraries I upload to Hackage use continuations a
> lot.
Do you have a few examples?

- -- 
Tony Morris
http://tmorris.net/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4etLwACgkQmnpgrYe6r60BfgCeMHNVU+xZfZjqQmmbyFs0Ep0V
0sIAn1ssPQXqeVakyTU3xC2xynuOg9jg
=mLjy
-----END PGP SIGNATURE-----




------------------------------

Message: 4
Date: Thu, 14 Jul 2011 09:46:42 +0000
From: Roelof Wobben <[email protected]>
Subject: Re: [Haskell-beginners] FW: question
To: <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"



Hello 

 

That was the problem.

When I do <- instead of <-- I see outcome.

So this problem is also solved.

 

Everyone thanks for the help and patience.

 

Roelof


________________________________
> Date: Thu, 14 Jul 2011 09:25:33 +0100 
> Subject: Re: [Haskell-beginners] FW: question 
> From: [email protected] 
> To: [email protected] 
> CC: [email protected]; [email protected] 
> 
> 
> The first problem I see is that "x <--" is wrong... it should be just x 
> <-, a single hyphen. 
> 
> On 14 Jul 2011 09:18, "Luca Ciciriello" 
> <[email protected]<mailto:[email protected]>> 
> wrote: 
> 
> Hi. 
> On wich system are you using GHCi ? Probably I missed this information 
> from the previous mail. 
> 
> I'm using GHC 7.0.4 on MacOS X 10.6.8 (Xcode 4) and all works fine with 
> [x^2 | x <- [1..10]]. 
> 
> You can try to see if you installation of ghc is ok typing "ghc-pkg 
> list" from a console, or using the command ghc -v to see if there are 
> some strange notification. 
> 
> Luca. 
> 
> 
> On Jul 14, 2011, at 9:55 AM, Roelof Wobben wrote: 
> 
> > 
> > Oke, 
> > 
> > 
> > I tried with Ghci 7.03 on the...                                      


------------------------------

Message: 5
Date: Thu, 14 Jul 2011 11:51:26 +0200
From: Ertugrul Soeylemez <[email protected]>
Subject: Re: [Haskell-beginners] Monads in javascript
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Tony Morris <[email protected]> wrote:

> > Also most of the libraries I upload to Hackage use continuations a
> > lot.
>
> Do you have a few examples?

The contstuff library is probably the most important example here.  It
is an advanced monad transformer library with many features not found in
other libraries like mtl or monadLib.  But it takes some time to get
used to the CPS-iness and the slightly different semantics following it.

Other examples are ihttp, ismtp and netlines, which use contstuff and
the enumerator library, both CPS-heavy libraries.  Unlike other
libraries I regard the iteratee interface as a feature, not as an
implementation detail which should be hidden.

And for the sake of completeness the dnscache library is a caching DNS
resolver library, which also uses contstuff and provides a StateT
interface for those, who don't like IO-global state.


Greets,
Ertugrul


- -- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAwAGBQJOHrweAAoJENVqN/rl3Y0RJakQALVeXbTFBFwp3nUbHVfFM4lb
y0sp8LMoAh/lXz5dziJ1UScLOVorztz0c1ppmMlITDjp3eSkc4RryqKdovhOJJUt
9oGVY/rQklr/sMZlIOGTQIEU2fl0nmZpP3gkKGV4bSBfPozN8F6r5o2OgRW412rq
cHOCTVK+5HxNGtBN46cntV8sByln1xhfAYma3l65FGJlsN9FNBC4vxzJO1nfAHwy
75Ml8XLLD1cqcCr43gP7yJmZ6NZvqKjikzptn8QIxKnXgVqMnL0lKqTKSPMHgZPs
iWVLhj2BEXxqNmxL8Xzqf6XCsBtBrJsQupOdUAUkH630iyMB34zoVosRyIbjBF18
S7gF2QcxiqxDpbpzqjSJcMffcsAGeBPVdymEEtd8dJEMuuW1D7+tsRC3gm/aYZJ1
TV+yAxyok+f0jZ08y9yTjiMatSNXzNON/NQz7ORMX7jmi2UvFrlNB9OffA424g9a
392SNxfhfhBKmdh3J91EK8feXozbtvSP2t+0rt/Ie5Lj6OrgCg4kQ5gu7nGYvlJ7
0h01hKBeBtg1J74RKesR+5EP6rSbqifLPSHXmpT5V5zB5C3++5UyVWKYipCFeNmW
fP+HrdyzmXiRkPWMSdI9GQisYjKbeFBnLgK77n4FOcpyBoJAPp/8iplEj8J1zb6v
K1hYqIelbzwAmy7OrHOf
=A9sn
-----END PGP SIGNATURE-----

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 37, Issue 27
*****************************************

Reply via email to