Re: lisp scripts

Liste des GroupesRevenir à cu shell 
Sujet : Re: lisp scripts
De : nospam (at) *nospam* lisse.NA (Eberhard W Lisse)
Groupes : comp.unix.shell
Date : 14. Feb 2025, 22:51:57
Autres entêtes
Message-ID : <m19s7uFbvn8U2@mid.individual.net>
References : 1 2 3
User-Agent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Betterbird/128.6.0
On 10/02/2025 02:00, Lawrence D'Oliveiro wrote:
On Sun, 09 Feb 2025 11:07:43 -0500, Dan Espen wrote:
 
I once spent a week converting a LOT of sed/awk to Perl. I turned
a complicated mess into something any programmer could readily
understand. (And actually worked.)
 
I have pointed out several times that Perl does everything awk can
do, at least as concisely, and a lot more besides. Which is why I
never bothered to learn awk.
 
Some people get annoyed every time I say that.
 
Now I'd use Python.
[...]

Python, Shmython. It's like whether vi or emacs is the better editor
(of course Sublime Text is the better one :-)-O)

Awk is very good for short one liners on reasonably short input files,
because Perl takes longer to load.

Perl is very good for large input files, a more complete programming
language with gazillions of modules and around for ages.

Python is probably as good as Perl or better and has gazillions of
libraries. However this need for virtual environments and that scripts
stop working after a Python upgrade, make things complicated and has
turned me off from learning it, which I wanted to do as I have
retired.

Don't forget LUA :-)-O

If you are young and want to learn a (new) programming language don't
start with Perl, start with Python.

If you have worked with Perl for ages, carry on I doubt there is
anything in Python that you can't do in Perl.

If there is a need to learn shell then learn shell (bash, zsh or
whatever).

I recently had to come up with a script that takes a DNS zone file, and
constructs a really complicated CSV of 79 columns delimited with ';'
and "pivoting" name servers from 'long' to 'wide' (but without
aggregation) with the IP addresses concatenated to the names of the
glue records, some of which didn't even have IP addresses.

Perl script works quite will for smaller zones, but does not scale well.

Bash script with QSV pipelines and DuckDB (for the 'pivoting') is
extremely fast. So fast that I didn't try Perl with DuckDB.

The Bash script is as readable as the Perl script because I tend to
comment so much that I later can figure out what I did and why,
myself :-)-O

That's 11 cents from a retired Gynecologist :-)-O

el

Date Sujet#  Auteur
9 Feb 25 * lisp scripts30zara
9 Feb 25 +* Re: lisp scripts11Kaz Kylheku
9 Feb 25 i`* Re: lisp scripts10Keith Thompson
9 Feb 25 i +* OT: web-based source hosting (was: Re: lisp scripts)8Nuno Silva
9 Feb 25 i i+- Re: OT: web-based source hosting (was: Re: lisp scripts)1Kenny McCormack
9 Feb 25 i i+- Re: OT: web-based source hosting1Christian Weisgerber
10 Feb 25 i i+* Re: OT: web-based source hosting (was: Re: lisp scripts)3Lawrence D'Oliveiro
10 Feb 25 i ii`* Re: OT: web-based source hosting2Nuno Silva
10 Feb 25 i ii `- Re: OT: web-based source hosting1D
10 Feb 25 i i`* Re: OT: web-based source hosting2Keith Thompson
10 Feb 25 i i `- Re: OT: web-based source hosting1Lawrence D'Oliveiro
9 Feb 25 i `- Re: lisp scripts1Janis Papanagnou
9 Feb 25 `* Re: lisp scripts18Dan Espen
9 Feb 25  +* Re: lisp scripts12Kenny McCormack
9 Feb 25  i+* Re: lisp scripts5Dan Espen
9 Feb 25  ii`* Re: lisp scripts4Janis Papanagnou
9 Feb 25  ii `* Re: lisp scripts3Dan Espen
10 Feb 25  ii  `* Re: lisp scripts2Janis Papanagnou
10 Feb 25  ii   `- Re: lisp scripts1Janis Papanagnou
13 Feb 25  i`* Re: lisp scripts6Randal L. Schwartz
13 Feb 25  i `* Re: lisp scripts5Kaz Kylheku
14 Feb 25  i  +- Re: lisp scripts1Salvador Mirzo
14 Feb 25  i  `* Re: lisp scripts3Eberhard W Lisse
15 Feb 25  i   `* Re: lisp scripts2Dan Cross
16 Feb 25  i    `- Re: lisp scripts1Randal L. Schwartz
10 Feb 25  `* Re: lisp scripts5Lawrence D'Oliveiro
10 Feb 25   +* Re: lisp scripts2Dan Espen
11 Feb 25   i`- Re: lisp scripts1Lawrence D'Oliveiro
14 Feb 25   `* Re: lisp scripts2Eberhard W Lisse
14 Feb 25    `- Re: lisp scripts1Janis Papanagnou

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal