Saturday, May 14, 2016

C.S. Lewis: Odds and Ends

I've been a fan of C.S. Lewis since I was young. Here are a couple short "odds and ends" he wrote that I hadn't seen until recently.  First, a poem, with a humorous twist:

The Late Passenger
by C.S. Lewis

The sky was low, the sounding rain was falling dense and dark,
And Noah's sons were standing at the window of the Ark.

The beasts were in, but Japhet said, 'I see one creature more
Belated and unmated there come knocking at the door.'

'Well let him knock,' said Ham, 'Or let him drown or learn to swim.
We're overcrowded as it is; we've got no room for him.'

'And yet it knocks, how terribly it knocks,' said Shem, 'Its feet
Are hard as horn--but oh the air that comes from it is sweet.'

'Now hush,' said Ham, 'You'll waken Dad, and once he comes to see
What's at the door, it's sure to mean more work for you and me.'

Noah's voice came roaring from the darkness down below,
'Some animal is knocking. Take it in before we go.'

Ham shouted back, and savagely he nudged the other two,
'That's only Japhet knocking down a brad-nail in his shoe.'

Said Noah, 'Boys, I hear a noise that's like a horse's hoof.'
Said Ham, 'Why, that's the dreadful rain that drums upon the roof.'

Noah tumbled up on deck and out he put his head;
His face went grey, his knees were loosed, he tore his beard and said,

'Look, look! It would not wait. It turns away. It takes its flight.
Fine work you've made of it, my sons, between you all to-night!

'Even if I could outrun it now, it would not turn again
--Not now. Our great discourtesy has earned its high disdain.

'Oh noble and unmated beast, my sons were all unkind;
In such a night what stable and what manger will you find?

'Oh golden hoofs, oh cataracts of mane, oh nostrils wide
With indignation! Oh the neck wave-arched, the lovely pride!

'Oh long shall be the furrows ploughed across the hearts of men
Before it comes to stable and to manger once again,

'And dark and crooked all the ways in which our race shall walk,
And shrivelled all their manhood like a flower with broken stalk,

'And all the world, oh Ham, may curse the hour when you were born;
Because of you the Ark must sail without the Unicorn.’

-C.S. Lewis, ‘Poems’, 1963.  A version titled “The Sailing of the Ark” was first published on August 11, 1948 in Punch.  



Second, two book reviews credited to Lewis for The Hobbit (written by one of my other favorite authors, J.R.R. Tolkien):


Times Literary Supplement (October 2, 1937)


A WORLD FOR CHILDREN

THE HOBBIT or There and Back Again. By J. R. R. TOLKIEN. Allen and Unwin. 7s. 6d. 

The publishers claim that "The Hobbit," though very unlike "Alice," resembles it in being the work of a professor at play. A more important truth is that both belong to a very small class of books which have nothing in common save that each admits us to a world of its own—a world that seems to have been going on long before we stumbled into it but which, once found by the right reader, becomes indispensable to him. Its place is with "Alice," "Flatland," "Phantastes," "The Wind in the Willows". 

To define the world of "The Hobbit" is, of course, impossible, because it is new. You cannot anticipate it before you go there, as you cannot forget it once you have gone. The author’s admirable illustrations and maps of Mirkwood and Goblingate and Esgaroth give one an inkling—and so do the names of the dwarf and dragon that catch our eyes as we first ruffle the pages.  But there are dwarfs and dwarfs, and no common recipe for children’s stories will give you creatures so rooted in their own soil and history as those of Professor Tolkien—who obviously knows much more about them than he needs for this tale. Still less will the common recipe prepare us for the curious shift from the matter-of-fact beginnings of his story (“hobbits are small people, smaller than dwarfs—and they have no beards—but very much larger than Lilliputians”) to the saga-like tone of the later chapters (“It is in my mind to ask what share of their inheritance you would have paid to our kindred had you found the hoard unguarded”). You must read for yourself to find out how inevitable the change is and how it keeps pace with the hero’s journey. Though all is marvellous, nothing is arbitrary: all the inhabitants of Wilderland seem to have the same unquestionable right to their existence as those of our own world, though the fortunate child who meets them will have no notion—and his unlearned elders not much more—of the deep sources in our blood and tradition from which they spring.


