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: Make synonym for Main? (Ozgur Akgun)
2. Still wrestling with lazy IO (Raphael P?bst)
3. Re: Still wrestling with lazy IO (Antoine Latter)
4. Re: Still wrestling with lazy IO (Raphael P?bst)
5. Re: Still wrestling with lazy IO (KC)
6. Re: Still wrestling with lazy IO (Raphael P?bst)
7. Re: Still wrestling with lazy IO (KC)
8. Re: Still wrestling with lazy IO (Raphael P?bst)
----------------------------------------------------------------------
Message: 1
Date: Sat, 18 Jun 2011 14:18:25 +0100
From: Ozgur Akgun <[email protected]>
Subject: Re: [Haskell-beginners] Make synonym for Main?
To: Christopher Howard <[email protected]>
Cc: Haskell Beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
Hi,
On 18 June 2011 08:56, Christopher Howard <[email protected]
> wrote:
> To be clear, I want Main qualified within the code that is Main.
>
Change the module name of your Main module to M?
Ozgur
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110618/8c5827c7/attachment-0001.htm>
------------------------------
Message: 2
Date: Sat, 18 Jun 2011 20:01:17 +0200
From: Raphael P?bst <[email protected]>
Subject: [Haskell-beginners] Still wrestling with lazy IO
To: beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Hey everyone!
Sorry for asking more or less the same question again, but I'm still
stuck wrestling with lazy IO.
What I'm trying to do is the following:
sending a Bytestring to a server, via TCP
Do stuff with the Bytestring that results in another Bytestring
Send that new Bytestring back to the original client.
At the moment this all happens inside an IO handle and doesn't work.
The stuff on the server side only gets executed, once the handle is
closed on the client's side and therefore the response is lost
somewhere.
It's a very simple program otherwise and so I don't want to get too
much into iteratees, iterators and that stuff, since it feels like
overkill.
Is there a way to get this working in the way I'm currently trying?
Or can I do this in a strict way?
Thanks again
Raf
------------------------------
Message: 3
Date: Sat, 18 Jun 2011 13:41:25 -0500
From: Antoine Latter <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: Raphael P?bst <[email protected]>
Cc: beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
On Sat, Jun 18, 2011 at 1:01 PM, Raphael P?bst
<[email protected]> wrote:
> Hey everyone!
> Sorry for asking more or less the same question again, but I'm still
> stuck wrestling with lazy IO.
> What I'm trying to do is the following:
>
> sending a Bytestring to a server, via TCP
> Do stuff with the Bytestring that results in another Bytestring
> Send that new Bytestring back to the original client.
>
> At the moment this all happens inside an IO handle and doesn't work.
> The stuff on the server side only gets executed, once the handle is
> closed on the client's side and therefore the response is lost
> somewhere.
>
Have you looked at how you're buffering the handles? Have you
experimented with changing the buffering mode or using the hFlush
function?
Antoine
> It's a very simple program otherwise and so I don't want to get too
> much into iteratees, iterators and that stuff, since it feels like
> overkill.
>
> Is there a way to get this working in the way I'm currently trying?
> Or can I do this in a strict way?
>
> Thanks again
>
> Raf
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
------------------------------
Message: 4
Date: Sat, 18 Jun 2011 21:37:27 +0200
From: Raphael P?bst <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: Antoine Latter <[email protected]>
Cc: beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
I am currently using line buffering and I tried hFlush on both server
and client side so far.
On 6/18/11, Antoine Latter <[email protected]> wrote:
> On Sat, Jun 18, 2011 at 1:01 PM, Raphael P?bst
> <[email protected]> wrote:
>> Hey everyone!
>> Sorry for asking more or less the same question again, but I'm still
>> stuck wrestling with lazy IO.
>> What I'm trying to do is the following:
>>
>> sending a Bytestring to a server, via TCP
>> Do stuff with the Bytestring that results in another Bytestring
>> Send that new Bytestring back to the original client.
>>
>> At the moment this all happens inside an IO handle and doesn't work.
>> The stuff on the server side only gets executed, once the handle is
>> closed on the client's side and therefore the response is lost
>> somewhere.
>>
>
> Have you looked at how you're buffering the handles? Have you
> experimented with changing the buffering mode or using the hFlush
> function?
>
> Antoine
>
>> It's a very simple program otherwise and so I don't want to get too
>> much into iteratees, iterators and that stuff, since it feels like
>> overkill.
>>
>> Is there a way to get this working in the way I'm currently trying?
>> Or can I do this in a strict way?
>>
>> Thanks again
>>
>> Raf
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>
------------------------------
Message: 5
Date: Sat, 18 Jun 2011 12:47:19 -0700
From: KC <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: Raphael P?bst <[email protected]>,
[email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
There is a chapter on this in the book "Real World Haskell" which I
believe is also online. :)
On Sat, Jun 18, 2011 at 12:37 PM, Raphael P?bst
<[email protected]> wrote:
> I am currently using line buffering and I tried hFlush on both server
> and client side so far.
>
> On 6/18/11, Antoine Latter <[email protected]> wrote:
>> On Sat, Jun 18, 2011 at 1:01 PM, Raphael P?bst
>> <[email protected]> wrote:
>>> Hey everyone!
>>> Sorry for asking more or less the same question again, but I'm still
>>> stuck wrestling with lazy IO.
>>> What I'm trying to do is the following:
>>>
>>> sending a Bytestring to a server, via TCP
>>> Do stuff with the Bytestring that results in another Bytestring
>>> Send that new Bytestring back to the original client.
>>>
>>> At the moment this all happens inside an IO handle and doesn't work.
>>> The stuff on the server side only gets executed, once the handle is
>>> closed on the client's side and therefore the response is lost
>>> somewhere.
>>>
>>
>> Have you looked at how you're buffering the handles? Have you
>> experimented with changing the buffering mode or using the hFlush
>> function?
>>
>> Antoine
>>
>>> It's a very simple program otherwise and so I don't want to get too
>>> much into iteratees, iterators and that stuff, since it feels like
>>> overkill.
>>>
>>> Is there a way to get this working in the way I'm currently trying?
>>> Or can I do this in a strict way?
>>>
>>> Thanks again
>>>
>>> Raf
>>>
>>> _______________________________________________
>>> Beginners mailing list
>>> [email protected]
>>> http://www.haskell.org/mailman/listinfo/beginners
>>>
>>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
--
--
Regards,
KC
------------------------------
Message: 6
Date: Sat, 18 Jun 2011 21:55:21 +0200
From: Raphael P?bst <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: KC <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
If you mean the network chapter, then I have read this and in fact
taken most of the code for the TCP server from there.
If you mean another, then please tell me which one.
On 6/18/11, KC <[email protected]> wrote:
> There is a chapter on this in the book "Real World Haskell" which I
> believe is also online. :)
>
>
> On Sat, Jun 18, 2011 at 12:37 PM, Raphael P?bst
> <[email protected]> wrote:
>> I am currently using line buffering and I tried hFlush on both server
>> and client side so far.
>>
>> On 6/18/11, Antoine Latter <[email protected]> wrote:
>>> On Sat, Jun 18, 2011 at 1:01 PM, Raphael P?bst
>>> <[email protected]> wrote:
>>>> Hey everyone!
>>>> Sorry for asking more or less the same question again, but I'm still
>>>> stuck wrestling with lazy IO.
>>>> What I'm trying to do is the following:
>>>>
>>>> sending a Bytestring to a server, via TCP
>>>> Do stuff with the Bytestring that results in another Bytestring
>>>> Send that new Bytestring back to the original client.
>>>>
>>>> At the moment this all happens inside an IO handle and doesn't work.
>>>> The stuff on the server side only gets executed, once the handle is
>>>> closed on the client's side and therefore the response is lost
>>>> somewhere.
>>>>
>>>
>>> Have you looked at how you're buffering the handles? Have you
>>> experimented with changing the buffering mode or using the hFlush
>>> function?
>>>
>>> Antoine
>>>
>>>> It's a very simple program otherwise and so I don't want to get too
>>>> much into iteratees, iterators and that stuff, since it feels like
>>>> overkill.
>>>>
>>>> Is there a way to get this working in the way I'm currently trying?
>>>> Or can I do this in a strict way?
>>>>
>>>> Thanks again
>>>>
>>>> Raf
>>>>
>>>> _______________________________________________
>>>> Beginners mailing list
>>>> [email protected]
>>>> http://www.haskell.org/mailman/listinfo/beginners
>>>>
>>>
>>
>> _______________________________________________
>> Beginners mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/beginners
>>
>
>
>
> --
> --
> Regards,
> KC
>
------------------------------
Message: 7
Date: Sat, 18 Jun 2011 12:57:13 -0700
From: KC <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: Raphael P?bst <[email protected]>,
[email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Hi:
I meant the network chapter.
How is what you're doing different than the network chapter?
On Sat, Jun 18, 2011 at 12:55 PM, Raphael P?bst
<[email protected]> wrote:
> If you mean the network chapter, then I have read this and in fact
> taken most of the code for the TCP server from there.
>
> If you mean another, then please tell me which one.
>
> On 6/18/11, KC <[email protected]> wrote:
>> There is a chapter on this in the book "Real World Haskell" which I
>> believe is also online. :)
>>
>>
>> On Sat, Jun 18, 2011 at 12:37 PM, Raphael P?bst
>> <[email protected]> wrote:
>>> I am currently using line buffering and I tried hFlush on both server
>>> and client side so far.
>>>
>>> On 6/18/11, Antoine Latter <[email protected]> wrote:
>>>> On Sat, Jun 18, 2011 at 1:01 PM, Raphael P?bst
>>>> <[email protected]> wrote:
>>>>> Hey everyone!
>>>>> Sorry for asking more or less the same question again, but I'm still
>>>>> stuck wrestling with lazy IO.
>>>>> What I'm trying to do is the following:
>>>>>
>>>>> sending a Bytestring to a server, via TCP
>>>>> Do stuff with the Bytestring that results in another Bytestring
>>>>> Send that new Bytestring back to the original client.
>>>>>
>>>>> At the moment this all happens inside an IO handle and doesn't work.
>>>>> The stuff on the server side only gets executed, once the handle is
>>>>> closed on the client's side and therefore the response is lost
>>>>> somewhere.
>>>>>
>>>>
>>>> Have you looked at how you're buffering the handles? Have you
>>>> experimented with changing the buffering mode or using the hFlush
>>>> function?
>>>>
>>>> Antoine
>>>>
>>>>> It's a very simple program otherwise and so I don't want to get too
>>>>> much into iteratees, iterators and that stuff, since it feels like
>>>>> overkill.
>>>>>
>>>>> Is there a way to get this working in the way I'm currently trying?
>>>>> Or can I do this in a strict way?
>>>>>
>>>>> Thanks again
>>>>>
>>>>> Raf
>>>>>
>>>>> _______________________________________________
>>>>> Beginners mailing list
>>>>> [email protected]
>>>>> http://www.haskell.org/mailman/listinfo/beginners
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> Beginners mailing list
>>> [email protected]
>>> http://www.haskell.org/mailman/listinfo/beginners
>>>
>>
>>
>>
>> --
>> --
>> Regards,
>> KC
>>
>
--
--
Regards,
KC
------------------------------
Message: 8
Date: Sat, 18 Jun 2011 22:26:52 +0200
From: Raphael P?bst <[email protected]>
Subject: Re: [Haskell-beginners] Still wrestling with lazy IO
To: KC <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Mainly I'd say it's that I want to send the answer back via the same
handle. That's where the problem comes from, I suspect. Since it is
lazy IO, it only evaluates, once the handle gets closed from the
client side. And then it is too late to send something back. At least
that's how I understand it.
On 6/18/11, KC <[email protected]> wrote:
> Hi:
>
> I meant the network chapter.
>
> How is what you're doing different than the network chapter?
>
>
> On Sat, Jun 18, 2011 at 12:55 PM, Raphael P?bst
> <[email protected]> wrote:
>> If you mean the network chapter, then I have read this and in fact
>> taken most of the code for the TCP server from there.
>>
>> If you mean another, then please tell me which one.
>>
>> On 6/18/11, KC <[email protected]> wrote:
>>> There is a chapter on this in the book "Real World Haskell" which I
>>> believe is also online. :)
>>>
>>>
>>> On Sat, Jun 18, 2011 at 12:37 PM, Raphael P?bst
>>> <[email protected]> wrote:
>>>> I am currently using line buffering and I tried hFlush on both server
>>>> and client side so far.
>>>>
>>>> On 6/18/11, Antoine Latter <[email protected]> wrote:
>>>>> On Sat, Jun 18, 2011 at 1:01 PM, Raphael P?bst
>>>>> <[email protected]> wrote:
>>>>>> Hey everyone!
>>>>>> Sorry for asking more or less the same question again, but I'm still
>>>>>> stuck wrestling with lazy IO.
>>>>>> What I'm trying to do is the following:
>>>>>>
>>>>>> sending a Bytestring to a server, via TCP
>>>>>> Do stuff with the Bytestring that results in another Bytestring
>>>>>> Send that new Bytestring back to the original client.
>>>>>>
>>>>>> At the moment this all happens inside an IO handle and doesn't work.
>>>>>> The stuff on the server side only gets executed, once the handle is
>>>>>> closed on the client's side and therefore the response is lost
>>>>>> somewhere.
>>>>>>
>>>>>
>>>>> Have you looked at how you're buffering the handles? Have you
>>>>> experimented with changing the buffering mode or using the hFlush
>>>>> function?
>>>>>
>>>>> Antoine
>>>>>
>>>>>> It's a very simple program otherwise and so I don't want to get too
>>>>>> much into iteratees, iterators and that stuff, since it feels like
>>>>>> overkill.
>>>>>>
>>>>>> Is there a way to get this working in the way I'm currently trying?
>>>>>> Or can I do this in a strict way?
>>>>>>
>>>>>> Thanks again
>>>>>>
>>>>>> Raf
>>>>>>
>>>>>> _______________________________________________
>>>>>> Beginners mailing list
>>>>>> [email protected]
>>>>>> http://www.haskell.org/mailman/listinfo/beginners
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Beginners mailing list
>>>> [email protected]
>>>> http://www.haskell.org/mailman/listinfo/beginners
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Regards,
>>> KC
>>>
>>
>
>
>
> --
> --
> Regards,
> KC
>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 36, Issue 48
*****************************************