[comp.lang.apl] Simple J editor

ljdickey@watmath.waterloo.edu (L.J.Dickey) (12/21/90)

Frederick Way, of Case Western Reserve University, has constructed
this editor using J.  It uses the "/" and "," conventions known
to some APLers.  Here is Fred's (edited) letter.

 From fxw3@cwns4.INS.CWRU.Edu  Tue Dec 18 12:47:18 1990
 Date: Tue, 18 Dec 90 12:47:06 -0500
 From: fxw3@po.CWRU.Edu (Frederick Way)
 Subject: Voila!
 Cc: fxw3@cwns4.INS.CWRU.Edu
 Status: O

 VOILA!!!!
 
 A trivial "/" (delete character) and "," (insert text) editor for J
 that seems to work:
 
    L0=.'$.=.s#$.}:s=.0 0 1 1 0{.~3*_1+2*0=#inp=.1!:1 (1)}:y. 1!:2 (2)'
    L1=.'y.=.(/:(i.#y.),($cac)#inp i.'',''){y.,cac=.}.inp#~cv=.+./\inp='','''
    L2=.'$:(-.''/''=(#y.){.(-.cv)#inp)#y.'
    L3=.'y.'
    edit=.(L0,L1,L2,:L3) ::''
 
 Holiday cheers,
       Fred
 
 --
 Frederick Way, III
 fxw3@po.CWRU.Edu