small medium large xlarge


Code in Code

by Michael Swaine

Generic image illustrating the article

Last issue I presented a short program. It was an example designed to introduce a particular programming language, published on the website for the language, and written by the language’s author. The only modification I made to it is to encrypt the letters with a simple substitution cipher. All numerals, punctuation, spacing, and capitalization remained unchanged. The challenge was to answer this simple question:

What is the language?

The answer is that the language is Rebol, which you can learn about at the company site, and the author of the program and the language is Carl Sassenrath. Here’s the decoded code:

  Title: "Digital Clock"
  Version: 1.3.3
  Author: "Carl Sassenrath"
  Purpose: {A simple digital clock.}
 f: layout [
  origin 0
  b: banner 140x32 rate 1
  effect [gradient 0x1 0.0.150 0.0.50]
  feel [engage: func [f a e]
  [set-face b now/time]]
 resize: does [
  b/size: max 20x20 min 1000x200 f/size
  b/font/size: max 24 f/size/y - 40
  b/text: "Resize Me"
  b/size/x: 1024 ; for size-text
  b/size/x: 20 + first size-text b
  f/size: b/size
  show f
 view/options/new f 'resize
 insert-event-func [
  if event/type = 'resize [resize]