Show HN: Codestat.dev – Stats from 2M open-source repositories (codestat.dev)
Hi HN! This is a little site I put together while learning the Elm language as part of a hackathon at my work, I thought you might enjoy it.
Be sure to click the `(source)` buttons next to the graphs: you can edit them interactively & write your own queries against the entire data set. The syntax isn't well documented yet, but you can probably get the general idea pretty quickly based on the examples there.
If you like it, have questions, etc. let me know! If folks think this is cool, maybe I can get it turned into a legit project. :)
8 comments
[ 2.9 ms ] story [ 29.2 ms ] thread[0]: https://sourcegraph.com/.api/compute/stream?q=context%3A%40r...
So the reason they bounce around is because new results are streaming in, and it's updating the chart live based on those.
After a little bit it will stop & have found all results
Basic format is:
For example, this query will find all `License: <word>` instances in code/text files across all 2 million repos. It selects (`-> $1`) the first regexp capture group `(\w+)`: There are some options you can add, like `count:all` (get all results it can find, will timeout after 60s), `repo:github\.com/myorg/` (regexp filter to just your repos)Can use this for code mining, too: to find out what the most common delimiter passed to `strings.Split` in Go is, for example:
When it comes to changing CSS dynamically, it's quite nice to have that in Elm code too rather than say a CSS class you toggle.
The thing I'm using here is elm-ui, it takes a more opinionated approach and basically eliminates a lot of the CSS oddities: instead of numerous flex, margin etc. CSS properties you just get simple alignLeft, centerX, etc. attributes in a row/column layout. Quite nice. There's a talk[0] about it.
[0] https://www.youtube.com/watch?v=Ie-gqwSHQr0&t=2s