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