From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17407 invoked from network); 13 Dec 2022 04:05:11 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 13 Dec 2022 04:05:11 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 27B6942390; Tue, 13 Dec 2022 14:05:05 +1000 (AEST) Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by minnie.tuhs.org (Postfix) with ESMTPS id 1B45B4238D for ; Tue, 13 Dec 2022 14:05:00 +1000 (AEST) Received: by mail-qv1-f43.google.com with SMTP id d13so9644269qvj.8 for ; Mon, 12 Dec 2022 20:05:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=algebras-org.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=toGuvVhx9FJR0H8fMwm/ormVhqw0r0YFz/e+YhjOEy0=; b=IJ7yVC2UNR+6cwdoHq+/sA2vY6uAkPx/awx4fUehh3pH4fPbtYv5aZCyDCkpyydKRX jWIR/J7WzRudBLr9qWZrFvkJ6TTOiuVQdNxy7swch68ZuaXjaSVGg0VWp10d69t1vq0z 1lAUfAwSeWRYoAIA9dxXoe7ZMGIzsoMlB0cSlbO9mjiAZMilbniP9Az05GUfKZgTuqkw R0qzjn2OZ2i65+UNdmi7sLToxHNlLHiGj7l0yqpq3Ev6PHN1bXvCo9n4ibryTL4x9w/h FmQps4TVLlPb67igExABDyyMi8sEcLSNluWQte1R+9ol3TCgG/WSIafmrGP1eU8lFepk mkFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=toGuvVhx9FJR0H8fMwm/ormVhqw0r0YFz/e+YhjOEy0=; b=OMh8PrhA1v68XquMv88Q5BVnZ3aiKlngfxuxKC9LTAMVmcApEOo4ptMx1mG+MaD1Y3 raYZ0b04vsNuzWP0NkKRgz8DwsnDIMqL8/xRotx0CxZ6o4CUelM/S1uKR18+Pnjg5VAK Im+Yp04tMJoahwGwwvgoZUAM66Lh2w/7NFzDY9RUjZ668EuDCEZtb7gaaC0TRt9LxKyP qjKR5ukrVDue0910Jv1AEflehRm48KXPzSbub1jiLiOcMeELEac0QQRlzVZBTkOCgyB/ H7mrz45SxtjOKJ4qgblOgUe/YmcCi+YeGDLp23fahaDDJoPNqVQXEfot4yMAagagq/TU XCXQ== X-Gm-Message-State: ANoB5pkaQs0GwJ5aVMn6GsizHmzA0QYKQVzYBN4y54Kjacwu6oqGk9la nGZbGgBDYjhxz6uSqOwPa0LxLdIzUYqkP2QciqIYI7CM5ODamA== X-Google-Smtp-Source: AA0mqf68wPVbPUoKF2+5kqxkJhTbur5BW68fNdMb2L2VmX5+5G9a3FYUbA/CeMr+fhfmIRcE1k3MGMA89iCNGfCmURo= X-Received: by 2002:a0c:9044:0:b0:4c7:4eb4:77b2 with SMTP id o62-20020a0c9044000000b004c74eb477b2mr22028319qvo.111.1670904239078; Mon, 12 Dec 2022 20:03:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: George Michaelson Date: Tue, 13 Dec 2022 14:03:47 +1000 Message-ID: To: Dave Horsfall Content-Type: text/plain; charset="UTF-8" Message-ID-Hash: O2VPVUIAG6XDBDRYGTCXGI7MG2KUYZDS X-Message-ID-Hash: O2VPVUIAG6XDBDRYGTCXGI7MG2KUYZDS X-MailFrom: ggm@algebras.org 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: The Eunuchs Hysterical Society X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Clever code List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The "sticky" bit was quite clever. tell the OS to keep something memory resident, so you can binary patch the back end without worrying. Copy on Write was enormously clever. Keeping FD open across fork/exec was fantastically clever. making a null pointer be a valid address was probably not clever (PDP11) but I expect somebody will explain to me why it was clever. On Tue, Dec 13, 2022 at 1:53 PM Dave Horsfall wrote: > > On Tue, 13 Dec 2022, Rudi Blom wrote: > > > I vaguely remember having read here about 'clever code' which took into > > account the time a magnetic drum needed to rotate in order to optimise > > access. > > Sounds like you're referring to SOAP (Symbolic Optimal Assembly Program) > on the IBM 650; the programmer wrote the code "straight down" and SOAP > reordered it for rotational latency. > > > Similarly I can imagine that with resource restraints you sometimes need to > > be clever in order to get your program to fit. Of course, any such > > cleverness needs extra documentation. > > Try writing a bootstrap program in 512 bytes :-) Self-modifying code was > the order of the day... > > > I only ever programmed in user space but even then without lots of comment > > in my code I may already start wondering what I did after only a few months > > past. > > You could be clever in kernel space too, such as taking advantage of > the DATIP/DATO cycles on DEC's Unibus when updating a memory word i.e. > read/modify/write. > > -- Dave