🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #7003

Re: The Pure Bit...

#7003
From: Peter A. Castro
Date: Mon, 26 Nov 1990 18:58
38 lines
2447 bytes
in article <1990Nov22.142858.9900@canterbury.ac.nz>, cctr120@canterbury.ac.nz (Brendon Wyber, C.S.C.) says:
> 
> Hi,
> 
>   What exactly is the pure bit for. Many PD programs say that they have their
> pure bit set and can be made resident, but what does that means since you can
> set the pure bit on any file?
    Yes, you can set the Pure bit, but you shouldn't.  There is a real reason
    for this bit.  The resident command loads a Pure program into memory and
    keeps it for reuse.  Thus, a Pure program must be re-entrant.  I'll give
    you an example of what can happen if a program that is not Pure has it's
    Pure bit turned on and loaded with resident:
    The Manx environment comes with a program called 'ls'.  This is not a
    Pure program.  I turned on the Pure bit, loaded it with resident.  Now
    for the fun.  Open two windows.  Type 'ls' in both without hitting return.
    Now, hit return in one window and quickly click on the other one and hit
    return.  The programs start to take a directory, but somethings wrong...
    I get filenames from one directory in the other window, and visa-versa.
    and for some reason one 'ls' program is looping, and looping on the same
    name.  If I let them go, I eventually get a Guru. (Kids, don't try this
    at home ;-)
> 
>   If I was writing a program, what would I have to do so that I can say that it
> is `legally' pure?
    It must be "re-entrant" code, with no static data.
> 
> Be seeing you,
     You are Number 6 ?
> 
> Brendon Wyber                 Computer Services Centre,
> b.wyber@canterbury.ac.nz      University of Canterbury, New Zealand.
> 
> "Ph-nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn."
-- 
Peter A. Castro                   INTERNET: peter@dbaccess.com        // //|
c/o DB Access Inc.                UUCP: {uunet,mips}!troi!peter      // //||
2900 Gordon Avenue, Suite 101     FAX: (408) 735-0328            \\ // //-||-
Santa Clara, CA 95051-0718        TEL: (408) 735-7545             \// //  ||
Technical Details
Message-ID: <1043@troi.dbaccess.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!troi!peter
References: <1990Nov22.142858.9900@canterbury.ac.nz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!mips!troi!peter
From: peter@dbaccess.com (Peter A. Castro)
Newsgroups: comp.sys.amiga.tech
Subject: Re: The Pure Bit...
Message-ID: <1043@troi.dbaccess.com>
Date: 26 Nov 90 18:58:55 GMT
References: <1990Nov22.142858.9900@canterbury.ac.nz>
Organization: DB Access Inc., Santa Clara, CA
Lines: 38