2 hours to go… I’ve been waiting for the men’s tennis US Open final to start. What should I do? In the end, I’ve been killing time listening to that Functional Geekery podcast episode which features Matthew Flatt talking about the Racket programming language. Realizing the irony, my thoughts went something like: “Racket, tennis?! Can’t be a coincidence! Still some time to burn, so I will programm something tennis-like in Racket!” So let’s open the Racket quickstart to somehow learn Racket and get an idea what the tennis-like thing should be.
The idea came instantly when I saw that Racket offers quite newbie-friendly picture drawing examples in its tutorial. Now, it’s obvious what I would do, isn’t it? Exactly, I would draw a tennis court! So I downloaded Racket and found the executable for the Racket IDE DrRacket in the bin folder of the resulting directory. Given the examples of the quickstart tutorial I could come up with that code which got the job done. And it even has (kind of) the blue color of the US Open hard court ;)
1 2 3 4 5 6 7 8 9 10 11 12 |
|
The code can also be found in that gist.
Anyway, now the final is about to start, so only a few impressions of using Racket for the first time: DrRacket proved easy to use and the documentation made it easy to find the right functions for drawing. It was quite pleasant to see that I could get things done in Racket even under severe time pressure ;)
Go, Federer!