Skip to content
Why is a raven like a writing desk?

Thoughts both confusing and enlightening.

Why is a raven like a writing desk?

Thoughts both confusing and enlightening.

Haskell wibblings

elbeno, 21 May, 200729 July, 2007

Well, this weekend I dived in with Haskell and started to make my way through The Haskell School of Expression. So I’ve been exercising neural pathways that haven’t seen a treadmill in a while, C++ programmer that I am. Overall, it’s been going well, and it’s giving me the feeling that Haskell is a very nice language. Also, Haskell mode for emacs is just fine. However, there are a few areas where Haskell seems rough around the edges.

First, the Haskell Graphics Library doesn’t compile for me – no x86_64 target exists! So I had to switch from GHC to Hugs, which had it built in. I still harbour hopes of a native-compiled HGL, but when I become an experienced Haskell programmer, I foresee a future of library and FFI pain.

Second, although I’m generally not too bothered with the Haskell way of indentation being vital to syntax, I have hit a problem that seems to be very common (even bothering experienced Haskellers). And to boot, Hugs’ error message is obscure (“unexpected ;”? I don’t even have any ;’s!).

Anyway, I’m up to the stage of drawing snowflake fractals and Sierpinski triangles/gaskets.

Haskell

Post navigation

Previous post
Next post

Related Posts

Haskell problem followup

10 July, 200729 July, 2007

Having read a bit of the next chapter and discovered the zipWith function, I now have a higher-order non-recursive solution to the makeChange problem, viz. makeChange1 :: Int -> [Int] -> [Int] makeChange1 amt vs = zipWith div modvs vs where modvs = scanl mod amt vs

Read More

More on Tree Folds

17 July, 200729 July, 2007

After some thought, I think I have the definitions for left and right fold on a tree: foldrTree :: (a -> b -> b) -> b -> InternalTree a -> b foldrTree f z ILeaf = z foldrTree f z (IBranch a x y) = foldrTree f (f a (foldrTree…

Read More

Functional Rainbow

29 December, 200829 December, 2008
Read More

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

©2026 Why is a raven like a writing desk? | WordPress Theme by SuperbThemes