[Haskell-cafe] Haskell Weekly News: Issue 173

Daniel Santa Cruz dstcruz at gmail.com
Thu Mar 17 03:21:30 CET 2011

   Welcome to issue 173 of the HWN, a newsletter covering developments in
   the [1]Haskell community. This release covers the week of March 06-12,

   For a (easier to read) HTML version goto: http://bit.ly/gQCQHf


   Bas van Dijk [2]annouced updates to regions (0.9), regions-mtl
   (, and regions-monadstf (

   Don Stewart [3]gave us reason to celebrate with the announcement of the
   new Haskell Platform 2011.2, the "single, standard Haskell distribution
   for everyone." Most of you have probably already heard/gotten this new
   release, but in case you haven't...

   Remi Turk [4]annouced the first release of cinvoke, "a binding to the C
   library cinvoke, allowing functions to be loaded and called whose names
   and types are not known before run-time."

Quotes of the Week

     * kmc: [After discussing monads, containers, and tortillas] therefore
       the key difference between a container and a monad is delicious
       carne asada
     * edwardk: [you mean #haskell has a 2 phD/nick average ?] clearly
       this is why SPJ stays away, he doesn't want to dilute that metric.
     * byorgey: The magic of printf is that it is well-typed but you need
       not actually know what the types are.
     * monochrom: How do I extract the IO out of IO String?
     * kmc: ghc -XTwitter -ddump-tweets
     * xplat: because, you know, you have to write a quicksort so
       differently in java than any other language. first you create an
       AbstractSequenceSubrangeFactory interface, and then you create the
       implementation for ArrayList ...

Top Reddit Stories

     * The Haskell Platform 2011.2 is out!: From
       (hackage.haskell.org.nyud.net), scored 80 with 34 comments. Read on
       [5]reddit or the [6]original post.

     * Umm... yes... you can now write new GHC compiler passes in Coq
       (!!?): From (cs.berkeley.edu), scored 55 with 16 comments. Read on
       [7]reddit or the [8]original post.

     * The Type Technology Tree (mapping Type Extensions in GHC): From
       (blog.ezyang.com), scored 53 with 5 comments. Read on [9]reddit or
       the [10]original post.

     * a message from Tokyo: From (haskell.org), scored 47 with 9
       comments. Read on [11]reddit or the [12]original post.

     * Haskellâs Niche: Hard Problems: From (cdsmith.wordpress.com),
       scored 43 with 16 comments. Read on [13]reddit or the [14]original

     * Functional flocks : modelling and visualizing flocking behavior in
       Haskell: From (syntacticsalt.com), scored 21 with 0 comments. Read
       on [15]reddit or the [16]original post.

     * Tech Talk Video: Faster Persistent Data Structures Through Hashing:
       From (corp.galois.com), scored 20 with 5 comments. Read on
       [17]reddit or the [18]original post.

     * Recursion is a low-level operation: From (blog.fogus.me), scored 18
       with 25 comments. Read on [19]reddit or the [20]original post.

     * Yesod 1.0 Roadmap: From (docs.yesodweb.com), scored 17 with 9
       comments. Read on [21]reddit or the [22]original post.

     * Type inference weirdness: From (self.haskell), scored 13 with 26
       comments. Read on [23]reddit.

    Top StackOverflow Answers

     * [25]haskell beginner - recursive recursion votes: 10

       This can be improved substantially by using a different
       algorithm: The smallest number which can be divided by a set of
       numbers (in this case, the set is [1..10]) is the least common
       multiple of those numbers.

       Haskell even has a least common multiple function (lcm)
       built-in which you can use:

       Prelude> foldl lcm 1 [1..10]

       If you prefer not to use ...

     * [26]Reasoning laziness votes: 10

       I believe the problem is that Data.Vector is not strict in its
       elements.  So although your reasoning is right, when
       accumulating the histogram your thunks looks like:

       <1+(1+(1+0)) (1+(1+0)) 0 0 (1+(1+(1+(1+0)))) ... >

       Rather than

       <3 2 0 0 4 ...>

       And only when you print are those sums computed.  I don't see a
       strict accum function in the ...

     * [27]What are some compelling use cases of infinite data structures?
       votes: 13

       Here are two examples, one big and one small:

       Why Functional Programming Matters by John Hughes has a good
       example, of a chess game.  The move tree for a chess game is
       not actually infinite, but its big enough that it might as well
       be infinite (call it "near-infinite").  In a strict language
       you can't actually treat it as a tree, because there isn't
       enough ...

     * [28]Computational cost of applicative style votes: 14

       I really suspect they'll be compiled down to the same thing in
       most cases. I did a tiny test,

       import Control.Applicative

       test1 :: (b -> b -> c) -> (a -> b) -> (a -> b) -> a -> c
       test1 bracket takeConn putConn pool = bracket (takeConn pool)
(putConn pool)

       test2 :: (b -> b -> c) -> (a -> b) -> (a -> b) -> a -> ...

Top StackOverflow Questions

     * what does "exists" mean in Haskell type system? (votes: 20,
       answers: 4) [29]read

     * Is there a book which teaches about compilers using Haskell?
       (votes: 12, answers: 3) [30]read

     * Reasoning laziness (votes: 10, answers: 1) [31]read

     * What are some compelling use cases of infinite data structures?
       (votes: 10, answers: 5) [32]read

     * The difference between +1 and -1 (votes: 9, answers: 3) [33]read

About the Haskell Weekly News

   To help create new editions of this newsletter, please send stories to
   dstcruz at 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


   1. http://haskell.org/
   2. http://article.gmane.org/gmane.comp.lang.haskell.general/18554
   3. http://article.gmane.org/gmane.comp.lang.haskell.platform/1519
   4. http://article.gmane.org/gmane.comp.lang.haskell.general/18543
   5. http://www.reddit.com/r/haskell/comments/g1g0a/the_haskell_platform_20112_is_out/
   6. http://hackage.haskell.org.nyud.net/platform/?2011-2
   7. http://www.reddit.com/r/haskell/comments/fze1q/umm_yes_you_can_now_write_new_ghc_compiler_passes/
   8. http://www.cs.berkeley.edu/~megacz/coq-in-ghc/
   9. http://www.reddit.com/r/haskell/comments/fz0ve/the_type_technology_tree_mapping_type_extensions/
  10. http://blog.ezyang.com/2011/03/type-tech-tree/
  11. http://www.reddit.com/r/haskell/comments/g2m0t/a_message_from_tokyo/
  12. http://www.haskell.org/pipermail/glasgow-haskell-users/2011-March/020166.html
  13. http://www.reddit.com/r/haskell/comments/g382d/haskells_niche_hard_problems/
  14. http://cdsmith.wordpress.com/2011/03/13/haskells-niche-hard-problems/
  15. http://www.reddit.com/r/haskell/comments/g2v75/functional_flocks_modelling_and_visualizing/
  16. http://syntacticsalt.com/2011/03/10/functional-flocks/
  17. http://www.reddit.com/r/haskell/comments/g030j/tech_talk_video_faster_persistent_data_structures/
  18. http://corp.galois.com/blog/2011/3/8/tech-talk-video-faster-persistent-data-structures-through-ha.html
  19. http://www.reddit.com/r/haskell/comments/g1ajf/recursion_is_a_lowlevel_operation/
  20. http://blog.fogus.me/2011/03/09/recursion-is-a-low-level-operation/
  21. http://www.reddit.com/r/haskell/comments/fywf1/yesod_10_roadmap/
  22. http://docs.yesodweb.com/blog/road-to-yesod-1-0
  23. http://www.reddit.com/r/haskell/comments/g2aiv/type_inference_weirdness/
  25. http://stackoverflow.com/questions/5250012/haskell-beginner-recursive-recursion/5250136#5250136
  26. http://stackoverflow.com/questions/5274700/reasoning-laziness/5275489#5275489
  27. http://stackoverflow.com/questions/5284458/what-are-some-compelling-use-cases-of-infinite-data-structures/5284552#5284552
  28. http://stackoverflow.com/questions/5230043/computational-cost-of-applicative-style/5230516#5230516
  29. http://stackoverflow.com/questions/5235116/what-does-exists-mean-in-haskell-type-system
  30. http://stackoverflow.com/questions/5234398/is-there-a-book-which-teaches-about-compilers-using-haskell
  31. http://stackoverflow.com/questions/5274700/reasoning-laziness
  32. http://stackoverflow.com/questions/5284458/what-are-some-compelling-use-cases-of-infinite-data-structures
  33. http://stackoverflow.com/questions/5210182/the-difference-between-1-and-1

More information about the Haskell-Cafe mailing list