4 ms·
It's using Ruby to replace Awk, the way Perl once tried to.
by tptacek 8y ago
It's using Ruby to replace Awk, the way Perl once tried to.
- gfodor 8y agoTechnically Ruby tried to replace Perl, so I guess the shoe fits. It sure has taken a while for someone to do this!
- star-techate 8y agoWell the thing is, matz did it a decade ago when he carefully copied all these features that Perl came up with or itself carefully copied from awk and sed.
- Annatar 8y agoWhy the hell would anybody want to replace AWK? It’s super fast, extremely light on resources, doesn’t have any dependencies, does auto memory management and type inference, and is extremely powerful for large dataset processing, not to mention easy to learn and program.
- damagednoob 8y ago> easy to learn and program I think that's relative and it certainly hasn't been my experience. If I program in Ruby, Node, Python, etc for 8 hours of every day, it makes sense that I would reach for that over a command line tool with a syntax that looks a bit arcane. The best tool for the job sometimes is the tool you know best.
- DarkWiiPlayer 8y ago> The best tool for the job sometimes is the tool you know best. That's like hammering in screws because you know your hammer and screwdrivers seem arcane to you. For ad-hoc stuff `ruby -e` is more than enough, and if you want to write a program once and use it a lot, it's worth investing the time in doing it the way it works best, which in this case, would be a (fast) language like awk that makes it easier to process line-by-line instead of reading until EOF and making the rest of the pipeline wait.
- Annatar 8y agoIt’s arcane only if you don’t know C. If you’re on a UNIX-like or a true UNIX system, not knowing C will come to haunt you with a vengeance sooner or later.
- tragomaskhalos 8y agoI want to say that Perl, and Ruby, and even Python are superior tools .... except that awk is also my default go-to for pipiing into to munge output data, so yes it's clearly still hitting the sweet spot for many tasks.
- deleted 8y ago[deleted]