News for hackers. Stuff that matters.
Re:Demand for Ruby on Rails is Still Huge by js2 on Wednesday June 20, 2018 @11:00AM (#17356026)

  $ 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.
Re:Demand for Ruby on Rails is Still Huge by dang on Wednesday June 20, 2018 @02:53PM (#17358512)
Yeah, 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 ([email protected]) and we'll turn pagination off while you do that.

Re:Demand for Ruby on Rails is Still Huge by dmartinez on Wednesday June 20, 2018 @11:26AM (#17356270)
They were probably looking for references to 'MEAN' stack.
Re:Demand for Ruby on Rails is Still Huge by NegativeLatency on Wednesday June 20, 2018 @11:29AM (#17356296)
mean = mongo, express, angular, node
Re:Demand for Ruby on Rails is Still Huge by ransom1538 on Wednesday June 20, 2018 @12:14PM (#17356731)
+1 Solid thanks man.