ARGON

Sean 'Captain Napalm' Conner spc@gate.net
Fri, 20 Dec 1996 01:01:29 -0500 (EST)


On some network somewhere in cyberspace, Alaric B. Williams transmitted:
> 
> > >> * Efficiency of a portable language: it means a very high-level language,
> > > Not incredibly high level...
> > Then not efficient on all platforms.
> > The same bytecode just can't be efficient at the same time
> > on 32bit and as well as 64bit as well as 21bit architectures
> > (note that a byte is a wierd size for data to a 21bit architecture).
> > Whatever "standard word size" you choose for anything encoded in a p-code,
> > it will make it an inefficient p-code for architectures
> > were this size is too much or too little.
> 
> There is no standard word size for ARGOT bytecode; there is no class 
> "INT" or anything like that. A little like ADA, you order integers by 
> size:
> 
> [U|S][1|2|4|8|16|32|64|128|256|...]
> 
> U for unsigned, S for signed. I'm debating allowing arbitary sizes 
> instead of just powers of 2. That wouldn't cause a problem when the 
> implementation uses the next largest size it has (eg U21 -> 32 bit 
> word) because overflow is trapped rather than wrapped.
> 
> Also, there are:
> 
> R[x]^[y]
> 
> ie R16^16
> 
> means a real number with 16 bits of accuracy, and 16 bits of exponent 
> (we're talking huge numbers here!).
> 
> Not to mention:
> 
> F[x].[y]
> 
> for fixed point
> 
> F16.16
> 
> etc.
> 
> And last but not least, the rationals:
> 
> [Good abreviation letter wanted!][1|2|4|...]
> 
> where the number is the number of bits in each of the two parts.
> 
> And perhaps most important are the variable-length types, which I 
> have yet to devise snazzy names for... variable length integers and 
> rationals will be available.
> 
  In the January 1986 issue of "Computer Language" there's an article on
KISS, which, as far as I know, only exists in this article.  The declaration
of variables (traditional, numbers and strings) is as follows:

	:	means "means" or "defined as"
	..	means range
	,	logical AND
	;	logical OR
	@	valid digit
	$	valid character
	
  So, you can have a declaration like:

	A,B : @
	amount: @15.@2
	ieeefloat: @.@15E-307..307
	ranged: -999 .. 999
	result: $
	name: $512
	results@@@:0.0 .. 1.0

  A and B are declared as (implementation defined) integers.  amount is
defined as a fixed point with 15 digits to the left, and 2 digits to the
right.  ieeefloat is defined as a number with one digit, up to fifteen to
the right of the decimal point, and an exponent that goes from -307(^10) to
307(^10).  Ranged is will only contain values between -999 to 999, result
holds one character, name holds up to 512 and the last line defines
variables results000 to results999 to be between 0.0 and 1.0.

  Some more examples from the article:

	Points(10): 0.0 .. @.@
	Bool: T;F
	Bits(8): 0;1
	Array(1..50,0..15):@5.@5
	Day: Mon;Tue;Wed;Thur;Fri;Sat;Sun
	Last_name: a$20 .. z$20

  One more note:

	A .. C (1..5,1..10): @.@
	A := B + C

  Calculates all values of A(i,j) := B(i,j) + C(i,j)

  So you can probably cobble something up like:

	i : @.@,@.@

  which means, I holds two values, both float (possibly a form of record
declaration?).  Possibly
  
	i = 4.5,1.8

  for assignment?

  Just some thoughts.

> > I just don't care about while not supporting lots of information
> > I *do* care about.
> 
> But writing style is just as much a property of a character as which 
> character it is. When we're using good old fashioned pens, we can 
> push hard, underline ANYTHING we have written, change colours, etc. 
> If we're naming card indexes, we can choose to use red pen for 
> important entries. Software card indexes these days think they're 
> clever if they supply an option to colour code entries...
> 
> And I can do cool things like have parts of entity names in bold etc.
> 
> "Alaric's *important* work"
> "Alaric's /secret/ letters"
> "Alaric's _wierd_ jokes"
> 
> etc...
> 
  What's wrong with having a metacharacter followed by an open set of
commands, much like, oh, HTML?  I mean, it doesn't have to follow HTML

	&quot;Alaric's <strong>important</strong> work&quot;
	&quot;Alaric's <color=red>secret</color> letters&quot;
	&quot;Alaric's <underline>wierd</underline> jokes&quot;

  but that's better than wasting excessive bits to attributes that may
rarely change over time (except for writing ransom notes).

  Simply define a character as a marker, meaning next character encodes a
style.  For 8 bit characters, you have 256 styles to choose from.  For
Unicode, 65,536.  If you need more, you can set up several characters in a
range for a marker.  A program can register (to the system) new sytles, or
such styles can be included in some meta-data for that text file.

> > If your code is such that order doesn't matter,
> > then SEQ and PAR are equivalent to it,
> > and you shouldn't care about that,
> > because the compiler should be able to choose
> > whatever combination fits most the available runtime resources.
> 
> Nononono! SEQ and PAR would both /work/ instead of DO, but they give 
> extra information that DO doesn't. SEQ says "Do these in /this/ 
> order", PAR says "Do these things as many at a time as possible". DO 
> just says "Do these things as you see fit". PAR is not about saying 
> "arbitary order" as about saying "in parallel". Some things /need/ to 
> be parallelised. EG:
> 
> PAR
>    Start server process
>    Start test client process
> END
> 
  The only thing I'll say about this is there are several different forms of
parallel code.  The two I'm familiar with are SIMD and MIMD.  SIMD is Single
Instruction, Multiple Data and MIMD is Multiple Instruction, Multiple Data. 
SIMD is used in the Connection Machine (if I'm not mistaken) and the MasPar. 
This is basically where each CPU runs the exact same code, but each has
their own copy of the data.  This is useful for such calculations as fractal
generation or password cracking (say, decoding a DES block with different
keys, each CPU runs the same routine, each has the same encrypted data, but
different key.

  MIMD is used on machines like the BeBox, or certain workstation class
machines, where each CPU runs different programs.

  You can do SIMD stuff on a MIMD box, but not the other way around.

  Also, you have:

	PAR
		start_server();
		start_client();
	END

  How robust is that?  What happens in this case:

	double a;
	double b;
	double c;
	double d;
	double x;
	double y;
	double x1;
	double y1;

	PAR
		x1 = ((a * y) + b) * x * (1.0 - x);
		y1 = ((c * x) + d) * y * (1.0 - y);
		x1 = x;
		y1 = y;
	END

  Are each statement run independantly?  Is it an error (the first two
statements can run separately, but the last two mess things up).  Just
curious (or do you rely upon the programmer knowing what to do?)

  -spc (I find it odd that you came up with a cooperative system as 
	well, even though I've to be convinced it's a win ... )