Instagram Engineer Challenge solved with Javascript
feval.info
Image processing challenge solved using javascript and HTML5 canvas.
feval.info
https://github.com/Mgccl/mgccl-haskell/blob/master/random/un... (so it seems I don't like to specify the type of my functions...)
Explanation is here: http://chaoxuprime.com/2011/11/a-solution-to-Instagram-engin...
Care for some unsolicited hlint-like suggestions?
Why not simply this:
img <- readImage "file.png"
-- instead of this?
t <- readImage "file.png"
let img = t
Why not this: map (y!!) x
foldr ((:).(y!!)) [] x -- instead of this?
Note that a way of reading fold g [] is that replaces the list constructor (:) (aka cons) with g. So (:) as argument of fold is probably not idiomatic, since foldr (:) [] is the same as id.I have no idea what was in my mind when I wrote
foldr ((:).(y!!)) [] xHere's case 8 to give you an idea: http://i.imgur.com/1fFzO.png :P
Test data here: http://dl.dropbox.com/u/76985/life-all-linux.zip