Moving code between APL versions

General APL language issues

Moving code between APL versions

Postby paulmansour on Wed Aug 08, 2018 2:36 pm

What is the current state of the art of moving code between Dyalog versions?

Say I want to take a namespace full of functions in a V17 workspace and load them up in, say V11 or V13? (Lets assume as far back as the existence of namespaces and dfns.)

I assume the code must be written out as text and read back in and fixed.

There is ]In and ]Out (didn't have much luck here, put I did not pursue too hard), there is SALT and Snap, is that they way to go?

Or is there some other simple utility or technique I am overlooking?
paulmansour
 
Posts: 420
Joined: Fri Oct 03, 2008 4:14 pm

Re: Moving code between APL versions

Postby Morten|Dyalog on Thu Aug 09, 2018 7:10 am

]in and ]out should be the way to go, although to be honest they have mostly been tested for moving code to Dyalog from APL systems with an )OUT system command. Perhaps you have some sort of native Dyalog construct that defeats them. If you are able to send me your workspace, I can take a look at it.

I often get away with:

Code: Select all
'file' ⎕FCREATE 1
(⎕CR¨⎕NL -3 4) ⎕FAPPEND¨ 1
⎕FUNTIE 1
⍝ and then on the other system
'file' ⎕FTIE 1
⎕FX¨⎕FREAD¨1,¨⍳--/2↑⎕FSIZE 1
⎕FUNTIE 1
User avatar
Morten|Dyalog
 
Posts: 453
Joined: Tue Sep 09, 2008 3:52 pm

Re: Moving code between APL versions

Postby paulmansour on Thu Aug 09, 2018 2:12 pm

Morten thanks.

That actually does the trick for V17 back to V14.0 at least. (I didn't go back further). I had assumed the component file would have undergone a lot of incompatible changes since then. Nice that works.
paulmansour
 
Posts: 420
Joined: Fri Oct 03, 2008 4:14 pm


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest