APL workspace

From Just Solve the File Format Problem
Jump to: navigation, search
File Format
Name APL workspace
Ontology
Extension(s) .apl, .atf, .dws, .dxf
Wikidata ID Q28600228

An APL workspace is a collection of APL programming language objects such as functions (programs) and variables (scalars, vectors, and matrices). The workspace is the basic thing that is loaded, saved, and transferred in order for APL programs to be used or developed, serving as an encapsulated app and dataset for end-users and a project file for developers.

Traditionally, APL in its mathematical purity is kept apart from such barbarisms as computer filesystems, instead doing all of its data access through APL functions operating on variables. The earliest versions of APL had no ability to read or write data files, and the pragmatic necessity of system commands such as ")LOAD" and ")SAVE" for loading and saving workspaces (to/from a computer filesystem whose details were hidden from the user) were at best a necessary evil, such status being signalled by the use of a syntax whose ugly mismatched parenthesis telegraphs the fact that the command was not part of the pure elegance of true APL.

Later versions of APL added some file capabilities, along with inter-process communication, through the mechanism of "shared variables".

File formats

Unfortunately, there is no single standard for the files by which APL workspaces are stored. The user, shielded from the low-level system details by the high-level APL constructs, is kept blissfully ignorant of how the workspaces are stored and retrieved (on old mainframe APL implementations, perhaps it was to/from a reel of magnetic tape!) until such time as it becomes necessary or desirable to port them over to a different platform, at which time it becomes an issue that the manner of storage was highly specific to the platform and APL implementation on which the workspace originated.

Various transfer formats and utilities have been developed to solve this problem, encoding the APL objects in a number of different ways. The odd APL code page full of special characters poses a difficulty for text-file-based transfer formats; although Unicode does include those characters, many systems lack fonts supporting them. An "APL-ASCII" format was devised which encodes the characters in human-understandable form with sequences using curly braces and abbreviations like "del" for the Del character.

Some of the formats for storing or transferring APL workspaces use the extensions .apl, .atf, .dws, and .dxf, but there are probably others.

Saving of individual APL functions in character form was sometimes done using the system function ⎕CR (canonical representation), which allowed APL functions to be stored or transmitted in text form in places where direct transmission of workspaces was not available.

More information about files by extension

  • .apl: Apparently used in some APL implementations, but also used for a number of other file types unrelated to the APL programming language.
  • .atf: APL Transfer File format; somewhat standardized transfer format dating back to 1980s
  • .dws: Native format of Dyalog APL workspaces (for Windows)
  • .dxf: Dyalog variant of APL Transfer File format

References and Resources

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox