From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11867 invoked from network); 7 Aug 2023 06:48:55 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 7 Aug 2023 06:48:55 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 4DC5343130; Mon, 7 Aug 2023 16:48:50 +1000 (AEST) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by minnie.tuhs.org (Postfix) with ESMTPS id 912C94312B for ; Mon, 7 Aug 2023 16:48:42 +1000 (AEST) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-52328e96869so2634568a12.1 for ; Sun, 06 Aug 2023 23:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691390920; x=1691995720; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2vtZSRIgcQlCzYXh1T90TuHz1DvwYze/fNpLQ2Rze6M=; b=VrfkcUB4R2/4E7rpAYQuwIE6DgF1BiURflTkVHHSn2pX6ZmUjoYarAZKqCnrf3AI+r u2ri1L/Vx7pK82toPpu6Ualls3gN6g/RsZjKC7tQnelkh+fhS+WflC4m7L3Uww9Vlg1e S48dz+SKQXdKiajoq3lEcXOBJKpkUFX6qZ8WBYz6dyQFHaEGxzrxx4CjQ+4BfSVkJDRJ va4QEevkHkUBZqF7SMGzytwDW63A5ep1xVh8P/J2ibEHahYIFvQ6UMEG35uUHEPk3Oyk DpTmCAzwtIGmjUPudnRYuJMhUBS+ThME68I2ATrB4Xlnzp+q6bnX8Nt49LsdhgsvCp76 fUCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691390920; x=1691995720; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2vtZSRIgcQlCzYXh1T90TuHz1DvwYze/fNpLQ2Rze6M=; b=HSie4Lxaws3xV49VBBzdZdu/WR0omfuc1HKy4KSvsHKFnv2pLt6bOsyNWTxNnmsisc r8+foIUTCO+WgcElX6V4yhgDfkSsj9zlid9HoQK2Uu6TMlXmvtHKDIngJbiR8dIT6wL6 1HCBoq6bq0MO5SveyQozejvJc0pg+ev+x/l2iukCTbmSOxhz7taZiZxJgK2y5/UN3RLR Q1sxUQLK8WR+q/AbQ67l/F2KOqBJoBr/29Fl1t22ASUyU/y3Z/QFoIbotutKT4/xGaMG LASZuzMSbKO9CPstj4hbUFy7CFCu38SvBmu1d4sM5TUqNTsQpmXU8LcmnpcuzNW1liQC 3p3Q== X-Gm-Message-State: AOJu0Yzcz3rZX6VAC/13s4Ik3y/arZKlU6U96xQ146UHyByY6nv+NWGN zDVonCtDLEaHbhOs2bNsU8YnksVkrYBvq8rE/PC0CTJA3ko= X-Google-Smtp-Source: AGHT+IF7aVrwIaqxpYAWB8Wrky3j7Z9TV6gTMp5hq7as8uNueEWhY7Ch2YbTtELEXLNgLBOpDBpbownA2fcxcOhjXTY= X-Received: by 2002:aa7:da17:0:b0:522:7ab4:31fe with SMTP id r23-20020aa7da17000000b005227ab431femr8118955eds.23.1691390919944; Sun, 06 Aug 2023 23:48:39 -0700 (PDT) MIME-Version: 1.0 References: <523A100F35BC4139947795C31B70303E.for-standards-violators@oclsc.org> In-Reply-To: <523A100F35BC4139947795C31B70303E.for-standards-violators@oclsc.org> From: Ed Bradford Date: Mon, 7 Aug 2023 01:48:01 -0500 Message-ID: To: Norman Wilson Content-Type: multipart/alternative; boundary="000000000000f5ad5606024fa221" Message-ID-Hash: DGNYRBHQYHJEMGLQ73WYZZXK44E46SNI X-Message-ID-Hash: DGNYRBHQYHJEMGLQ73WYZZXK44E46SNI X-MailFrom: egbegb2@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: tuhs@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: python List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --000000000000f5ad5606024fa221 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Very nice serman, Norman. I moved from (cb unix) BTL C (1976) to C++ to Java to PHP and JavaScript to Python. I never went for the object oriented view but loved C++'s strict type checking. I got very frustrated with the active support for Python2 and Python3 versions and vacationed for several years. Then Python went out of the Python 2 support business and I started using Python again. Over the span of all those languages Python 3 has supported almost anything I could think of with free downloadable modules. That has happened nowhere I have ever seen. I also struggled with writing and supporting print functions where the variables were in one place and the formats for them were in another place. Python3's f-strings reduced my strings substantially. Now the format and variable can be defined in one place and used in lots of places. That is a huge help to me for documentation and support. That's my two cents. Thanks for your thoughts Ed Bradford Pflugerville, TX egbegb2@gmail.com PS: Has anyone else but me on this list tried chatGPT generated python programs? We should move such a conversation elsewhere, but I simply don't know where. Email me if you want to start a discussion on this topic in a more appropriate place. On Sun, Aug 6, 2023 at 2:46=E2=80=AFPM Norman Wilson wro= te: > At the risk of releasing more heat than light (so if you feel > compelled to flame by this message, please reply just to me > or to COFF, not to TUHS): > > The fussing here over Python reminds me very much of Unix in > the 1980s. Specifically wars over editors, and over BSD vs > System V vs Research systems, and over classic vs ISO C, and > over embracing vendor-specific features (CSRG and USG counting > as vendors as well as Digital, SGI, Sun, et al) vs sticking > to the common core. And more generally whether any of the > fussing is worth it, and whether adding stuff to Unix is > progress or just pointless complication. > > Speaking as an old fart who no longer gets excited about this > stuff except where it directly intersects something I want to > do, I have concluded that nobody is entirely right and nobody > is entirely wrong. Fancy new features that are there just to > be fancy are usually a bad idea, especially when they just copy > something from one system to a completely different one, but > sometimes they actually add something. Sometimes something > brand new is a useful addition, especially when its supplier > takes the time and thought to fit cleanly into the existing > ecosystem, but sometimes it turns out to be a dead end. > > Personal taste counts, but never as much as those of us > brandishing it like to think. > > To take Python as an example: I started using it about fifteen > years ago, mostly out of curiousity. It grew on me, and these > days I use it a lot. It's the nearest thing to an object- > oriented language that I have ever found to be usable (but I > never used the original Smalltalk and suspect I'd have liked > that too). It's not what I'd use to write an OS, nor to do > any sort of performance-limited program, but computers and > storage are so fast these days that that rarely matters to me. > > Using white space to denote blocks took a little getting used > to, but only a little; no more than getting used to typing > if ...: instead of if (...). The lack of a C-style for loop > occasionally bothers me, but iterating over lists and sets > handles most of the cases that matter, and is far less cumbersome. > It's a higher-level language than C, which means it gets in the > way of some things but makes a lot of other things easier. It > turns out the latter is more significant than the former for > the things I do with it. > > The claim that Python doesn't have printf (at least since ca. 2.5, > when I started using it) is just wrong: > print 'pick %d pecks of %s' % (n, fruit) > is just a different spelling of > printf("pick %d pecks of %s\n", n, fruit) > except that sprintf is no longer a special case (and snprintf > becomes completely needless). I like the modern > print(f'pick {n} pecks of {fruit}') > even better; f strings are what pushed me from Python 2 to > Python 3. > > I really like the way modules work in Python, except the dumbass > ways you're expected to distribute a program that is broken into > modules of its own. As a low-level hacker I came up with my own > way to do that (assembling them all into a single Python source > file in which each module is placed as a string, evaled and > inserted into the module table, and then the starting point > called at the end; all using documented, stable interfaces, > though they changed from 2 to 3; program actually written as > a collection of individual source files, with a tool of my > own--written in Python, of course--to create the single file > which I can then install where I need it). > > I have for some years had my own hand-crafted idiosyncratic > program for reading mail. (As someone I know once said, > everybody writes a mailer; it's simple and easy and makes > them feel important. But in this case I was doing it just > for myself and for the fun of it.) The first edition was > written 20 years ago in C. I rewrote it about a decade ago > in Python. It works fine; can now easily deal with on-disk > or IMAP4 or POP3 mailboxes, thanks both to modules as a > concept and to convenient library modules to do the hard work; > and updating in the several different work and home environments > where I use it no longer requires recompiling (and the source > code need no longer worry about the quirks of different > compilers and libraries); I just copy the single executable > source-code file to the different places it needs to run. > > For me, Python fits into the space between shell scripts and > awk on one hand, and C on the other, overlapping some of the > space of each. > > But personal taste is relevant too. I didn't know whether I'd > like Python until I'd tried it for a few real programs (and > even then it took a couple of years before I felt like I'd > really figured out out to use it). Just as I recall, about > 45 years ago, moving from TECO (in which I had been quite > expert) to ed and later the U of T qed and quickly feeling > that ed was better in nearly every way; a year or so later, > trying vi for a week and giving up in disgust because it just > didn't fit my idea of how screen editors should work; falling > in love with jim and later sam (though not exclusively, I still > use ed/qed daily) because they got the screen part just right > even if their command languages weren't quite such a good match > for me. > > And I have never cottoned on to Perl for, I suspect, the same > reason I'd be really unhappy to go back to TECO. Tastes > evolve. I bet there's a lot of stuff I did in the 1980s that > I'd do differently could I have another go at it. > > The important thing is to try new stuff. I haven't tried Go > or Rust yet, and I should. If you haven't given Python or > Perl a good look, you should. Sometimes new tools are > useless or cumbersome, sometimes they are no better than > what you've got now, but sometimes they make things easier. > You won't know until you try. > > Here endeth today's sermon from the messy office, which I ought > to be cleaning up, but preaching is more fun. > > Norman Wilson > Toronto ON > --=20 Advice is judged by results, not by intentions. Cicero --000000000000f5ad5606024fa221 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Very nice serman, Norman. I moved from (cb unix) BTL C (1976) = to C++ to Java to PHP and JavaScript to Python. I never went for the object= oriented view but loved C++'s strict type checking.

