Re:How to Parse Ruby
by noacct on Friday February 08, 2013 @01:22AM
(#5186575)
Wow guys really.
Or to sort by counts directly
Granted this uses guava, but there is nothing really more readable about your ruby code than this guy's java code. To say he 'lacks courage' ... jesus I'm still laughing. "Why didn't you add the sort!" You're too much man.
[ Parent
| on HN ]
Your code doesn't do the same thing as mine. You need to start with an array of sentences.
Show the java code that does the same thing and it will be clear that the ruby is more readable.
It will not be clear: You can replace the first line with the following two
String[] sents = {"the quick", "the slow", "the blue"};
Iterable<String> s = Splitter.on(" ").split(Joiner.on(" ").join(sents));