News for hackers. Stuff that matters.
Re:Instagram Engineer Challenge solved with Javascript by Mgccl on Tuesday November 15, 2011 @03:16PM (#3239970)
This challenge is the first real life program I wrote with Haskell.

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...

Re:Instagram Engineer Challenge solved with Javascript by nandemo on Tuesday November 15, 2011 @11:44PM (#3241814)
Very nice.

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.
Re:Instagram Engineer Challenge solved with Javascript by Mgccl on Thursday November 17, 2011 @09:26AM (#3247729)
Thanks. hlint-like suggestions are always welcome.

I have no idea what was in my mind when I wrote

  foldr ((:).(y!!)) [] x
Re:Instagram Engineer Challenge solved with Javascript by tikhonj on Tuesday November 15, 2011 @03:21PM (#3240000)
Heh, I did the same thing. It took me much too long to figure out that I needed to call ilInit...