Showing posts with label racket. Show all posts
Showing posts with label racket. Show all posts

Wednesday, September 9, 2015

(divisors z) → (Listof Natural)
z : Integer
Returns a list of all positive divisors of the integer z. The divisors appear in ascending order.

Another reason why Racket rocks, because optimizing trial-division for large numbers.

It makes solving the Fermat Exponent problem easy:

Apparently, there was a period of time in Beethoven's transition from classical formalist to bombastic romanticist (possibly accompanied by severe hearing loss and disillusionment with Napoleon) when musicians said, (translated from 19th-century German), "What the heck, Beethoven! This isn't music! My kids could write this!"

Elsewhere:

Saturday, June 6, 2015

Racket and Identicons

Using Racket to generate identicons:

I’ve always liked identicons, which WordPress and GitHub have used to great effect. The premise is simple: take a user identifier such as an IP or email address and deterministically convert it into an image based on a simple algorithm. To that I end I started hacking on Identikon - a little Racket program that generates different types of identicons based on rules modules.