noacct
Re:How to Parse Ruby
on Friday February 08, 2013 @01:22AM (#5186575)
Wow guys really.
Iterable<String> s = Splitter.on(" ").split("Hello World");
Multiset<String> counts = HashMultiSet.create(s);
Multiset<String> sorted = Multisets.copyHightestCountFirst(counts);
Or to sort by counts directly TreeHashSet.create(Splitter.on(" ").split("Hello World"))
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.