@Tony - I am getting a 404 for that link[1]. The base repo is there by I can not find the MVC example with a github search.
[1] https://github.com/tonyday567/afgame/blob/mvc-example/haskell/src/Afgame/MVC.hs On Wed, May 7, 2014 at 10:51 PM, Tony Day <[email protected]> wrote: > Hi Pierre, > > I coded up your front-end in the spirit of Gabe's mvc library. I know you > didn't ask that, of course, but G has asked for examples of using the mvc > library and your example was perfect for the task. > > > https://github.com/tonyday567/afgame/blob/mvc-example/haskell/src/Afgame/MVC.hs > > I liked how it turned out. Most of the IO in the existing pipes became > messages that get wrapped as part of an Either String (Int,Board). Not > perfect but, with the pipeline getting a bit messier. > > Most fun was using quickcheck on the game logic. I can guess from qc that > the game lasts for 15 moves, that a high score is around 200, and that > moves of 15 and consecutive moves that add up to 15 are strong. Not bad > considering I haven't even read the rules! > > > On Tuesday, May 6, 2014 5:32:37 AM UTC+10, Pierre R wrote: >> >> Hi, >> >> I have added a little pipes frontend to one of my pet example and I was >> wondering how idiomatic (or not) it is. >> >> http://lpaste.net/103623 >> >> Basically instead of consuming a list with mapM (the `scores` function) I >> am streaming input from stdin. Consequently I need to treat the end of game >> differently than a bogus shot. >> >> Nothing to do with Pipes but I am not sure annotation 2 is better because >> it forces all client `score` code to unwrap StateT whereas I only need the >> state monad when I have to deal with a list of shots. Is there a more >> idiomatic way to do this ? >> >> The github repo is here : https://github.com/PierreR/ >> afgame/tree/master/haskell >> >> Thanks for your feedback >> > -- > You received this message because you are subscribed to the Google Groups > "Haskell Pipes" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > -- Patrick Wheeler [email protected] [email protected] [email protected] -- You received this message because you are subscribed to the Google Groups "Haskell Pipes" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
