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: book question (Sean Charles)
2. Re: A first try (David Place)
3. Re: Why aren't David Harley's QT bindings more popular?
(Mats Rauhala)
4. Various style at instance of a typeclass (Haisheng Wu)
5. concerning wxHaskell: wxcore fails to install (Obscaenvs)
6. Re: Various style at instance of a typeclass (Stephen Tetley)
7. Global variables (ARJANEN Lo?c Jean-David)
8. type question (Roelof Wobben)
9. Re: Why aren't David Harley's QT bindings more popular?
(Kyle Murphy)
----------------------------------------------------------------------
Message: 1
Date: Wed, 29 Jun 2011 11:10:54 +0100
From: Sean Charles <[email protected]>
Subject: Re: [Haskell-beginners] book question
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
RWH is the first haskell book I bought after deciding that reading pages
on a browser wasn't doing it for me... I bought it eight months ago and
to be honest, it looks like I've owned it for years... it takes you from
beginner level, and I have to say that it does a very good job at
guiding you through the type system and onto IO, monads, parsec, the works.
Some of the projects in the book are just awesome, not only in their
execution but in the step-by-step explanation, for example the bar code
reading and unix pipes projects are really well done. Kudos to RWH for that.
Having learned Erlang and LISP did give me some advantages in that the
concepts of higher order functions and pattern matching were already
under my belt, along with guard clauses etc.
If I could say one thing so far to beginners to haskell it would be two
things:
* learn to "read" type signatures
* learn to "decipher" the type related error messages
Everything else just comes naturally after practice.
Practice.
And more practice.
A famous author once said "You get good at writing by reading, and
writing lots."
:)
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/4d04de3e/attachment-0001.htm>
------------------------------
Message: 2
Date: Wed, 29 Jun 2011 08:00:32 -0400
From: David Place <[email protected]>
Subject: Re: [Haskell-beginners] A first try
To: Heinrich Apfelmus <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Jun 29, 2011, at 4:30 AM, Heinrich Apfelmus wrote:
> It is still possible to write programs that return unexpected _|_, but they
> violate a clear conceptual guideline ("only fully evaluated values may escape
> the scope of withFile ").
I wonder. If that is the behavior you desire, why not just call deepseq on the
value before you return it to guarantee it.
> Granted, Iteratees make it impossible to write such programs, but they come
> with the terrible price of code duplication.
I don't really understand this objection, though. Won't any iteratee library
provide all those functions? The user shouldn't have to write them. In this
way, it is certainly no worse than the duplication brought about by
ByteStrings. Also, isn't that the point of the ListLike class?
____________________
David Place
Owner, Panpipes Ho! LLC
http://panpipesho.com
[email protected]
------------------------------
Message: 3
Date: Wed, 29 Jun 2011 15:50:51 +0300
From: Mats Rauhala <[email protected]>
Subject: Re: [Haskell-beginners] Why aren't David Harley's QT bindings
more popular?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
On 10:59 Wed 29 Jun , Heinrich Apfelmus wrote:
> Indeed, reactive-banana intended to be a solid work horse. :) The
> FRP model is quite conservative because of this.
>
> Of course, the library does cover new ground, nobody has figured out
> the most pleasant abstractions for dealing with common GUI tasks
> yet, but I'm in the process of finding some out.
>
> I would like to encourage you to try it out and get back to me with
> any issues you have, both concerning documentation/learning and
> functionality. For instance, one of the authors of Leksah has
> experimented with it; while he had more ambitious plans than
> reactive-banana can handle at the moment, it prompted me to come up
> with the pleasing improvements in version 0.3. Not to mention that I
> now have a new use case to keep in mind for the big picture.
Personally, what I'd like is a simple documented tutorial/example for a
simple application (counter which updates a label?), which is kept
updated even when the library updates.
I noticed two examples in the github repository, but I didn't have time
to properly read them through yet.
--
Mats Rauhala
MasseR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/f02c8b97/attachment-0001.pgp>
------------------------------
Message: 4
Date: Wed, 29 Jun 2011 22:05:29 +0800
From: Haisheng Wu <[email protected]>
Subject: [Haskell-beginners] Various style at instance of a typeclass
To: Haskell Beginer <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
The Control.Monad.Writer module exports the Writer w a type along with its
Monad instance
newtype Writer w a = Writer { runWriter :: (a, w) }
instance (Monoid w) => Monad (Writer w) where
return x = Writer (x, mempty)
(Writer (x,v)) >>= f = let (Writer (y, v')) = f x in Writer (y, v
`mappend` v')
My question is
Why the signature is "Monad (Write w)" but neither "Monad Write" nor "Monad
(Write w a)"?
Any difference among those three styles?
Thanks a lot!
-Haisheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/9dd09295/attachment-0001.htm>
------------------------------
Message: 5
Date: Wed, 29 Jun 2011 16:14:06 +0200
From: Obscaenvs <[email protected]>
Subject: [Haskell-beginners] concerning wxHaskell: wxcore fails to
install
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Attempting to install the wxcore package yields the following result on
my Arch Linux box, got the same result on an Ubuntu box:
<code>
cabal: Error: some packages failed to install:
wxcore-0.12.1.7 failed during the configure step. The exception was:
ExitFailure 1
</code>
As a result, the package wx cannot be installed either. I am trying to
get started with wxHaskell.
Is there any way to fix this retaining one's sanity?
/Fredrik
------------------------------
Message: 6
Date: Wed, 29 Jun 2011 15:21:37 +0100
From: Stephen Tetley <[email protected]>
Subject: Re: [Haskell-beginners] Various style at instance of a
typeclass
Cc: Haskell Beginer <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
The class Monad is more specifically a "constructor class" rather than
a type class.
Constructor classes have particular arities (numbers of parameters -
"holes") called "kinds".
Monad is a constructor class with kind :: * -> *
(Write w) - has kind :: * -> *
Write - has kind :: * -> * -> *
(Write w a) - has kind :: *
Thus only the first is compatible with the Monad class.
------------------------------
Message: 7
Date: Wed, 29 Jun 2011 16:40:05 +0200
From: ARJANEN Lo?c Jean-David <[email protected]>
Subject: [Haskell-beginners] Global variables
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
Hello,
For a pet project I need a global counter, giving how many times a
given function was called. What would you use for that purpose ?
Loic
------------------------------
Message: 8
Date: Wed, 29 Jun 2011 14:55:50 +0000
From: Roelof Wobben <[email protected]>
Subject: [Haskell-beginners] type question
To: <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Hello,
I'm now following the book Programming in Haskel by Hutton.
IM now reading the chapter about types.
But I don't understand this :
False :: Bool
True :: Bool
? :: Bool ---> Bool
So False and True has the type Bool.
That's clear.
I find out that ? makes the opposite of True and False.
But why is it also the type Bool --> Bool
Roelof
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/94b477a2/attachment-0001.htm>
------------------------------
Message: 9
Date: Wed, 29 Jun 2011 10:57:10 -0400
From: Kyle Murphy <[email protected]>
Subject: Re: [Haskell-beginners] Why aren't David Harley's QT bindings
more popular?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
I've been really busy the last couple days and haven't had a chance to do
more than look over reactive-banana, but I do recall looking at it
previously and thinking it was a) really interesting looking, and b) I
really need to go back through the typeclass-o-pedia because I don't really
understand a lot of the types the core of it is built around.
On the topic of wxWidgets, I really like the design of it, much more than
GTK, which is part of the reason it was one of the first GUI libraries I
tried to get working with Haskell. Unfortunately at the time (this was right
around the transition to 6.12) I had all kinds of problems getting wxHaskell
to work in Windows, even though it seemed to work well enough in Linux. At
the time at least one of my key requirements was cross-platform support, so
I had to abandon wxHaskell after I couldn't get it to work in Windows after
more than a week of struggling with it. I've since managed to get GTK
working cross-platform, but like others I've found it to be almost painfully
procedural, and even then the process of getting it working was not exactly
trivial. Once I get a little bit of time free I intend to try to get
wxHaskell working in Windows again (hopefully now that 7.0 has stabilized a
bit this should be a little smoother), and revisit reactive-banana. Worst
case scenario maybe I'll at least get a better understanding of some of the
more high level types out of it this time.
-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.
On Wed, Jun 29, 2011 at 02:39, Mats Rauhala <[email protected]> wrote:
> On 10:11 Tue 28 Jun , Heinrich Apfelmus wrote:
> > wxHaskell intends to get into the Haskell Platform, but it needs
> > more manpower. You can help!
> >
> > http://comments.gmane.org/gmane.comp.lang.haskell.wxhaskell.devel/616
> >
> > I'm actively working on FRP and have released the library
> >
> > http://hackage.haskell.org/package/reactive-banana
> >
> > If you have any suggestions, questions, needs for learning material,
> > write me an email. Try the package and the developer blog
> >
> >
> http://apfelmus.nfshost.com/blog.html#functional-reactive-programming-frp
> >
> > and tell me of your learning journey; I'll figure out whether I
> > should create a written tutorial, video tutorial or something else
> > to help understand FRP.
> >
> >
> > The package
> >
> > http://hackage.haskell.org/package/reactive-banana-wx
> >
> > includes a tiny working example for wxHaskell .
> >
> >
> > Best regards,
> > Heinrich Apfelmus
>
> That seems promising. If you're really trying to get wxhaskell into
> Haskell Platform, it must be more mature than I initially thought.
>
> wxHaskell itself seems to be more functional than the GTK library I'm
> used to, which is enough motivation to try and learn it. Add to it the
> reactive-bananas library, and this might become something great. I
> initially had the idea that reactive-bananas was a little more than just
> a proof of concept, but seems like I was mistaken about that too :).
> Keep up the good work.
>
> --
> Mats Rauhala
> MasseR
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110629/3a6fa3c2/attachment.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 36, Issue 81
*****************************************