Profile cover photo
Profile photo
Hideyuki Tanaka
145 followers
145 followers
About
Hideyuki's posts

Post has shared content
I don't know why they call C++ strict and Haskell lazy, it's the wrong way round.

It's easy to write a Haskell program to input a list and start doing work on it before the user has even finished typing it in. This is the default in Haskell. It's eager to get stuff done. The norm in C++ is to wait until the user has finished entering the string before doing any work. Haskell is great if you want to compose a sequence of operations on lists. You don't have to wait for the entire operation on the first list to finish before starting work on the next because Haskell just can't wait to start evaluating the final result.

The Haskell laziness page (http://en.wikibooks.org/wiki/Haskell/Laziness) discusses how thunks are used to implement laziness. But really a thunk is a mechanism that allows Haskell to be eager. Rather than try to evaluate code that could cause a computation to block Haskell puts that stuff in a thunk so it can get on with evaluating the part that's going to be most productive from the point of view of any consumers further down the evaluation chain.

It's all a matter of perspective. If you're a consumer of output from a Haskell program it looks eager but if a Haskell program is the consumer of your input it looks lazy.

(I was motivated to write this because of the tweet: https://twitter.com/CompSciFact/status/572750815800238081 )

Update: Repost with different permissions.

Post has shared content
I'm excited to announce that +Simon Marlow & +Edward Kmett will be giving talks at ZuriHac 2014.

If you wish to attend, please register by filling out the following form:
http://bit.ly/ZuriHac2014

Haskell学ぼう.みんな Haskell勉強したい人の集まるサイト #みんなのドメイン

Post has shared content
New versions of text, attoparsec, and aeson!

Now you can enjoy UTF-8 encoding that is up to 4 times faster than before, and JSON encoding and decoding that are up to twice as fast. Not a bad way to start 2014!

Post has shared content
If you have Emacs haskell-mode installed, you can improve your GHC development experience by setting (using M-x set-variable) haskell-compile-cabal-build-command to

  cd ~/src/ghc; make -C compiler 2 EXTRA_HC_OPTS=-ferror-spans

You can then rebuild the (stage 2) compiler by typing C-c C-c in Emacs. You can jump to the next compilation error with C-` as per usual.

Post has attachment

Post has attachment

Post has attachment

Post has attachment

Post has attachment
Wait while more posts are being loaded