Path: usenet.cise.ufl.edu!newsfeeds.nerdc.ufl.edu!news.magicnet.net!newspump.monmouth.com!newspeer.monmouth.com!newsfeed.corridex.com!nntp2.savvis.net!inetarena.com!not-for-mail
From:
[email protected] (Charlie Stross)
Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules
Subject: ANNOUNCE: CLC-INTERCAL 0.01
Followup-To: comp.lang.perl.modules
Date: 1 Apr 1999 12:38:11 GMT
Organization: Chateau Antipope retirement home for senescent computers
Lines: 166
Approved:
[email protected] (comp.lang.perl.announce)
Message-ID: <
[email protected]>
Reply-To:
[email protected]
NNTP-Posting-Host: halfdome.holdit.com
Keywords: INTERCAL Perl Compiler Release Insanity Not-an-April-Fool-Joke-This-Is-Serious
X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content.
Xref: usenet.cise.ufl.edu comp.lang.perl.announce:268 comp.lang.perl.modules:9823
Assurdo Technologies are pleased to announce the release of CLC-INTERCAL
0.01, an entirely new INTERCAL compiler implemented in 100% pure Perl.
CLC-INTERCAL is an abbreviation for "INTERCAL to Perl Compiler".
It can be found at:
http://www.assurdo.com/
In terms of Perl integration, CLC-INTERCAL consists of the module
Language::INTERCAL and supporting modules for EBCDIC and Baudot code
processing. It was developed on Perl 5.004 but should run on versions
5.002 and above. Intercal compilers can be embedded in and integrated
into other applications; preliminary work on the INTERCAL ORB is now
in progress.
Our interim goals are to add XML support, browser plug-ins, and full
network awareness so that migratory INTERCAL programs can dump core
safely in a client machine's "litter tray". Our ultimate goal is to
replace Java as the language of choice for distributed applications
development and job security. For portability, bytecode output is
envisaged for the perl virtual machine, java VM, native iBCS2 binary
format, and RedCode.
EXTENSIONS:
The main features of CLC-INTERCAL not found in INTERCAL-72 are:
Input/output has been extensively rethought. While INTERCAL-72's numeric
input/output has been preserved unchanged, there are now two more types
of input/output: alphanumeric i/o which can be used with any EBCDIC text
(it will be automatically converted to/from extended Baudot if
necessary); and binary i/o which can be used with any data whatsoever,
at the price of a minor performance hit when the data is assembled and
disassembled by the INTERCAL runtime to fit it into virtual punched
cards.
Computed COME FROM. You can now cause the program execution to hop
around (or at least jump) in arbitrary ways by using computed COME FROM.
We refer you to the compiler's documentation for details, but can't
resist exhibiting a code fragment which corresponds to what other
languages might call a subroutine invocation:
DO REINSTATE (11)
(10) DO .1 <- #10
(11) DON'T COME FROM (1001)
PLEASE ABSTAIN FROM (11)
...
(1000) DO COME FROM .1
...
(1001) DO .1 <- #0
Arbitrary data structures. While INTERCAL-72 was great for purely
numeric processing, we feel that the use of numeric registers and arrays
doesn't quite lend itself to non-numeric processing. We have therefore
added the basic building blocks for arbitrary data structures by means
of reverse pointers, also known as the BELONGS TO relation. If, for
example, you want to build a tree, then all the leaves will belong to
some node, and nodes belong to other nodes, all the way to the ones
which belong to the root of the tree. Any registers can be linked up in
a graph structure using the BELONGS TO relation, and there are mechanism
to follow the relation while accessing registers.
Network independence. A future version of the compiler will support a
complete networking library, "INTERNET", which simply removes the
restriction that registers belong to a single process or a single
computer, and provides transparent access to data structures on other
parts of the network. Of course, the library will also provide security
and access control features and all the usual stuff. Stay tuned for this
exciting development.
Object-Oriented INTERCAL. The BELONGS TO relation will remind people of
the relation between objects and classes in other languages, and for
some time we have been tempted to extend it to obtain a complete
object-oriented language. However, this would be against the philosophy
of the language. Rather, we introduce a fifth type of register, the
"class register", which are used to define classes. A parenthood
relation between classes is conceptually related to the "inheritance" of
other languages. However, parenthood is not yet implemented in the alpha
version. The association of an object with a class is somewhat related
to the bless operator of Perl, however, instead of specifying the name
of the class (which would not be possible, since the class registers do
not have names), the programmers identifies the class by example. If
more than one class can do the same operations as the example, the
runtime will generate a "CLASS WAR" error.
Finally, minor improvements to the language's syntax allow for more
readable programs. The improvements are backward compatible with
INTERCAL-72.
OBJECT ORIENTATION
Claudio writes:
What is a class? It's something where you go and learn.
What is a method? It's something you learn in class.
So I create a class by defining what an object might learn by being part
of the class. The subjects are numbered, and each subject is taught by a
label in your program.
So, let's define class @2. In there, you can learn #2 by executing label
(1000) and learn #7 by executing label (1100):
STUDY #2 AT (1000) IN CLASS @2 STUDY #7 AT (1100) IN CLASS @2
It is not recommended to study anything at labels before (1000). You
might get a runtime error: "SORRY, WE DON'T ALLOW LECTURES BEFORE 1000".
Now that you have your class, you might want to create objects. What is
an object? It's the same as a student. So the equivalent of Perl's
"bless" is:
ENROL :1 TO STUDY #2 + #7
Assuming no other class teaches #2 and #7, that means that :1 is now an
object of class @2. If more than one class can teach that, you get a
runtime error:
CLASS WAR BETWEEN @2 AND @5
Unlike Perl, you can "unbless" objects:
:1 GRADUATES
Now that you have an object, you might want to do method calls. That's
the easiest thing:
:1 LEARNS #2
Again, you get a runtime error if :1 is not an object (":1 IS NOT A
STUDENT") or if its class does not teach #1 ("#2 IS NOT IN :1'S
CURRICULUM"). If none of these error conditions apply, execution
continues at the appropriate label, in this example (1000), with @2 (the
class register) temporarily enslaved to :1 (so :1 is accessible with the
construct $@2 - the "big money" ($) is the syntax to follow the BELONGS
TO relation). If :1 belongs to a complicated graph structure, and for
example $23$4$2$$:1 is an element of it, then the same element will be
accessible with $$23$4$2$$@2 - nothing could possibly be simpler.
Besides, it's more compact than Perl's array/hash syntax.
To return from the method, use the command:
FINISH LECTURE
Oh, and before I forget... You are familiar with the "ABSTAIN FROM
gerund" form of conditional execution, do you? Essentially, you say
"PLEASE ABSTAIN FROM READING" and any subsequent "READ" just doesn't get
executed. So this would be the only language where one can write a
syntactically correct program which starts with:
PLEASE ABSTAIN FROM STUDYING + GRADUATING
This will obviously be enormously popular with students...
-- RELEASE ENDS --
-- posted by Charlie Stross; developed by Claudio Calvelli