Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Equal bytes for women.


devel / comp.lang.awk / cppawk now mentioned in GNU Awk manual.

SubjectAuthor
* cppawk now mentioned in GNU Awk manual.Kaz Kylheku
`* Re: cppawk now mentioned in GNU Awk manual.Kpop 2GM
 `- Re: cppawk now mentioned in GNU Awk manual.Kenny McCormack

1
cppawk now mentioned in GNU Awk manual.

<20230609224607.987@kylheku.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1475&group=comp.lang.awk#1475

  copy link   Newsgroups: comp.lang.awk
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.awk
Subject: cppawk now mentioned in GNU Awk manual.
Date: Sat, 10 Jun 2023 05:54:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <20230609224607.987@kylheku.com>
Injection-Date: Sat, 10 Jun 2023 05:54:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c9fb74a993ac1198f6cb3cd0facc19d4";
logging-data="2344313"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sc4sBGA5z+Nq3Y32vd42VWIrHhlaxnbI="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:FxYPoKTchbQEw0p35uGzFBKHkUY=
 by: Kaz Kylheku - Sat, 10 Jun 2023 05:54 UTC

Cool!

https://www.kylheku.com/cgit/cppawk/about/

cppawk preprocesses your Awk code with the C preprocessor
and executes it or optionally captures it.

This has benefits:

- modularization: making a big Awk program out of include
files.
- #include nicely searches relative to the directory
of the file in which the #include appears. Bye-bye AWKPATH.

- #define constants, efficiently propagated where you want them.

- macros for inlining code; avoid call overhead.

- syntactic macros! including ones that come with cppawk
- cppawk provides a case macro which translates to GNU Awk
switch syntax or to portable Awk.
- cppawk provides a loop macro with numerous useful clauses.
- parallel and cross-product iteration.
- cppawk has some macros for dealing with

- conditional code. E.g. #if ... we are targeting this awk,
do this, #else do that.
- parametrize your code and conditionally generate;
#if THIS_FEATURE ... #endif

cppawk is rigorously developed, covered by 149 test cases.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: cppawk now mentioned in GNU Awk manual.

<7ffd2ac7-7c32-4fac-9cb1-a0c8c4371ae2n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1476&group=comp.lang.awk#1476

  copy link   Newsgroups: comp.lang.awk
X-Received: by 2002:ac8:5e51:0:b0:3fd:e410:7399 with SMTP id i17-20020ac85e51000000b003fde4107399mr19111qtx.2.1688682591045;
Thu, 06 Jul 2023 15:29:51 -0700 (PDT)
X-Received: by 2002:a63:7e55:0:b0:553:ec49:f310 with SMTP id
o21-20020a637e55000000b00553ec49f310mr2051191pgn.3.1688682590723; Thu, 06 Jul
2023 15:29:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.awk
Date: Thu, 6 Jul 2023 15:29:50 -0700 (PDT)
In-Reply-To: <20230609224607.987@kylheku.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2603:7000:3c3d:41c0:3480:8ec0:48cd:9db;
posting-account=n74spgoAAAAZZyBGGjbj9G0N4Q659lEi
NNTP-Posting-Host: 2603:7000:3c3d:41c0:3480:8ec0:48cd:9db
References: <20230609224607.987@kylheku.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7ffd2ac7-7c32-4fac-9cb1-a0c8c4371ae2n@googlegroups.com>
Subject: Re: cppawk now mentioned in GNU Awk manual.
From: jason.cy.kwan@gmail.com (Kpop 2GM)
Injection-Date: Thu, 06 Jul 2023 22:29:51 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3307
 by: Kpop 2GM - Thu, 6 Jul 2023 22:29 UTC

here's an easy way to do (some form of) var-arg without any special preprocessor :

BEGIN {
.. . CONVFMT = OFMT = "%.250g"
.. . srand() srand()
}

($++NF = _______(__ARGV__[$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11,
.. . . . . . . . . . . . . . . . . . . . . . . . $12, $13, $14, $15, $16, $17] = FNR "_" NR "_" NF "_" (1 + int(3^3^3 *
rand()))))^_ {
.. . print
}

function _______(__, ___, _, ____, _____, ________, _________,
__________, ___________)
{ .. . for (_ in __ARGV__) {
.. . . . if ((_____ = __ARGV__[_]) == __) {
.. . . . . . delete __ARGV__[_]
.. . . . . . break
.. . . . }
.. . }
.. . print __ = +___[_ ^= (_____ = split(_, ___, SUBSEP)) < _____]
.. . ___________ = (++_^_^_ * _)^(_ + (__________ = _ * _ * _--))
.. . * __________--
.. . while (_++ < _____) {
.. . . . print __ = (____ = ( (________ = ___[_]) * __) < ___________) \
.. . . . ? ____ : (length(________) <= __________) ? int((________ = \
.. . . . +________) * substr(__ = __ "", !!_, _________ = length(__) \
.. . . . - __________) + (____ = int((__ = substr(__, ++_________) * \
.. . . . ________) / (_________ = (!!_ !_)^__________)))) sprintf("%.*d",
.. . . . __________, __ - _________ * ____) : (________ * substr(__,
.. . . . !!_, ________ = match(__, "[^0][0]*$"))) substr(__, ++________)
.. . }
.. . return __
}

when I fed in

echo ' 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 '

as the input, then run the output through gnu-factor, it looks like :

2: 2
6: 2 3
30: 2 3 5
210: 2 3 5 7
2310: 2 3 5 7 11
30030: 2 3 5 7 11 13
510510: 2 3 5 7 11 13 17
9699690: 2 3 5 7 11 13 17 19
223092870: 2 3 5 7 11 13 17 19 23
6469693230: 2 3 5 7 11 13 17 19 23 29
200560490130: 2 3 5 7 11 13 17 19 23 29 31
7420738134810: 2 3 5 7 11 13 17 19 23 29 31 37
304250263527210: 2 3 5 7 11 13 17 19 23 29 31 37 41
13082761331670030: 2 3 5 7 11 13 17 19 23 29 31 37 41 43
614889782588491410: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47
32589158477190044730: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53
1922760350154212639070: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59

worked in gawk 5.2.2, mawk 1.3.4, mawk2 - 1.9.9.6, and nawk 20200816

Re: cppawk now mentioned in GNU Awk manual.

<u87hva$1u2sp$1@news.xmission.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1477&group=comp.lang.awk#1477

  copy link   Newsgroups: comp.lang.awk
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.awk
Subject: Re: cppawk now mentioned in GNU Awk manual.
Date: Thu, 6 Jul 2023 23:15:54 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <u87hva$1u2sp$1@news.xmission.com>
References: <20230609224607.987@kylheku.com> <7ffd2ac7-7c32-4fac-9cb1-a0c8c4371ae2n@googlegroups.com>
Injection-Date: Thu, 6 Jul 2023 23:15:54 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2034585"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Thu, 6 Jul 2023 23:15 UTC

In article <7ffd2ac7-7c32-4fac-9cb1-a0c8c4371ae2n@googlegroups.com>,
Kpop 2GM <jason.cy.kwan@gmail.com> wrote:
>here's an easy way to do (some form of) var-arg without any special preprocessor :
>
>BEGIN {
>. . CONVFMT = OFMT = "%.250g"
>. . srand() srand()
>}

Thank you for sharing.

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/Snicker

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor