News for hackers. Stuff that matters.
Re:Awk vs. Perl (2009) by comstock on Tuesday June 27, 2017 @02:07PM (#14647725)
The nice thing about awk is that it's really only suitable for simple record processing. You therefore stop using fairly quickly when the problem reaches sufficient complexity to use a better suited language.

It's like a very neat, small domain specific language for use processing simple record based text files. And within those limits it's super useful.

Re:Awk vs. Perl (2009) by vram22 on Tuesday June 27, 2017 @03:30PM (#14648534)
>The nice thing about awk is that it's really only suitable for simple record processing.

Not exactly only simple processing, IMO. Record processing, yes - it is a domain specific language, and its core feature is the pattern-action thing, and it was (at least originally) meant mainly to operate on record-oriented text files (even if on lines, since a line is a record with one column). I don't have good examples off the top of my head, but can mention a few things:

The books The Unix Programming Environment by Kernighan and Pike, and either Programming Pearls or More Programming Pearls, by Jon Bentley, have some examples of advanced uses of awk - so it is not just for simple record processing. And I've read somewhere that just shell and awk and other Unix tools have even been used to create a DBMS of sorts. Plus, with later versions like GNU awk and so on, they've added more features to the language, including probably many more built-in functions, and also some network programming support [1].

https://www.quora.com/What-is-the-most-complex-software-writ...

According to an answer at the above link, an nroff-subset text formatter and Lisp subset interpreter have been written in awk. Those are more complex than simple record processing.

Also:

[1] Effective awk Programming, 3rd Edition http://shop.oreilly.com/product/9780596000707.do

Re:Awk vs. Perl (2009) by comstock on Wednesday June 28, 2017 @06:09AM (#14652923)
Right, I mean it's Turing complete, and you can do anything you want. But at least when I use it, I quickly reach for another language after using it for basic reformatting/simple calculations because using awk to do so would be too difficult and awkward.
Re:Awk vs. Perl (2009) by vram22 on Thursday June 29, 2017 @06:17PM (#14667304)
I get you now.