3 ms·
$ links -dump https://news.ycombinator.com/item?id=17205865 | grep -Eio '(php|python|react|javascript|java|objective-c|objective|object-c|object|haskell|rails|m
by js2 8y ago
$ links -dump https://news.ycombinator.com/item?id=17205865 | grep -Eio '(php|python|react|javascript|java|objective-c|objective|object-c|object|haskell|rails|mongo|lamp|docker|aws|devops|android|ios|django|ruby|rails|react|swift|node|docker)\b' | tr A-Z a-z| sort| uniq -c | sort -rn
87 react
63 python
42 javascript
39 aws
33 devops
29 rails
28 ruby
28 node
23 android
22 java
19 ios
19 docker
15 django
12 haskell
8 php
7 swift
5 mongo
2 object
1 objective-c
1 objective
Used links to get just the text and not the HTML markup. Used grep -O to emit just the part of the regex which matches so we can feed it all into a pipe that emits a single histogram. By ordering the pattern we can match "javascript" before "java" and not need to add the space or "," after "java" to exclude javascript (you could also use "\b" with grep -E).Case-insensitve and case-folded. Added a few other keywords.
Since grep only emits the first match on a given line, this won't count properly if multiple keywords appear on one line.
Why did you search for "mean"?
Edit: here's another approach that splits the output into words first so that we can count multiple keywords on one line, along with a couple tweaks to the pattern to eliminate some false positives:
$ links -dump https://news.ycombinator.com/item?id=17205865 | tr -s '[[:punct:][:space:]]' '\n' | tr A-Z a-z | grep -E '\b(php|python|react|java|object|haskell|rails|mongo|lamp|docker|aws|devops|android|ios\b|django|ruby|rails|react|swift|node|docker)' | sort | uniq -c | sort -rn
87 react
63 python
42 javascript
38 aws
33 devops
29 rails
28 ruby
27 node
23 android
21 java
19 docker
18 ios
15 django
12 haskell
8 php
7 swift
6 nodejs
5 reactjs
5 mongodb
5 mongo
2 objective
2 object
1 reactnative
1 reactive
Another issue: this only grabs the first page of comments.
- dmartinez 8y agoThey were probably looking for references to 'MEAN' stack.
- NegativeLatency 8y agomean = mongo, express, angular, node
- ransom1538 8y ago+1 Solid thanks man.
- dang 8y agoYeah, we have to have comment pagination turned on these days to spare our poor single-core server with steam coming out its ears. Hopefully the performance improvements we've been working on this year can roll out in the next few months. If you or anyone wants to run this query on the full comment set, email us (hn@ycombinator.com) and we'll turn pagination off while you do that.