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:  Why aren't David Harley's QT bindings more   popular?
      (Tom Murphy)
   2. Re:  A first try (Antoine Latter)
   3. Re:  A first try (Heinrich Apfelmus)


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

Message: 1
Date: Fri, 24 Jun 2011 20:08:37 -0400
From: Tom Murphy <[email protected]>
Subject: Re: [Haskell-beginners] Why aren't David Harley's QT bindings
        more    popular?
To: Krzysztof Skrz?tnicki <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-2

On 6/24/11, Michael Serra <[email protected]> wrote:
[...]
>   I understand qtHaskell is much newer than the others,
> and so far its development appears to be a one-man operation; other than
> these obvious explanations, is there a bigger reason people don't seem to be
> using or discussing QT with Haskell?  I would have thought working bindings
> to such a useful framework would be a bigger deal.

I think Nikki and The Robots (http://joyridelabs.de/game/) was written with QT.
That's a pretty big working demonstration.


On 6/24/11, Krzysztof Skrz?tnicki <[email protected]> wrote:
> For one thing it's not available on Hackage. This surely hurts visibility of
> any Haskell package. It may be the reason it didn't receive so much
> attention.
>

What can we do to get it on Hackage? That seems like the right place.
(Similar discussion:
http://lists.debian.org/debian-haskell/2011/05/msg00054.html)


Tom



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

Message: 2
Date: Sat, 25 Jun 2011 09:51:58 +0900
From: Antoine Latter <[email protected]>
Subject: Re: [Haskell-beginners] A first try
To: Jared Hance <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8

On Fri, Jun 24, 2011 at 11:51 PM, Jared Hance <[email protected]> wrote:
>
>> Lines 25-31
>> dispatch (fl, fn) = do
>> ? handle <- openFile fl ReadMode
>> ? contents <- hGetContents handle
>> ? let cnt = getCounter fn
>> ? ? ? res = cnt contents
>> ? hClose handle
>> ? return res
>
> Cleaner is:
>
> dispatch (fl, fn) = do contents <- withFile fl ReadMode hGetContents
> ? ? ? ? ? ? ? ? ? ? ? return $ getCounter fn contents
>

I had thought hGetContents was lazy IO. If so, will that even work?
The handle to the file will be closed before much of the file is even
read.

Antoine



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

Message: 3
Date: Sat, 25 Jun 2011 11:39:51 +0200
From: Heinrich Apfelmus <[email protected]>
Subject: Re: [Haskell-beginners] A first try
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

David Place wrote:
> Hi, Panagiotis.
> 
> The wc program is a good choice for a learning program, but it
> reveals a long-standing weakness in Haskell: Lazy-IO.  I think you
> will find that your program will get an error if you try to run wc on
> many files.  You will open too many files at once.
> 
> There is a solution called IterateeIO.  It's extremely elegant and
> very good Haskell, but quite challenging to understand.  So far, I
> have not found a good tutorial.

Personally, I think that lazy IO is not a weakness and works extremely 
well for prototyping. In contrast, I find IterateeIO to be ugly and 
non-idiomatic Haskell, since it exposes implementation details and is 
not built on an algebraic "combinators & laws" approach. Being 
challenging to understand is not a substitute for beauty.


Best regards,
Heinrich Apfelmus

--
http://apfelmus.nfshost.com




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

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


End of Beginners Digest, Vol 36, Issue 63
*****************************************

Reply via email to