16 comments

[ 2.7 ms ] story [ 48.4 ms ] thread
I'm baffled and somewhat suspicious that awk became unpopular enough that I didn't really understand it till now.
Awk seems to have fallen out of favor, in my opinion, due to the rising popularity of easier to use general purpose programming/scripting languages. Awk is the bee's knees when it comes to processing text. You can do just about anything to some text with it. However, you can do much the same with Perl or Python, both of which can do more than just process text.

I still use awk for shell one-liners. It can do the work of grep, grep -v, cut, and substring operations in one command, which makes things a bit simpler (less processes, less pipes). Unfortunately, a grep piped to cut is almost always faster due to awk being a very robust interpreter.

Just in case anyone here doesn't know who Brian Kernighan is:

- He co-created AWK (he's the K) and AMPL

- He literally wrote the book on C with Dennis Ritchie (the book with the big blue "C" on it)

- He authored some of the first UNIX programs (cron, for example) when he was working at Bell Labs

- He made "Hello World!" a trope and named UNIX

He's also quite possibly the nicest person ever.

Don't forget co-authorship with Rob Pike of The Unix Programming Environment, possibly even more influential than K&R.
Man, I just looked it up. He's 73 years old. I hope I'm as active as he seems to be when I'm that age.

I hope he'll be as active as he was in the presentation for many, many more years!

I love it how you mentioned "The C Programming Language" (https://en.wikipedia.org/wiki/The_C_Programming_Language), the book commonly known as "K&R", without doing the K-reference and instead doing that for AWK.

In my tiny little world, K&R is like a bazillion times more well-known than AWK. Always fun with different perspectives. :)

> He's also quite possibly the nicest person ever.

This. (Had to break HN protocol here)

Let me recount an anecdote from the past, its from an old comment of mine:

==

Navigating Google was such a nerd minefield, but in the best possible way. The excited student that I was, I ended up lecturing about longest common subsequence to Thomas Szymanski not knowing his association with the history of diff on Unix. Same thing happened with SVM's, I was explaining its merits and demerits to Corinna Cortes, my other cube neighbor, not knowing she was the first author of the paper on SVMs. Not only would they not take offence they would all keep indulging.

Then one day I step out for a break, a senior person whom I recognized because had a cube on the row behind mine, approaches me, apologizing profusely and ad infinitum that he had got locked out, could I please let him in. No big deal for me, but he just would not stop apologizing and thanking me with such striking sincerity. A few days later a co-intern asks me if I knew that guy. I said sure, "I let him in once, he sits one row behind me". He says, "No, do you know who he is ?" He asked me to checkout the name tag on his cube. I saunter off, "Brian Kernighan" !

An important takeaway of this internship was to experience the humility of all these people, and the sense that you are surrounded by such iconic stalwarts in CS and you wouldn't even know...

==

"Notation matters"

"If a language is useful, you will want to generate it by program"

well said

And then he leaves the slide about lisp blank. Even though it's the prime example of a language that one can generate by programs.
but only because he admitted he knew little about the subject matter...
Biggest takeaways from the video (in my opinion):

- "Notation matters"

- "Start with domain specific languages [like regex/AMPL/etc], rather than big general purpose ones - don't build the next C++"

It felt like he was biting his tongue and really pulling punches when mentioning the complexity of C++.

I also liked the comment about some of the good ideas being lost over time. I would love to hear an in depth talk about some of the serious the regressions we have in modern software systems and design.