I got very = frustrated with the active support for Python2 and Python3 versions and vac= ationed
for several years. Then Python went out of the Python 2 support bu= siness=C2=A0and I started using
Python again. Over the span of all those l= anguages Python 3 has supported almost anything
I could think of with free= downloadable modules. That has happened nowhere I have ever seen.

I= also struggled with writing and supporting print functions where the varia= bles were
in one place and the formats for them were in another place. Pyt= hon3's=C2=A0f-strings=C2=A0reduced
my strings substantially. Now the f= ormat and variable can be defined in one place and used in lots of places.<= /div>

That is a huge help to me for documentation and support.

=
That= 's my two cents.

Thanks for your thoughts

Ed Bradford
P= flugerville, TX

PS: Has anyone else but me on this list tried chatGPT generated pyt= hon programs? We should
move such a conversation elsewhere, but I simply d= on't know where. Email me if you
want to start a discussion on this to= pic in a more appropriate place.



On Sun, Aug 6, 2023 at 2:= 46=E2=80=AFPM Norman Wilson <norman@= oclsc.org> wrote:
At the risk of releasing more heat than light (so if you feel compelled to flame by this message, please reply just to me
or to COFF, not to TUHS):

The fussing here over Python reminds me very much of Unix in
the 1980s.=C2=A0 Specifically wars over editors, and over BSD vs
System V vs Research systems, and over classic vs ISO C, and
over embracing vendor-specific features (CSRG and USG counting
as vendors as well as Digital, SGI, Sun, et al) vs sticking
to the common core.=C2=A0 And more generally whether any of the
fussing is worth it, and whether adding stuff to Unix is
progress or just pointless complication.

