bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Suggestion for Quad-RE


From: Leslie S Satenstein
Subject: Re: [Bug-apl] Suggestion for Quad-RE
Date: Thu, 12 Oct 2017 15:43:13 +0000 (UTC)

What about using the shared variable processor capability for your requirement.
 
Regards

 Leslie
Leslie Satenstein
Montréal Québec, Canada




From: Christian Robert <address@hidden>
To: "address@hidden" <address@hidden>
Sent: Tuesday, October 10, 2017 11:13 PM
Subject: [Bug-apl] Suggestion for Quad-RE

Sometimes we only want to know if it match or not.

I suggest a new flag ['m']  (as match) that will return ...

  for a string:  either 0 or 1 as a scalar for "not matching" or "matching"
  for an array of strings: a vector of 0/1 for each string saying like above.


lets say:

      z←⎕fio[49] '/var/log/messages'  // beware that this file is inaccessible by default unless being "root" on linux
                                      // or you chmod a+r /var/log/messages  # as root

who may return 50,000 lines or even 2 millions, on an average of say ~120 characters each.


I would hope to be able to use a flag as ['m']:

      'Started|Stopped' ⎕RE['m'] z

who will return an array of (0/1) telling which lines match or not the pattern, so I can
only retain those matching for further fine tuning (via diadic operator "/").

It will be a LOT faster than letting ⎕RE returning the whole result of pcre2 INTO the physical Gnu-APL memory engine
creating a lot of integers arrays for no real purpose, ie: seen from the application.

comments welcome,

my usual 2 cents,
Xtian.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]