    THIS SET OF DOCUMENTS, PROGRAMS AND SCRIPTS IS DISTRIBUTED FREE ON
AN 'AS-IS AS-SEEN' BASIS. THERE IS NO FITNESS OF PURPOSE GUARANTEE.
SOURCE CODE SHOULD BE PART OF THE DISTRIBUTION.

 (C) Tony Goddard, Sheffield 2003

 NEW !!! Industry standard tarfile distribution format.

     http://d4maths.lowtech.org
     http://d4maths.lowtech.org/mirage/install.htm
     Infoline: +44(0)7944 764312

                 D4: AN ARRAY PROCESSING LANGUAGE

    The programs in this package offer the user access to a glorified
calculator which is capable of dealing with advanced mathematics
techniques such as RSA encryption, continued fractions, and polynomial
multiplication. Ordinary statistical techniques are made easy by the
extension of the four operators plus (+), minus(-), times(*) and
divide(%) to vectors and tables. An editor is provided so that
calculations on tables of data can be moved around in blocks of text
via cut and paste operations. The syntax of expressions is based on the
type of algebra still taught in some schools. D4 is a keyboard
intensive application.

   The distribution includes the text of a pamphlet called 'A Rough
Guide to Numbers and Algebra'. Expect pot-holed roads and excessive
speed. There is also a time travel package to 1960s style UNIX
computing with a simplified version of a UNIX shell, the 'dsh'. This in
itself can be used as a gentle introduction to LINUX.

                       INSTALLATION GUIDE

    Installation is done via scripts. Many system administrators do not
expect users to run scripts. For LINUX it is necessary to use a shell
interface. Users of Windows 95/98 or WINDOWS-NT need to use a command
window, also known as a DOS box. Floppy disk distributions come with an
16-bit and 32-bit interpretors and a self extractor (d4z.exe).

    Sometimes there are restrictions on creating new directories. In
this case it is normally possible to install a working set in a
temporary directory such as /tmp in LINUX, or c:\tmp on Windows. All
DOS/WINDOWS versions may be easily installed on a ramdisk.

    Complete user documentation is included in the Windows self
extractors, or the files csrc.tgz and math2546.tgz. The cautious
WINDOWS user should download math2546.tgz where they can find the full
source code of the self extractor (xtar.c, tar.d4f).

                        LINUX INSTALLATION

    You need this README file, math2546.tgz and etc.tgz. These can
normally be obtained from the ftp site, web pages, or on 1.4Mb floppy.
Use gzip, the GNU project compression / decompression utility to make
the file d4linux.tar. Create a directory d4, then download or copy
math2546.tgz here and run tar.

    math2546.tgz comes without the binaries. You must compile the source
files. There is not a single makefile, but a collection of .mf files,
but all of these can be run from a single command.

    mkdir d4
    mv math2545.tgz d4
    cd d4
    tar -xzf math2545.tgz
    cd cp
    make -f lek.mf

    Now test the ascii animation:-

    d4x test.afn x=animate#sail
    d4x test.afn x=animate#walk

    (Thanks to jgs, jmoon).

    d4x test.afn x=ya#ya_ss     scrolling dna

    CAUTION !!! The make files (.mf) contain hardcoded path names which
tell the compiler where to find the files. It may be necessary to edit
the .mf files to get the make process to work correctly if the files
are located anywhere else.

                       DOS INSTALLATION

    Scripts and documentation are distributed as industry standard
gzipped tar (.tgz) files which may be unbundled with either WINZIP or
d4t.exe/d4x.exe and tar.d4f. If the tarfile is prefixed with a certain
d4 script, then it may be unpacked by the interpretor itself. The file
'base.tgz' is set this way.

               !!!! NEW ...... ULTRA FAST INSTALL

    Download DNA.EXE or RNA.EXE to a fresh directory, or the directory
where you previously installed the D4 software and run the program.
self-extracting auto-running partially gzipped file containing a copy
of the Gnu Public Licence plus complete C source code for creating a
fast installer for any software you may wish to distribute. The licence
claims you must pass on the same rights which you inherit to other
users. Beta testers are urgently required. This software downloads and
runs with no problems on college computers in the UK
 (Novell+Windows/NT).

                        DOS/WINDOWS FULL INSTALLATION

    For full installation you need more files.

    README          this file
    d4t.exe         16-bit executeable for 386 etc. Runs from floppy.
    dna.exe         Binaries, Documentation and scripts (also rna.exe)
    csrc.tgz        Documentation and scripts
    csdpmi3b.zip    DOS Protected Memory interface. DOS only.

    It is quite possible that the machine already has a working version
