Google Groups Home
Help | Sign in
Message from discussion 1001 uses for a dead whirlpool
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
charless  
View profile  
 More options Jul 6 1993, 12:08 am
Newsgroups: alt.lang.intercal
From: charl...@sco.COM (charless)
Date: Mon, 05 Jul 1993 13:33:48 GMT
Local: Mon, Jul 5 1993 11:33 pm
Subject: 1001 uses for a dead whirlpool

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!


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google