sourcedoc: TzzSpec-D11

hide references

TzzSpec-D11

=== 15.04.03

WORKING SPEC FOR TZZ (Ted's ZigZag®)

© 2015 Project Xanadu. All rights reserved.

Note: "ZigZag" is a registered trademark of Project Xanadu.

Theodor Holm Nelson, Founding Designer, Project Xanadu

ALL THESE SPECIFICATIONS ARE NEGOTIABLE. The intention is to get a workable system, not insist on specifics.

=== === === OVERALL OBJECTIVES of Tzz

ZigZag is a virtual interactive machine (VIM) that shows and manipulates hypergrids (hyperthogonal structures).

What a ZigZag VIM will do is exactly defined. However, the internals can be implemented many different ways. The internal representations of cells and dimensions are arbitrary, provided that performance and external files meet the specs.

Tzz (Ted's ZigZag) is the design for a ZigZag VIM programmed in Python, meant to become an installable desktop application and deal with interchangeable and combinable files (slices). Files of cells, or "slices", are intended to communicate between zzvims and save content for re-use.

It should work on Mac, PC and Linux, hiding the Python code.

We will go by simple stages, beginning with a simple version and going on from there.

We want a staged series of distributable programs leading to a very general product, a new software platform accomplishing a number of goals.

How far we get remains to be seen.

=== ARCHITECTURE

Hidden inside the lump application are various

- data cells and their connections, represented in Python lists and/or objects.

- operations programmed in Python. The operations also need to be be represented as cells which are executable (progcells), but each of the executable cells actually calls Python code in the global Python program. Daring users may later add Python programs to the mix, to be represented in cells, but this can of course be hazardous.

The system architecture is based on an unusual double plan.

- first, as a straightforward Python program, with intercommunication between the parts through Python arguments, variables, lists and objects.

- eventually, as an enactment system of visible cells which intercommunicate by cells. This will allow user scripts to be written as executable chains of ZigZag cells.

=== === === === === === === === ===

LEVEL 0

  Preliminary components and operations

LEVEL 1

   Two windows, basic Kblang operations

   Two cell types: texel, progcell

   Dimensions: 1,2,3

   Ops in executable progcells

LEVEL 2

   CLONE (clone as interpreted identical cell by interpretation)

      Implemented through clone dimension (active dimension z.clone)

   Undo

   search cells

   print as cells

LEVEL 3 (or 4)

   Present cell chains and grid as virtual text document

   add: indirect text cell

LEVEL 4 (or 3)

   Spreadsheet: add spreadsheet functionality through active dimension z.calc

    add import, export spreadsheet functions

OTHER LEVELS TO BE DISCUSSED LATER.

   Containment dimensions

   Program-by-example

   Sworfing

   User-supplied views programmable in Python

   Combinable slices

   Zzogl (ZigZag OpenGL, allowing scenes and transitions to be specified by zzsructures

=== === === === === === === === === SPEC LEVEL 0 Series

Level 0:

PRELIMINARY COMPONENTS AND OPERATIONS

This level is possibly the hardest because it involves so much.

- representation of cells and connections

- representation of fundamental ops

- command-line presentation of results, to see anything

NAMING ISSUES: what should be--

- the name of a cell internally? (given that it has an integer ID)

=== REPRESENTATION OF CELLS AND CONNECTIONS

There is no separate representation of connections; including the positive side of the connection with one cell and the negative side of the connection with another is sufficient.

At this level, cell has an integer ID and either

- text contents

- a program

A cell may have an arbitrary number of connections on an arbitrary number of dimensions, although we are beginning with just three dimensions.

A cell and its connections are represented by either--

1. Python lists, as follows--

[ cellID , type , contentPointer, Reserved , [ 17+d.2 ] , [ 45-d.3 ] ...

 These lists are in either

  -- a larger list

  -- a dictionary

2. Python objects, to which the operations are applied as methods.

How much extra work to try it both ways?

=== REPRESENTATION OF CELL CONTENTS

Cell contents can be held by a variable. (Question of garbage collection for deleted contents?)

=== === === === === === SPEC LEVEL 0

=== SIMPLEST OPERATIONS

TEST INTEGRITY OF SLICE

- each connection is reciprocated

- no contradictory connections

STEP (move current pointer in a direction specified by user)

NEW CELL (make new cell in direction specified by user)

EDIT CELL

 Put text contents in new cell or change text contents of cell)

Connect cells (in a direction specified by user, unless blocked by an existing conection)

Break connection

ERROR SIGNAL IF OP IMPOSSIBLE, call it CHIRP, user may choose to hear it or not.

=== KEY VARIABLES OF THE SYSTEM

For each window, a "cursor" (currently selected cell, or "accursed cell", whose environment can be changed and queried).

This is actually held in a cursorplex,

 or window list, one for each window.

It holds all the variables associated with a window and cursor.

The cursorplex contains

  - ID of accursed cell

  - currently assigned dimension on x-axis

  (only posward at first, x is posward rightward)

  - currently assigned dimension on y-axis

  (only posward at first, y is posward downward)

  - currently assigned dimension on z-axis

  (only posward at first,

   z is posward away from the user,

   toward and beyond the screen)

=== OPERATIONS FROM THE COMMAND LINE

At first, we will control fundamental operations from command line, with approximately the following calls and responses:

>>> chirp on

[SYSTEM REPLIES]

Chirp is turned on.

[SYSTEM CHIRPS]

>>> chirp off

[SYSTEM REPLIES]

Chirp turned off.

>>> cell 3

[SYSTEM REPLIES]

cell 3 is connected to cell 7 posward in d.1

cell 3 is connected to cell 4 negward in d.1

cell 3 is connected to cell 7 posward in d.3

>>> row of cell 12

[SYSTEM REPLIES-- asterisk indicate accursed cell]

13,22, *12*,14

>>> column of cell 12

[SYSTEM REPLIES-- asterisk indicate accursed cell]

4

6

*12*

93

>>> row of cell 12 withcontents

13 snerd , 22 grumf, *12* Hello , 14 there

>>> column of cell 12 withcontents

4 snark

6 tweedle

*12* Hello

93 [blank]

>>> cursor0

*12* Hello

x=d.1, y= d.2, z=d.3

>>> cursor1

*6* tweedle

x=d.1, y= d.2, z=d.3

>>> row of cursor0 withcontents

13 snerd , 22 grumf, *12* Hello , 14 there

x=d.1, y= d.2, z=d.3

>>> column of cursor0 withcontents

4 snark

6 tweedle

*12* Hello

93 [blank]

x=d.1, y= d.2, z=d.3

>>> cucifixview cursor0 withcontents

cursor0 horizontal row

13 snerd , 22 grumf, *12* Hello , 14 there

cursor0 vertical column

4 snark

6 tweedle

*12* Hello

93 [blank]

x=d.1, y= d.2, z=d.3

=== FUNDAMENTAL OPS

DimDir()

receives user direction (esdf etc.)

 and resolves it to

 specified dimension and direction.

NEW

>>> new window0, -d.1

d.1: 24 [empty] *12* Hello , 14 there

EDIT TEXEL

[window opens for text edit]

BREAK CONNECTION

[ chirp if there is no connection to break ]

[ Remove posward connection in one cell ]

[ Remove negward connection in the other cell ]

>>> break 12, -d.1 [negative direction]

d.1: *12* Hello , 14 there

CONNECT

Direction determines the starting cell , the positive direction, the destination cell.

[ TEST CONNECTABILITY--

 is source facet blocked?

 is destination facet blocked?]

[optional chirp if blocked]

IF NEITHER BLOCKED, MAKE CONNECTION--

- make posward connection in source cell

- make negward connection in destination cell

>>> connect 12,7 d.1

 (posward connection is from the first to the second)

d.1: *12* Hello , 7 bloop

=== === === === === === SPEC LEVEL 0A

NEW FOR THIS LEVEL--

- STEP operation

step cursor to next cell.

[ chirp if there is no next cell ]

- DELETE operation-- tricky because of cursor retreat sequence

- ALLOW REVERSED DIMS-- axis can show -d.1, etc.

  This means all axes are reversible in the cursorplex.

=== DELETE RETREAT SEQUENCE

  When a cell is deleted, the cursor--

- retreats negward on x-axis

IF NO CELL THERE,

- retreats posward on x-axis

IF NO CELL THERE,

- retreats negward on y-axis

IF NO CELL THERE,

- retreats posward on y-axis

IF NO CELL THERE,

- go to Home cell.

=== === === === === === SPEC LEVEL 1

Command line presentations still apply.

NEW FOR THIS LEVEL--

Receive and parse user keystrokes, select op and direction

[ table of parsed operations as flowchart ]

=== === === === === === SPEC LEVEL 1A

NEW FOR THIS LEVEL--

Showing cell as bitmap.

Cursorplex now holds

- window size

- cursor color

- background color

SHOW ONE CELL as a bit-map

>>> show 12

[ Display cell as rectangle with contents and cellno,

current axes ]

=== === === === === === SPEC LEVEL 1B

NEW FOR THIS LEVEL--

SHOW CRUCIFIX OF CELLS AS BITMAP [crucifix view]

>>> show 12 crucifix

[ Display cross of cells,

 with accursed cell at the intersection of

 its column and row ]

Window shows--

- accursed cell in center

- cellID of accursed cell

- name of view

- dimrose (diagram of dimensions currently assigned to the three axes)

STEP operation

ENACT ALL PREVIOUS OPERATIONS,

 SHOWING RESULTING CRUCIFIX.

=== === === === === === SPEC LEVEL 1C

NEW FOR THIS LEVEL--

DIMWHEEL, looped list of current dimension.

STEP THROUGH DIMENSIONS in each axis.

=== === === === === === SPEC LEVEL 1D

NEW FOR THIS LEVEL--

ROW view

COLUMN view (row view turned sideways)

EACH window shows--

- accursed cell in center

- cellID of accursed cell

- name of view

- dimrose (diagram of dimensions currently assigned to the three axes)

VISIBLE GEOGRAPHY OF CELLS

- starting cell (HOME)

- OPCELLS of principal operations

- DIMWHEEL four dimensions

- d.1.,d.2, d.3, d.4

- VIEWWHEEL showing views--

 - single cell

 - crucifix

 - row

 - column

=== === === === === === SPEC LEVEL 1E

NEW FOR THIS LEVEL--

TWO WINDOWS SHOWN, windoow0 and window1

TWO-HANDED FULL KBLANG commands

 interpreted by a command parser

 (flowchart to be supplied)

EXECUTE operation-- if accursed cell in window0--

- is a progcell

- does not require two cursors (e.g. connect)

THEN its results take place.

=== === === === === === SPEC LEVEL 1F

FILE (slice of zzspace) may be saved, brought back in.

=== === === === === === SPEC LEVEL 1G

NEW DIMENSION ADDED: d.interslice

More than one slicefile may be co-resident;

 they interconnect through home cell on d.interslice.

=30=

raw

span:

References

There are no documents that refer to this sourcedoc.