[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] )DUMP now creates valid HTML files

From: Juergen Sauermann
Subject: Re: [Bug-apl] )DUMP now creates valid HTML files
Date: Thu, 28 May 2015 17:54:07 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi Louis,

valid point. I was thinking of that. but was not really sure if it is a good idea or not.

One thought was that the old format does anyhow require a modification of the .apl file (changing file permission to 'executable')
and that uncommenting the first line of the file would be an acceptable extra effort.

Another thought was that most likely very few (if any) people are using the old feature and that creating and maintaining multiple
formats in parallel could be worse than a break in compatibility in the long run. The old format is, by the way, still supported by
)LOAD so the change only affects newly )DUMPed workspaces.

Another flaw in the old format was that the apl interpreter in the first line was the one that had written the file.  That is normally
OK but can become problematic if you have - like myself - multiple versions of GNU APL on your machine. Then you mat start
the wrong one by mistake without noticing it. That happened to me a few times. So by commenting out the first line, the
user is forced to think about that aspect.

If anybody has problems with the new format then I can add an argument to )DUMP, but the new format should be the default.

/// Jürgen

On 05/28/2015 02:01 PM, Louis Chretien wrote:
An excellent idea, but instead of modifying the existing behavior of )DUMP, maybe you could have created an )HDUMP or )HTMLDUMP command, so as not to change existing workflows?

Just a thought…

On 2015-05-27, at 09:15, Juergen Sauermann <address@hidden> wrote:


I have changed GNU APL to accept (=ignore) HTML tags at the beginning of an .apl file.

I also changed the )DUMP command to create a few HTML tags at the beginning and at the end of an .apl file.

The net effect of these changes is that .apl files can now be published on the web or directly displayed as APL code
in browsers without  any changes. Once opened in the browser (say: firefox) you can also generate PDF or Postscript files
(using File→Print→Print-to-file in firefox).

For this to work, I had to (HTML-) comment out the first line of the .apl file. It used to be something like:

    #!/usr/local/bin/apl --script

but is now something like:

    <!-- #!/usr/local/bin/apl --script -->

So if you want to invoke an .apl file directly (i.e. without starting GNU APL and )LOADing the file) or as CGI script then you need
to remove the <!-- and -->  (and, as before, change the file permission to 'executable').

SVN 632

/// Jürgen

Louis Chrétien

reply via email to

[Prev in Thread] Current Thread [Next in Thread]