Fwd: compelling examples of read-eval-print loop for pm-gawk

11 views
Skip to first unread message

Alan Karp

unread,
Oct 27, 2026, 7:33:44 PMOct 27
to <friam@googlegroups.com>
Anyone have some good examples for Terence?

--------------
Alan Karp


---------- Forwarded message ---------
From: terence.patrick.kelly <terence.pa...@proton.me>
Date: Tue, Oct 27, 2026 at 3:33 AM
Subject: compelling examples of read-eval-print loop for pm-gawk
To: Alan Karp <alan...@gmail.com>


Hi Alan,

My "Drill Bits" column is moving from Queue to CACM.  The first
installment in CACM will be about persistent-memory gawk (pm-gawk),
which uses my persistent memory library to enable AWK scripts to
"remember" data and user-defined functions from one run to the next.

After we implemented pm-gawk, the gawk maintainer (Robbins) and I
realized that we'd essentially given gawk the moral equivalent of
a "read-eval-print loop" (REPL), reminiscent of Python's REPL.

I'm looking for compelling examples to explain and motivate REPL,
examples that will resonate with huge numbers of average programmers
who might not yet be REPL enthusiasts.  I'm wondering if you or one
of your functional programming friends have any great REPL examples
that I can use.  The best example is one that relates to the core
strengths of AWK (text processing, quick & dirty one-liners, etc.).

Details about pm-gawk's REPL are in Section 3 of the user manual:

https://web.eecs.umich.edu/~tpkelly/pma/pm-gawk_2025.02feb.09.pdf

Thanks in advance for any tips you can provide!

-- Terence


William ML Leslie

unread,
Oct 28, 2026, 6:52:23 AMOct 28
to fr...@googlegroups.com
On Wed, 28 Oct 2026 at 09:33, Alan Karp <alan...@gmail.com> wrote:
Anyone have some good examples for Terence?

Hey Alan!  Emailing back to friam, not sure if you wanted things sent directly to Terence.
 

--------------
Alan Karp


---------- Forwarded message ---------
From: terence.patrick.kelly <terence.pa...@proton.me>
Date: Tue, Oct 27, 2026 at 3:33 AM
Subject: compelling examples of read-eval-print loop for pm-gawk
To: Alan Karp <alan...@gmail.com>


Hi Alan,

My "Drill Bits" column is moving from Queue to CACM.  The first
installment in CACM will be about persistent-memory gawk (pm-gawk),
which uses my persistent memory library to enable AWK scripts to
"remember" data and user-defined functions from one run to the next.

After we implemented pm-gawk, the gawk maintainer (Robbins) and I
realized that we'd essentially given gawk the moral equivalent of
a "read-eval-print loop" (REPL), reminiscent of Python's REPL.

I'm looking for compelling examples to explain and motivate REPL,
examples that will resonate with huge numbers of average programmers
who might not yet be REPL enthusiasts.  I'm wondering if you or one
of your functional programming friends have any great REPL examples
that I can use.  The best example is one that relates to the core
strengths of AWK (text processing, quick & dirty one-liners, etc.).

Something I've routinely had to do is examine tasks that failed.  Often I'll start with a query from some business key, and once I identify some logs, I can expand my search to include correlated requests.  For example, in some of the contact centre software I worked on, a customer might complain that something went wrong, and to investigate, we might start from a customer's phone number.  That will give us identifiers for the specific call from whatever we are using for telephony - Amazon Connect, Asterisk, or PJSIP.  We can use the logs from those services to figure out other downstream systems the agent accessed, where the call transcripts went, or what the agent did after the call.

More generally, I tend to use interactive editor features that abstract over a REPL (in the style of eval-print-last-sexp) letting me interact with multiple outputs at once, or modify and re-run queries.  The feeling is very much that the distinction between a programmer and a user doesn't exist - I'm just an operator, using the computer in the most natural way possible.

--

Alan Karp

unread,
Oct 28, 2026, 11:14:43 AMOct 28
to fr...@googlegroups.com
You could have sent it to Terence directly, but I'll forward this response to him.

--------------
Alan Karp


--
You received this message because you are subscribed to the Google Groups "friam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to friam+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/friam/CAHgd1hFDEg2Qr4krj3Rn6zY9nudSQgP3BLEptPrOfpmDSDVMwQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages