Haskell statistics on Project Euler
I was curious about some statistics related to Project Euler and how well Haskell holds up in the contest. The table lists the most-often solved problems (in Haskell and overall). The question was to see if some problems are "easier" to solve in Haskell than in other languages.
Scraper
I put together a quick scraper in Haskell + tagsoup. You can find it here. If there is some interest in these kind of stats, I think I'll clean it up and look for more interesting correlations. ;-) In order to use the script, you need to be logged into ProjectEuler with a cookie set. Run this first (replacing USERNAME and PASSWORD):
$ mkdir ~/.cookies/
$ curl --cookie-jar ~/.cookies/euler --data "username=USERNAME&password=PASSWORD&login=Login" "http://projecteuler.net/index.php"
Stats
Here's the first question I wanted to answer: what problems are "easier" to solve in Haskell? Given all users on Project Euler who have selected their language of preference as "Haskell", the first column gives us a percentage of how many solved the problem (second column). The third column is for comparison a ranking of difficulty of problems as judged by all languages.| % Haskelled | Haskell Rank | Euler Rank | |
| 98% | 1 | 1 | |
| 95% | 2 | 2 | |
| 89% | 6 | 6 | |
| 87% | 5 | 5 | |
| 85% | 3 | 3 | |
| 84% | 4 | 4 | |
| 83% | 7 | 7 | |
| 78% | 9 | 8 | |
| 78% | 8 | 9 | |
| 73% | 10 | 10 | |
| 73% | 16 | 16 | |
| 72% | 20 | 20 | |
| 67% | 13 | 13 | |
| 60% | 25 | 11 | |
| 58% | 14 | 14 | |
| 55% | 11 | 12 | |
| 54% | 48 | 25 | |
| 54% | 15 | 15 | |
| 54% | 12 | 48 | |
| 50% | 21 | 18 | |
| 47% | 18 | 21 | |
| 47% | 22 | 17 | |
| 46% | 17 | 22 | |
| 45% | 30 | 19 | |
| 44% | 28 | 28 | |
| 44% | 24 | 30 | |
| 43% | 29 | 24 | |
| 41% | 36 | 67 | |
| 40% | 34 | 36 | |
| 40% | 19 | 29 | |
| 39% | 67 | 34 | |
| 36% | 40 | 35 | |
| 35% | 35 | 23 | |
| 34% | 52 | 40 | |
| 33% | 56 | 42 | |
| 32% | 97 | 27 | |
| 32% | 53 | 52 | |
| 32% | 23 | 45 | |
| 31% | 31 | 26 | |
| 31% | 42 | 31 | |
| 31% | 27 | 39 | |
| 31% | 45 | 37 | |
| 31% | 26 | 33 | |
| 30% | 39 | 53 | |
| 28% | 33 | 97 | |
| 28% | 37 | 56 | |
| 28% | 41 | 41 | |
| 27% | 55 | 32 | |
| 26% | 32 | 79 | |
| 24% | 38 | 55 |
More stats
In the top 50, there is almost no difference. But maybe some bigger patterns can emerge. Here's the entire list of problems, sorted by how many Haskellers solved it: [1, 2, 6, 5, 3, 4, 7, 9, 8, 10, 16, 20, 13, 25, 14, 11, 48, 15, 12, 21, 18, 22, 17, 30, 28, 24, 29, 36, 34, 19, 67, 40, 35, 52, 56, 97, 53, 23, 31, 42, 27, 45, 26, 39, 33, 37, 41, 55, 32, 38, 79, 63, 47, 43, 49, 46, 50, 59, 57, 44, 92, 69, 99, 58, 71, 81, 76, 65, 73, 62, 54, 74, 85, 112, 72, 51, 61, 70, 102, 87, 80, 82, 64, 124, 68, 77, 60, 89, 206, 66, 104, 75, 96, 83, 120, 116, 123, 91, 113, 78, 145, 117, 205, 114, 125, 108, 119, 115, 100, 95, 187, 93, 94, 179, 86, 204, 173, 90, 122, 107, 101, 203, 121, 110, 84, 191, 109, 98, 88, 164, 131, 188, 105, 132, 118, 103, 207, 174, 162, 148, 111, 137, 134, 183, 169, 138, 197, 151, 130, 139, 135, 133, 129, 106, 127, 225, 214, 149, 190, 166, 140, 136, 215, 128, 178, 231, 230, 172, 144, 211, 159, 155, 220, 158, 142, 216, 209, 165, 160, 126, 146, 202, 185, 235, 168, 150, 182, 234, 157, 221, 186, 171, 152, 141, 222, 200, 181, 176, 147, 189, 180, 175, 219, 217, 199, 154, 227, 226, 218, 213, 210, 193, 170, 208, 192, 156, 143, 196, 184, 161, 228, 201, 167, 163, 212, 194, 153, 232, 177, 195, 223, 198, 224, 236, 233, 237, 229, 239, 238] This has just been a teaser, maybe we can draw out some interesting correlations. Look forward to more stats! Suggestions, ideas, criticisms...?
Filed under //
haskell
ProjectEuler




Comments [2]