ws-to-ws transfer 
Author Message
 ws-to-ws transfer

     W2W: Transfer all ws fns and vars to/from an ASCII file.

This file (or email message) -- when read into your copy of Weigang's
A2A workspace -- makes a new workspace that transfers all fns and all
non-nested vars to and from ASCII file representations of an entire
workspace.  It's an "add-in" extension of Jim Weigang's APLASCII, all
features of which remain 100% intact.  The main feature is that this
ws sends and retrieves variables (APLASCII does not).

To use this software, you must have Weigang's APLASCII.  If you don't
have APLASCII for your interpreter, it's available via download from
FileArea APL95 of the BBS\APL at 703-528-7617, via

ftp://archive.uwaterloo.ca/langauges/apl/workspaces/aplascii

and by mail order for $US 12 ppd worldwide (which includes the APL95
Software Exchange collection).  Make your check or International Postal
Money Order out to SIGAPL, %{*filter*} Holt (see address below).

APLASCII wasn't designed to transfer vars.  I wrote W2W because a
customer of the APL95 Software Exchange who uses the APL68k wanted
Langlet's SEARCHGL.AWS.  In this .AWS, specially tailored vars are a
critical part of software to demonstrate hot new ideas from molecular
biology as applied to APL programming and artificial intelligence.
Thus this extension of Weigang's APLASCII to transfer variables.

How to use this file:

(1)  )LOAD your copy of A2A, Weigang's installed version
     of APLASCII.

(2)  While in A2A, issue the command:

                DEFINEFNS TFREAD 'path\filename'

     If you get this file via email on CLA, use the name of
     your email file for 'filename'.  DEFINEFNS will ignore
     the text you are now reading.

     If you get this file by downloading or FTP, the filename
     will be w2w.asc (or w2w.zip).

     In either case, the above command will import 8 fns (readme2,
     getw, getf, getv, sendw, sendf, sendv, and ssearch) that
     follow the text you are now reading.

(3)  Rename your A2A workspace -- the name W2W is suggested -- and
     )SAVE it.

(4)  Run fn readme2 in your new ws for further information.  Unless
     you're using APL*PLUS/PC, you'll probably need to edit some of
     the fns of W2W to make the []s compatible with your APL (for
     native files, and especially string search).

That's it.  You're done.

This is version 0.9.  It may not work in every case.  I've gotten
WSFULL on some big test cases, and some truly horrible results on
variables in an .AWS containing cryptographic variables.  For WSFULL
or NONCE errors, you can always decomment the fns of W2W.  You'll
gain about 20K of workspace (in an APL*PLUS/PC .AWS).

If A2A (and W2W) gains general acceptance in the APL community, I'll
ask the SIGAPL Executive Committee to encourage its more widespread
use, especially in the Annual Conference Software Exchange.  A side
effect of such a move would be to encourage APL programmers to write
more in accord with ISO standard APL.  Another side effect would be
to chip away at the Tower of Babel that currently exists among
different APL interpreters.

Please send comments and suggestions to{*filter*} Holt at:
3802 North Richmond St.  Arlington VA 22207 USA

W2W.ZIP and W2W.ASC are available for download in FileArea APL95
on the BBS\APL at 703-528-7617, 1.2-14.4b, N81 24 hrs, and will be
available after a few months of testing, via FTP from:
archive.uwaterloo.ca/languages/apl/i_dont_know_what_dir.

Don't bother to read the rest of this message (it has some long lines).
It consists of the ASCII representation of the 8 fns of W2W.

Dick Holt

=====[  Start of W2W ASCII representation ]==========================
     {del}readme2;z

[2]   '' & ''
[3]   '            W2W: Workspace-to-Workspace Transfer'
[4]   ''
[5]   '  Workspace W2W sends/retrieves an entire WS to/from an ASCII file.  {+
   +}It''s'
[6]   '  an ''add-in'' to A2A, the installed version of Jim Weigang''s {+
   +}APLASCII,'
[7]   '  which remains 100% functional.   W2W extends A2A to transfer {+
   +}variables'
[8]   '  as well as fns.' & ''
[9]   '  You *must* use W2W in A2A, because W2W uses fns of A2A.  It won''t {+
   +}work'
[10]  '  without them.  Weigang did all the hard work, and deserves all the {+
   +}credit.' & ''
[11]  '  W2W is designed to aid the transfer of entire workspaces among {+
   +}different'