For it must be understood that this is a children’s book only in the sense that the first of many readings can be undertaken in the nursery. "Alice" is read gravely by children and with laughter by grown-ups; "The Hobbit", on the other hand, will be funnier to its youngest readers, and only years later, at a tenth or a twentieth reading, will they begin to realise what deft scholarship and profound reflection have gone to make everything in it so ripe, so friendly, and in its own way so true. Prediction is dangerous: but "The Hobbit" may well prove a classic.


The London Times (October 8, 1937)


PROFESSOR TOLKIEN'S "HOBBIT"

All who love that kind of children's book which can be read and re-read by adults should take note that a new star has appeared in this constellation. If you like the adventures of Ratty and Mole you will like The Hobbit, by J. R. R. Tolkien (Allen and Unwin, 7s. 6d.).  If, in those adventures, you prized the solidity of the social and geographical context in which your small friends moved, you will like "The Hobbit" even better.  The hobbit himself, Mr. Bilbo Baggins, is as prosaic as Mole, but fate sets him wandering among dwarfs and elves, over goblin mountains, in search of dragon-guarded gold. Every one he meets can be enjoyed in the nursery; but to the trained eye some characters will seem almost mythopoeic - notably lugubrious gollum the fish-man, and the ferociously benevolent Beorn, half man, half bear, in his garden buzzing with bees.

The truth is that in this book a number of good things, never before united, have come together: a fund of humour, an understanding of children, and a happy fusion of the scholar's with the poet's grasp of mythology.  On the edge of a valley one of Professor Tolkien's characters can pause and say: "It smells like elves."  It may be years before we produce another author with such a nose for an elf.  The Professor has the air of inventing nothing.  He has studied trolls and dragons at first hand and describes them with that fidelity, which is worth oceans of glib "originality."  The maps (with runes) are excellent, and will be found thoroughly reliable by young travelers in the same region.




Monday, May 2, 2016

Retro Machine: TIS-100

If you have not yet gotten your hands on a TIS-100, I highly recommend it.  It is a bit of a vintage item, but in many ways I believe it was way ahead of its time (much like the Amiga, which came out a decade later).  The name TIS-100 also harkens back to my first computer, the TS-1000 (known as ZX81 in the UK) with its 2K RAM. In any case, TIS-100 is a fun little machine to use to solve coding problems.  I haven't seen many on eBay, but there is a decent emulator available from Zachtronics.

And here's a handy quick reference guide to get you started:

TIS-100 (Tessellated Intelligence System) Quick Reference Guide

Basic Execution Node Instruction Set

