The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: ron minnich <rminnich@gmail.com>
To: "Peter Weinberger (温博格)" <pjw@google.com>
Cc: Luther Johnson <luther.johnson@makerlisp.com>, tuhs@tuhs.org
Subject: [TUHS] Re: Minimum Array Sizes in 16 bit C (was Maximum)
Date: Tue, 1 Oct 2024 08:50:58 -0700	[thread overview]
Message-ID: <CAP6exYJM0A6hbQ-omaz8+peQTdvyPuucrN3n3hzS84SeL07QeA@mail.gmail.com> (raw)
In-Reply-To: <CAOUkXSpZkekMAuAK-HNs8QK7YXeG5AtjW8bTSvqz=2dt2UDcdw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4457 bytes --]

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/1nqZicux6SloS8AynBu0B7cJYxw5pKu4IfCzq_vqWccw/edit?usp=sharing

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 AM Peter Weinberger (温博格) 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 AM 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 the demand
> > > > for programmers, we now have a very large number of programmers with
> > > > little or no math and science (and computer science doesn't count in
> 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 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 think 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 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 be
> > > 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 increases
> > > 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
>

[-- Attachment #2: Type: text/html, Size: 5646 bytes --]

  reply	other threads:[~2024-10-01 15:51 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-28 13:34 Douglas McIlroy
2024-09-28 16:58 ` G. Branden Robinson
2024-09-28 17:47   ` Luther Johnson
2024-09-28 17:52     ` Luther Johnson
2024-09-28 18:46       ` G. Branden Robinson
2024-09-28 22:08         ` Luther Johnson
2024-09-28 22:45           ` Luther Johnson
2024-09-28 22:50             ` Luther Johnson
2024-09-28 17:59   ` Bakul Shah via TUHS
2024-09-28 22:07     ` Douglas McIlroy
2024-09-28 23:05       ` Rob Pike
2024-09-28 23:30         ` Warner Losh
2024-09-29 10:06           ` Ralph Corderoy
2024-09-29 12:25             ` Warner Losh
2024-09-29 15:17               ` Ralph Corderoy
2024-09-30 12:15           ` Dan Cross
2024-09-28 18:01   ` G. Branden Robinson
2024-10-01 13:13     ` arnold
2024-10-01 13:32       ` Larry McVoy
2024-10-01 13:47         ` arnold
2024-10-01 14:01           ` Larry McVoy
2024-10-01 14:18             ` arnold
2024-10-01 14:25             ` Luther Johnson
2024-10-01 14:56               ` Dan Cross
2024-10-01 15:08                 ` Stuff Received
2024-10-01 15:20                 ` Larry McVoy
2024-10-01 15:38                   ` Peter Weinberger (温博格) via TUHS
2024-10-01 15:50                     ` ron minnich [this message]
2024-10-01 19:04                 ` arnold
2024-10-01 16:49           ` Paul Winalski
2024-10-01 15:44       ` Bakul Shah via TUHS
2024-10-01 19:07         ` arnold
2024-10-01 20:34           ` Rik Farrow
2024-10-02  0:55             ` Steffen Nurpmeso
2024-10-02  5:49             ` arnold
2024-10-02 20:42               ` Dan Cross
2024-10-02 21:54                 ` Marc Donner
2024-10-05 17:45                 ` arnold
2024-10-06 12:20                   ` Dan Cross
2024-10-06 12:29                     ` [TUHS] UREP code (was Re: Re: Minimum Array Sizes in 16 bit C (was Maximum)) arnold
2024-10-01 16:40       ` [TUHS] Re: Minimum Array Sizes in 16 bit C (was Maximum) Paul Winalski
2024-09-28 18:05   ` Larry McVoy
2024-09-30 15:49     ` Paul Winalski
2024-09-29 16:56 Douglas McIlroy
2024-09-29 20:29 ` Rob Pike
2024-09-29 21:13   ` Rik Farrow
2024-09-29 22:21   ` Rich Salz
2024-09-29 23:56     ` Rob Pike
2024-09-30  0:36       ` Larry McVoy
2024-09-30  0:55         ` Larry McVoy
2024-09-30  1:09         ` Luther Johnson
2024-09-30  1:37           ` Luther Johnson
2024-09-30  3:52             ` ron minnich
2024-10-01 12:43             ` arnold
2024-09-30 19:12   ` Steffen Nurpmeso
2024-09-30 20:03     ` Rich Salz
2024-09-30 21:15       ` Steffen Nurpmeso
2024-09-30 22:14       ` Bakul Shah via TUHS
2024-10-01  1:42         ` Alexis
2024-09-30 20:14     ` Rik Farrow
2024-09-30 22:00       ` Steffen Nurpmeso
2024-10-01 12:53       ` Dan Cross
2024-11-18 12:00         ` Anton Shepelev
2024-11-18 12:46           ` Luther Johnson
2024-11-18 14:05             ` Steve Nickolas
2024-11-18 15:00               ` Anton Shepelev
2024-11-23 22:29                 ` Alexander Schreiber
2024-11-18 14:55             ` Anton Shepelev
2024-11-18 16:52               ` G. Branden Robinson
2024-11-18 17:00                 ` Anton Shepelev
2024-11-18 18:56                 ` Luther Johnson
2024-11-22  1:53           ` Dan Cross
2024-11-22  2:55             ` Luther Johnson
2024-09-29 21:24 ` Ralph Corderoy

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=CAP6exYJM0A6hbQ-omaz8+peQTdvyPuucrN3n3hzS84SeL07QeA@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=luther.johnson@makerlisp.com \
    --cc=pjw@google.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).