Speaking as an old fart who no longer gets excited about this
stuff except where it directly intersects something I want to
do, I have concluded that nobody is entirely right and nobody
is entirely wrong.=C2=A0 Fancy new features that are there just to
be fancy are usually a bad idea, especially when they just copy
something from one system to a completely different one, but
sometimes they actually add something.=C2=A0 Sometimes something
brand new is a useful addition, especially when its supplier
takes the time and thought to fit cleanly into the existing
ecosystem, but sometimes it turns out to be a dead end.

Personal taste counts, but never as much as those of us
brandishing it like to think.

To take Python as an example: I started using it about fifteen
years ago, mostly out of curiousity.=C2=A0 It grew on me, and these
days I use it a lot.=C2=A0 It's the nearest thing to an object-
oriented language that I have ever found to be usable (but I
never used the original Smalltalk and suspect I'd have liked
that too).=C2=A0 It's not what I'd use to write an OS, nor to do any sort of performance-limited program, but computers and
storage are so fast these days that that rarely matters to me.

Using white space to denote blocks took a little getting used
to, but only a little; no more than getting used to typing
if ...: instead of if (...).=C2=A0 The lack of a C-style for loop
occasionally bothers me, but iterating over lists and sets
handles most of the cases that matter, and is far less cumbersome.
It's a higher-level language than C, which means it gets in the
way of some things but makes a lot of other things easier.=C2=A0 It
turns out the latter is more significant than the former for
the things I do with it.

