The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Rob Pike <robpike@gmail.com>
To: Kenneth Goodwin <kennethgoodwin56@gmail.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: Book: "You Are Not Expected to Understand This"
Date: Sun, 13 Nov 2022 12:12:32 +1100	[thread overview]
Message-ID: <CAKzdPgzAPB+-LjtZ+rhqRY8+Cdk4Fqks5hK1EdmShT_QbGHKjg@mail.gmail.com> (raw)
In-Reply-To: <CAMQbRb3hYmvtLtXUwgutX_JhCm=3F=5M5o6h+iifu4yenkNtEw@mail.gmail.com>

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

I find it fascinating how, just a few years after the difficulty of stack
switching required a commented challenge in the Unix source, we were using
setjmp and longjmp to do this with no fuss at all. Once the problem is
solved, the solution can simplify dramatically.

See https://github.com/plan9foundation/plan9/blob/main/sys/src/9/port/proc.c
for instance - almost all of sched is bookkeeping and a comment about
locks. The little burst at the bottom, starting around line 163, that does
the work is so compact. (setlabel and gotolabel are setjmp and longjmp.)

Insight.

-rob


On Sun, Nov 13, 2022 at 11:26 AM Kenneth Goodwin <kennethgoodwin56@gmail.com>
wrote:

> Maybe it is just me, but I don't recognize any of the contributors listed
> either at the bottom
>
> On Sat, Nov 12, 2022, 7:20 PM Dave Horsfall <dave@horsfall.org> wrote:
>
>> I spotted this when glancing through a book catalogue; well, with a title
>> like that how could I miss it?
>>
>> Subtitled "How 26 Lines of Code Changed the World", edited by Torie Bosch
>> and illustrated by Kelly Chudler (can't say that I've heard of them).
>>
>> Summary:
>>
>> ``Programming is behind so much of life today, and this book draws
>> together
>>   a group of distinguished thinkers and technologists to reveal the
>>   stories and people behind the computer coding that shapes our
>>   world.  From how university's [sic] databases were set up to
>>   recognise only two genders to the first computer worm and the
>>   first pop-up ad, the diverse topics reveal the consequences of
>>   historical decisions and their long-lasting, profound implications.
>>   Pb $34.99''
>>
>> Lines of code, eh? :-)
>>
>> Abbey's Bookshop: www.abbeys.com.au
>>
>> Disclaimer: I have no connection with them, but I'll likely buy it.
>>
>> -- Dave
>>
>

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

  reply	other threads:[~2022-11-13  1:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-13  0:02 [TUHS] " Dave Horsfall
2022-11-13  0:25 ` [TUHS] " Kenneth Goodwin
2022-11-13  1:12   ` Rob Pike [this message]
2022-11-13  1:52     ` Larry McVoy
2022-11-13  1:12 ` Stuff Received
2022-11-13 21:58   ` Dave Horsfall
2022-11-14 22:48 ` Dave Horsfall
2022-11-14 14:14 Douglas McIlroy
2022-11-14 15:50 ` Clem Cole
2022-11-14 16:58 Norman Wilson
2022-11-14 19:17 ` Larry McVoy
2022-11-14 19:50   ` Dave Horsfall

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=CAKzdPgzAPB+-LjtZ+rhqRY8+Cdk4Fqks5hK1EdmShT_QbGHKjg@mail.gmail.com \
    --to=robpike@gmail.com \
    --cc=kennethgoodwin56@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).