( ( Most
interesting question
; MortonKromberg ; What is a
symbol other than a string ? ) ;
( MyconsideredAnswer ;
me ;
:
sym? (
str -- bool ( string contains no WhiteSpace ) 1p
L@ van _0ws_ M->I _iv 1P ;
alias:
name? sym?
; in
current 4th.CoSy the
following convert the headers back and forth . The type cell is changed
and for symbols , the count is set to 1 and the length stored
directly in the bit count word :
| Note : these fns operate on the
object passed , not a copy .
|
To emphasize that fact , no result is returned .
:
sym>str ( sym -- ) TypeC over Type! dup sym# over
cell+ ! byte swap bits! ;
:
str>sym ( str -- ) TypeS over Type! dup i# over
bits@ * over bits!
1 swap cell+ ! ;
) )
Spoke on
CoSy "K-Tree" Structured
Open Intel Forth Generalized APL Environment
Slide
Show ( annotated ) :
- TRON
Event at which I learned of Charles Moore's FORTH
- Bob
Smith
Back in the early days of NARS , said " just do it"
- Ray
Cannon
Invited me to use
his spare room at joint APL confernece Naples FL where I had nothing
better to do than sit by the pool and code the essential functions to
save and restore reference counted lists of lists to flat files
|
BushWacking
- I don't know
how you are supposed to implement a language .
Never lived in C/UNIX .
- 4th.CoSy
is Interactive
language lab , breadboard
- Straddles
FORTH and Array Language
one Fn key executes as FORTH , one assumes CoSy
|
Goals
- Personal
Artificially Aided Intelligence
- Open
code from gate
arrays to data arrays
Language is a bush , not a horizon ; optimize by using vocabulary at
appropriate level
- Deal
with business
of life
(
which involves a lot of accounting and form filing )
|
FORTH
Minimal
vocabulary capable of extending itself
- Stacks : Data
, Return
- Definitions
either code or in dictionary
code is the language
in which the FORTH is implemented . In Reva.CoSy
, it is INTEL assembly .
- A word
is a string of characters delimited by whitespace
aka : token symbol
- Interpreter
reads a word , looks it up in dictionary
- If
code execute it
- If
defined , look each word definition in
turn and interpret
- If
not found , parse as number and put on data
stack
- If
not number , abort
|
Generalized
Array Language
- Lists
of lists (
a la Backus
Turing speech )
- Modulo
indexing ( -1 indexes last element )
- Dictionary
relation : list of 2 lists : ( symbols ; values )
- Objects
(
defined by header )
type |
count
|
bits %
item /
reference count |
meta |
<---
body of object
--->
|
|
Also conducted
Q&A on
Memory Management and Generic Token Overloading
Syracuse U's
Minnowbrook Conference Ctr from Kayak
Current Code
uploaded
for conference
|