That's all correct, I believe.

--LX runs a command or expression. To be fair, an expression isn't useful.
However, you can write --LX ')copy myws' or --LX ')load myws' to start up
APL with a particular workspace. That's useful.

If you load a workspace as above, and that workspace ends contains a call
to ⎕ARG to parse out the args after '--' (which are the args reserved to
the APL program, rather than to APL itself), then the program can do
different things depending upon the command line.


My application is as follows:

$ aplwrap -s 17 -w 1220 -h 710 \
    --name "GNU APL `apl --version | awk '/Version/ { print $4 }'`" \
    --LX ')COPY pkg' \
    -- --pkg-manifest system-1

This copies the pkg workspace (my APL package manager) into APL. The
package manager then finds the '--pkg-manifest system-1' option, which
causes it to read a file named system-1 from the package manager's
directory and load all of the packages listed in the system-1 file.



The combination of --LX '...' and -- ... can have other uses, of course.
Say you build a turnkey system that requires per-customer or per-seat
customization. One way to do this is to load the system using --LX and pass
it runtime options following the -- on the command-line. Wrap the whole
command line in a shell script or alias, and you have a much
simpler-looking command for the end-user. :)




On Wed, Aug 13, 2014 at 4:30 PM, Chris Moller <mol...@mollerware.com> wrote:

>  I'm not sure I get it...
>
> aplwrap -- --LX "9-8"
>
> opens a window containing the result and
>
>       ⎕ARG
>
> yields
>
>  apl --noColor --rawCIN -w 500 --silent --LX 8-9
>
>
>  aplwrap -- -f plotsincos
>
> runs the script.  Is there something I'm missing?
>
>
>
>
> On 08/13/14 18:16, David Lamkins wrote:
>
> Sorry... I didn't explain the command-line stuff completely and forgot a
> part.
>
> Here's a patch (attached).
>
>
> On Wed, Aug 13, 2014 at 2:22 PM, Chris Moller <mol...@mollerware.com>
> wrote:
>
>>
>>    - Added the command-line stuff.
>>    - Fixed the assign arrow and branch arrow transposition.
>>
>> Both pushed to github.
>>  I'll look at the quad-PW stuff
>>
>>
>> On 08/13/14 16:36, David Lamkins wrote:
>>
>>    Here's a feature request:
>>
>>  - Provide a means to pass command-line arguments to APL.
>>
>>  At the very least, I'd like to be able to do something like:
>>
>>  $ aplwrap -s 16 -- --my-option 1234
>>
>>  where everything from -- onward would be tacked onto the end of
>> aplwrap's apl_argv[].
>>
>>  That way, everything after the -- would be available via quad-ARG for
>> consumption by the APL program.
>>
>>
>>
>
>
> --
>  "The secret to creativity is knowing how to hide your sources."
>    Albert Einstein
>
>
> http://soundcloud.com/davidlamkins
> http://reverbnation.com/lamkins
> http://reverbnation.com/lcw
> http://lamkins-guitar.com/
> http://lamkins.net/
> http://successful-lisp.com/
>
>
>


-- 
"The secret to creativity is knowing how to hide your sources."
   Albert Einstein


http://soundcloud.com/davidlamkins
http://reverbnation.com/lamkins
http://reverbnation.com/lcw
http://lamkins-guitar.com/
http://lamkins.net/
http://successful-lisp.com/

Reply via email to