In article <brendahC9IAs0.
...@netcom.com> bren
...@netcom.com (Brenda Holloway) writes:
>But, I like the "whirlpool" 8-) I'll bet there's something we could use it
>for!
It should be obvious, dammit. Intercal will never come into its
own until you can write an Intercal compiler in Intercal, and it
will never supplant C until you can write UNIX in it.
The biggest ommission from the Intercal standard is obviously the
ability to handle indirect addressing. I'd propose that the
whirlpool (@) symbol be used for address dereferencing and
pointer operations. Unlike C, which uses *p to indicate the
address pointed to by p, and &p to indicate the address of p, we
can economize by using only the one symbol. Position sensitivity
is the name of the game. For example, @.1 should mean the address
pointed to by .1 and .1@ should mean the address of .1 .
Note that Intercal pointers should operate on 7-bit word
boundaries, so a complicated mingle-and-twiddle operation is
required to convert from 16 or 32 bit addresses to 7-bit Intercal
addresses. Oh, and of course Intercal assumes a segmented address
space, so all the 8086 assembly hackers should be happy.
I'd also like to propose the addition of an augmented operator
namespace for Intercal. It's obvious that we're using up the
single character operators pretty fast. I'd like to propose a new
class of three-character operators. Lexical analysis relies on
the fact that the middle character is a "-", so the regular
expression defining the pattern space is:
[;:@<>?#$%&(]-[][(){}<>]
Example operators include:
:-) -- happy -- always returns TRUE
:-( -- sad -- always returns FALSE
;-) -- sly -- always returns TRUE or FALSE, depending
on how polite the program is
:-] -- hcf -- if TRUE, halt and catch fire
:-[ -- dracula -- deallocates a byte of memory from the
specified address (leaving a leak --
so bite me)
;-} -- loopy -- allocates two 7-bit words and returns
a pointer to the first nonzero bit in
the first word (no zero-on-demand clearing
necessary for Intercal gurus!)
>-] -- guess -- uses Bayesian reasoning to guestimate
the next line to be executed, and jump
to that line (plus specified increment)
This augmented address space will give us lots of room to
implement all those wonderful advanced features we envy in
languages such as C++, Ada, Snobol-4, and Perl. It should
keep us all happy with new features while we await with
bated breath the draft ANSI standard for Objective-Intercal.
-- Charlie
--
Charlie Stross ... charl...@scol.sco.com ... char...@antipope.demon.co.uk
UNIX oriented text mangler | This is a
"As soon as you pull out the pin, Mister | Kibo
Hand Grenade stops being your friend." | attractor: help stop newsgrepping!