Sunday, Debtember 27, 2015
INRAC, the mind bending implementation language of Racter
I found another reason why splitting the test from the conditional in INRAC (the language Racter is written in) was a good idea with these lines:
X ?40= /# Are you continuing $40 <'s interview? # X /# ?? ?no,not,don't /# #*2DIF
The test is on the first line, but the result is also used on the next line, so we need to carry the result over. I guess this means that all the comparison results will be stored in a global variable.
I found another bit of scary code:
STORY ?65= />65="%STORIES1" $65 *30first
So we compare variable 65 to an empty string,
and if empty,
the string “%STORIES1
” is stored there.
In INRAC,
%STORIES1
will load file STORIES1.RAC
(basically,
%FOO
will cause Racter to load FOO.RAC
).
At first,
I thought $40
would just print the contents of a variable
(in this case, variable 40)
but no—it appears that $40
evaluates the contents as code
(which may cause output; it may not).
And yes,
when I managed to trigger this bit of code and checked the variables after the session,
it does appear that variables are indeed evaluated as code.
For example,
variable 81 contained *29EB a $47 or a $48
.
Section 29, lines EB
are:
EB Would you rather be EB Do you prefer EB Which do you think is better,
Variable 47 contains “novelist” and variable 48 contains “poet” so evaluating variable 81 would result in one of the following three lines:
- Would you rather be a novelist or a poet
- Do you prefer a novelist or a poet
- Which do you think is better, a novelist or a poet
So,
getting back to variable 65 there.
This loads STORIES1.RAC
if it isn't set,
then calls section 30, line first
,
which is code that will generate a little story,
such as:
Suddenly Elvis chanted to Mr. Toad "my desire is enrapturing, anyhow furious and enraged scientists will speak during the time that jackals spy hawks." Mr. Toad wanted to enrage or belittle Elvis but started to speak "Dainty dogs are walking to yellow houses." Enthralling. Enrapturing. Nevertheless a jackal may hungrily chew meat and chicken a dove will wing over tomatoes and spinach by reason of the fact that theoreticians are angry. Terrifying! Concerning an electron, well Elvis may think that an electron is appalling, anyhow my dreaming will steer my essay from Elvis to neutrinos and neutrons during the time that Mr. Toad is embarrassing Elvis. Ask a question, please.
This is turning out to be one mind bending computer language …