News aggregator

Lazy Dynamic Programming

Haskell on Reddit - Mon, 05/26/2014 - 12:49pm
Categories: Incoming News

Memoizing Kayles

Haskell on Reddit - Mon, 05/26/2014 - 12:07pm
Categories: Incoming News

nomeata: Does list fusion work?

Haskell on Reddit - Mon, 05/26/2014 - 10:08am
Categories: Incoming News

www.fpcomplete.com

del.icio.us/haskell - Mon, 05/26/2014 - 6:46am
Categories: Offsite Blogs

So how is a noob supposed to get the latest version?

Haskell on Reddit - Mon, 05/26/2014 - 6:37am

I'm running GHC version 7.6.3. There's now version 7.8.2 to which I'd like to upgrade. However, if I go to the place where it's available, I'm told that I really should install the Platform (which is what I did last time). But the platform is still supplying 7.6.3 of GHC

How to proceed?

submitted by dhjdhj
[link] [34 comments]
Categories: Incoming News

Joachim Breitner: Does list fusion work?

Planet Haskell - Mon, 05/26/2014 - 6:10am

I’m writing this in the lunch break of TFP in Soesterberg. The invited talk this morning was by Geoffrey Mainland, and he talked about the difficulties of (informal) reasoning about performance in high-level languages like Haskell, especially with fancy stuff in the compiler like fusion. So I couldn’t help but think about a (very small) help here.

Consider the the two very similar expressions foldl (+) 0 [0..1000] and foldr (+) 0 [0..1000]. Which of these fuse away the list? Hopefully both, but hard to predict.

So with my list-fusion-probe library, you can write

import Data.List.Fusion.Probe (fuseThis) main = print $ foldr (+) 0 (fuseThis [0..1001])

and find out. If you compile this (with -O!), it will print

500500

If you change the foldr to foldl, it will print

Test: fuseThis: List did not fuse

So you can see that the function fuseThis :: [a] -> [a] does nothing if the list gets fused away, but causes a run-time error if not. It allows you to annotate your code with your assumptions of list fusion, and get shouted at if your assumptions are wrong.

It wouldn’t be hard to have the compiler give a warning or error message at compile time; we’d just need to introduce a special function abortCompilation that, when found in the code during compilation, does just that.

Note that you’ll have trouble reproducing the above in GHC HEAD, where foldl does fuse (which is what I’m going to talk about tomorrow here).

Categories: Offsite Blogs

sencjw.com

del.icio.us/haskell - Sun, 05/25/2014 - 9:55pm
Categories: Offsite Blogs

sencjw.com

del.icio.us/haskell - Sun, 05/25/2014 - 9:55pm
Categories: Offsite Blogs

www.wellposed.com

del.icio.us/haskell - Sun, 05/25/2014 - 4:26pm
Categories: Offsite Blogs

www.wellposed.com

del.icio.us/haskell - Sun, 05/25/2014 - 4:26pm
Categories: Offsite Blogs

github.com

del.icio.us/haskell - Sun, 05/25/2014 - 3:16pm
Categories: Offsite Blogs

github.com

del.icio.us/haskell - Sun, 05/25/2014 - 3:16pm
Categories: Offsite Blogs

Call Arity

del.icio.us/haskell - Sun, 05/25/2014 - 1:13pm
Categories: Offsite Blogs

Call Arity

del.icio.us/haskell - Sun, 05/25/2014 - 1:13pm
Categories: Offsite Blogs

New gtk2hs 0.12.4 release

gtk2hs - Wed, 11/21/2012 - 12:56pm

Thanks to John Lato and Duncan Coutts for the latest bugfix release! The latest packages should be buildable on GHC 7.6, and the cairo package should behave a bit nicer in ghci on Windows. Thanks to all!

~d

Categories: Incoming News