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

#### Announcements

Bas van Dijk annouced updates to regions (0.9), regions-mtl (0.3.1.5), and regions-monadstf (0.3.1.5)

Don Stewart 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 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 reddit or the 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 reddit or the original post.*The Type Technology Tree (mapping Type Extensions in GHC)*: From (blog.ezyang.com), scored 53 with 5 comments. Read on reddit or the original post.*a message from Tokyo*: From (haskell.org), scored 47 with 9 comments. Read on reddit or the original post.*Haskell’s Niche: Hard Problems*: From (cdsmith.wordpress.com), scored 43 with 16 comments. Read on reddit or the original post.*Functional flocks : modelling and visualizing flocking behavior in Haskell*: From (syntacticsalt.com), scored 21 with 0 comments. Read on reddit or the original post.*Tech Talk Video: Faster Persistent Data Structures Through Hashing*: From (corp.galois.com), scored 20 with 5 comments. Read on reddit or the original post.*Recursion is a low-level operation*: From (blog.fogus.me), scored 18 with 25 comments. Read on reddit or the original post.*Yesod 1.0 Roadmap*: From (docs.yesodweb.com), scored 17 with 9 comments. Read on reddit or the original post.*Type inference weirdness*: From (self.haskell), scored 13 with 26 comments. Read on reddit .

#### Top StackOverflow Answers

- 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] 2520 If you prefer not to use ...

- 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 ...

- 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 ...

- 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*) read - Is there a book which teaches about compilers using Haskell? (
*votes: 12, answers: 3*) read - Reasoning laziness (
*votes: 10, answers: 1*) read - What are some compelling use cases of infinite data structures? (
*votes: 10, answers: 5*) read - The difference between +1 and -1 (
*votes: 9, 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:

Post a Comment