[12]  '  APL interpreters.  It transfers all fns and all non-nested vars in {+
   +}a ws'
[13]  '  of APL X to an ASCII file that can be read by W2W in APL Y.  Of {+
   +}course,'
[14]  '  you''ll probably have to edit some of the fns imported from APL X to'
[15]  '  make them compatible once they arrive in APL Y.  For example, some'
[16]  '  uppercase #s from APL*PLUS must be changed to lowercase #s in {+
   +}Iverson.'
[17]  ''
[18]  '  To send all fns and all non-nested array vars in workspace XXX to an'
[19]  '  ASCII file: )COPY or )PCOPY XXX into your W2W workspace and run:'
[20]  ''
[21]  '             sendw ''path\filename'' (use quotes)'
[22]  ''
[23]  '      Press Enter to continue: ' & z{<-}{quotequad}
[24]  '  To retrieve all fns and vars in workspace XXX that have been put in {+
   +}an'
[25]  '  ASCII file by sendws in W2W, )LOAD W2W and run'
[26]  ''
[27]  '             getw ''path\filename''  (use quotes)'
[28]  ''
[29]  '  Then expunge all W2W objects in GRPA2A.  What remains are the APL fns'
[30]  '  and vars from the ASCII file -- exactly the ones you wanted.' & ''
[31]  '  W2W uses some system fns (#s) that may be unique to APL*PLUS.  You {+
   +}may'
[32]  '  need to edit W2W fns to modify the #s below for your interpreter:' &{+
   +} ''
