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:  Parser composition (Henk-Jan van Tuyl)
   2. Re:  Named Pipes Et Cetera (Brandon S Allbery KF8NH)
   3. Re:  Named Pipes Et Cetera (Brandon S Allbery KF8NH)


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

Message: 1
Date: Fri, 03 Dec 2010 13:36:40 +0100
From: "Henk-Jan van Tuyl" <[email protected]>
Subject: Re: [Haskell-beginners] Parser composition
To: [email protected], "Angelos Bimpoudis" <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes

On Thu, 02 Dec 2010 23:50:16 +0100, Angelos Bimpoudis <[email protected]>  
wrote:

>
> I am trying to understand what is the f in p>>=f in each one of above
> sequencing applications?

Maybe "A tour of the Haskell Monad functions" can help:
   http://members.chello.nl/hjgtuyl/tourdemonad.html

Regards,
Henk-Jan van Tuyl


-- 
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--



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

Message: 2
Date: Fri, 03 Dec 2010 14:59:21 -0500
From: Brandon S Allbery KF8NH <[email protected]>
Subject: Re: [Haskell-beginners] Named Pipes Et Cetera
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

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

On 11/23/10 07:55 , matthew coolbeth wrote:
> Hello, all.
> 
> Three questions:
> 
> 1> What, if anything, can I do in a Haskell program to do blocking
> reads from a Linux FIFO?  For the curious, there is a small program
> below that doesn't block, but immediately terminates because of an EOF
> 
> 2> How could I have found the answer to this question on my own? (The
> documentation that Google found for me was not completely adequate)

This isn't specific to Haskell, but rather to Unix/POSIX FIFOs.  In general,
they often don't do what you want.  :)

The short version is:  the "server" end should open read-write, because the
last close by a writer will send an EOF and tear down the connection so that
it can't be reused without closing and reopening.  This does mean you can't
actually receive EOFs if you intend to block on the FIFO, so design whatever
protocol you plan to use with this in mind.

That said, it sounds like GHC's I/O manager is handling this incorrectly;
what you wrote should in fact block waiting for a writer, output everything
it reads, then exit when the writer goes away.  If it's GHC7, then likely
someone broke FIFO handling (again... very few people seem to understand the
care and feeding of FIFOs) in the new I/O manager.

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      [email protected]
system administrator  [openafs,heimdal,too many hats]  [email protected]
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz5TBkACgkQIn7hlCsL25URDQCdGisbjpa65EeE83CZcyXRLuru
Py4AoIB17qhlagBd3JxggakvjV23+6pC
=mphl
-----END PGP SIGNATURE-----



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

Message: 3
Date: Fri, 03 Dec 2010 15:00:48 -0500
From: Brandon S Allbery KF8NH <[email protected]>
Subject: Re: [Haskell-beginners] Named Pipes Et Cetera
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

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

On 11/23/10 10:36 , Patrick LeBoutillier wrote:
> The Glorious Glasgow Haskell Compilation System, version 6.10.1

IIRC this was in fact broken in 6.10.1; upgrade at least to 6.10.3.

- -- 
brandon s. allbery     [linux,solaris,freebsd,perl]      [email protected]
system administrator  [openafs,heimdal,too many hats]  [email protected]
electrical and computer engineering, carnegie mellon university      KF8NH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz5THAACgkQIn7hlCsL25VOEQCgp/fPxHTsFb6vAeaO1GGonZDc
dh8AmgIy4l0khXTHliySwRSnz804tu0Z
=m7l1
-----END PGP SIGNATURE-----



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

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


End of Beginners Digest, Vol 30, Issue 5
****************************************

Reply via email to