News for hackers. Stuff that matters.
Re:Factorization diagrams in Haskell by jonp on Saturday October 06, 2012 @08:39AM (#4620365)
Here's a JavaScript/HTML5/Canvas version.

You can view the first 100 diagrams in a grid or view the diagram for the N of your choice. There's also an option to view an alternative diagram where the drawing starts with the smallest prime instead of the smallest.

http://jsfiddle.net/FEKX2/3/

Re:Factorization diagrams in Haskell by gwillen on Saturday October 06, 2012 @01:38PM (#4621104)
I noticed the author speculating about color, so I colorized it based on the identity of the largest prime:

http://jsfiddle.net/HEHHj/2/

It actually uses the last prime drawn, so it's only useful in 'smallest first' mode. That ought to be fixed, but I was lazy about it.

Colorizing the image based on the largest prime makes the pattern intelligible a little bit longer, before it becomes impossible to tell the big primes apart.

Re:Factorization diagrams in Haskell by Almaviva on Saturday October 06, 2012 @09:35AM (#4620475)
> var PI = 355 / 113;

You know about Math.PI?

Re:Factorization diagrams in Haskell by smcl on Saturday October 06, 2012 @11:05AM (#4620692)
I'm curious about this line, too. I wonder if it's maybe just a wee joke
Re:Factorization diagrams in Haskell by Almaviva on Saturday October 06, 2012 @12:12PM (#4620865)
If it's a droll reference to that thread last week about how there are no useful rational approximations, then "whoosh" and well played, sir:)
Re:Factorization diagrams in Haskell by cocoflunchy on Saturday October 06, 2012 @08:41AM (#4620370)
Arg! You beat me to it.