of dpmi. Games such as 'QUAKE' include this.

    (1) Create an installation directory.
    mkdir \d4

    (2) Copy, or download the files to this directory.

    (3) Unzip the .tgz files.
    Use Winzip, or else run dna.exe and read the documentation.

    At this stage you should get some licence screens followed by the
dollar prompt. You may now read more of the help files using the vi
editor which is part of D4, or any other editor.

    To install the rest of the material, including the source code you
must unpack csrc.tgz. If the first step of the installation was correct
you should see a dollar prompt '$'. Type the following commands.

 gzip -d csrc.tgz
 ld tar
 pwd                       should give c:\d4
 tar x csrc.tar

    If DPMI is not installed on the DOS machine then d4x.exe will not
run. It will fail with the rather cryptic message 'No dpmi'. In that
case get cwsdpmi?.zip from a website (try a search engine).

    The self extractor should give you a binary d4x.exe and some
scripts.

    Next you can put a link to d4x on the Windows desktop. Use any
windows file manager to find d4x.exe, drag the icon to the desktop,
then click the right mouse button to get the icon menu. Select
properties and switch to programs. Fill in the boxes:-

    Cmd line:   C:\D4\CP\D4X.EXE test.afn v=14
    Working:    C:\D4\CP

    Check the 'Close on exit' box.

    Now select the 'Change Icon' box and select a suitable icon. Two
icons were selected during development. These were the dice pair, and a
keyboard icon. You may also use a .ico file within the directory
containing d4x.exe, if available.

    If you wish to compile the sources on DOS then you need to get a
version of Borland TurboC, or DJGPP. The file TC.D4F contains a
variable called TURBOC.CFG. This must be written to \tc\bin\turboc.cfg.
This may be accomplished by D4-SHELL commands:-

 ld tc
 #sed"X$TURBOC.CFG;:w/tc/bin/turboc.cfg"
 cp d4t.exe d4s.exe
 ! mai

    mai.bat contains a 'cd' instruction. This may need to be changed to
give a 'cd' to the current installation directory.  Eventually you
should get a new .exe file, called d4t.exe.

    Compiling with DJGPP is rather like LINUX. \d4\gc contains make
files with an .mf extension. The file DJGPP.D4F contains a script for
moving the C-compiler around on four floppy disks. When you look at the
size of SPLIT.EXE and MERGE.EXE in the DJGPP distribution then you
should realise the advantages to be gained by using the post-card size
ASCII scripts available with D4.

    DJGPP is a free compiler, with handy documentation in plaintext
files. You may obtain it by anonymous FTP from

     ftp://sunsite.doc.ic.ac.uk/packages/simtelnet/gnu/djgpp

                        SETTING UP THE BROWSER

----------------------------------------------------------------------
    If you do not really love MS-WINDOWS then you may safely omit this
section. There are many ways for the procedure to go wrong, and it
seems excessively time consuming.
----------------------------------------------------------------------

    This paragraph is an explanation of how to associate actions with
file types. The explanation is more or less valid, but the applications
will not run unless the scripts are changed.

    Once D4 is installed on windows-95 the program can be used to create
plug-ins for INTERNET EXPLORER. These include right to left editing
facilities for Arabic and Hebrew. This is done by using D4 to open
files with a specified extension.

    It may be necessary to press ALT+ENTER to see the font.
    The hebrew keyboard mapping is cut from a LINUX file.

    It is necessary to create new file associations. This can be done
via the 'My_computer' option in Windows, or directly on older versions
of Internet Explorer via 'View' and 'Options'.

      File associations and startup lines for 'Open'.

 Arabic     .axt  c:\d4\x\d4t.exe v=13 c:\d4\x\test.afn vi=1 cwd=1
 Hebrew     .heb  c:\d4\x\d4t.exe v=14 \d4\x\test.afn cwd=1
x=hebrew#vheb

    I only know how to configure these file associations by hand.
    (1) Go to the Options section of the View Button.
    (2) Go to Programs, then click on 'file types' in the Viewers Box.
    (3) Select 'New Type'.  Fill in the form.
        Description          d4 header
        Content type         text
        Default Extension    .d4i

    (4) Select New in the 'Actions' panel.
        Call the first action 'open' then fill in the form.

        Action                  open
        Application used ..     c:\d4\x\d4t.exe c:\d4\x\iex.afn v=10

        Confirm by clicking OK.

    (5) Close the options windows

    (6) Test all this by using INTERNET EXPLORER to view a .d4i file.





