6 ms·
Show HN: A graph of the languages you use on Github
- willvarfar 15y agoNeat looking but I couldn't work out how it could be so wrong about my williame account
- aaronpk 15y agoWhat's wrong about it? It's finding a bunch of C code in this repo: https://api.github.com/repos/williame/GlestNG/languages https://api.github.com/repos/williame/GlestNG/languages. I just realized that it won't take in to account the difference between a repo you created and one you cloned, it counts both equally.
- udp 15y ago> between a repo you created and one you cloned Forked, you mean.
- aaronpk 15y agoyes. oops
- willvarfar 15y agoaha, so its a github bug then?
- samirahmed 15y agoThis is really neat. One suggestion would be to have a visible and accessible back button or search again button. Since going back doesn't take you to the home screen, I need to refresh to get back to the search option
- aaronpk 15y agoThanks for the suggestion! I added a "start over" button.
- caseorganic 15y agoThanks! I wanted to request that too.
- th0ma5 15y agoI 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
- aaronpk 15y agoYea 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 https://github.com/aaronpk/Github-Language-Graph
- th0ma5 15y agothere'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.
- jawngee 15y agoI sent you a pull request that uses hash tags.
- aaronpk 15y agoAwesome! Merged it in and updated the site. Thanks!
- gukjoon 15y agoVery neat. How does this treat forks? Does it consider only the commits you make?
- aaronpk 15y agoUnfortunately 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/languages https://api.github.com/repos/aaronpk/Flickr-Archiver/languag... I was thinking about excluding forks, or showing them in a separate graph.
- strager 15y agoI'd like that. My forks of a few C++ projects brings C++ to over 50%, but I barely use C++ in my own projects. =]
- gukjoon 15y agoVery neat. How does this treat forks? Does it consider only the commits you make?
- mrvim 15y agoAwesome interface. Very cool.
- deleted 15y ago[deleted]
- infincia 15y agoI was a bit shocked to see numbers like this: http://i.imgur.com/2ayTD.png http://i.imgur.com/2ayTD.png 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. Nice little tool though, good work :)
- tzs 15y agoHow 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: 1000 JavaScript 1100 Lua 600 Perl
- aaronpk 15y agoMy mistake! Apparently the counts that come back from the Github api are bytes, not lines. http://developer.github.com/v3/repos/#list-languages http://developer.github.com/v3/repos/#list-languages You can see an example of an API call for one of your repositories: https://api.github.com/repos/tzs/Reddit-Math-Display-for-Safari/languages https://api.github.com/repos/tzs/Reddit-Math-Display-for-Saf...
- xyzzyb 15y agoThis is one instance where the github documentation is lacking. Actually their entire API documentation site could use some serious attention.
- kingkilr 15y agoSo yeah, code. Python 7308374 JavaScript 1247179 Shell 12761 C 5939
- mkramlich 15y agoI 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. :)
- kibwen 15y agoFor 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.
- xyzzyb 15y agoIt'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. http://developer.github.com/v3/repos/ http://developer.github.com/v3/repos/
- mbetter 15y agoFrom 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.
- alptrv 15y agoCool. 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
- jwarzech 15y agoI'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.
- aaronpk 15y agoYes, 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 https://developers.geoloqi.com/client-libraries/Javascript) so then it would require a server-side backend to handle the login.
- alpb 15y agoThat's pretty inaccurate. So I forked Linux kernel and changed nothing. Now I'm a 99.9% C developer. Cool.
- ohyes 15y agoLanguage Bytes Clojure 6731 JavaScript 9778 Erlang 13858 Common Lisp 584550 Emacs Lisp 2489 What do I win Bob??