NOP              NO OPERATION
MOV <SRC> <DST>  MOVE <SRC> TO <DST>
SWP SWAP ACC AND BAK
SAV SAVE ACC TO BAK
ADD <SRC> ADD <SRC> TO ACC
SUB <SRC> SUBTRACT <SRC> FROM ACC
NEG NEGATE ACC (NEG 0 = 0)
JMP <LABEL> JUMP TO <LABEL>
JEZ <LABEL> JUMP TO <LABEL> IF ACC = 0
JNZ <LABEL> JUMP TO <LABEL> IF ACC != 0
JGZ <LABEL> JUMP TO <LABEL> IF ACC > 0
JLZ <LABEL> JUMP TO <LABEL> IF ACC < 0
JRO <SRC> JUMP TO RELATIVE OFFSET <SRC>
                 (A value of 0 causes an infinite loop. Both
                 positive and negative jumps are bounded by the
                 node's first and last instructions.)
HCF HALT & CATCH FIRE
                 (Undocumented; resets the TIS-100.)


<SRC>            Refers to ACC, UP, DOWN, LEFT, RIGHT, ANY, LAST,
                 NIL, literal (-999...999)
<DST> Refers to ACC, UP, DOWN, LEFT, RIGHT, ANY, LAST, 
                 NIL
<LABEL> Refers to location marked by alphanumeric 
                 label '<LABEL>:'


# Indicates a comment in source.

## Indicates program title to the debugger.
! Triggers a breakpoint when using the debugger.


Registers

All registers and ports can store an integer in the range of -999 to 999.

ACC      The primary storage and computational register in

                 each node.

BAK              BAK cannot be directly addressed (see SWP, SAV).


UP, DOWN, Each output port holds its value until read,

 LEFT, RIGHT thereby behaving like an additional register. 

ANY              Reads to or writes from the next available port 
                 (UP, RIGHT, DOWN, or LEFT) that is receiving or 
                 sending a value.  

LAST             Maps to the last port selected by ANY. LAST maps to
                 NIL if ANY has not been used.

NIL              As a source, NIL maps to 0. As a destination, it 

                 has no effect.


Nodes
Up to 12 nodes are available per program. 
There are two types of nodes available on the TIS-100, Basic Execution and Stack Memory. Note that a defective or damaged node is automatically disabled.

Basic Execution Node (T21)

- Each node can run a subprogram with up to 15 instructions.  Labels
  are not considered instructions.
- When the last instruction in a node is run, execution continues 
  with the first. Note that this wraparound does not cost any 
  cycles.

Stack Memory Node (T30)
- Can hold up to 15 values.
- Supports push/pop from any connected port.
- Pop from an empty stack node will stall.
- Push to a full stack node will stall.
- Note that push/pop stalls can be recovered if another port is used
  to remove/add a value from the stack.

Cycles

- Writes take 2 cycles. Other operations require only one cycle 
  assuming data is available.
- The first "step" in a run does not count as a cycle.
- A cycle is needed to write out the last output port.


List of Sample Programs Included*


TIS-100 SEGMENT MAP


00150 SELF-TEST DIAGNOSTIC

10981 SIGNAL AMPLIFIER
20176 DIFFERENTIAL CONVERTER
21340 SIGNAL COMPARATOR
22280 SIGNAL MULTIPLEXER
30647 SEQUENCE GENERATOR
31904 SEQUENCE COUNTER
32050 SIGNAL EDGE DETECTOR
33762 INTERRUPT HANDLER
40196 SIGNAL PATTERN DETECTOR
41427 SEQUENCE PEAK DETECTOR
42656 SEQUENCE REVERSER
43786 SIGNAL MULTIPLIER
50370 IMAGE TEST PATTERN 1
51781 IMAGE TEST PATTERN 2
52544 EXPOSURE MASK VIEWER
53897 HISTOGRAM VIEWER
60099 SIGNAL WINDOW FILTER
61212 SIGNAL DIVIDER
62711 SEQUENCE INDEXER
63534 SEQUENCE SORTER
70601 STORED IMAGE DECODER

TIS-NET DIRECTORY


NEXUS 00.526.6   SEQUENCE MERGER

NEXUS 01.874.8   INTERNER SERIES CALCULATOR
NEXUS 02.981.2   SEQUENCE RANGE LIMITER
NEXUS 03.176.9   SIGNAL ERROR CORRECTOR
NEXUS 04.340.5   SUBSEQUENCE EXTRACTOR
NEXUS 05.647.1   SIGNAL PRESCALER
NEXUS 06.786.0   SIGNAL AVERAGER
NEXUS 07.050.0   SUBMAXIMUM SELECTOR
NEXUS 08.633.9   DECIMAL DECOMPOSER
NEXUS 09.904.9   SEQUENCE MODE CALCULATOR
NEXUS 10.656.5   SEQUENCE NORMALIZER
NEXUS 11.711.2   IMAGE TEST PATTERN 3
NEXUS 12.534.4   IMAGE TEST PATTERN 4
NEXUS 13.370.9   SPATIAL PATH VIEWER
NEXUS 14.781.3   CHARACTER TERMINAL
NEXUS 15.897.9   BACK-REFERENCE REIFIER
NEXUS 16.212.8   DYNAMIC PATTERN DETECTOR
NEXUS 17.135.0   SEQUENCE GAP INTERPOLATOR
NEXUS 18.427.7   DECIMAL TO OCTAL CONVERTER
NEXUS 19.762.9   PROLONGED SEQUENCE SORTER
NEXUS 20.433.1   PRIME FACTOR CALCULATOR
NEXUS 21.601.6   SIGNAL EXPONENTIATOR
NEXUS 22.280.8   T20 NODE EMULATOR
NEXUS 23.727.9   T32 NODE EMULATOR
NEXUS 24.511.7   WAVE COLLAPSE SUPERVISOR

*My machine appears to have had memory damage, as most of the sample programs listed in the directories were either corrupted or erased. I've reprogramed some of them, with varying degrees of efficiency. I have included some for reference:


Back-Reference Reifer (661/9/42)
Sequence Gap Interpolator (790/5/58)



Prime Factor Calculator (10884/4/49)


Signal Exponentiator (4259/6/34)














Histogram Viewer (2173/9/59)
Exposure Mask Viewer (808/7/50)









Signal Multiplier (638/4/31)
Sequence Merger (475/6/34)