The claim that Python doesn't have printf (at least since ca. 2.5,
when I started using it) is just wrong:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 print 'pick %d pecks of %s' % (n, fruit= )
is just a different spelling of
=C2=A0 =C2=A0 =C2=A0 =C2=A0 printf("pick %d pecks of %s\n", n, fr= uit)
except that sprintf is no longer a special case (and snprintf
becomes completely needless).=C2=A0 I like the modern
=C2=A0 =C2=A0 =C2=A0 =C2=A0 print(f'pick {n} pecks of {fruit}')
even better; f strings are what pushed me from Python 2 to
Python 3.

I really like the way modules work in Python, except the dumbass
ways you're expected to distribute a program that is broken into
modules of its own.=C2=A0 As a low-level hacker I came up with my own
way to do that (assembling them all into a single Python source
file in which each module is placed as a string, evaled and
inserted into the module table, and then the starting point
called at the end; all using documented, stable interfaces,
though they changed from 2 to 3; program actually written as
a collection of individual source files, with a tool of my
own--written in Python, of course--to create the single file
which I can then install where I need it).

I have for some years had my own hand-crafted idiosyncratic
program for reading mail.=C2=A0 (As someone I know once said,
everybody writes a mailer; it's simple and easy and makes
them feel important.=C2=A0 But in this case I was doing it just
for myself and for the fun of it.)=C2=A0 The first edition was
written 20 years ago in C.=C2=A0 I rewrote it about a decade ago
in Python.=C2=A0 It works fine; can now easily deal with on-disk
or IMAP4 or POP3 mailboxes, thanks both to modules as a
concept and to convenient library modules to do the hard work;
and updating in the several different work and home environments
where I use it no longer requires recompiling (and the source
code need no longer worry about the quirks of different
compilers and libraries); I just copy the single executable
source-code file to the different places it needs to run.

For me, Python fits into the space between shell scripts and
awk on one hand, and C on the other, overlapping some of the
space of each.

But personal taste is relevant too.=C2=A0 I didn't know whether I'd=
like Python until I'd tried it for a few real programs (and
even then it took a couple of years before I felt like I'd
really figured out out to use it).=C2=A0 Just as I recall, about
45 years ago, moving from TECO (in which I had been quite
expert) to ed and later the U of T qed and quickly feeling
that ed was better in nearly every way; a year or so later,
trying vi for a week and giving up in disgust because it just
didn't fit my idea of how screen editors should work; falling
in love with jim and later sam (though not exclusively, I still
use ed/qed daily) because they got the screen part just right
even if their command languages weren't quite such a good match
for me.

And I have never cottoned on to Perl for, I suspect, the same
reason I'd be really unhappy to go back to TECO.=C2=A0 Tastes
evolve.=C2=A0 I bet there's a lot of stuff I did in the 1980s that
I'd do differently could I have another go at it.

The important thing is to try new stuff.=C2=A0 I haven't tried Go
or Rust yet, and I should.=C2=A0 If you haven't given Python or
Perl a good look, you should.=C2=A0 Sometimes new tools are
useless or cumbersome, sometimes they are no better than
what you've got now, but sometimes they make things easier.
You won't know until you try.

Here endeth today's sermon from the messy office, which I ought
to be cleaning up, but preaching is more fun.

Norman Wilson
Toronto ON


--
Advice is judged by results, not by intentions.
=C2=A0 Ci= cero

--000000000000f5ad5606024fa221--