251 points · by ams1 · 12y ago · 50 comments
1. Normalize times to integers.
2. Assume congruence at x = t mod (t+1).
3. Solve congruence system.
4. Denormalize result.
Python solution: http://ideone.com/Wh2SR6
Solution perspective: http://www.wolframalpha.com/input/?i=35417600268377072234556...Awesome!
In terms of "code with explanation" layout, I really like todos.js' approach: http://backbonejs.org/docs/todos.html
It also works with images: http://www.ifixit.com/Teardown/Mac+Pro+Late+2013+Teardown/20...
Most layouts nowadays fail to take advantage of the horizontal space available. It's just 2 colums in the end, but it goes a long way.
Just out of curiosity, why did you include that? Do people make judgements about tools based on the person who wrote it?
I was going to bring up the IPython notebook functionality, in part because it was used as a follow-up to another xkcd strip ("Regex Golf", http://nbviewer.ipython.org/url/norvig.com/ipython/xkcd1313.... ), but I gotta say that one looks nicer :) The use-cases are slightly different, though.
... todos.js' did it better though.
In the meantime, pull requests quite welcome: https://github.com/jsvine/reporter
<p>(Code samples are hidden. <label><input type="checkbox" id="showCodeSamples"/> Show code samples</label>)</p> curl -s http://imgs.xkcd.com/comics/frequency/turnsignal1.gif |
giftext | grep DelayTime | cut -d':' -f 2 | awk '{s+=$1} END {print s/100}'
The results seem to correspond with authors table.One to make it.
One to take it apart.
Ping me if you do end up making one!
More info here: http://www.matthewflickinger.com/lab/whatsinagif/animation_a...
And more info on the zero-delay problem here: http://nullsleep.tumblr.com/post/16524517190/animated-gif-mi...
edit: The frequency equation solved for time, using the adjusted values from the table: https://www.google.com/search?q=1%2F%281%2F1-1%2F1.04%29
Surely he must have something truly epic saved up for 1337.
Right? Anyone?