But then I realized there are a ton of libraries included in some of those repos, so for languages or platforms where it's common to include 3rd party libraries in the tree (obj-c is a big one, appengine too and i hit both :), you'll get all that stuff counted by the github API too.
How is it counting? For me (tzs on Github) it says I have this many lines:
2038 JavaScript
43274 Lua
17425 Perl
If I count up the heads of all my repositories, just going by lines in the file to maximize the counts (i.e., not filtering out whitespace or comments, and counting mixed HTML/JavaScript as all JavaScript) I get numbers more like this:
For a fun time, check out some of the statistics for large organizations with Github accounts (e.g. Joyent, Mozilla), or simply bask in the monochromatic majesty of Torvalds.
Does anyone know where the source for this data is? I was poking around in Github's API for this sort of thing just last week, with no luck.
It's making a couple of calls: 1) grab the list of repos for the given user, 2) use the "List languages" call to the github repo API to pull in the language data for each repo.
Unfortunately it counts all code on your account equally. Github has a nice API that returns byte-count per language for a repository: https://api.github.com/repos/aaronpk/Flickr-Archiver/languag... I was thinking about excluding forks, or showing them in a separate graph.
I got different results each time, not in the numbers, but in the rendering of the graph. Anyway for a permalink or somesuch that I can send to people? Otherwise rather nice! :D
Yea I was thinking about making a permalink for it, but it's implemented entirely client-side so I don't think I have an easy way to do that. Feel free to fork it on github if you can figure it out: https://github.com/aaronpk/Github-Language-Graph
there's jquery libs for bookmark and history manipulation, you've seen this, it is the url path like stuff after a # in a url... javascript basically can sniff that, like anchor tag bookmarks. sort of a hack for sure! but very common, eg: twitter.
Cool. But I assume it only looks to user's public repositories? Would be nice to see a graph with private repos. Don't know if it would be possible with Github's API
Yes, it only looks at public repositories. It wouldn't be hard to look at private ones but it would require the user to OAuth so the app has access. But I'm not sure if Github supports using OAuth entirely in Javascript (like https://developers.geoloqi.com/client-libraries/Javascript) so then it would require a server-side backend to handle the login.
I'd imagine that with most paid accounts the private repos are also the largest. I know my stats would we be completely different if it included those.
I like your taste in languages. That mix will realistically let you do 99% of the things you'd want, almost all roles and use cases, well. Not a coincidence, that's the mix I've settled on too. :)
From the given numbers, my account (mbetter) is about 40% Haskell, 36% Javascript and 24% Python. The graph never shows this - sometimes it shows 58% Haskell, 42% Javascript and other times it shows 100% Python.