Groups | Search | Server Info | Login | Register


Groups > comp.lang.awk > #9869

Re: GNU Awk's types of regular expressions

From Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups comp.lang.awk
Subject Re: GNU Awk's types of regular expressions
Date 2024-11-30 12:41 +0100
Organization A noiseless patient Spider
Message-ID <vietm2$1munm$1@dont-email.me> (permalink)
References <viac5m$l8oh$1@dont-email.me> <20241128200247.439@kylheku.com>

Show all headers | View raw


Coming back to this...

On 29.11.2024 05:13, Kaz Kylheku wrote:
> [...]
> 
> It could also (in combination with this) be lazy. [...]

Yes. There's already something like "on-demand logic" there, where
in  print > "a_file"  the file won't be created or overwritten if
the statement doesn't get triggered, and subsequent calls won't
overwrite it. So it would indeed be not surprising if such a
mechanism is implemented. (But I haven't examined the awk code.)

> 
> Someone will undoubtedly chime in confirming or refuting these
> hypotheses.
> 
> It would be pretty silly if these regex objects didn't cache a compiled
> regex across multiple uses.

True. But, OTOH, in GNU Awk there's a couple functions that are
just passed through to other (external) library functions. If these
functions happen to support only an interface like  match(re,str)
where match() supports no [thread-safe] static memory for "re"
the caller might have no choice. (Don't know how it's actually
implemented.)

Janis

> [...]

Back to comp.lang.awk | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

GNU Awk's types of regular expressions Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-11-28 19:18 +0100
  Re: GNU Awk's types of regular expressions Kaz Kylheku <643-408-1753@kylheku.com> - 2024-11-29 04:13 +0000
    Re: GNU Awk's types of regular expressions Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-11-29 09:33 +0100
    Re: GNU Awk's types of regular expressions Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-11-30 12:41 +0100
  Re: GNU Awk's types of regular expressions arnold@freefriends.org (Aharon Robbins) - 2024-12-01 20:20 +0000
    Re: GNU Awk's types of regular expressions Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-01 22:17 +0100
      Re: GNU Awk's types of regular expressions arnold@skeeve.com (Aharon Robbins) - 2024-12-01 23:18 +0000
        Re: GNU Awk's types of regular expressions Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-02 08:00 +0100
          Re: GNU Awk's types of regular expressions arnold@skeeve.com (Aharon Robbins) - 2024-12-02 20:58 +0000
            Re: GNU Awk's types of regular expressions Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-02 23:13 +0100

csiph-web