From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [50.116.15.146]) by inbox.vuxu.org (Postfix) with ESMTP id 877EE2D65B for ; Tue, 1 Oct 2024 17:51:21 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 3B1D2437C0; Wed, 2 Oct 2024 01:51:16 +1000 (AEST) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by minnie.tuhs.org (Postfix) with ESMTPS id 6BA12437BF for ; Wed, 2 Oct 2024 01:51:13 +1000 (AEST) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2fabc9bc5dfso41943961fa.0 for ; Tue, 01 Oct 2024 08:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727797871; x=1728402671; darn=tuhs.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iLKVom4koU67ymJqYzT9nf94u9oRXqFHbP/8Ro9XqC4=; b=WoY5MZ0SYe3p6bepcFDKEdGW83ZDPyfAw8VNvNWaDbIxYYwiieTVvg2WSQshEi/mOd hMu7hrN1KfRRbkm9SBIw1Pa0SPL6ANjs4RfNL7AinpJ4aomKaZt3kxBQ7FgvLNlZBaKB tsivVLntROM4zEiLaDde0nsn8jEq4gPHAV/MfFjsrJleIwojwuzD9vBSiPtBj9+YBmds C+YCSaN4V/rVGcuSnTv4joOETvVFIiT+DQIWodx639G1JcKzutwJVr9ApLsPFu2XWlS7 edgN9AyGU2E4MoEUT9pPGD83cUnPwiSpwCmmrJCMWAUF5s+/FwG+l9I+Z5IkksfkIxqw ly6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727797871; x=1728402671; 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=iLKVom4koU67ymJqYzT9nf94u9oRXqFHbP/8Ro9XqC4=; b=DyKNYtXeaxVAMP4J/9BiRJkP/K7/SHyVIwEj/P4klMKbHPwj0jyHuOrVwPbzCNNwjT q8dZgAPmClZrabHGduDBBjrCgYXCfcrPDvi7yE9ZMpZaL44jy1aWbzhfoYOZv9Gujpj4 h/nknX0GBkjMr2cOJG4YDa2Bwm5GezFIKcHh4LGXiGklaOHa4HZT8vt5KO8FetKfuVmt 8onVfWVYrfaZAZFOYsr+wQH929304TTHkIQg+C+ukTrKEA4tM8oZpTwNBtSQSKk7io0u V2gSuJRgjfRl9di8rvjcFuLEHhDOc9TrWFWfxDvH6cvvZ9SluB+Bu6/65kPt92oAC/zB WLbA== X-Forwarded-Encrypted: i=1; AJvYcCVTowI232KKNdy8k+/FaslIrDFTWxwRBv5l3g1/JvDdaNqV90r0fXvluexa+FTY6XSjXvxs@tuhs.org X-Gm-Message-State: AOJu0YxCKTBBLlCvpkVRV+rk8aWgymYga32KZ4Fcw6vVYZqkt/BjSrte N2uHz6oVj5+rD1lX4MxgzDGVbF3orAAD/fuyrctrAIUhf5KhRFGJ14HJn7/2Gyg1OUYpMQejAzw qHQRZd3K6J6x/LdtMt390mtOolLk= X-Google-Smtp-Source: AGHT+IEG0YgPW9Z0tEcH4OS+0pUztTia/GUtcpdHzcZWW0cV47hBHfDRFKIVTaebhA0xCdAXAz+2RJxil30DMyJY5ZI= X-Received: by 2002:a05:651c:2209:b0:2fa:d296:6fbf with SMTP id 38308e7fff4ca-2fae0ffcb20mr2038001fa.1.1727797870759; Tue, 01 Oct 2024 08:51:10 -0700 (PDT) MIME-Version: 1.0 References: <20240928165812.4uyturluj4dsuwef@illithid> <20240928180138.aygrwqdwrvq3n6xt@illithid> <202410011313.491DD4ac421643@freefriends.org> <20241001133231.GE13777@mcvoy.com> <202410011347.491DlAsJ423777@freefriends.org> <20241001140101.GG13777@mcvoy.com> <024bd803-2852-c0d0-5f15-30ec65c45cb4@makerlisp.com> <20241001152033.GH13777@mcvoy.com> In-Reply-To: From: ron minnich Date: Tue, 1 Oct 2024 08:50:58 -0700 Message-ID: To: =?UTF-8?B?UGV0ZXIgV2VpbmJlcmdlciAo5rip5Y2a5qC8KQ==?= Content-Type: multipart/alternative; boundary="00000000000054980706236c4a92" Message-ID-Hash: 3WWRPT5Y6LA7STF5B523VBPGC4KXKKIV X-Message-ID-Hash: 3WWRPT5Y6LA7STF5B523VBPGC4KXKKIV X-MailFrom: rminnich@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Luther Johnson , tuhs@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Minimum Array Sizes in 16 bit C (was Maximum) List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --00000000000054980706236c4a92 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable by the way, if you are hankering to do bare metal programming again, and you're done with C, tinygo is great, and it works on 200 or so boards, from the bbc micro on up. tinygo gives you all the nice bits from go, and uses llvm as the backend, so programs can be very small. Tamago is also bare metal go, using the standard Go compiler, and has even flown in space. I had thought Rust and C would always be the only path to very low level programming in tiny environments, but it turned out I was too pessimistic. https://docs.google.com/presentation/d/1nqZicux6SloS8AynBu0B7cJYxw5pKu4IfCz= q_vqWccw/edit?usp=3Dsharing It's been years now since I used C on bare metal; it's Rust or Go for me. These languages give me all I ever needed for "first instruction after reset" programming. On Tue, Oct 1, 2024 at 8:38=E2=80=AFAM Peter Weinberger (=E6=B8=A9=E5=8D=9A= =E6=A0=BC) via TUHS < tuhs@tuhs.org> wrote: > Each generation bemoans the qualities of following generations. > (Perhaps justifiably in this case, but we're acting out a stereotyped > pattern.) > > Having a mental model of a computer is a good idea, but I'd rather not > have to teach the details of PDP-11 condition codes (which changed in > unexpected ways over time) Now caches loom large, and should such a > course provide a mental model of smart phones? [I think it should, and > the course should cover secure boot, but that leaves lots less time > for assembly language.] > > On Tue, Oct 1, 2024 at 11:20=E2=80=AFAM Larry McVoy wrote: > > > > On Tue, Oct 01, 2024 at 10:56:13AM -0400, Dan Cross wrote: > > > On Tue, Oct 1, 2024 at 10:32???AM Luther Johnson > > > wrote: > > > > I think because the of the orders of magnitude increase in the dema= nd > > > > for programmers, we now have a very large number of programmers wit= h > > > > little or no math and science (and computer science doesn't count i= n > the > > > > point I'm trying to make here, if that's your only science, you're > not > > > > going to have the models in your head from other disciplines to giv= e > you > > > > useful analogs) background, and that's a big change from 40 years > ago. > > > > So that has had an effect on who is programming, how they think abo= ut > > > > it, and how languages have been marketed to that programming > audience. IMHO. > > > > > > I've found a grounding in mathematics useful for programming, but > > > beyond some knowledge of the physical constraints that the universe > > > places on us and a very healthy appreciation for the scientific > > > method, I'm having a hard time understanding how the hard sciences > > > would help out too much. Electrical engineering seems like it would b= e > > > more useful, than, say, chemistry or geology. > > > > > > I talk to a lot of academics, and I think they see the situation > > > differently than is presented here. In a nutshell, the way a lot of > > > them look at it, the amount of computer science in the world increase= s > > > constantly while the amount of time they have to teach that to > > > undergraduates remains fixed. As a result, they have to pick and > > > choose what they teach very, very carefully, balancing a number of > > > criteria as they do so. What this translates to in the real world > > > isn't that the bar is lowered, but that the bar is different. > > > > I really wish that they made students take something like the PDP-11 > > assembly class - it was really systems architecture, you learned the > > basic idea of a computer: a CPU, a bus to talk to memory, a bus to > > talk to I/O, how a stack works, ideally how a context switch works > > though that kinda blows minds (I personally don't think you are a > > kernel programmer if you haven't implemented swtch() or at least > > walked the code and understood all of it). > > > > I did all that and developed a mental model of all computers that > > has helped me over the last 4 decades. Yes, my model is overly > > simplistic but it still works, even on the x86 craziness. I don't > > know how you could get to that mental model with x86, x86 is too > > weird. I don't really know which architecture is close to the > > simplicity of a PDP-11 today. Anyone? > > > > If I were teaching it, I'd just get a PDP-11 simulator and teach > > on that. Maybe. > > -- > > --- > > Larry McVoy Retired to fishing > http://www.mcvoy.com/lm/boat > --00000000000054980706236c4a92 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
by the way, if you are hankering to do bare metal programm= ing again, and you're done with=C2=A0C, tinygo is great, and it works o= n 200 or so boards, from the bbc micro on up.

