Extreme Simplicity :
- CoSy is a TimeStamped notebook/log created as an open
vocabulary in Forth
- a `
word is any non blank string of characters .
Space is the prime delimiter .
- words pass information to each other by pushing it on , or taking it off a
stack .
- The syntax is noun
noun verb aka: RPN ( Reverse Polish Notation
) .
- A noun is a word which takes nothing off the
stack just puts something on it .
- A verb is a word which either does some operation without touching the stack ,
or takes one or more items from the stack and generally returns a result to it .
But Note : a verb can look forward in the sentence it is in .
- the ` tick ,
` on the upper left returns the following word as a CoSy simple string .
- Chuck Moore's brilliant ` quote ,
' , returns the address of the following word
rather than executing it . In particular , that allows a verb to be passed as an
argument to a following verb . See Iterators .
This supplies the power of a traditional APL .
- Tap
F6
instead of Enter on any line & your computer
will try to execute it .
- all nouns are lists , trees . At the Forth level they have a 3 cell header
`( Type Count refCount )`
Type 0 is list of lists , lists of pointers to lists . Simple lists like characters or numbers are the leafs .
- Indexing is modulo -
- like counting on your
thumb & fingers : 0 1 2 3 4 0
: name . . . ; adds a
word to the
dictionary .
- an extensive vocabulary evolved from APL via K , mainly
slicing and dicing ,
searching & replacing , and applying
verbs to each item in lists .
The philosophical goal of APLs is the succinct expression of algorithms
whether cleaning HTML , handling mailing lists or family
accounting ,
or finite element modeling the planet .
- The CoSy
notebook environment itself is written in CoSy
For example :
R ` text v@ "lf
VM ` cash con
Split your note text on lineFeeds and return the lines
containing the
word cash .
And to make it a word
: log R ` text
v@ "lf VM ;
So can write
log ` cash con
to find and return all lines containing the word ` cash .
The rest is Vocabulary
( so some important vocabulary is help vocabulary )
|