[comp.lang.misc] Turing

sam@csri.toronto.edu (Samuel Weber) (01/16/89)

In article <2658@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>I just read the turing article. I don't know... the syntax is full of little
>arbitrary glitches (for example, using a token for the last character of a
>string that can't be stored anywhere),

Pardon me?  I don't understand.  How can you have a 'last character' which
can't be stored?  Anyway, there is no such beast in Turing.  Perhaps
you were confused by the following example in the CACM article:

       var fruit: string
       fruit:="pine"
       fruit:=fruit + "apple"   % fruit becomes "pineapple"
       put fruit(1..2) + fruit(6) + fruit(*)   % Outputs "pipe"

fruit(*) does, indeed, result in the last character of the string,
but this character is 'e', which certaintly can be stored!  The *
is simply an abbreviation for the length of the string, ie.
    fruit(*-2..*)
would result in the last 3 characters of the string, ie. "ple".

> the seperate compilation handling
>is pretty hairy (if submodule A accesses something in a program that isn't
>passed to it, that program has to be available when the module is compiled),

Nope, just the stub file of the submodule.  The module body itself does
not even need to be written.  In fact, you can have several versions of
the submodule lying around, just as long as they all use the same stub.
This actually turns out to be quite useful during development.

>and the I/O handling is built in to the language (the language is otherwise
>so nice, and perfectly capable of providing the capabilities in a standard
>library... just as 'C', Modula, and so on do).

If you wanted to, you could give it an IO module, and use those routines.
Certainly there is nothing preventing you from doing what you want.
However, I hardly see the point.  After all, with IO statements you
can do reads, writes and seeks to arbitrary numbers of files, and with
various formats as well.  What else do you need?

Besides, the Modula2 equivalent to the turing statement
    put "item:", number, " name:", name, "has value", realvalue
is
    InOut.WriteString("item");
    InOut.WriteInt(number,0);
    InOut.WriteString(" name:");
    InOut.WriteString(name);
    InOut.WriteString("has value");
    RealInOut.WriteReal(realvalue,0);
    InOut.WriteLn;
which I do not think is an improvement.

>I got the impression of a more advanced teaching language, rather than a
>replacement for Modula, 'C', and so on... It's got a lot of nice ideas,
>but doesn't hang together all that well.

At the University of Toronto there is a project underway to design and
build a computer with apx. 100 processors.  The operating system for
this computer is being written in Turing Plus.  Even the system kernel
is by and large written in Turing Plus, except for a few lines of
assembly in a very time-critical region.  Not just a teaching language!

It has been my experience that it is almost impossible to tell how well
a language "hangs together" without actually trying to use it.
-- 
    --Sam Weber               "Little Birds are choking
    sam@csri.toronto.edu         Baronets with bun, Taught to fire a gun:
                               Taught, I say, to splinter
        (quote by              Salmon in the winter--
      Lewis Carroll)             Merely for the fun."

pierson@mist (Dan Pierson) (01/24/89)

In article <8901152132.AA06967@king.csri.toronto.edu>, sam@csri (Samuel Weber) writes:
 >Besides, the Modula2 equivalent to the turing statement
 >    put "item:", number, " name:", name, "has value", realvalue
 >is
 >    InOut.WriteString("item");
 >    InOut.WriteInt(number,0);
 >    InOut.WriteString(" name:");
 >    InOut.WriteString(name);
 >    InOut.WriteString("has value");
 >    RealInOut.WriteReal(realvalue,0);
 >    InOut.WriteLn;
 >which I do not think is an improvement.

Fortunately, the Modula-3 version is something like:

    PutLine ("item:" & Int(number) & " name:" & name & " has value"
             & Real(realvalue));

Assuming an IO module that includes the procedure PutLine.  While I still
prefer printf, this is acceptable to me.
-- 
                                            dan

In real life: Dan Pierson, Encore Computer Corporation, Research
UUCP: {talcott,linus,necis,decvax}!encore!pierson
Internet: pierson@multimax.encore.com

andrew@uel.co.uk (Andrew Josey) (04/05/90)

Can anyone tell me anything about the language Turing and its
evolution ? 
Thanks in anticipation.

------------
Andrew Josey, email: andrew@uel.co.uk

pnl@hpfinote.HP.COM (Peter Lim) (04/10/90)

> Can anyone tell me anything about the language Turing and its
> evolution ? 
>
Is Turing a language ? For all I can remember, I thought Turing refers
to the guy who conceptualized the "Turing Machine" which becomes the
proof that you can define a really simple machine to process an
infinite language. And, based on that evolved the Harvard and Von Neumann
architectures of today's computers.

Can't remember anything more than that. But go to your local library
and look for the subject "Turing Machine".

If I'm referring to a different thing all together, ignore me  :-).


Regards,                       ## Life is fast enough as it is ........
Peter Lim.                     ## .... DON'T PUSH IT !!          >>>-------,
                               ########################################### :
E-mail:  plim@hpsgwg.HP.COM     Snail-mail:  Hewlett Packard Singapore,    :
Tel:     (065)-279-2289                      (ICDS, ICS)                   |
Telnet:        520-2289                      1150 Depot Road,           __\@/__
  ... also at: pnl@hpfipnl.HP.COM            Singapore   0410.           SPLAT !