| 
                   CoSy 
IntroHelp 
                   | 
                  
                  
                   | 
                 
              
             
  | 
           
        
       
 
       
      | 20221012.2348 |
      
      s" ~" i( 65 )i reshape lst 
( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) 
 | ======================== | Tue.Oct,20061010 |
======================== | 
| 1705 |  | 20070912.1707 | 
 | ======================== | Thu.Aug,20140807 |
======================== | 
| 1717 | updating  
         
        NASCENT 
4th.CoSy TUI 
         
         
        A
crucial aspect of the efficiency for the user/programmer in CoSy is the
interface , nowdays called a "Textual User Interface" which allows the
intermixing of machine executable "sentences" within an ongoing log or
diary of notes , etc , for purely human , tho machine searchable ,
consumption . 
         
        This is
the first documentation initially written within the 4th.CoSy system
itself . Only a few function keys have been defined . Most salient ,
tapping F1 will present their definitions in the "res"ult window .  
         
        The key
that virtually defines CoSy is F6 which evaluates the line in this
"text" window under the cursor . In current 4th.CoSy , The line is
evaluated by the Reva FORTH interpreter in which the system is written
and anything emitted is spooled and displayed in the "res" window .
Note because commands are executed directly in FORTH any typo or wrong
thought has a good chance of blowing the system away .  Thus it it
strongly recommended to click the "Save" button ( or ctrl-s ) before
doing anything exporatory . This will save the environment so it will
be restored the next time you restart . 
         
        Here is
a simple example . Put the cursor on the line below and tap F6 : 
         
          1 2 - _i 
         
        The F5
key is complementary to the F6 key in that it inserts the contents of
the "res" window into "text" at the cursor . Try it . 
          
        All the
text , and anything that persists from session to session is stored in
the CoSy "1-tree" dictionary . See http://cosy.com/CoSy/NL0506.htm and
the CoSy.f file for more detail . For instance , the definition of
the  F1 key is  { " help" (sym) v@ van rtype } which
retrieves the value of the object ` help  from ` R grabs the
content of it , and 
         "types"
it to the result window . 
         
         The
F1 help has been edited simply by editing the contents of "res" and
executing : 
         
        | 
res> cs-> help  
         
         (
Note , I commented the line above so it won't be accidentally executed
. ) 
         
         Likewise
this text has been edited and retrieved using the lines below . 
         
         
text> cs-> IntroHelp 
        | `
IntroHelp v@ van >text  
        | `
IntroHelp v@ van type        | list
in  res . 
         
         There
is a lot more to go into , but there are some major transformations
ahead so this introduction is intended as just a taste of the nature of
things to come . 
         
         Below
are some examples , including my notes for the presentation at Ray
Cannon's APL Moot outside London last August . I have cleaned out most
of my personal notes ( yes , I have started using this as my daily log
suplementing old K.CoSy ) . 
         
         Please
post any Reva FORTH level questions on the Reva forum , or , if on the 
         CoSy
APL level , feel free to inaugurate the CoSy forum at  
         
(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) 
         