tinygo giv= es you all the nice bits from go, and uses llvm as the backend, so programs= can be very small.=C2=A0

Tamago is also bare meta= l go, using the standard Go compiler, and has even flown in space.=C2=A0

I had thought Rust and C would always be the only pa= th to very low level programming in tiny environments, but it turned out I = was too pessimistic.=C2=A0https://d= ocs.google.com/presentation/d/1nqZicux6SloS8AynBu0B7cJYxw5pKu4IfCzq_vqWccw/= edit?usp=3Dsharing

It's been years now sin= ce I used C on bare metal; it's Rust or Go for me. These languages give= me all I ever needed for "first instruction after reset" program= ming.=C2=A0


On Tue, Oct 1, 2024 at 8:38=E2=80=AFAM Pete= r Weinberger (=E6=B8=A9=E5=8D=9A=E6=A0=BC) via TUHS <tuhs@tuhs.org> wrote:
Each g= eneration bemoans the qualities of following generations.
(Perhaps justifiably in this case, but we're acting out a stereotyped pattern.)

Having a mental model of a computer is a good idea, but I'd rather not<= br> have to teach the details of PDP-11 condition codes (which changed in
unexpected ways over time) Now caches loom large, and should such a
course provide a mental model of smart phones? [I think it should, and
the course should cover secure boot, but that leaves lots less time
for assembly language.]

