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. share a record type (Kees Bleijenberg)
2. Re: Web frameworks (Mats Rauhala)
3. Re: Web frameworks (Christopher Done)
4. Re: Web frameworks (Michael Snoyman)
5. Re: Web frameworks (Christopher Done)
6. Re: Web frameworks (Haisheng Wu)
----------------------------------------------------------------------
Message: 1
Date: Fri, 17 Jun 2011 13:00:09 +0200
From: "Kees Bleijenberg" <[email protected]>
Subject: [Haskell-beginners] share a record type
To: <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
I want to learn more about Haskell and I started with my Sudoku solver
class SudokuClass s where
initAreas :: s -> s
createEmptySudoku :: s
getBoardLength :: s -> Int
setBoard :: s -> Board -> s
getCellToAreas :: s ->CellToAreas
... other functions with default implementations
I created a Sudoku solver for 9x9 sudoku's.
data Sudoku9x9 = Sudoku9x9 {
board :: Board,
areas:: Areas,
cellToAreas :: CellToAreas
} deriving (Show)
Board, Areas and CellToAreas are of type Map.
After that I create an instance:
instance SudokuClass Sudoku9x9 where
initAreas s = .....
After implementing the 9x9 solver I wanted to create a second instance
SudokuTwins, that solves a different kind of sudoku, but uses the same
record:
data SudokuTwins = SudokuTwins {
board :: Board,
areas:: Areas,
cellToAreas :: CellToAreas
} deriving (Show)
This is almost a copy of Soduku9x9 (right side of the =)
How can I express the fact that all sudoku solvers use the same recordtype?
Can I make a type of the record structure {board:: Board.... } and use it in
the constructor function or can I incorperate the recordtype in the class or
......?
Kees
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110617/251a0351/attachment-0001.htm>
------------------------------
Message: 2
Date: Fri, 17 Jun 2011 15:01:55 +0300
From: Mats Rauhala <[email protected]>
Subject: Re: [Haskell-beginners] Web frameworks
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
On 08:30 Fri 17 Jun , Manfred Lotz wrote:
> Hi there,
> There are some web frameworks out there, as snap, yesod, happstack, and
> perhaps even more.
>
> I'd like to get a recommendation which web framework might be easiest to
> get into, and to use for a haskell beginner.
My opinion is that you should go with Happstack. It doesn't hold your
hand as Yesod does, and enables you to learn a bit at the same time.
But the real deal comes from the fact that Happstack is already mature,
and has pretty good documentation. The Yesod people are doing a great
job with their book, but as long as it's only half finished, it's a pain
to learn Yesod. There seems to be no api docs whatsoever.
--
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/20110617/b9f0ec12/attachment-0001.pgp>
------------------------------
Message: 3
Date: Fri, 17 Jun 2011 14:30:04 +0200
From: Christopher Done <[email protected]>
Subject: Re: [Haskell-beginners] Web frameworks
To: Manfred Lotz <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On 17 June 2011 14:01, Mats Rauhala <[email protected]> wrote:
> On 08:30 Fri 17 Jun , Manfred Lotz wrote:
> > Hi there,
> > There are some web frameworks out there, as snap, yesod, happstack, and
> > perhaps even more.
> >
> > I'd like to get a recommendation which web framework might be easiest to
> > get into, and to use for a haskell beginner.
>
Oh well, I might as well chime in with Snap. I'd say it's easiest to get
into for a beginner. That's partly why I used it for http://hpaste.org/,
because I wanted people who knew Haskell and had done web dev elsewhere but
didn't necessarily know how X framework's magic worked, to be able to hack
on it. FWIW checkout the source here: https://github.com/chrisdone/amelie
The API is well-documented and it's basically only just one step up above
CGI, so the concepts are bog standard web dev. Everything you need to get
going with something simple in Snap is here:
http://snapframework.com/docs/tutorials/snap-api and then
http://snapframework.com/docs/latest/snap-core/index.html for everything
else.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110617/13ca9fc5/attachment-0001.htm>
------------------------------
Message: 4
Date: Fri, 17 Jun 2011 15:53:53 +0300
From: Michael Snoyman <[email protected]>
Subject: Re: [Haskell-beginners] Web frameworks
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
On Fri, Jun 17, 2011 at 3:01 PM, Mats Rauhala <[email protected]> wrote:
> On 08:30 Fri 17 Jun ? ? , Manfred Lotz wrote:
>> Hi there,
>> There are some web frameworks out there, as snap, yesod, happstack, and
>> perhaps even more.
>>
>> I'd like to get a recommendation which web framework might be easiest to
>> get into, and to use for a haskell beginner.
>
> My opinion is that you should go with Happstack. It doesn't hold your
> hand as Yesod does, and enables you to learn a bit at the same time.
>
> But the real deal comes from the fact that Happstack is already mature,
> and has pretty good documentation. The Yesod people are doing a great
> job with their book, but as long as it's only half finished, it's a pain
> to learn Yesod. There seems to be no api docs whatsoever.
(Note: I'm the leader developer on Yesod.)
I'd like to respectfully disagree with this assessment. I'm not quite
sure what you mean by "mature", but Yesod has been developed actively
for two years, has the vast majority of features you'll need on a
project, is in use by many production settings and has the highest
performance figures of any of the big three frameworks.
As for documentation: the Yesod book as it stands is already pretty
thorough. The entire basics section is complete, sans minor
improvements that are constantly happening. Some of the more advanced
features are not fully documented, but I'm not sure if you could say
otherwise about Happstack (or Snap for that matter).
And if by "API docs" you mean the Haddocks autogenerated on the
Hackage server... unfortunately, that's a known issue with Hackage,
outside of our control. But the sources themselves have Haddocks, and
you can generate the documentation locally with some simple changes to
your cabal config file.
I'm not saying Happstack or Snap are bad frameworks, quite the
opposite. But I don't think these generic "X isn't mature" or "Y has
bad documentation" do much to help newcomers become acclimated.
Michael
------------------------------
Message: 5
Date: Fri, 17 Jun 2011 15:38:36 +0200
From: Christopher Done <[email protected]>
Subject: Re: [Haskell-beginners] Web frameworks
To: Michael Snoyman <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"
On 17 June 2011 14:53, Michael Snoyman <[email protected]> wrote:
>
> I'm not saying Happstack or Snap are bad frameworks, quite the
> opposite. But I don't think these generic "X isn't mature" or "Y has
> bad documentation" do much to help newcomers become acclimated.
>
I'll back this up, Yesod has quite an extensive book with tips and tricks
including corner cases and such: http://www.yesodweb.com/book
I'd like to respectfully disagree with this assessment. I'm not quite
> sure what you mean by "mature", but Yesod has been developed actively
> for two years, has the vast majority of features you'll need on a
> project, is in use by many production settings and has the highest
> performance figures of any of the big three frameworks.
FWIW I think he means the API changes, not that the software itself is
runtime-stable. The "developed actively" may imply a changing API. I don't
know whether this is true, but I think that's what he meant.
Anyway, I doubt maturity as in runtime stability matters that much to
newbies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20110617/826910a2/attachment-0001.htm>
------------------------------
Message: 6
Date: Fri, 17 Jun 2011 22:49:12 +0800
From: Haisheng Wu <[email protected]>
Subject: Re: [Haskell-beginners] Web frameworks
To: [email protected], Michael Snoyman <[email protected]>,
[email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
Yesod is cool though I know a little about that.
Actually I have one question that what's the reason it has 'special' (a
better word?) style at programming CSS and JavaScripts?
Seems like no other frameworks doing that? (Correct me if I am wrong)
Thanks.
-Simon
On Fri, Jun 17, 2011 at 9:38 PM, Christopher Done
<[email protected]>wrote:
> On 17 June 2011 14:53, Michael Snoyman <[email protected]> wrote:
>>
>> I'm not saying Happstack or Snap are bad frameworks, quite the
>> opposite. But I don't think these generic "X isn't mature" or "Y has
>> bad documentation" do much to help newcomers become acclimated.
>>
>
> I'll back this up, Yesod has quite an extensive book with tips and tricks
> including corner cases and such: http://www.yesodweb.com/book
>
> I'd like to respectfully disagree with this assessment. I'm not quite
>> sure what you mean by "mature", but Yesod has been developed actively
>> for two years, has the vast majority of features you'll need on a
>> project, is in use by many production settings and has the highest
>> performance figures of any of the big three frameworks.
>
>
> FWIW I think he means the API changes, not that the software itself is
> runtime-stable. The "developed actively" may imply a changing API. I don't
> know whether this is true, but I think that's what he meant.
>
> Anyway, I doubt maturity as in runtime stability matters that much to
> newbies.
>
> _______________________________________________
> 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/20110617/876898f5/attachment.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 36, Issue 45
*****************************************