| \/ Some 4th.CoSy examples . F6 the indented lines sequentially . \/ 
         
  s" 0123456789" cs-> DIGITS  
  ` DIGITS v@  i( 70 )i reshape lst 
(
0123456789012345678901234567890123456789012345678901234567890123456789 ) 
         
  30 _iota  i( 2 )i  ' * each i1 ' + each >t0>
lst    | DaVinci Code question as to number of panes 
  t0 ' + scan >t1> -1 _take lst  | |>|  ( 900 ) 
  t1 i( 666 )i ' = f? $.  | |>| 7FFFFFFF   
 | in Louvre pyramid = 666 |  nil -- not found 
         
  s"  ! Hello World ! "   i( 7 31 )i  
reshape >t0> lst    | Vidal Sassoon liked this
demo in 1981 
  t0  t0  ' reverse  eachm ' cL each >t1>
lst        | in APL which is
substantially shorter . 
  t1 t1 reverse  cL lst 
         
                
| ================================================ | 
         
  getwords 
 | /\  spool  words  into vector t0 . Cannot have
any other word on same line | 
  t0 i# .          
 | |>| 11611     | < these numbers are from
before contexts . 
  t0 s"  " toksplt >t1> i# .    | |>|
1444         | split on spaces . 
  t1 -2 _take lst    | |>| (  (  1442
)  (  words )  )    | last 2 words 
  t1 i( -2 )i  _   >t0  
     | cut off last 2 words  
  t0 -4 _take lst    |  last 4 words  
  t0 cs-> words    | save in dictionary  
  ` words v@ lst    | retrieve & list  
         
  f( 1.90 1.28 )f  cs-> LE      
 | Store Pound and Euro conversion rates  
  ` LE v@ lst 
         
6200.0 fsqrt f.  | |>| 78.74007      |
Alaskan BP oil spill size - feet 
576.0 fsqrt f     | |>| 24.00000 .  
 | size M ^ 2  
576.0 fpi f/ fsqrt fdup f. 2. f*  f.  | |>| 13.54055
27.08110  
27.08 2. f/ fdup f* fpi f* f.  | |>| 575.95320  
24 dup * . | |>| 576 
24. 2. f/ 2. fsqrt 2 f* f.  | |>| 16.97056  
         
200000.0 42.0 f/ f.  | |>| 4761.90476     | gal
-> barrels  
         
|  TRIP | --------------------------------------- | 
 Tue, Aug 15      11:05 AM to 04:40 PM 
    Denver, CO (DEN) to New York-LaGuardia, NY (LGA) 
3hrs 35min - nonstop     Frontier AirlinesAirlines
    Frontier Airlines Flight 510 
Airbus Jet- Economy  
 | --------------------------------------- | 
 Thu, Aug 17      06:05 PM to 06:25 AM 
Arrive next day 
    Newark, NJ (EWR) to London Heathrow, UK (LHR) 
7hrs 20min - nonstop     British AirwaysAirlines
    British Airways Flight 184 
Boeing 767 Jet- Economy  
 | --------------------------------------- |   
dt   | |>| ( 2006 8 19 15 0 15  )  | Hard disk
dead on Gateway ! | 
  
|  \/  DEMO that I really do have an APL \/  | 
  12 _iota i(  3 4 )i reshape >t0> lst 
  24 _iota i( 2 3 4 )i reshape >t0> lst 
  t0 i( 10 100 200 300 )i  ' *  aaply lst 
         
 10000 _iota i>f   >t0> i# .  
     | generate the 0 -- 9999 , convert to floats . 
  t0 ' fsin eachm >t1       
 |  take their sines . 
  t1 ' f+ across lst      
     | add them up & list result 
         
|  \/  Show internal structure of   dic 
\/  | 
  dnames            |
dictionary names 
  dic DMP        | dump leading 32
bytes . Header - 1st 3 cells . cell 0 , type 0 - nested . 
  dic i# .          
 | count of items from cell 1 
  dic 0 i@ DMP        | dump of 0th
item - names  
  dic 0 i@ 4 i@ DMP    | 4th name  
  dic 1 i@ 4 i@ DMP     | second item values .
value for 4th name  
  dic 1 i@ 4 i@ lst        | List it
         
  dic 1 i@ 4 i@ van type    | Simply retrieve
actual string and type it .  
  
         
 dt   | |>| ( 2006 8 19 21 23 24  ) 
  Showed Paul Grosvenor 01342713204  
         
( -- \/ -- ACTUAL SUNDAY DEMO -- \/ -- )   dt  | |>|
( 2006 8 20 8 57 13  ) 
         
 MAIN POINTS  
         
  o  AN INFANT but  ALIVE  
  
  o AN APL 
     . PURE " LISTS OF LISTS "  -- 
1-TREE  
     . MODULO INDEXING -- rather than scalar
extension . 
         
  o OPEN FREEWARE DOWN TO THE Intel -- ( Windows & Linux ) 
     . Reva FORTH FOUNDATION -- ACTIVE COMMUNITY  
     . Rapidly evolving facilities -  sockets
- sql-lite . big-nums . gui   
      
  o DOWNLOAD IT & JOIN THE DEVELOPING COMMUNITY    
  
  dt  | |>| ( 2006 8 20 11 9 41  ) 
         
 | --------------------------------------- | 
 Wed, Aug 30      09:35 AM to 11:55 AM 
    London Heathrow, UK (LHR) to Chicago-Ohare, IL (ORD) 
8hrs 20min - nonstop     British AirwaysAirlines
    British Airways Flight 295 
Boeing 777 Jet- Economy  
 | --------------------------------------- | 
 Sun, Sep 03      10:15 AM to 11:40 AM 
    Chicago-Midway, IL (MDW)  to  Denver, CO
(DEN) 
2hrs 25min - nonstop     Frontier AirlinesAirlines
    Frontier Airlines Flight 538 
Airbus Jet- Economy  
         
dt  | |>| ( 2006 9 3 18 38 29  ) |  |
--------------------------------------- | 
 11642 emails waiting ! 
dt  | |>| ( 2006 9 4 14 23 51  )  |  |
--------------------------------------- | 
         
| --------------------------------------- |  2006 09 23  |
--------------------------------------- | 
1100 / outdoorchannel : PP hill climb 
         
dt  | |>| ( 2006 9 26 17 10 35  ) Got running in Tui again
. /\ missed because not in Tui ! /\ 
dt  | |>| ( 2006 9 27 9 3 40  )  | ( 2006 9 27 17 4
41  ) 
         
| ======================== | Fri.Oct,20061013 |
======================== | 
| 1514 |  
         
|  ToDo | --------------------------------------- | 
  ( A lot ) 
         
o Get running in FORTH stack so continuous from one execution to next . 
o Make dynamic  "dic" based execution key . 
         
         
(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ) 
| \/  USEFUL PRHASES  \/ | 
  include CoSy/furniture.f 
  dt 
  !! dir 
  dnames 
  savetext savedic 
bye"  
       
      
       
      
         
      
      --  
       
      
      
       |