News for hackers. Stuff that matters.
Re:Ruby One-Liners by stevebmark on Friday September 13, 2019 @09:16PM (#20968263)
If you're going to write unreadable code why not use Perl? It's much faster than Ruby. Or Awk, even though it's one of the worst programming languages ever created?
Re:Ruby One-Liners by aexl on Friday September 13, 2019 @10:22PM (#20968524)
Why is awk one of the "worst programming languages ever created"?
Re:Ruby One-Liners by emmelaich on Saturday September 14, 2019 @01:48AM (#20969143)
.. because you know Ruby and not Perl of course.

Ruby (and Perl) can and probably should be used for many tasks where you might use awk and sed and don't particularly care about performance.

Re:Ruby One-Liners by pizza234 on Saturday September 14, 2019 @03:32AM (#20969450)
One liners are not necessarily part of a codebase; one might use them for text processing on the fly.

An argument "against readability" is culture. For sysadmins, Perl is a well-known language; it's not unreadable¹. Note that the same applies to Bash, and Bash scripts are still popular. This doesn't imply that Perl/Bash scripts should be universally used, but that within a certain culture, they make perfect sense.

¹=when talking about oneliners

Re:Ruby One-Liners by aledalgrande on Friday September 13, 2019 @11:57PM (#20968832)
That's what I was thinking. Free to use Ruby any way you want, but this is not code I would be happy to see in my codebase.