Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Real Programmers think better when playing Adventure or Rogue.


devel / comp.lang.awk / FYI: Bard AI Coding and AWK

SubjectAuthor
* FYI: Bard AI Coding and AWKJ Naman
`- Re: FYI: Bard AI Coding and AWKJanis Papanagnou

1
FYI: Bard AI Coding and AWK

<876673a6-7f35-4f44-9702-43eddd3bc9e4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.awk
X-Received: by 2002:a05:622a:1a90:b0:3e9:b2ec:573f with SMTP id s16-20020a05622a1a9000b003e9b2ec573fmr5630123qtc.12.1682385074301;
Mon, 24 Apr 2023 18:11:14 -0700 (PDT)
X-Received: by 2002:a05:6214:9c8:b0:5ef:43ec:d153 with SMTP id
dp8-20020a05621409c800b005ef43ecd153mr3189029qvb.5.1682385074088; Mon, 24 Apr
2023 18:11:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.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: Mon, 24 Apr 2023 18:11:13 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=151.200.57.7; posting-account=BcR7vAoAAABY9YgIIYIhD68t7wwjMvJW
NNTP-Posting-Host: 151.200.57.7
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <876673a6-7f35-4f44-9702-43eddd3bc9e4n@googlegroups.com>
Subject: FYI: Bard AI Coding and AWK
From: jnaman2@gmail.com (J Naman)
Injection-Date: Tue, 25 Apr 2023 01:11:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5042
 by: J Naman - Tue, 25 Apr 2023 01:11 UTC

I received an email from Google:
Bard has just been updated with coding capabilities Try coding with Bard >>
This update introduces software development support for over 20 programming languages, including JavaScript, Python, SQL, TypeScript, and even Google Sheets functions.
Collaborate with Bard to help generate, explain, and debug your code. Google Colab users can also export Python code generated by Bard directly to Google Colab to seamlessly continue programming tasks.
#---
Ques: do you help with code in the AWK programming language?
Yes, I can help you with code in the AWK programming language. I can generate AWK code, debug AWK code, and answer questions about AWK code. I can also help you learn AWK by providing examples and explanations.
Here are some examples of what I can do:
Generate AWK code to print the first 10 lines of a file.
Debug AWK code that is not working correctly.
Answer questions about AWK syntax, functions, and operators.
Provide examples of AWK code for common tasks, such as data extraction, filtering, and reporting.
Explain how to use AWK to solve specific problems.
If you need help with AWK code, please feel free to ask me. I am always happy to help.
#---
Ques: what is the difference between GAWK and AWK?
AWK is a programming language that is designed for text processing. It was developed in the late 1970s by Aho, Kernighan, and Weinberger. GAWK is a GNU implementation of AWK. It was developed by the GNU Project in the early 1990s.
GAWK is a superset of AWK. This means that GAWK can run any AWK program, but it can also run programs that use GAWK's extensions. GAWK's extensions include support for regular expressions, floating-point numbers, and multiple input and output files.
In addition to its extensions, GAWK also has a number of other features that make it a more powerful and versatile tool than AWK. For example, GAWK has a built-in debugger, which can be used to step through and debug GAWK programs. GAWK also has a number of built-in functions that make it easier to perform common tasks, such as sorting, searching, and summarizing data.
Overall, GAWK is a more powerful and versatile tool than AWK. If you need to perform text processing tasks, GAWK is the better choice.
#---
Ques: what is an AWK namespace?
An AWK namespace is a way of grouping variables and functions together. This can be useful for organizing your code and preventing name collisions.
To create a namespace, you use the @namespace directive. For example, the following code creates a namespace called my_namespace:
Awk
@namespace "my_namespace"
Once you have created a namespace, you can use the :: operator to access variables and functions in that namespace. For example, the following code defines a variable called foo in the my_namespace namespace:
Awk
@namespace "my_namespace"
foo = "bar"
To access the variable foo from outside the my_namespace namespace, you would use the following code:
Awk
my_namespace::foo
#---
Ques: AWK code for a simple random number generator based on George Marsaglia's MWC (multiply with carry) generator
Awk
BEGIN {
# Set the seed for the random number generator.
srand(time());
# Initialize the MWC state variables.
a = 36969;
b = 18000;
c = 0;
} {
# Generate a new random number.
z = a * (b & 65535) + (b >> 16);
w = b * (c & 65535) + (c >> 16);
c = z >> 16;
b = w >> 16;
a = z & 65535;
# Print the random number.
print a;
} # Not exactly AWK code ... but not a bad answer
-----------
Bard: Use code with caution. Learn more
Bard is still experimental and you are responsible for your use of code or coding explanations. So you should use discretion and carefully test and review all code for errors, bugs, and vulnerabilities before relying on it. Code may also be subject to an open source license and Bard provides related information.
---------------

Re: FYI: Bard AI Coding and AWK

<u27tta$p1b2$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.awk
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.awk
Subject: Re: FYI: Bard AI Coding and AWK
Date: Tue, 25 Apr 2023 09:02:02 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <u27tta$p1b2$1@dont-email.me>
References: <876673a6-7f35-4f44-9702-43eddd3bc9e4n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 25 Apr 2023 07:02:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="424d65ff1f4dc6a9d092e927d4645763";
logging-data="820578"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MBQO9ewLW9v5xFK5xWqnY"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Cv82rXXqBYyD+K8OEKelp6iuXSo=
In-Reply-To: <876673a6-7f35-4f44-9702-43eddd3bc9e4n@googlegroups.com>
 by: Janis Papanagnou - Tue, 25 Apr 2023 07:02 UTC

On 25.04.2023 03:11, J Naman wrote:
> I received an email from Google:
> [...]

Is that yet another example of a chat bot providing bad/wrong
information (here about Awk)?

Janis

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor