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...
Re:Instagram Engineer Challenge solved with Javascript by ronilan on Tuesday November 15, 2011 @03:02PM (#3239899)
Mine from the weekend here: http://ronilan.com/instagram-unshredder/
Re:Instagram Engineer Challenge solved with Javascript by reledi on Wednesday November 16, 2011 @02:13AM (#3242189)
I preferred yours. You at least gave some comments about the solution.
Re:Instagram Engineer Challenge solved with Javascript by ekosz on Tuesday November 15, 2011 @03:06PM (#3239917)
I wish I read the comments here first.
Re:Instagram Engineer Challenge solved with Javascript by sktrdie on Tuesday November 15, 2011 @03:18PM (#3239984)
awesome! great job
Re:Instagram Engineer Challenge solved with Javascript by Timothee on Tuesday November 15, 2011 @02:49PM (#3239841)
Note that image 3 and 5 are slightly NSFW.
Re:Instagram Engineer Challenge solved with Javascript by magicalhobo on Tuesday November 15, 2011 @02:57PM (#3239880)
The source code is also NSFW: "_analizeColumn"
Re:Instagram Engineer Challenge solved with Javascript by verroq on Tuesday November 15, 2011 @07:46PM (#3241130)
That's probably a mispelling of _analyseColumn.
Re:Instagram Engineer Challenge solved with Javascript by codingsolo on Tuesday November 15, 2011 @03:26PM (#3240032)
5 depends on where you work :)
Re:Instagram Engineer Challenge solved with Javascript by ricardobeat on Tuesday November 15, 2011 @03:57PM (#3240178)
I (kind of) solved it with CoffeeScript but thought it wasn't a good idea to publish… if you do it's not a challenge anymore, is it?

https://github.com/ricardobeat/instagram-challenge

Re:Instagram Engineer Challenge solved with Javascript by eridius on Tuesday November 15, 2011 @03:01PM (#3239896)
Very neat. Makes me kind of embarrassed that I never got around to actually solving this challenge. I've had the web page open on my laptop since it first showed up on HN.
Re:Instagram Engineer Challenge solved with Javascript by HeyImAlex on Wednesday November 16, 2011 @02:10AM (#3242177)
Me too, and no response. I really wanted that T-Shirt... http://www.solesavoria.com/instagram/v2/
Re:Instagram Engineer Challenge solved with Javascript by carnevalem on Tuesday November 15, 2011 @06:44PM (#3240927)
You might also be interested in DARPA's similar challenge: http://www.shredderchallenge.com/
Re:Instagram Engineer Challenge solved with Javascript by espes on Wednesday November 16, 2011 @01:08AM (#3242055)
Or for a similar, easier task, problem 3 "life" from this year's FARIO: http://orac.amt.edu.au/fario/11/problems_en.pdf

Here'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

Re:Instagram Engineer Challenge solved with Javascript by rjenkins on Tuesday November 15, 2011 @08:50PM (#3241321)
Re:Instagram Engineer Challenge solved with Javascript by swang on Tuesday November 15, 2011 @08:06PM (#3241184)
So is this challenge over? I submitted an entry using Canvas as well but allowed users to drop image in from their desktop (only works in Chrome/Firefox though). Haven't heard from anyone at Instagram.
Re:Instagram Engineer Challenge solved with Javascript by rjenkins on Tuesday November 15, 2011 @08:54PM (#3241334)
funny, that's exactly how mine works. Haven't heard anything either
Re:Instagram Engineer Challenge solved with Javascript by touchcream on Tuesday November 15, 2011 @05:48PM (#3240715)
I solved it in ocaml, I only had this development environment this week end but it was fun. I didn't posted it on my blog but if someone wants it, just ask ;)
Re:Instagram Engineer Challenge solved with Javascript by vidoss on Thursday November 17, 2011 @01:17AM (#3246631)
Re:Instagram Engineer Challenge solved with Javascript by coreyrecvlohe on Tuesday November 15, 2011 @03:09PM (#3239933)
Great job! Excellent coding style btw.
Re:Instagram Engineer Challenge solved with Javascript by asdfqwer1234 on Tuesday November 15, 2011 @09:30PM (#3241450)
so can someone actually explain how this works?
Re:Instagram Engineer Challenge solved with Javascript by the-cakeboss on Wednesday November 16, 2011 @12:35AM (#3241981)
While I didn't look at how he did it, if I were to write something to do this, I would first locate each slice of the image. This could be accomplished using a rudimentary edge detection algorithm ( ie starting from the left, compare each column of pixels with the next, any large differences of course means an edge ). After that I might assign a weighted value to each edge of a slice, and then sort based upon those values.
Re:Instagram Engineer Challenge solved with Javascript by _gd3l on Tuesday November 15, 2011 @04:22PM (#3240304)
Nice work!
Re:Instagram Engineer Challenge solved with Javascript by cleverjake on Tuesday November 15, 2011 @02:34PM (#3239756)
Really impressive work, great job.