The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: Warner Losh <imp@bsdimp.com>, Dave Horsfall <dave@horsfall.org>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55th anniversary
Date: Sun, 12 Mar 2023 23:27:38 +0100	[thread overview]
Message-ID: <20230312222738.bX8Mi%steffen@sdaoden.eu> (raw)
In-Reply-To: <CANCZdfqOZ3wrHktZGk3BrHV5ZdbkDyRPGxH61Mq87TVDQRQh7A@mail.gmail.com>

Warner Losh wrote in
 <CANCZdfqOZ3wrHktZGk3BrHV5ZdbkDyRPGxH61Mq87TVDQRQh7A@mail.gmail.com>:
 |On Sun, Mar 12, 2023, 2:47 PM Dave Horsfall <dave@horsfall.org> wrote:
 |> On Fri, 10 Mar 2023, Steffen Nurpmeso wrote:
 |>
 |>>|Seriously, I also use setjmp()/longjmp() for a more elegant exit from a
 |>>
 |>> That is sheer unbelievable, really?  _So_ expensive!
 |>
 |> How often would you call setjmp()/longjmp()

Only on a Sunday!

I never used these myself of free will.

(And never regulary at all until i took maintainership of a BSD
Mail clone, which is the examplary piece of software to show that
BSD signal handling and SA_RESTART are a terrible misconception,
especially as soon as the software gets larger. .. In my opinion.
Once it was able to run "24/6" i counted the number of system
calls necessary for signal block / release and installation
/ removal over a week, and i think the number was way in the six
digits.  System calls them all!  I should have taken the OpenBSD
variant instead, and simply take over what "was good", and it
would be much, much better by now.  They did the work and reduced
the very messy part to two exactly locatable system call points of
interest.  (I looked i guess 2014-<2017.)  A very bad decision.
But if i live long enough i will make it, and another one i would
really long for.)

 |Cheap enough for occasional error handling, way too expensive for a generic
 |exception handling system... processors with lots of registers were more of
 |a problem...

Even on a x86(-32) i have gnashed with my teeth.  And that with
a Cyrix from 1996 .. and not to think about i386 or even earlier
processors with so few memory and speed.
I remember _for sure_ looking at the jmpbuf structure by then, and
the assembler files (sheer magic by then) and x86 instructions.

"Some" jpeg library used jump buffers to signal errors.
(I got rid of most sources for things that will never come true,
but i do have libjpeg-turbo ball due to package dependencies, and
they also use that internally, but looking at it it seems to be
a different thing.)
That is maybe ok since image processing is maybe expensive enough
by itself to simply say they do not care about proper error paths
along the way but take a "dead-end exit".  (But it was i think not
like that with the jpeg i have in mind.)

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

  reply	other threads:[~2023-03-12 22:27 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-09 23:01 [TUHS] " Steffen Nurpmeso
2023-03-09 23:18 ` [TUHS] " segaloco via TUHS
2023-03-09 23:21   ` Warner Losh
2023-03-09 23:31     ` Luther Johnson
2023-03-09 23:44       ` josh
2023-03-09 23:54       ` Warner Losh
2023-03-10  0:54         ` segaloco via TUHS
2023-03-10  1:08           ` Warner Losh
2023-03-10 10:08             ` Ralph Corderoy
2023-03-10 11:37               ` arnold
2023-03-10 11:56                 ` Ralph Corderoy
2023-03-10 11:59                   ` arnold
2023-03-10 12:11                     ` Ralph Corderoy
2023-03-10  6:15     ` Dave Horsfall
2023-03-10 16:55       ` Steffen Nurpmeso
2023-03-10 17:02         ` Bakul Shah
2023-03-12 20:47         ` Dave Horsfall
2023-03-12 21:50           ` Warner Losh
2023-03-12 22:27             ` Steffen Nurpmeso [this message]
2023-03-13  3:09               ` [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55thanniversary Dave Horsfall
2023-03-14 19:54                 ` Steffen Nurpmeso
2023-03-10  1:31   ` [TUHS] Re: I can't drive 55: "GOTO considered harmful" 55th anniversary Rich Morin
2023-03-10 11:37 Noel Chiappa
2023-03-10 15:54 ` Dan Cross
2023-03-12  7:39   ` Anthony Martin
2023-03-12 11:40     ` Dan Cross
2023-03-12 16:40       ` Paul Winalski
2023-03-13  3:25       ` John Cowan
2023-03-13 10:40         ` Alejandro Colomar (man-pages)
2023-03-13 12:19           ` Dan Cross
2023-03-10 11:51 Noel Chiappa
2023-03-10 14:16 ` Ronald Natalie
2023-03-10 14:39   ` John Cowan
2023-03-10 16:30   ` Phil Budne
2023-03-10 17:50     ` Steffen Nurpmeso
2023-03-10 17:57       ` Paul Winalski
2023-03-10 18:12         ` Lawrence Stewart
2023-03-10 17:28   ` Clem Cole
2023-03-10 17:54     ` Paul Winalski
2023-03-10 15:37 Noel Chiappa
2023-03-10 15:46 ` Larry McVoy
2023-03-10 16:04 ` Dan Cross
2023-03-10 18:55 ` Ron Natalie
2023-03-10 19:04   ` Dan Cross
2023-03-10 19:35     ` segaloco via TUHS

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=20230312222738.bX8Mi%steffen@sdaoden.eu \
    --to=steffen@sdaoden.eu \
    --cc=dave@horsfall.org \
    --cc=imp@bsdimp.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).