March 2, 2011

Haskell Weekly News: Issue 171

Welcome to issue 171 of the HWN, a newsletter covering developments in the Haskell community. This release covers the week of Februrary 20 - 26, 2011.

Announcements

Eric Kow announced that the Darcs project is staring to organize the next hacking sprint, which will be "most likely in Paris in this spring. If you fancy a weekend of hacking Haskell on a really neat real world project, come join...!"

Jose Pedro Magalhaes informed us of the initial release of htime, a library to mimic the unix "time" utility.

Iain Alexander annouced the initial release of data-type, function-combine, and flexiwrap. "data-type contains a number of fundamental types and classes useful for type-level programming, such as type-level booleans, natural numbers, and lists."

I'd like to once again recognize some of the members of the community that spend their time fielding questions from the new commers. If you haven't been in the #haskell irc channel, you are just missing out! There are also those who spend their time writting great answers to the many questions in haskell's StackOverflow tag. You are what make this community an inviting place for all the people interested in Haskell. Keep it up!

Quotes of the Week

  • kmc: but rarely do beginners come to #haskell and say "i want to append two lists, but i don't understand all this Monoid business, i hear they're like taco salad"
  • Eduard:_Munteanu [In response to "GHC can go jump out a window" and "GHC has already jumped out a window and flied and left you behind"] Yes, GHC even implements optimizations such as defenestration.
  • Top Reddit Stories

    • What kind of things are easy in Haskell and hard in Scala, and vice versa?: From (programmers.stackexchange.com), scored 47 with 34 comments. Read on reddit or the original post.
    • Multiday Debugging GHC: From (blog.ezyang.com), scored 37 with 2 comments. Read on reddit or the original post.
    • Making OpenCL Simple with Haskell [pdf]: From (developer.amd.com), scored 35 with 11 comments. Read on reddit or the original post.
    • GHC 7.0.2 RC 2 available. Please test!: From (haskell.org), scored 33 with 5 comments. Read on reddit or the original post.
    • Minecraft data API for Haskell: HaskellNBT: From (blog.acfoltzer.net), scored 27 with 4 comments. Read on reddit or the original post.
    • Dependently Typed Programming: an Agda Introduction: From (youtube.com), scored 25 with 5 comments. Read on reddit or the original post.
    • Minecraft network protocol and proxy in Haskell: From (github.com), scored 25 with 1 comments. Read on reddit or the original post.
    • Threading State - a short tutorial for new Haskell programmers: From (mtnviewmark.wordpress.com), scored 22 with 3 comments. Read on reddit or the original post.
    • Solution (code) XCKD: Nerd Snipping: From (pgraycode.wordpress.com), scored 20 with 8 comments. Read on reddit or the original post.
    • Agda 2.2 released: From (permalink.gmane.org), scored 18 with 1 comments. Read on reddit or the original post.

    Top StackOverflow Answers

    • Feed elements of a tuple to a function as arguments in Haskell? votes: 14
      Function uncurry converts a two-argument (curried) function into a function on pairs. Here's its type signature:
      
      uncurry :: (a -> b -> c) -> (a, b) -> c
      
      You need to use it on printf, like this:
      
      mapM_ (uncurry $ printf "Values: %d %d\n") [(1,100),(2,350),(3,600),(4,200)]
      
      Another solution is to use pattern matching to deconstruct the tuple, ...
    • What is the difference between different orderings of the same monad transformers? votes: 10
      Edit: I originally got the cases backwards.  Fixed now.
      
      The difference between orderings of monad transformer stacks really only matters when you're peeling off layers of the stack.
      
      type Procedure a = MaybeT (State ProcedureState) a
      
      In this case, you first run the MaybeT, which results in a stateful computation which returns a Maybe a.
      
      type Procedure a ...

    Top StackOverflow Questions

    • Real-world applications of zygohistomorphic prepromorphisms (votes: 54, answers: 2) read
    • How to roll a fast BVH representation in Haskell (votes: 10, answers: 2) read
    • curious about how “loop = loop” is evaluated in Haskell (votes: 9, answers: 2) read
    • What is the difference between different orderings of the same monad transformers? (votes: 8, answers: 3) read
    • haskell function declaration (votes: 6, answers: 3) read

    About the Haskell Weekly News

    To help create new editions of this newsletter, please send stories to dstcruz@gmail.com. I'm in dire need of finding good "quotes of the week". If you happen to come across any, please don't hesitate to send it along.

    Until next time,
    Daniel Santa Cruz

    No comments: