[Haskell] Haskell Weekly News: Issue 169
Daniel Santa Cruz
dstcruz at gmail.com
Thu Feb 17 06:35:28 CET 2011
Welcome to issue 169 of the HWN, a newsletter covering developments in
the [1]Haskell community. This release covers the week of February 6 -
12, 2011.
Congrats to Bryan O'Sullivan and Mark Lentczner for pulling off a
successfull [2]BayHac 2011!
Announcements
Joao Fernandes [3]sent out a call for papers for the 4th International
Conference on Software Language Engineering to be held in Braga,
Portugal, 3-6 July 2011.
Bas van Dijk annouced [4]version 0.1 and [5]version 0.2 of his
monad-control library. "monad-control is a rewrite of monad-peel than
uses CPS style operations and exploits RankNTypes language extensions
to simplify and speed up most functions."
Gregory Collins and the Snap team [6]proudly announced the release of
Snap 0.4 "containing a whole bunch of nifty new features."
Peter Scott [7]announced pwstore, a library that aims to "handle all
the details of password storage for you, in a way that should be so
easy to use that there's no reason not to use it."
Bas van Dijk [8]released case-insensitive 0.1. "The package provides
the module Data.CaseInsensitive which exports the CI type constructor
which can be parameterised by a string-like type... Comparisons of
values of the resulting type are then insensitive to cases."
Ryan Newton [9]released a package to do accelerated AES and RNG.
Brent Yorgey [10]sent in a second call for submissions to the
Monad.Reader -- special poetry and fiction edition.
John Lato [11]released version 3.0.1 of ListLike, which "provides
polymorphic functions with Data.List-style api for many different data
types, including list, arrays, and bytestrings.
John also [12]released version 0.7.0.2 and 0.8.0.1 of iteratee, after
discovering a memory leak which affects all current versions of
iteratee. He states that he would "strongly encourage all users of
earlier versions to upgrade to one of these releases."
Ganesh Sittampalam and the darcs team are [13]pleased to announce
version 2.5.1, a minor upgrade for the 2.5 release. "The main focus of
this release is support for the GHC 7.0 series and the upcoming
February 2011 Haskell Platform, but the release also includes bug fixes
and minor usability improvements."
Trystan Spangler [14]announced the release of hspec: Behavior Driven
Development for Haskell. "hspec ties together requirements and code
that verifies the requirements are met. The verifying code can be a
boolean expression, a QuickCheck property, or an explination of why
it's pending. The requirements can then be turned into documentation of
what the code does and what remains to be implemented."
Wren Ng Thornton [15]announce bytestring-trie 0.2.3, a "long awaited
release for efficient finite maps from (byte)strings to values."
Brent Yorgey would like to invite you to [16]save the date for the
Haskell hackathon in Philadelphia, July 29-31.
Quotes of the Week
* smerdyakov: Some might argue that you can derive False from a
sentence containing both "dependent types" and "contract
programming."
* Einstein: Make everything as simple as possible, but not simpler.
* Einskell: Make everything as monad as possible, but not monadder.
* kmc: it's important to show that Haskell is usable not just for
useless maths, but also for real-world tasks such as rendering
teapots
* ddarius: Attempting to join #not-not-math sent me to #math.
Freakin' Boole.
* gwern: [quoting a hypothetical edwardk] 'I HAVE CONSUMED YOUR
KNOWLEDGE; LEAVE ME LEST I CONSUME YOUR FLESH AS WELL'
* monochrom: @let germanize = concat . words
Top Reddit Stories
* Announcing: Snap Framework v0.4
Domain: snapframework.com, Score: 40, Comments: 3
On Reddit:
http://www.reddit.com/r/haskell/comments/fgc38/announcing_snap_framework_v04/
Original: http://snapframework.com/blog/2011/02/05/snap-0.4-released
* Haskell Summers of Code retrospective (updated for 2010)
Domain: gwern.net, Score: 31, Comments: 7
On Reddit:
http://www.reddit.com/r/haskell/comments/fid5w/haskell_summers_of_code_retrospective_updated_for/
Original: http://www.gwern.net/Haskell%20Summer%20of%20Code.html
* How to write type-level lambda-abstractions at the value level
Domain: haskell.org, Score: 26, Comments: 7
On Reddit:
http://www.reddit.com/r/haskell/comments/fjbxw/how_to_write_typelevel_lambdaabstractions_at_the/
Original: http://www.haskell.org/pipermail/haskell-cafe/2011-February/089184.html
* Storing passwords securely: don't roll your own
Domain: finger-tree.blogspot.com, Score: 25, Comments: 22
On Reddit:
http://www.reddit.com/r/haskell/comments/fgm26/storing_passwords_securely_dont_roll_your_own/
Original: http://finger-tree.blogspot.com/2011/02/storing-passwords-securely-in-haskell.html
* #haskell-game & Haskellers Game Interest Group
Domain: self.haskell, Score: 25, Comments: 3
On Reddit:
http://www.reddit.com/r/haskell/comments/fjzz0/haskellgame_haskellers_game_interest_group/
Original: /r/haskell/comments/fjzz0/haskellgame_haskellers_game_interest_group/
* Type class generics to be replaced in GHC 7.2 or 7.4
Domain: haskell.org, Score: 24, Comments: 2
On Reddit:
http://www.reddit.com/r/haskell/comments/fiq7o/type_class_generics_to_be_replaced_in_ghc_72_or_74/
Original: http://www.haskell.org/pipermail/glasgow-haskell-users/2011-February/020006.html
* What can I do with Haskell?
Domain: self.haskell, Score: 22, Comments: 33
On Reddit:
http://www.reddit.com/r/haskell/comments/fgfh9/what_can_i_do_with_haskell/
Original: /r/haskell/comments/fgfh9/what_can_i_do_with_haskell/
* There seems to be lots of interest in SMT solvers in the Haskell
community these days, so I started ##smt on freenode
Domain: self.haskell, Score: 20, Comments: 6
On Reddit:
http://www.reddit.com/r/haskell/comments/fh2zw/there_seems_to_be_lots_of_interest_in_smt_solvers/
Original: /r/haskell/comments/fh2zw/there_seems_to_be_lots_of_interest_in_smt_solvers/
* darcs 2.5.1 released
Domain: lists.osuosl.org, Score: 16, Comments: 0
On Reddit:
http://www.reddit.com/r/haskell/comments/fj46y/darcs_251_released/
Original: http://lists.osuosl.org/pipermail/darcs-users/2011-February/026018.html
* monad-control
Domain: mail-archive.com, Score: 11, Comments: 2
On Reddit: http://www.reddit.com/r/haskell/comments/fgbao/monadcontrol/
Original: http://www.mail-archive.com/haskell@haskell.org/msg23278.html
Top StackOverflow Answers
* How does Data.MemoCombinators work?
votes: 20
Read on SO:
http://stackoverflow.com/questions/4980102/how-does-data-memocombinators-work/4980838#4980838
This library is a straightforward combinatorization of the well-known
technique of memoization. Let's start with the canonical example:
fib = (map fib' [0..] !!)
where
fib' 0 = 0
fib' 1 = 1
fib' n = fib (n-1) + fib (n-2)
I interpret what you said to mean that you know how and why this works.
So I'll focus on the combinatorization.
We ...
* What's similar to fmap for monadic values?
votes: 16
Read on SO:
http://stackoverflow.com/questions/4927014/whats-similar-to-fmap-for-monadic-values/4927549#4927549
pelotom's answer is the straightforward one. But not the fun one! sequence
is the Haskell function that one can think of as flipping the order of
type constructors between a list and a monad.
sequence :: (Monad m) => [m a] -> m [a]
Now what you want is, so to speak, to flip the order of type
constructors between a Maybe and a monad. Data.Traversable ...
* Does there exist a monad instance for Data.Map / Data.IntMap?
votes: 15
Read on SO:
http://stackoverflow.com/questions/4973335/does-there-exist-a-monad-instance-for-data-map-data-intmap/4973929#4973929
Is there any particular reason you want to avoid using monad transformers?
if you get the MaybeT package from Hackage you can achieve what you
want like this:
import Control.Monad
import Control.Monad.Maybe
import Control.Monad.State
import qualified Data.Map as Map
type MapM k v a = MaybeT (State (Map.Map k v)) a
lookupM k = MaybeT $ Map.lookup k `liftM` ...
* How to split a string in Haskell?
votes: 11
Read on SO:
http://stackoverflow.com/questions/4978578/how-to-split-a-string-in-haskell/4978742#4978742
There is a package for this called split.
cabal install split
Use it like this:
ghci> splitOn "," "my,comma,separated,list"
["my","comma","separated","list"]
It comes with a lot of other functions for splitting on matching
delimiters or having several delimiters.
* Haskell (n+1) in pattern matching
votes: 10
Read on SO:
http://stackoverflow.com/questions/4913588/haskell-n1-in-pattern-matching/4913617#4913617
It's a specific case of what is called "n+k patterns", which is generally
disliked, and will be has been removed from the language. See here for
more information.
Here is a good note on n+k patterns, which quotes the following from the
Haskell 98 Report (emphasis mine):
Matching an n+k pattern (where n is a
variable and k is a positive integer
...
* Setting upper limit to the input set according to the output function
votes: 10
Read on SO:
http://stackoverflow.com/questions/4927387/setting-upper-limit-to-the-input-set-according-to-the-output-function/4927476#4927476
The check fib x < 1000000 in the list comprehension filters away the
fib x values that are less than 1000000; but the list comprehension has
no way of knowing that greater values of x imply greater value of
fib x and hence must continue until all x have been checked.
Use takeWhile instead:
takeWhile (< 1000000) [ fib x | x <- [0..35]]
Top StackOverflow Questions
* How does Data.MemoCombinators work?
votes: 13, answers: 4
Read on SO:
http://stackoverflow.com/questions/4980102/how-does-data-memocombinators-work
* How to best synchronize game engine and network server in Haskell?
votes: 10, answers: 3
Read on SO:
http://stackoverflow.com/questions/4973401/how-to-best-synchronize-game-engine-and-network-server-in-haskell
* How to choose right Haskell C type?
votes: 9, answers: 1
Read on SO:
http://stackoverflow.com/questions/4924994/how-to-choose-right-haskell-c-type
* How to split a string in Haskell?
votes: 9, answers: 5
Read on SO:
http://stackoverflow.com/questions/4978578/how-to-split-a-string-in-haskell
* Haskell (n+1) in pattern matching
votes: 7, answers: 1
Read on SO:
http://stackoverflow.com/questions/4913588/haskell-n1-in-pattern-matching
About the Haskell Weekly News
You can find an html version of this newsletter at:
http://bit.ly/h1ICad
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
References
1. http://haskell.org/
2. http://mtnviewmark.wordpress.com/2011/02/13/bayhac-2011-wrap-up/
3. http://article.gmane.org/gmane.comp.lang.haskell.general/18473/match=call+papers
4. http://article.gmane.org/gmane.comp.lang.haskell.general/18474
5. http://article.gmane.org/gmane.comp.lang.haskell.general/18485
6. http://article.gmane.org/gmane.comp.lang.haskell.cafe/86087
7. http://article.gmane.org/gmane.comp.lang.haskell.general/18476
8. http://article.gmane.org/gmane.comp.lang.haskell.general/18475
9. http://article.gmane.org/gmane.comp.lang.haskell.general/18481
10. http://themonadreader.wordpress.com/2011/01/19/call-for-copy-special-poetry-and-fiction-edition/
11. http://article.gmane.org/gmane.comp.lang.haskell.general/18486
12. http://article.gmane.org/gmane.comp.lang.haskell.general/18490
13. http://article.gmane.org/gmane.comp.version-control.darcs.user/25902
14. http://article.gmane.org/gmane.comp.lang.haskell.general/18493
15. http://article.gmane.org/gmane.comp.lang.haskell.libraries/15294
16. http://article.gmane.org/gmane.comp.lang.haskell.general/18501
More information about the Haskell
mailing list