Hacker News new | ask | show | jobs
Find out what you favorite programming languages are (github-languages.com)
5 points by alex-benoit 3505 days ago
1 comments

Cool.

Does it go by how GitHub tags each repo or by an independent look at the code in each repo? Maybe by file extensions?

The github api return the memory footprint of each programming language per repository e.g: C++: 3000bytes, Ruby: 2000+ bytes. It's just about retrieving your list of public repos and going though all of them. Solution is not perfect, I assume 1 byte = 1 char, 25 char is 1 line, plus frameworks like ruby mess up the count, but it's something :D
You can check out the source if you follow the star icon on the homepage. Under app/services/github_client.rb