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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19836 invoked from network); 3 Aug 2023 13:29:44 -0000 Received: from minnie.tuhs.org (2600:3c01:e000:146::1) by inbox.vuxu.org with ESMTPUTF8; 3 Aug 2023 13:29:44 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id D27A9410F0; Thu, 3 Aug 2023 23:29:39 +1000 (AEST) Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) by minnie.tuhs.org (Postfix) with ESMTPS id 8B8AA410A2 for ; Thu, 3 Aug 2023 23:29:30 +1000 (AEST) Received: by mail-ua1-x929.google.com with SMTP id a1e0cc1a2514c-799fa82fb44so306177241.0 for ; Thu, 03 Aug 2023 06:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691069369; x=1691674169; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jAS+u6nAruC+WgpWAthb1UkUSyN6a2Ukg/RHvp8eaII=; b=fBKmXNKJvybzItTGgGTuAxmqXqPWWh1WQLih+tXvFQ680edCsWuA5CY13Lxth8HGPX Ahm3aGRzYEQ1gRR8Dbvj9FBiB8uXzmNVtp6Xt/RAHyh0GvsrFhteeelNUwcRaA1TtXHn UhZWWZqyibLEEgMwIMZHFXlPMXMIEfPXLSuZk+vDKb+Bq/POeDYLTRlFYahovVGAQ3XJ M95lRXmx+wwzegrB4XFbQR0extevbj6rREo6smOz9AbQRBnBTsrgrMA1Rl1apexe3McU n7lYWIFYA5aComJ7J8BzJcrgvJNyCQpPgqAJXH9j4dtYzhHXiS/405VFRgCGt/7RU+AO z0Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691069369; x=1691674169; 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=jAS+u6nAruC+WgpWAthb1UkUSyN6a2Ukg/RHvp8eaII=; b=F2mVPtbUJ2CRmg/dytPxrmaGT+FHxEmjMiyqQHmDLPsJj8JAk5RKZyvAtsYdXXUMoX yWM7dVETMOZo00EJf0RVhBQCHBw6M5NdEbpMRAaTRmwqclBZiHvO4Eq0pHTTxdALjNyo 5kcO12J5kGHnX/VW02bzIEzXoaPSVWrpUQvaO5V3jTQyawf1W4CaPR67z/Nqzr6+tsUN QkwbVNsV/6fgieHi+wKne+F+bbHLsGu8SU2jWiiFvE19p2CGdmz/h7fUWL+S6v4yydi9 Wcz4X8hI5ADR32rZy86g/CsbEJm5Y6Y3MdGtYZx8wAwhoNdiWI5ff8lVLo77KVnubSqb kVrA== X-Gm-Message-State: ABy/qLZBz+g9ZCHPEFtryrdV3p38y07Vob/9RREmFppm01JVdXTXq73L brRPp8AgD8jOVLzO8xUo+LWle0KBUSrK61QeR3/xGfLJ X-Google-Smtp-Source: APBJJlHerVOMkTKJxuYUYbNhysaHXtOdUGyBUqH605rzBfe+d6bIO+H99uXw4v+8jZ6zK6kXn4R5yu49Aen2/acjh7s= X-Received: by 2002:a67:fc19:0:b0:447:6853:5d3c with SMTP id o25-20020a67fc19000000b0044768535d3cmr6901553vsq.20.1691069369169; Thu, 03 Aug 2023 06:29:29 -0700 (PDT) MIME-Version: 1.0 References: <8246.1690761540@cesium.clock.org> <29602.1690887524@cesium.clock.org> <20230803005106.GA12652@mcvoy.com> In-Reply-To: From: Rob Pike Date: Thu, 3 Aug 2023 23:29:18 +1000 Message-ID: To: Mike Markowski Content-Type: multipart/alternative; boundary="0000000000000a3b3e060204c56f" Message-ID-Hash: D3GNCTX4NU4FZK3TGSLXU4IRMFP2PRGW X-Message-ID-Hash: D3GNCTX4NU4FZK3TGSLXU4IRMFP2PRGW X-MailFrom: robpike@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: --0000000000000a3b3e060204c56f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=AFPM Mike Markowski 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 numbe= r. > > 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=E2=80=99m not so sure really had expe= rienced > > much beyond it for real programs. Maybe I=E2=80=99m just an old fart = but > > between C, Go and Rust I=E2=80=99m pretty good. I do write scripts in = Bourne > > shell and or awk truth be known. > > > --0000000000000a3b3e060204c56f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The idea of indentation defining structure seemed really cool whe= n it arose. I first saw it in a toy language called Henry, back in the earl= y 1980s.

But over time the notion that invisible characters define program= execution created so many problems that in retrospect it is ill advised de= spite 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=E2=80=AFPM Mike Markowski <mike.ab3ap@gmail.com> wrote:
Clem and all,

I find python string format syntax to be close enough to printf. E.g.,

=C2=A0=C2=A0 print('%.4f ns, (%.4f, %.4fj)' % (tap[0], tap[1].real,= tap[1].imag))

However, the example highlights a shortcoming.=C2=A0 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.'=C2=A0 An engineer's fri= end 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.'=C2=A0 As to (3), if you will use the program for larg= e
scenarios, use c or fortran. For small runs or to dovetail results with control of lab gear python fills the bill.=C2=A0 (I even went to the slight= ly
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.=C2=A0 I can= 9;t
say many times I took someone else's program, made a quick change, to <= br> 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.=C2=A0 But the real killer for my su= stain
> for Python is the use white space and being typeless. =C2=A0 My daught= er
> loves it for her cloud development and we argue a bit.=C2=A0 But it wa= s the
> first language she really mastered in college and she never took a > competitive languages course so I=E2=80=99m not so sure really had exp= erienced
> much beyond it for real programs. =C2=A0 Maybe I=E2=80=99m just an old= fart but
> between C, Go and Rust I=E2=80=99m pretty good.=C2=A0 I do write scrip= ts in Bourne
> shell and or awk truth be known.
>
--0000000000000a3b3e060204c56f--