[33]  '      Native files   : #NTIE, #NUNTIE, #NCREATE, #NSIZE,'
[34]  '                       #NREAD, #NAPPEND, #NRESIZE'
[35]  '      Execution      : #IO (is 1 in W2W)'
[36]  '      Fn manipulation: #FX, #CR'
[37]  '      Object info    : #NL 2, #NL 3'
[38]  '      String search  : a #SS z (','''','abcdbc','''',' #SS ','''','bc'{+
   +},'''',' gives 0 1 0 0 1 0)' & ''
[39]  '  The only # that you probably need to worry about is #SS.  The ISO fn'
[40]  '  ''ssearch'' is provided in case your APL interpreter has nothing {+
   +}better.'
[41]  '  All other #s have probably already been correctly replaced in your '
[42]  '  version of A2A, and you may simply edit them into the fns of W2W.'
[43]  '' & '      Press Enter to continue: ' & z{<-}{quotequad}
[44]  '  How do A2A and W2W interact?' & ''
[45]  '  File F written by:       -->   As read by:  -->     Results in:'
[46]  '  ----------------------------   ----------------     ------------'
[47]  '  sendw F                        getw F               fns and vars'
[48]  '  sendw F                        DEFINEFNS TFREAD F   fns only'
[49]  '  (INSERTFNS ''{del}xxx'') TFWRITE F   getw F               fns only'
[50]  '  (INSERTFNS ''{del}xxx'') TFWRITE F   DEFINEFNS TFREAD F   fns only '{+
   +} & ''
[51]  '  If you have problems with WSFULL or NONCE errors, try splitting the'
[52]  '  ws into smaller parts, or, decomment W2W fns to gain about 20K (in'
[53]  '  apl*plus/pc).' & ''
[54]  '  Please send comments and suggestions to{*filter*} Holt:'
[55]  '  3802 N. Richmond St.  Arlington VA  22207  USA'

[57]  '' & '' & '' & '' & '' & ''
     {del}
---------
     {del}sendw {delta_}ws;v;{delta}f{delta};{delta}Nolo{delta}



[4]   #IO{<-}1 & '' & '   Sending fns and vars to ASCII file  ',{delta_}ws


[7]   GRPA2A{<-}GRPA2A {delta_}OVER 6 5 {shape}'getw getf getv sendwsendfsendv'
[8]   GRPA2A{<-}GRPA2A {delta_}OVER 2 7 {shape}'readme2ssearch'

   +}local stuff
[10]  {delta}Nolo{delta}{<-}{delta}Nolo{delta},' {delta}Nolo{delta} {delta}f{+
   +}{delta} {delta_}Z{delta} {delta_}ws r{delta} k{delta_} i{delta} j{delta}{+
   +} {delta_}v{delta_} {delta_}cn{delta} {delta_}Ok '

[12]  {delta}f{delta}{<-}sendf & v{<-}sendv & {->}(~(''{match}{delta}f{delta}{+
   +})^(''{match}v))/L2
[13]  '' & '   No functions or variables to send.' & '' & {->}Bye


   +}separates fns from vars

[17]  '   All available fns and vars sent to ASCII file ',{delta_}ws & ''
[18]  Bye:'   Please send comments and suggestions to{*filter*} Holt:'
[19]  '   3802 N. Richmond St.  Arlington VA  22207  USA'

     {del}
---------
     {del}F{<-}sendf;k;fn;j{delta}



[4]   k{<-}1 & F{<-}'' & '' & j{delta}{<-}0 & '   > Sending functions:'

[6]   L1:fn{<-}{format}(#NL 3)[k;]~' '

   +}local fns
[8]   {->}(~0{epsilon}{shape}#CR '',({format}fn),'')/Ins

[10]  '      ',({format}fn),' < Skipped: can''t send locked fns.'
[11]  '      ',(({shape}{format}fn){reshape}' '),'   Contact{*filter*} Holt to {+
   +}unlock .AWS fns.'
[12]  {->}End

[14]  Ins:F{<-}F,#TCNL,INSERTFNS '','{del}',fn,''
[15]  j{delta}{<-}j{delta}+1 & '      ',{format}fn
[16]  End:{->}((1{reshape}{shape}#NL 3){>=}k{<-}k+1)/L1

[18]  {->}(0{/=}j{delta})/OK & '      No functions available' & '' & {->}0
[19]  OK:'   > Functions done.' & ''
     {del}
---------
     {del}{delta_}Z{delta}{<-}sendv;k{delta_};i{delta};j{delta};{delta_}v{+
   +}{delta_};{delta_}cn{delta};{delta_}Ok;r{delta}





   +}    Set it up


   +} deblanked name of k{delta_}th var
[8]   {->}(1{epsilon}{delta}Nolo{delta} #SS ' ',({format}{delta_}v{delta_}),'{+


[10]  LV:{delta_}cn{delta}{<-}0{epsilon}1{take}0{reshape}{execute}{format}{+

   +}{delta}=0 if char

[12]  {->}(~0{epsilon}{shape}{shape}{execute}{format}{delta_}v{delta_})/Lnc &{+


   +}            Force rank 0 to rank 1


   +}Numeric ???

[17]  LvC:{->}(~1{epsilon}(('',{format},{execute}{delta_}v{delta_},'')#SS '[%{+

[18]  '      ',{delta_}v{delta_},' < Skipped.  Conflict with [%] separator' &{+
   +} {->}End

[20]  LvN:{delta_}Ok{<-}'[%]',({format}{shape}{execute}{delta_}v{delta_}),'[%{+
   +}]',({delta_}v{delta_})
[21]  {delta_}Ok{<-}{delta_}Ok,'[%]',({format}{delta_}cn{delta}),'[%]',{+
   +}APL2ASCII({format},{execute}{delta_}v{delta_})
[22]  {delta_}Z{delta}{<-}{delta_}Z{delta},{delta_}Ok & {->}(r{delta}=1)/Skip
[23]  '      ',{delta_}v{delta_},' < Rank rank forced to 1 by W2W (was 0).' &{+
   +} {->}End


[26]  End:r{delta}{<-}1 & {->}((1{reshape}{shape}#NL 2){>=}k{delta_}{<-}k{+
   +}{delta_}+1)/L1
[27]  {->}(~{delta_}Z{delta}{match}'')/Bye & '      No variables available' &{+
   +} {->}0
[28]  Bye:'   > Variables done.' & ''
     {del}
---------
     {del}getw {delta_}ws;Z;k;{delta}Nolo{delta}





   +}avoid

   +}GRPA2A
[7]   GRPA2A{<-}GRPA2A {delta_}OVER 6 5 {shape}'getw getf getv sendwsendfsendv'
[8]   GRPA2A{<-}GRPA2A {delta_}OVER 2 7 {shape}'readme2ssearch'
[9]   L1:{delta}Nolo{delta}{<-}'',' ',(,GRPA2A,' '),'',' KEEPUS '
[10]  {delta}Nolo{delta}{<-}{delta}Nolo{delta},' {delta}Nolo{delta} {delta}f{+
   +}{delta} {delta_}Z{delta} {delta_}ws r{delta} k{delta_} i{delta} j{delta}{+
   +} {delta_}v{delta_} {delta_}cn{delta} {delta_}Ok '
[11]  '' & '   Retrieving fns and vars from ASCII file ',{delta_}ws & ''

[13]  Z{<-}TFREAD {delta_}ws


   +}{|}%%%{|}'

[17]  getf '',(k{take}Z),'' & {->}(1{epsilon}Z #SS '{|}%%%{|}')/L2
[18]  '   > No variables in ',{delta_}ws,'.' & ' ' & {->}Bye
[19]  L2:getv '',((5+k){drop}Z),''

[21]  Bye:'   Ok.  WS transfer from ASCII file ','''',{delta_}ws,'''',' done.'
[22]  '   Now, )ERASE all objects in GRPA2A, rename the ws, and )SAVE it.'
[23]  '' & '   Please send comments and suggestions to{*filter*} Holt:'
[24]  '   3802 N. Richmond St.  Arlington VA  22207  USA'

     {del}
---------
     {del}getf Q;z



[4]   '   > Retrieving functions.'
[5]   {->}(~0{epsilon}{shape}Q)/L1 & '      No functions found' & '' & {->}0


   +}names
[8]   '   > Functions done.' & ''
     {del}
---------
     {del}{delta_}v{<-}getv {delta_}vCN;{delta_}sh{delta};namev{delta_};ch{+
   +}{delta}num;{delta_}val{delta};{delta_}v{delta_};{delta_}vCN



[4]   '   > Retrieving variables from file ',{delta_}ws
[5]   {->}(~0{epsilon}{shape}{delta_}vCN)/LVar & '      ','No variables {+
   +}found' & '' & {->}0


[8]   {delta_}vCN{<-}3{drop}{delta_}vCN
[9]   {delta_}sh{delta}{<-}((({delta_}vCN #SS '[%]'){iota}1)-1){take}{delta_}{+
   +}vCN & {delta_}vCN{<-}(3+{shape}{delta_}sh{delta}){drop}{delta_}vCN
[10]  namev{delta_}{<-}((({delta_}vCN #SS '[%]'){iota}1)-1){take}{delta_}vCN {+
   +}& {delta_}vCN{<-}(3+{shape}namev{delta_}){drop}{delta_}vCN
[11]  ch{delta}num{<-}((({delta_}vCN #SS '[%]'){iota}1)-1){take}{delta_}vCN &{+
   +} {delta_}vCN{<-}(3+{shape}ch{delta}num){drop}{delta_}vCN
[12]  {delta_}val{delta}{<-}((({delta_}vCN #SS '[%]'){iota}1)-1){take}{+
   +}{delta_}vCN & {delta_}vCN{<-}({shape}{delta_}val{delta}){drop}{delta_}vCN


   +}numeric?
[15]  LvC:{->}(~1{epsilon}''''{epsilon}{delta_}val{delta})/NQuo

   +}val{delta}
