Re: inconstancy with RS = "(\r?\n){2}"

2021-07-26 Thread Alex fxmbsw7 Ratchev
compute_min_length_from_regex .. maybe also max
compute_binary_speedup_from_regex
then have a in buffer of min, then per char
then on fill up or char add, crop to max - min , then
binary_regex_function_if on that buffer

this is optimized form of per char :
per read char, do optional crop, match for buf by regex ( RS )

On Mon, Jul 26, 2021, 16:03 Wolfgang Laun  wrote:

> The fundamental problem with a regex as RS is that you need to determine
> two things: first, you need to know that the regex matches some character
> sequence of the input stream and, second, that it does not also match any
> subsequent characters in the input stream. For certain regular expressions
> (including simple strings) it is possible to know that a match implies that
> subsequent characters can definitely not match. For other regular
> expressions it is not possible to answer the second question. It requires a
> lot of effort to determine whether a certain regular expression is in  the
> first group or in the second group. gawk uses a simple test to distinguish
> these two categories. The second category is never empty, even if you would
> implement the best possible analysis.
>
> /(\r?\n){2}/ is in gawk's second category, because it contains "magic"
> characters.
>
> You may have to implement a FSM, as I suggested early on.
>
> Wolfgang
>
>
>
>
>
>
> On Mon, 26 Jul 2021 at 15:15, Alex fxmbsw7 Ratchev 
> wrote:
>
>> -- Forwarded message -
>> From: Alex fxmbsw7 Ratchev 
>> Date: Mon, Jul 26, 2021, 15:13
>> Subject: Re: inconstancy with RS = "(\r?\n){2}"
>> To: Aharon Robbins 
>>
>>
>> but the RS issue remains
>> oh well up to better times somewhen else
>> thanks :)
>>
>> On Mon, Jul 26, 2021, 15:12  wrote:
>>
>> > I'm sorry.
>> >
>> > I give up.
>> >
>> > You will have to use another approach. Maybe using gawk's built-in
>> > networking will help.
>> >
>> > Good luck.
>> >
>> > Arnold
>> >
>> > Alex fxmbsw7 Ratchev  wrote:
>> >
>> > > and no it doesnt work
>> > > also on the stderr cmd i had to quit nc ( didnt try control d ) and
>> then
>> > > the rest appeared, on the tcpserv side, .. seems bug nothing done
>> > > i fetched git clone new and did bootstrap and further
>> > >
>> > > On Mon, Jul 26, 2021, 15:07 Alex fxmbsw7 Ratchev 
>> > wrote:
>> > >
>> > > > i just got now to it
>> > > > in my testing on terminal still same bug, on testing that gawk >
>> stderr
>> > > > cmd even more newlines were needed to make it print ( on the tcpserv
>> > term )
>> > > > that makes it invalid for my httpd and the bug but ill just try now
>> too
>> > > >
>> > > > On Mon, Jul 26, 2021, 13:24 Alex fxmbsw7 Ratchev > >
>> > > > wrote:
>> > > >
>> > > >> thank you big time ! ill just test now
>> > > >> sorry for not knowing much git
>> > > >>
>> > > >> On Mon, Jul 26, 2021, 13:17  wrote:
>> > > >>
>> > > >>> Please do
>> > > >>>
>> > > >>> make distclean
>> > > >>> git pull
>> > > >>> git checkout test-socket-patch
>> > > >>> ./bootstrap.sh && ./configure && make
>> > > >>>
>> > > >>> I applied the patch and pushed it to git in that branch.
>> > > >>>
>> > > >>> Arnold
>> > > >>>
>> > > >>
>> >
>>
>
>
> --
> Wolfgang Laun
>
>


Re: does /etc/profile get sourced also when .profile exists ?

2021-07-26 Thread Mike Jonkmans
On Mon, Jul 26, 2021 at 03:57:16PM +0200, Alex fxmbsw7 Ratchev wrote:
> ..

..: command not found

Regards, Mike Jonkmans



Re: Crash on large brace expansion

2021-07-26 Thread Alex fxmbsw7 Ratchev
i had an issue when needing ips, for my web crawler back then
i ended having a small .c that pulls random ips out to a count

On Thu, Jul 15, 2021 at 9:24 PM Greg Wooledge  wrote:
>
> On Thu, Jul 15, 2021 at 05:28:04PM +0200, Léa Gris wrote:
> > Le 15/07/2021 à 16:36, Gabríel Arthúr Pétursson écrivait :
> > > Hi all,
> > >
> > > Executing the following results in a fierce crash:
> > >
> > > $ bash -c '{0..255}.{0..255}.{0..255}.{0..255}'
> >
> > Brace expression expands all the value in memory.
> >
> > Here you are actually telling Bash to expand 256⁴ or 4294967296 42 Billion
> > entries.
>
> 4.2 billion, but who's counting? :-)
>