996
|
1 The file "Usenet" contains the original proposal as posted on
|
|
2 alt.lang.intercal; some changes have been made to the proposal, as
|
|
3 described in this file. The documentation (under doc/html) has been
|
|
4 updated with all the changes.
|
|
5
|
|
6 --------------------------------------------------------------------------------
|
|
7
|
|
8 MODIFICATIONS to the proposal.
|
|
9
|
|
10 1) Clarification about the representation of IP addresses.
|
|
11
|
|
12 IP addresses are represented by converting the network byte order to the
|
|
13 natural byte order of the computer running the program. In other words,
|
|
14 an IP address of 127.0.0.1 corresponds to 2130706433, which of course
|
|
15 should be entered by the programmer as #28672 ¢ #61441
|
|
16
|
|
17 2) IPv6.
|
|
18
|
|
19 IPv6 is not yet supported, but plans are already in place for adding
|
|
20 IPv6 support in CLC-INTERCAL 1.-94.-2.
|
|
21
|
|
22 To represent IPv6 addresses, CLC-INTERCAL uses the address range normally
|
|
23 reserved for multicast as follows. When a DNS lookup is performed, any
|
|
24 IPv6 addresses (AAAA record) are stored in an internal register, and an
|
|
25 address from the multicast range is returned to the user program. When this
|
|
26 multicast address is used for STEALing the corresponding IPv6 address is
|
|
27 retrieved and used instead. This allows to use 32-bit registers everywhere
|
|
28 and still be able to look up 128-bit IPv6 addresses.
|
|
29
|
|
30 A similar procedure applies to incoming IPv6 connections: the source address
|
|
31 is stored in an internal register and mapped to the multicast range.
|
|
32
|
|
33 The program will be able to store any IPv6 address in the translation
|
|
34 register by using a DNS lookup. If register ,1 would produce the ASCII
|
|
35 representation of an IPv6 address when READ OUT, a DNS lookup on that name
|
|
36 will return the corresponding IPv6 address, which then gets automatically
|
|
37 mapped to the multicast range as required.
|
|
38
|
|
39 Note that there is a limit in the number of IPv6 addresses a program can
|
|
40 access at any time.
|
|
41
|
|
42 For inconsistency, a DNS lookup on a "dotted-quad" does not return the
|
|
43 corresponding IPv4 address. The programmer must do the translation without
|
|
44 cheating.
|
|
45
|
|
46 3) Theft server.
|
|
47
|
|
48 The provisional port for the theft server is 64928, which can be changed
|
|
49 by copying the file INTERCAL/Include/system.sickrc to $HOME/.sickrc, and
|
|
50 editing the result.
|
|
51
|
|
52 The protocol has changed since the Usenet article was posted. It is not
|
|
53 yet documented but you don't need to access it directly unless you are
|
|
54 porting the INTERNET to another INTERCAL compiler.
|
|
55
|
|
56 4) STEAL and SMUGGLE
|
|
57
|
|
58 These accept a list of registers (separated, as usual, by intersections)
|
|
59 rather than a single register. This allows to STEAL (or SMUGGLE) a list
|
|
60 of registers from a single randomly selected process and/or computer.
|
|
61
|
|
62 Note that there is no guarantee that the thefts are done in a particular
|
|
63 order, and if one fails there is no rollback, so the theft may partly
|
|
64 succeed and then splat. Same for smuggling of multiple registers.
|
|
65
|
|
66 5) CASE statement
|
|
67
|
|
68 The final ESAC is optional. There is no real need for it.
|
|
69
|
|
70 6) Quantum statements
|
|
71
|
|
72 Of course, one can say things like
|
|
73
|
|
74 PLEASE STEAL .1 FROM #1234 ON #28672 ¢ #61441 WHILE NOT STEALING IT
|
|
75 DO SMUGGLE .1 FROM #1234 ON #28672 ¢ #61441 WHILE NOT SMUGGLING IT
|
|
76
|
|
77 with the obvious meaning. A Quantum CASE statement is also provided with
|
|
78 a slightly unusual syntax:
|
|
79
|
|
80 CASE (expression) WHILE NOT CASING IN (variable1) THEN (statement1)
|
|
81 OR (variable2) THEN (statement2) ...
|
|
82
|
|
83 7) ABSTAIN and REINSTATE
|
|
84
|
|
85 In addition to ABSTAIN FROM STEALING + SMUGGLING, one can also ABSTAIN FROM
|
|
86 CASING and of course the corresponding REINSTATEs.
|
|
87
|
|
88 8) Overloaded registers
|
|
89
|
|
90 STEALing or SMUGGLing an overloaded register can cause unexpected behaviour.
|
|
91
|