From: Larry McVoy <lm@mcvoy.com>
To: Rob Pike <robpike@gmail.com>
Cc: tuhs@tuhs.org
Subject: [TUHS] Re: python
Date: Thu, 3 Aug 2023 18:01:42 -0700 [thread overview]
Message-ID: <20230804010142.GH11023@mcvoy.com> (raw)
In-Reply-To: <CAKzdPgwXKAsRPz7owMrsBnfqFnrk08Ptz_cRYi=-MPB0Hr8unw@mail.gmail.com>
I agree with Rob. I get why Guido did it, he wanted some sane style. Any
of us who were kernel engineers and saw a sane C style, then you see GNU
C style and you recoil in horror. I don't know if that was his path but
I get that you would like some sanity in the formatting.
That said, as a person who thinks of himself as a professional, when I go
in to someone else's code, I adopt their style. It's really rude to not
do so. I've written code in GNU C style.
On Thu, Aug 03, 2023 at 11:29:18PM +1000, Rob Pike wrote:
> The idea of indentation defining structure seemed really cool when it
> arose. I first saw it in a toy language called Henry, back in the early
> 1980s.
>
> But over time the notion that invisible characters define program execution
> created so many problems that in retrospect it is ill advised despite its
> prevalence. In fact its prevalence makes it even less advisable, as it
> creates yet more areas for trouble.
>
> -rob
>
>
> On Thu, Aug 3, 2023 at 10:36???PM Mike Markowski <mike.ab3ap@gmail.com> wrote:
>
> > Clem and all,
> >
> > I find python string format syntax to be close enough to printf. E.g.,
> >
> > print('%.4f ns, (%.4f, %.4fj)' % (tap[0], tap[1].real, tap[1].imag))
> >
> > However, the example highlights a shortcoming. While complex numbers
> > are supported by the language, there is no formatting support like
> > '%.5j' ('j' is my made up format char) to directly format a complex number.
> >
> > I work in an RF lab focused on work with hardware and lab gear. Some
> > points in favor of python are (1) lab gear is controlled by SCPI, (2)
> > DSP relies on complex math, and (3) RF propagation modeling is
> > computationally intense.
> >
> > Item (1) is easily performed with python, (2) with python or
> > Matlab/octave, and (3) is 'it depends.' An engineer's friend went from
> > slide rule, to calculator, fortran/c (fortran for numbers, c for
> > hardware), and now python. A laptop with python or matlab is the new
> > 'calculator.' As to (3), if you will use the program for large
> > scenarios, use c or fortran. For small runs or to dovetail results with
> > control of lab gear python fills the bill. (I even went to the slightly
> > insane length of converting a classic prop model from fortran to python
> > for that reason: https://udel.edu/~mm/itm/ )
> >
> > I agree 110% that python white space formatting is horrible. I can't
> > say many times I took someone else's program, made a quick change, to
> > discover one of us used tabs and the other spaces.
> >
> > Mike Markowski
> >
> > On 8/2/23 10:07 PM, Clem Cole wrote:
> > > IMO (Like Larry) no printf stinks. But the real killer for my sustain
> > > for Python is the use white space and being typeless. My daughter
> > > loves it for her cloud development and we argue a bit. But it was the
> > > first language she really mastered in college and she never took a
> > > competitive languages course so I???m not so sure really had experienced
> > > much beyond it for real programs. Maybe I???m just an old fart but
> > > between C, Go and Rust I???m pretty good. I do write scripts in Bourne
> > > shell and or awk truth be known.
> > >
> >
--
---
Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat
next prev parent reply other threads:[~2023-08-04 1:01 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-30 18:22 [TUHS] Re: Cool talk on Unix and Sendmail history, by Eric Allman Norman Wilson
2023-07-30 21:43 ` Rob Pike
2023-07-30 23:34 ` George Michaelson
2023-07-30 23:59 ` Erik E. Fair
2023-07-31 0:26 ` Warner Losh
2023-07-31 22:57 ` Grant Taylor via TUHS
2023-07-31 23:05 ` Warner Losh
2023-08-01 2:45 ` Grant Taylor via TUHS
2023-08-01 1:51 ` Niklas Karlsson
2023-08-01 2:47 ` Grant Taylor via TUHS
2023-08-01 3:20 ` Theodore Ts'o
2023-07-31 0:41 ` segaloco via TUHS
2023-08-01 9:22 ` Marc Donner
2023-08-01 10:58 ` Erik E. Fair
2023-08-02 0:37 ` Dave Horsfall
2023-08-02 14:52 ` Ron Natalie
2023-08-02 21:14 ` Grant Taylor via TUHS
2023-08-02 22:20 ` segaloco via TUHS
2023-08-02 22:37 ` Warner Losh
2023-08-02 23:49 ` Rich Salz
2023-08-03 0:51 ` [TUHS] Re: python Larry McVoy
2023-08-03 1:20 ` George Michaelson
2023-08-03 2:53 ` Bakul Shah
2023-08-03 2:55 ` segaloco via TUHS
2023-08-03 3:24 ` George Michaelson
2023-08-03 3:32 ` Warner Losh
2023-08-03 3:55 ` Bakul Shah
2023-08-03 8:32 ` Rob Pike
2023-08-03 14:19 ` Bakul Shah
2023-08-03 14:56 ` Dan Halbert
2023-08-03 15:20 ` will.senn
2023-08-03 22:05 ` Dan Cross
2023-08-04 0:24 ` John Cowan
2023-08-04 15:17 ` Dan Cross
2023-08-05 4:44 ` Bakul Shah
2023-08-03 15:41 ` John Cowan
2023-08-03 2:07 ` Clem Cole
2023-08-03 2:21 ` Pete Wright via TUHS
2023-08-03 2:56 ` Warner Losh
2023-08-03 12:36 ` Mike Markowski
2023-08-03 13:29 ` Rob Pike
2023-08-03 15:24 ` emanuel stiebler
2023-08-03 15:39 ` Steffen Nurpmeso
2023-08-04 1:01 ` Larry McVoy [this message]
2023-08-04 1:28 ` segaloco via TUHS
2023-08-04 1:58 ` Adam Thornton
2023-08-04 15:04 ` Dan Cross
2023-08-04 15:10 ` Larry McVoy
2023-08-03 16:57 ` [TUHS] Re: [TULSA] " Phil Budne
2023-08-03 17:00 ` Rich Salz
2023-08-03 20:35 ` [TUHS] Split addressing (I/D) space (inspired by the death of the python... thread) Will Senn
2023-08-03 21:05 ` [TUHS] " Kenneth Goodwin
2023-08-03 21:10 ` Ronald Natalie
2023-08-03 21:16 ` Warner Losh
2023-08-03 21:24 ` Ronald Natalie
2023-08-03 22:34 ` Kenneth Goodwin
2023-08-03 21:05 ` Ronald Natalie
2023-08-03 21:44 ` Clem Cole
2023-08-03 22:08 ` Will Senn
2023-08-03 22:54 ` Clem Cole
2023-08-03 23:08 ` Dave Horsfall
2023-08-03 23:15 ` Clem Cole
2023-08-04 0:38 ` John Cowan
2023-08-03 17:29 ` [TUHS] Re: [TULSA] Re: python Alejandro Colomar
2023-08-03 17:51 ` John Cowan
2023-08-03 18:05 ` Alejandro Colomar
2023-08-03 21:29 ` Dan Cross
2023-08-03 23:55 ` [TUHS] printf (was: python) Alejandro Colomar
2023-08-04 16:06 ` [TUHS] " Dan Cross
2023-08-04 16:57 ` Alejandro Colomar
2023-08-04 21:16 ` Dan Cross
2023-08-03 21:02 ` [TUHS] Re: [TULSA] Re: python Steffen Nurpmeso
2023-08-03 23:47 ` Larry McVoy
2023-08-03 23:54 ` Will Senn
2023-08-04 19:20 ` [TUHS] " Ed Bradford
2023-08-04 19:47 ` Larry McVoy
2023-08-05 5:40 ` Ed Bradford
2023-08-02 23:33 ` [TUHS] Re: Cool talk on Unix and Sendmail history, by Eric Allman Dave Horsfall
2023-08-04 20:11 [TUHS] Re: python Noel Chiappa
2023-08-04 20:15 ` Larry McVoy
2023-08-04 20:45 ` Adam Thornton
2023-08-04 21:17 Douglas McIlroy
2023-08-04 21:30 ` Dan Cross
2023-08-04 22:36 ` Rob Pike
2023-08-06 19:46 Norman Wilson
2023-08-07 6:48 ` Ed Bradford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230804010142.GH11023@mcvoy.com \
--to=lm@mcvoy.com \
--cc=robpike@gmail.com \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).