• =?UTF-8?Q?The_AWK_book=E2=80=99s_60=2Dline_version_of_Make?=

    From Ben Hoyt@benhoyt@gmail.com to comp.lang.awk on Sun Sep 10 15:44:13 2023
    From Newsgroup: comp.lang.awk

    For your interest, I just published an article about the minimal version of Make (written in a page of AWK) that's included in the book "The AWK Programming Language":

    https://benhoyt.com/writings/awk-make/

    It's a neat program, and in the article I describe how it works, as well as porting it to a Python version for comparison.

    The Make program is included in the second edition of the book, which is coming out next month!

    -Ben
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Andrew Schorr@aschorr@telemetry-investments.com to comp.lang.awk on Mon Sep 11 09:08:26 2023
    From Newsgroup: comp.lang.awk

    On Sunday, September 10, 2023 at 6:44:16 PM UTC-4, Ben Hoyt wrote:
    For your interest, I just published an article about the minimal version of Make (written in a page of AWK) that's included in the book "The AWK Programming Language":

    https://benhoyt.com/writings/awk-make/
    Nice. Just FYI, the gawk filefuncs extension does include a stat() function that would enable you to
    eliminate the ages function and age map just as in Python. See "man 3am filefuncs" or the manual:
    https://www.gnu.org/software/gawk/manual/html_node/Extension-Sample-File-Functions.html
    And of course gawk also has true multi-dimensional arrays, so that could also make things prettier
    and more concise.
    Regards,
    Andy
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Ben Hoyt@benhoyt@gmail.com to comp.lang.awk on Mon Sep 11 09:59:32 2023
    From Newsgroup: comp.lang.awk

    Nice. Just FYI, the gawk filefuncs extension does include a stat() function that would enable you to
    eliminate the ages function and age map just as in Python. See "man 3am filefuncs" or the manual:

    Ah, excellent, thanks for the link. Yeah, that's much more direct (and more efficient!) than shelling out to "stat" as I did in my modified AWK version. (Though for the book I'm pretty sure Kernighan et al are trying to stick to standard AWK features.)

    -Ben
    --- Synchronet 3.20a-Linux NewsLink 1.114