Silicon Valley Forth Intrest Group
4th.CoSy Presentation

2013 11 16
  • 4th.CoSy
  • Planetary Temperature
  • CoSy/Life ; CoSy/Liberty
  • Forum 
  •  FaceBook ; Twitter

  • © Bob Armstrong
    Notes gathered from around CoSy.com into web page for presentation
    and examples executed in 4th.CoSy itself .
    Unfortunately no decent video of the presentation got made .



    4th.CoSy
    Just time to Whet Your Appitite , can chat later
    Is a "Work in progress"



    Technical skill is mastery of complexity, while creativity is mastery of simplicity
    Erik Christopher Zeeman

    APL implements the simplicities needed to master complexities .
    Another time when I was concerned about getting credit for some idea I had,
    [ Ken Iverson ] said, "Arthur, if it's a really good idea,you're going to have to shove it down people's throats."

    Arthur Whitney : Memories of Ken
    It is better to have 100 functions operate on one data structure
    than 10 functions on 10 data structures.

    Alan Perlis : Epigrams in Programming #9



    APL  : MAXIMALLY EXPRESSIVE NOTATION FOR SPECIFICATION
            OF FINITE ALGORITHMS
    FORTH : MINIMAL VOCABULARY TO CREATE EXTENSIBLE DICTIONARY




    Bit o History
    • Learned APL in the mid '70s when realized needed to learn multidimensional geometry and Ken Iverson's APL generalized the algebra and made it executable .
    • Learned of Forth in early '80s when saw Tron with some hardware tekies at Xerox . Pointed me to Byte special issue . Rochester relative hotbed of Forth .



    Everyone with any teky sense used the 68000 .

    Among us , Ryu Oosake was the most courageous pioneer . Around 1983 , probably steered by Phil VanCleave , he contacted me about his plan to make an 68000 notebook with APL in ReadOnlyMemory . I remember suggesting to him he also look to FORTH as the foundation of his environment .

    Ryu came to New York from Tokyo , but we failed to get together because of the last 250 miles . It is not at all clear that history would have been different if we had.






    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




    Generalized Array Language

    • Reference counted Lists of lists ( a la Backus Turing speech )
      recursive data structures and associated vocabulary .

    • Verbs & adverbs ( functions & operators ) acting on these lists .
      • atomic verbs , eg :  + * = , act on leaves ( atoms )
      • adverbs generally mapping verbs to collections of lists , eg : each , eachleft , eachright , across , scan
    • Modulo indexing ( -1 indexes last element ) unique to CoSy but I like it

    • Objects ( defined by header ) . 4 cells

      type count
      bits % item /
       reference count
      meta   <---  
      body of object
        --->nbsp;

    • Dictionary relation : list of 2 lists :  ( symbols ; values )
    NB : operators like each , etc , are definitionally parallel

    The enabling algorithms are the transformation of a reference counted recursive allocated list of lists to a simple saveable list and back again . The real bear is taming reference counts and decrementing and freeing of all the leaves of recursive trees .
     






    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 ) 



    Below are examples executed in 4th.CoSy during the demo with results copied down
    from the result window in blue

     | ======================== | Sat.Nov,20131116 | ======================== |
    | 0914 |

      s" -=" 80 _take
    s" -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
     
      10 _iota                  | _iota ( n -- integers<n )
    0 1 2 3 4 5 6 7 8 9

      R0 i( 100 0 )i +i         | R0  holds the result of the last execution
    100 1 102 3 104 5 106 7 108 9
     
      i( 1 0 0 0 )i i( 3 3 )i  take     | 
    (
     1 0 0
     0 1 0
     0 0 1
     )

      R0 DMP              | Executed w F6 .
                          | R0 holds last result DMP displays first 8 cells . 
    address     type      count ~ rho  refs | bits   meta_addr
    00313568 00 00 00 00  03 00 00 00  01 00|20 00  00 00 00 00 .......... .....
    00313578 90 C5 6F 02  C0 C5 6F 02  F0 C5 6F 02| 2F 5C 20 22 ..o...o...o./\ "
               item 0        item 1       item 2      junk

      text> >t0>     | grab this text and save in variable named t0
    s"  | ###################################################################### |
     |  \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/  |
     | ###################################################################### |
        revaver type | >| 7.0.10
      R ` lastSave v@
      R to _d
      help to

      savetext saverestxt saveLastsave
     savedic  |   simple save  |
     text> vm " aaply" con 
    ...
    "

      t0 rho         | count of items ( characters )
    139051

      t0 vm >t1>     | split on "lf chars
    (
     s"  | ###################################################################### |"
     s"  |  \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/ \/  | "
     s"  | ###################################################################### | "
     s"     revaver type | >| 7.0.10 "
     s"   R ` lastSave v@ "
     s"   R to _d"
     s"   help to"
     s" "
     s"   savetext saverestxt saveLastsave"
     s"  savedic  |   simple save  |"
     s"  text> vm " aaply" con  "
    ...
    )

      t1 rho
    3442

      t1 ' rho eachM>
    (
     75
     76
     76
     29
     18
     9
     9
     0
     34
    ...
    )

      R0 ,/
    75 76 76 29 18 9 9 0 34 ...

      R lst               | R is the "Root" dictionary which gets saved to CoSy.csy file
    (
     (
      ` DIGITS
      ` LE
      ` help
      ` winbk
      ` IntroHelp
    ...
     ) (
      s" 0123456789"
      1.89999 1.27999
      s"  F1    Key Help

     F5    Insert  res  at cursor
     F6    Eval line under cursor in  text
     F7    CoSy evaluate ( experimental )
    ...
     ) )

      R 0 _at             | 0th list is symbols
    (
     ` DIGITS
     ` LE
     ` help
     ` winbk
     ` IntroHelp
     ` ToDo
    ...
     ` REFR.revenue
     ` Pi
     ` Tau
     ` text
     )

      R ` ToDo v@         | Saved variable  ` ToDo
    s"  |  ToDo | --------------------------------------- |
            GlassTables
    acnts    MEJA 1041     | Ryan Keldsen , RECYCLES at 743 GOLD HILL PL S,
        |    BadRock : steering , starvation | transmission
    ...
    "

      s" 4th.CoSy " i( 11 31 )i take >t0>        | Vidal Sasson demo
    (
     s" 4th.CoSy 4th.CoSy 4th.CoSy 4th."
     s" CoSy 4th.CoSy 4th.CoSy 4th.CoSy"
     s"  4th.CoSy 4th.CoSy 4th.CoSy 4th"
     s" .CoSy 4th.CoSy 4th.CoSy 4th.CoS"
     s" y 4th.CoSy 4th.CoSy 4th.CoSy 4t"
     s" h.CoSy 4th.CoSy 4th.CoSy 4th.Co"
     s" Sy 4th.CoSy 4th.CoSy 4th.CoSy 4"
     s" th.CoSy 4th.CoSy 4th.CoSy 4th.C"
     s" oSy 4th.CoSy 4th.CoSy 4th.CoSy "
     s" 4th.CoSy 4th.CoSy 4th.CoSy 4th."
     s" CoSy 4th.CoSy 4th.CoSy 4th.CoSy"
     )
      t0 t0 reverse ' cL each
    (
     s" 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy"
     s" CoSy 4th.CoSy 4th.CoSy 4th.CoSy4th.CoSy 4th.CoSy 4th.CoSy 4th."
     s"  4th.CoSy 4th.CoSy 4th.CoSy 4thoSy 4th.CoSy 4th.CoSy 4th.CoSy "
     s" .CoSy 4th.CoSy 4th.CoSy 4th.CoSth.CoSy 4th.CoSy 4th.CoSy 4th.C"
     s" y 4th.CoSy 4th.CoSy 4th.CoSy 4tSy 4th.CoSy 4th.CoSy 4th.CoSy 4"
     s" h.CoSy 4th.CoSy 4th.CoSy 4th.Coh.CoSy 4th.CoSy 4th.CoSy 4th.Co"
     s" Sy 4th.CoSy 4th.CoSy 4th.CoSy 4y 4th.CoSy 4th.CoSy 4th.CoSy 4t"
     s" th.CoSy 4th.CoSy 4th.CoSy 4th.C.CoSy 4th.CoSy 4th.CoSy 4th.CoS"
     s" oSy 4th.CoSy 4th.CoSy 4th.CoSy  4th.CoSy 4th.CoSy 4th.CoSy 4th"
     s" 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy"
     s" CoSy 4th.CoSy 4th.CoSy 4th.CoSy4th.CoSy 4th.CoSy 4th.CoSy 4th."
     )

      R0 R0 reverse cL
    (
     s" 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy"
     s" CoSy 4th.CoSy 4th.CoSy 4th.CoSy4th.CoSy 4th.CoSy 4th.CoSy 4th."
     s"  4th.CoSy 4th.CoSy 4th.CoSy 4thoSy 4th.CoSy 4th.CoSy 4th.CoSy "
     s" .CoSy 4th.CoSy 4th.CoSy 4th.CoSth.CoSy 4th.CoSy 4th.CoSy 4th.C"
     s" y 4th.CoSy 4th.CoSy 4th.CoSy 4tSy 4th.CoSy 4th.CoSy 4th.CoSy 4"
     s" h.CoSy 4th.CoSy 4th.CoSy 4th.Coh.CoSy 4th.CoSy 4th.CoSy 4th.Co"
     s" Sy 4th.CoSy 4th.CoSy 4th.CoSy 4y 4th.CoSy 4th.CoSy 4th.CoSy 4t"
     s" th.CoSy 4th.CoSy 4th.CoSy 4th.C.CoSy 4th.CoSy 4th.CoSy 4th.CoS"
     s" oSy 4th.CoSy 4th.CoSy 4th.CoSy  4th.CoSy 4th.CoSy 4th.CoSy 4th"
     s" 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy"
     s" CoSy 4th.CoSy 4th.CoSy 4th.CoSy4th.CoSy 4th.CoSy 4th.CoSy 4th."
     s" CoSy 4th.CoSy 4th.CoSy 4th.CoSy4th.CoSy 4th.CoSy 4th.CoSy 4th."
     s" 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy"
     s" oSy 4th.CoSy 4th.CoSy 4th.CoSy  4th.CoSy 4th.CoSy 4th.CoSy 4th"
     s" th.CoSy 4th.CoSy 4th.CoSy 4th.C.CoSy 4th.CoSy 4th.CoSy 4th.CoS"
     s" Sy 4th.CoSy 4th.CoSy 4th.CoSy 4y 4th.CoSy 4th.CoSy 4th.CoSy 4t"
     s" h.CoSy 4th.CoSy 4th.CoSy 4th.Coh.CoSy 4th.CoSy 4th.CoSy 4th.Co"
     s" y 4th.CoSy 4th.CoSy 4th.CoSy 4tSy 4th.CoSy 4th.CoSy 4th.CoSy 4"
     s" .CoSy 4th.CoSy 4th.CoSy 4th.CoSth.CoSy 4th.CoSy 4th.CoSy 4th.C"
     s"  4th.CoSy 4th.CoSy 4th.CoSy 4thoSy 4th.CoSy 4th.CoSy 4th.CoSy "
     s" CoSy 4th.CoSy 4th.CoSy 4th.CoSy4th.CoSy 4th.CoSy 4th.CoSy 4th."
     s" 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy 4th.CoSy"
     )

     | ###################################################################### |
     | ###################################################################### |
     | ###################################################################### |


       
    Whole CoSy
    Locations of visitors to this page
    CoSy
     I reserve the right to post all communications I receive or generate to CoSy website for further reflection .
    Contact : Bob Armstrong ; About this page : Feedback ; 719-337-2733
    Coherent Systems / 28124 Highway 67 / Woodland Park , Colorado / 80863-9711
    /\ /\ Top /\ /\