[17]  {delta_}val{delta}[(''''={format}{delta_}val{delta})/{iota}{shape}{+


[19]  NQuo:{execute}({format}namev{delta_}),'{<-}',({format}{delta_}sh{delta}{+
   +}),'{reshape}',''''',({delta_}val{delta}),''''' & {->}End

[21]  LvN:{execute}({format}namev{delta_}),'{<-}',({format}{delta_}sh{delta}){+
   +},'{reshape}',{delta_}val{delta}

[23]  End:'      ',{format}namev{delta_} & {->}(~0{epsilon}{shape}{delta_}{+
   +}vCN)/LVar
[24]  Bye:'   > Variables done.' & ''
     {del}
---------
     {del}z{<-}Y ssearch X





[6]   z{<-}^{slashbar}({neg}1+{iota}{shape}X){rotate}X{jot}.=Y
     {del}
=====[  End of W2W ASCII representation ]==========================



Thu, 15 Jan 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. APL Transliteration & WS Transfer

2. apl ws transfer

3. Pferdemarkt.ws informiert! Newsletter 03/2003 http://www.pferdemarkt.ws

4. .WS and .SF encryption

5. Loading ws for APLX

6. EACH and WS FULL (was: Manugistics control strux example)

7. WS FULL

8. Looking for good APL encrytion algorithms for WS proctection

9. UN: ISIAPL WS UTILITIES

10. evaluate deselects in ws - possible to disable?

11. Ampere WS-1

12. Ampere WS-1

 

 
Powered by phpBB® Forum Software