HiConsole  

Help™™

"People usually fail right on the verge of success.
Therefore, pay as much attention to the ending of something as to the beginning."

Lao-Tze, Epic Win Technique

Don’t Panic

HiConsole is for people who want to have classic computing-type fun with their fancy modern machines.

To get started quickly, go to the homepage and click on Launch HiConsole. Try the dropdown commands list over the "Input" box. More Examples are listed below the diagram.

  Gerald Jay Sussman
HiConsole user interface diagram

Diagram Contents
  

Main Menu

 

Connects to the rest of HiConsole.com.

Raphael Graphics

 

Raphael commands take effect in this area.

View Options

 

These checkboxes show and hide the primary parts of the system, like the graphics window, input/output, and so on.

Output Box


 

The machine gives its formal answers in the green box. Above in the Chat Box, it says "hi", and the conversation happens between you, LISP, Raphael, JavaScript, and the new characters you make.

Input Box


 

This is where you type commands into the system. The Examples drop-down menu will put sample commands in the box. Auto-run hits "enter" for you.

Extras

 

 

These are the computer's "peripherals", like the cookie disks, the code diagram, etc.

Cookie Disks

 

This is a preliminary implementation of disks through long cookie strings. The New File and New Disk buttons don't work yet, but you can use the examples to make a cookie disk with code.

Cookie Files

 

When you select a disk, the system will try to show the files inside. In the cookie, they're separated by this string: "~--~". Lines in the file are separated by this string: "~~". This should be invisible in the GUI.

File Contents

 

 

This shows one file's worth of the cookie. The file's name is taken from the first element in the file array "section" of the cookie disk. Currently, IE reads in files with doublespaced lines.

Function Definitions

 

 

Here, the LISP functions defined in the system are listed in two parts. First, functions defined by the user, which will start empty. Second, LISP functions defined by composing elemental system commands. A list of elemental commands is wanted.

Compact Debug Info

 

This contains three parts: a single line of output, Raphael's unique output, and a display of the last keystroke typed into the page.

Try the Examples

HiConsole has many examples built in. Some require you run them before running others, like the (define)s. These should get you started. Click the "graphics" checkbox to view Graphics.

--- Simple Math:

 

 
(+ 100 5)
(+ 100 5 (* 1 2))
 

--- Set a value:

 
(set 'six 6)
(+ 7 six (set 'twelve 12))
 

--- Define a function:

 
(define square (e) (* e e))
(square 5)
(define average (x y) (/ (+ x y) 2))
(average 5 50.2)
 

--- Conditional:

 
(cond ((= 1 1) (+ 2 3) ) )
 

--- JavaScript:

 
j 100*5*(1+2)
 j 4/3.0002
 

--- Raphaël graphics:

 
r whiteoval ellipse(220,166,80,100)
r whiteoval attr stroke-width 8
r whiteoval attr fill white
r whiteoval click output1("whiteoval","hi");
r whiteoval attr opacity 0.2 (confuses IE!)
j whiteoval.rotate(45); (note: JavaScript!)
 

--- Turtle control:

 
j placeTurtle(100,200);
 

More Commands to Try

These get into multiline commands and JavaScript.

lisp expressions

   

single line

   
(* 100 5 (+ 1 2)) 
 

Multiply 100, 5, and the sum of 1 and 2.

[should output: 1500 ]

(+ (* 3 5) (* 47 (- 20 6)) 12)
 

Add 3 times 5 to: 47 times the result of 20 minus 6, and 12.

[should output: 685 ]

(+	(* 3 6)
      (* 47 
      (- 20 6))
      12)
 

 

Please add up these three numbers.
The first is the (multiply result) of 3 and 6.
The second is the multiply result of 47, and 20 minus 6.
The third and last is 12.

[should output: 688 ]

(cond ((= 1 1) (+ 2 3) ) )
 
 

 

I want to know whether 1 is equal to 1.
If it is, please give me back the sum of 2 and 3.

[should output: 5 ]

(define (pi-sum a b)
    (if (> a b)
    0
    (+ (/ 1 (* a (+ a 2)))
        (pi-sum (+ a 4) b))))
 
 

[left as an exercise to the reader.]

 

define

   
(define a (* 5 5))

 

define a to be the square of 5 and 5.

(* (* a a) (* a a))

 

?= -> 625

(define abs (x) (cond ((< x 0) (- x)) ) )

 

[outputs: (lambda (x) (cond ((< x 0) (- x)))) ]

(abs -33)
 

 

[outputs: 33 ]

 

JavaScript commands

   
j lispCommands.join("~");

 

[should output: list of lisp definitions]

j jslLookup("cdadr")

 

[should output: e,cdr,car,cdr,e ]

j 100*5*(1+2)

 

[should output: 1500 ]

j 4/3.0002

 

[should output: 1.3332444503699754 ]

 

Cookie writing and reading

   
j writeCookie("new disk", "a stored string." );
   

 

j debug1("cookie query", readCookie("new disk") );
   

 

Raphaël Graphics commands

   
r whiteoval ellipse(220,166,80,100)
r whiteoval attr stroke-width 8
r whiteoval attr fill white
r whiteoval attr opacity 0.2
r whiteoval func debug1("whiteoval","hi");
 

 

make a white oval, set its attributes and give it a click action.

r blueline path({stroke:"#036"})
.moveTo(10,10).lineTo(50,50)
r blueline attr stroke-width 8
 

 

make a blue line.

r newtext text(300,200,"hello")
r newtext attr font-size 50px

 

make some text.

 

userinput - cause input as if user typed it in

   
j userinput("\
R whiteoval ellipse(220,166,80,100) fill white");
j userinput("\
R whiteoval attr stroke-width 8");
j userinput("\
R whiteoval attr stroke-opacity 0.5");
j userinput('\
R whiteoval func debug1("rfunc","hi");');

 

 

JavaScript can invoke commands in the user's voice.

Didn't find what you wanted? Try the FAQ, or step through the Demos.

© Copyright 2008-2009 Conversation Research, Limited