Re: Maybe a much simpler syntax

From: Iain Findleton (ifindleton_at_yahoo.com)
Date: 04/06/04


Date: Tue, 06 Apr 2004 16:41:35 -0400

ulis wrote:
> Hi,
>
> I found the Whitespace language have a very simple syntax: 3 logical
> tokens, 5 commands.
> The Whitespace tutorial is here:
> http://compsoc.dur.ac.uk/whitespace/tutorial.php
>
> The beginning:
> Whitespace tutorial
>
> The only lexical tokens in the whitespace language are Space (ASCII
> 32), Tab (ASCII 9) and Line Feed (ASCII 10). By only allowing line
> feed as a token, CR/LF problems are avoided across DOS/Unix file
> conversions. (Um, not sure. Maybe we'll sort this in a later
> version.).
>
> The language itself is an imperative, stack based language. Each
> command consists of a series of tokens, beginning with the Instruction
> Modification Parameter (IMP). These are listed in the table below.
>
> IMP Meaning
> [Space] Stack Manipulation
> [Tab][Space] Arithmetic
> [Tab][Tab] Heap access
> [LF] Flow Control
> [Tab][LF] I/O
>
> The virtual machine on which programs run has a stack and a heap. The
> programmer is free to push arbitrary width integers onto the stack
> (only integers, currently there is no implementation of floating point
> or real numbers). The heap can also be accessed by the user as a
> permanent store of variables and data structures.
>
> Many commands require numbers or labels as parameters. Numbers can be
> any number of bits wide, and are simply represented as a series of
> [Space] and [Tab], terminated by a [LF]. [Space] represents the binary
> digit 0, [Tab] represents 1. The sign of a number is given by its
> first character, [Space] for positive and [Tab] for negative. Note
> that this is not twos complement, it just indicates a sign.
>
> Labels are simply [LF] terminated lists of spaces and tabs. There is
> only one global namespace so all labels must be unique.
>
> Have fun!
>
> ulis

And fun it is. I whipped off a small Tcl script that allows the assemble
of this type of code. Within a Tcl interp, you can quickly assemple
complex programs in Whitespace. How completely silly. I am thinking of
plugging the interpreter into the turtleshell so the language will have
full graphics capabilities...



Relevant Pages

  • Re: Maybe a much simpler syntax
    ... >> tokens, 5 commands. ... >> The only lexical tokens in the whitespace language are Space (ASCII ... >> The language itself is an imperative, ... >> Many commands require numbers or labels as parameters. ...
    (comp.lang.tcl)
  • Re: Maybe a much simpler syntax
    ... > I found the Whitespace language have a very simple syntax: ... > tokens, 5 commands. ... > Many commands require numbers or labels as parameters. ...
    (comp.lang.tcl)
  • Re: Strategic Functional Migration and Multiple Inheritance
    ... Would C# be a "simpler" language by making all the keywords single ... tokens mean different things in different contexts, ... I'm not trying to argue this in metrics of information theory, ... I don't believe such metrics give a good idea of the readability of ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Delphi was Re: InfoPathwys was Re: 2D 3D was Re: AbandonSHP was Re: Pop outs was Re: Cran Chops
    ... And so now you have thousands of commands she can understand if you plug ... When you are done, you have an overlord process, and then you can start ... If you know the Delphi programming language and it is a high level ...
    (sci.physics)
  • Delphi was Re: InfoPathwys was Re: 2D 3D was Re: AbandonSHP was Re: Pop outs was Re: Cran Chops was
    ... If you know the Delphi programming language and it is a high level language which has been built over a number of years as computing grew up from the first pc, to today's machines, and from before the birth of the Internet to full net capability today. ... So you don't need a thousand commands, but you can make it so that it can read your scripts that you make out of javascript and XML. ... So at this point the AI is now standing there beside you at the cyber cafe since you summoned it through the web, and control of it is now passed to that local machine. ...
    (sci.physics)