x         I`50S     
          THE ROCK-SCISSORS-PAPER RING
      AND ROCK-SCISSORS-PAPER PAPERCLIP

The ROCK-SCISSORS-PAPER RING and ROCK-SCISSORS-PAPER PAPERCLIP are structures to which you save backup files to guard against the otherwise eventual, but inevitable, accidental loss of much or all of your work on an important project.
The ring allows you to save the last n SAVE files. Once you have SAVEd N times, the oldest file will be purged evry time you SAVE. When you try to LOAD a file back in, you will be asked "how many generations back?". The answer will instruct the system how far back to go into the RING to retrieve a file. A zero will land you with the file most recently SAVEd. A "1" will get you the one 1 generation older, a "2", the next one older still, and so on. If you requested a RING of size = 10, a request for 18 generations back will be come a request for 8 generations back, since 18 in modulus 10 = 8, (i.e. the remainder of 18 / 10 is 8.
Think of the SAVEd files as being situated around a circular ring, and they are given ID numbers of 0,1,2,3,4,5,... etc. . The pointer visits the sites in consecutive order to overwrite old- and SAVE new files.
In the PAPERCLIP the files are SAVEd on a paperclip-shaped structure. This enables you to access the most recently SAVEd 2 files, at all times, except when an accident causes a system crash. A dense record of recent SAVEs, a sparse representation of ancient SAVEs, and an intermediate smattering of intermediately old SAVEs is kept. This is reminiscent of the way history has preserved the written record. The rationale is based on the assumption that if using the RING, you would have a conflict of interests over SAVing frequently or infrequently. Frequent saving would guard against the loss of too much recent work when the system crashes due to power loss, or a power surge, as when lightening hits the power line. However frequent saving in all but extremely long RINGs would lead to major losses if USER ERROR caused the accidental deletion of too large a fragment, and the error was not detected until it propagated all the way around the ring.
Think of the PAPERCLIP as being like a paperclip-shaped toy railroad. A switch is set as a "flip-flop" so as to send the train to the right every other time and to the left the times in between. To slightly complicate the picture only one last time, imagine the paperclip shape to be used recursively, i. e., instead of having a loop within a loop and that's all, you have a loop within a loop which is in turn still within another loop and that one is inside another loop and so on. Each fork in the road (one per loop) has a flip-flop switch. One file is SAVEd per loop. The order in which the file SAVEing sites are visited is:

  0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6... etc. .


The method by which the computer generates this sequence is:

 Let n be the number that would have been used as the suffix of the internal filename that would have been used had you been working with a RING instead of a CLIP.

Let x = n xor (n + 1)

 find the log of x in base 2

Use this log as the suffix for the filename.

          HOW TO USE THE SOFTWARE

To start a new RING you want to give the following DOS command either from DOS or by temperarily shelling into DOS from you current program. The command you want is:

      STARTRNG

From ARGOB or its versions you would go:

      MSHELL<CR>
      STARTRNG<CR>

To start a new CLIP you use the command, STARTCLP, instead.

After giving the command you get 2 prompts. The first one says:

"What is your projects's name?".

Use a name for this RING or CLIP which will come to less than 8 letters when the suffix has been added, so if you have 100 max files in the ring, the name must be no more than 6 characters, since the suffix will have 2 characters max.
The 2nd prompt asks for the maximum number of files the RING or CLIP will 
hold. Once this maximum size is attained, one file will be purged to make 
room for each file SAVEd. If you give 10 to a clip, the oldest file will 
be between 2 to the 9th power, and 2 to the 10th power - 1 SAVEs ago old, 
i. e. 512 to 1023 saves old. This is because younger files than your oldest 
will be purged in a manner consistant with the above description.

******************************************************************************
WARNING:

When using startclp, you will be asked how many files will be in your collection;
choose 20.  Any smaller number may result in loss of files.  When the 
number of times you have saved hits 2 raised to that number (i.e. 1048576 
times if the number is 20), you may lose files.

Also, you may occasionally lose a single file each time you exceed available
disk space.

Versions that averts this problem will be available in a few days.

            B. Carcich for Mike Orlove, 1.November, 1996
******************************************************************************

To store a file in the RING or CLIP, use whatever tools yhou alread posess to save it in a file called "ISAVE". To save the contents of ISAVE into the RING give the DOS command:

      SAVERING   .

The corresponding command for a CLIP is:

      SAVECLIP   .

To SAVE to both give a "X" command.          
To retrieve a file from the RING  go:

      LOADRING   .

To retrieve a file from the CLIP go:

      LOADCLIP   .

      (LOADCLI is an alternate version of LOADCLIP)

You will be greeted with appropriate menus and prompts, viz:


YOU ENTER     AGE OF FILE
 0             0 
 1             1 
 2             2 
 3             6 
 4             14 
 5             30 
 6             46 
HOW OLD A FILE (0  = YOUNGEST, 1 = OLDER, 2 = OLDER STILL, ETC., BEEPS =  AN    INDICATION NOTHING THAT OLD, OR YOUNG, EXISTS)? 4
YOUR CHOICE IS  14 GENERATIONS OLD.
        1 File(s) copied.

The contents retrieved will be copied to ISAVE. Next use whatever tools you already posess to load the contents of ISAVE into your current application. In ARGOB you would delete all but the last 2 characters of your current file, invoke the GARBAGE COLLECTOR, and use IMPORTA, INQUICK, or IMPORT, on ISAVE depending on which is appropriate (was it saved with EXPORTA, OUTQUICK, or EXPORT?).

      USING SEVERAL
      RINGS AND/OR CLIPS AT ONCE


To accomplish the objective of this section, simply use STARTRNG, or STARTCLP as before. When you wish to re-enter an old ring after having switched to a new one, go:

      REENTERR   .

To re-enter an old CLIP after having switched go:

      REENTERC   .
When switching use STARTRNG , STARTCLP, REENTERR, or REENTERC depending on whether your are reentering existing rings or clips, or starting new ones. When you turn your system off between sessions there will be no need to use a REENTERR, REENTERC, STARTCLP, or STARTRNG. The system will "remember" which RING or CLIP  you are in.
REENTERR and REENTERC prompt you for the name of the RING or CLIP. No size prompt will occur. The system "remembers" the numerical size of a RING or CLIP as well as where in the structure the user is current. This data is stored with the name.
All of the applications described here will signal their termination by playing the "shave and a haircut, shampoo" tune and then return control to the calling program automatically.

      ERASING RINGS AND CLIPS

Say the name of a RING were AUDIT. To erase the whole RING give the following DOS command:

      DEL AUDIT*   .
This is a final act and is irreversible (without Norton Utilities, or a similar package). Similar instructions hold for the erasure of CLIPS.

WARNING:

When using startclp, you will be asked how many files will be in your collection;
choose 20.  Any smaller number may result in loss of files.  When the 
number of times you have saved hits 2 raised to that number (i.e. 1048576 
times if the number is 20), you may lose files.

Also, you may occasionally lose a single file each time you exceed available
disk space.

Versions that averts this problem will be available in a few days.

            B. Carcich for Mike Orlove, 1.November, 1996

Distribution:  freely distributable

Shareware price: $50

THE AUTHOR
M J ORLOVE
PO BOX 6895
ITHACA, NY
14851
(607) 277-7126
