Workspace File Extensions

This topic is specifically for discussions on the new APL64 Project currently in development. This topic is open for all to browse. However, to post, one must have a registered account on the APLDN forum only available to APL+Win licensee under a current APL+Win Subscription.

Moderators: Tech Support, phpbb_admin

Workspace File Extensions

Postby Davin Church » October 16th, 2018, 1:54 pm

The Q&A document covers the question "Will the APL64 Project Support Workspace File Extensions?" But it seems to me that reserving the .W3 extension for APL+Win workspaces, while not a problem, is not really necessary either. Shouldn't you be able to detect the difference in workspace format by pre-reading a code byte somewhere out of the file to tell you which kind of workspace it is? If so, then you shouldn't need to impose any restrictions on this.
Davin Church
 
Posts: 651
Joined: February 24th, 2007, 1:46 am

Re: Workspace File Extensions

Postby Ajay Askoolum » October 16th, 2018, 3:05 pm

If you want APL to launch and open a file with extension W3, that is, use file association then reserved extensions are vital.

ZIP files have a pattern at the beginning of the file, they can be renamed to have any extension. However, unless that extension is zip, double clicking on it in File Explorer will not open and show the individual files within it, right-click on it will not show Extract All as an option.
Ajay Askoolum
 
Posts: 884
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Re: Workspace File Extensions

Postby Davin Church » October 16th, 2018, 3:21 pm

Try this... natively read the first 4-byte integer out of a .W3 file. That is a "workspace format version number" for that workspace. It matches the format of the interpreter used to )SAVE that workspace. This is how APL knows to produce INCOMPATIBLE WS and OBSOLETE INTERNAL WS REPRESENTATION UPDATED messages. In the latter case, it uses that code to determine how to read the workspace from an old format and convert it into the current format.

All they'd have to do is invent new codes for APL64 that it understood to be its own, then it would know how to read and interpret the file regardless of the extension.

OTOH, if you're clicking on a .W3 file from Windows Explorer, then Windows needs to know which version of APL (or other program) to use (by default) to open it. But that's not APL's problem.
Davin Church
 
Posts: 651
Joined: February 24th, 2007, 1:46 am

Re: Workspace File Extensions

Postby Ajay Askoolum » October 16th, 2018, 3:31 pm

Windows uses the last file association, executed either by user action or by an msi installer. It does not read any part of a file to determine the executable it should use.

If you installed APL+Win v16 AFTER v18, file association will have v16 as the association for *.w3 even when you saved *.w3 with v18.
Ajay Askoolum
 
Posts: 884
Joined: February 22nd, 2007, 2:16 am
Location: United Kingdom

Re: Workspace File Extensions

Postby Davin Church » October 16th, 2018, 4:13 pm

I'm trying to say that Windows' file associations aren't important to APL. APL can )LOAD the workspace appropriately regardless of the extension. I don't consider Windows' file associations to be a part of what APL can and cannot do. I think that using the .WS64 extension by default is great, and will keep things nicely separated, but that APL64 shouldn't prohibit use of .W3 if the user wants to use it.
Davin Church
 
Posts: 651
Joined: February 24th, 2007, 1:46 am


Return to APL64 Project

Who is online

Users browsing this forum: No registered users and 1 guest

cron