On Tue, Oct 1, 2024 at 11:20=E2=80=AFAM Larry McVoy <lm@mcvoy.com> wrote:
>
> On Tue, Oct 01, 2024 at 10:56:13AM -0400, Dan Cross wrote:
> > On Tue, Oct 1, 2024 at 10:32???AM Luther Johnson
> > <luther.johnson@makerlisp.com> wrote:
> > > I think because the of the orders of magnitude increase in t= he demand
> > > for programmers, we now have a very large number of programm= ers with
> > > little or no math and science (and computer science doesn= 9;t count in the
> > > point I'm trying to make here, if that's your only s= cience, you're not
> > > going to have the models in your head from other disciplines= to give you
> > > useful analogs) background, and that's a big change from= 40 years ago.
> > > So that has had an effect on who is programming, how they th= ink about
> > > it, and how languages have been marketed to that programming= audience. IMHO.
> >
> > I've found a grounding in mathematics useful for programming,= but
> > beyond some knowledge of the physical constraints that the univer= se
> > places on us and a very healthy appreciation for the scientific > > method, I'm having a hard time understanding how the hard sci= ences
> > would help out too much. Electrical engineering seems like it wou= ld be
> > more useful, than, say, chemistry or geology.
> >
> > I talk to a lot of academics, and I think they see the situation<= br> > > differently than is presented here. In a nutshell, the way a lot = of
> > them look at it, the amount of computer science in the world incr= eases
> > constantly while the amount of time they have to teach that to > > undergraduates remains fixed. As a result, they have to pick and<= br> > > choose what they teach very, very carefully, balancing a number o= f
> > criteria as they do so. What this translates to in the real world=
> > isn't that the bar is lowered, but that the bar is different.=
>
> I really wish that they made students take something like the PDP-11 > assembly class - it was really systems architecture, you learned the > basic idea of a computer: a CPU, a bus to talk to memory, a bus to
> talk to I/O, how a stack works, ideally how a context switch works
> though that kinda blows minds (I personally don't think you are a<= br> > kernel programmer if you haven't implemented swtch() or at least > walked the code and understood all of it).
>
> I did all that and developed a mental model of all computers that
> has helped me over the last 4 decades.=C2=A0 Yes, my model is overly > simplistic but it still works, even on the x86 craziness.=C2=A0 I don&= #39;t
> know how you could get to that mental model with x86, x86 is too
> weird.=C2=A0 I don't really know which architecture is close to th= e
> simplicity of a PDP-11 today.=C2=A0 Anyone?
>
> If I were teaching it, I'd just get a PDP-11 simulator and teach > on that.=C2=A0 =C2=A0Maybe.
> --
> ---
> Larry McVoy=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Retired to fishing= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://www.mcvoy.com/lm/boat
--00000000000054980706236c4a92--