Re: [Bug-apl] A modest proposal: user-defined commands

2014-05-06 Thread David Lamkins
Thank you. One more thing: ]usercmd definitions probably shouldn't survive )load and )clear. On May 6, 2014 10:57 AM, "Juergen Sauermann" wrote: > Hi David. > > thanks. Removing first and printing then was maybe not so smart. SVN 251. > > /// Jürgen > > > On 05/06/2014 06:47 PM, David B. Lamkin

Re: [Bug-apl] A modest proposal: user-defined commands

2014-05-06 Thread Juergen Sauermann
Hi David. thanks. Removing first and printing then was maybe not so smart. SVN 251. /// Jürgen On 05/06/2014 06:47 PM, David B. Lamkins wrote: Thank you, Jürgen! That'll do what I need. FYI, I'm seeing a bit of cruft on the REMOVE: ]usercmd remove ]foo User-defined command \371\

[Bug-apl] A sample application of ]usercmd

2014-05-06 Thread David B. Lamkins
Here's a transcript of the package manager's UI operating as a ]usercmd named ]pkg: ]pkg Commands:help [command] packages depends package-name metadata package-name load package-name

Re: [Bug-apl] A modest proposal: user-defined commands

2014-05-06 Thread David B. Lamkins
There's also a bit of confusion in the handling of remove. In this case, ]pkg is a usercmd: ]usercmd remove ]foo User-defined command ]pkg removed. On Tue, 2014-05-06 at 17:07 +0200, Juergen Sauermann wrote: > Hi David, Peter, > > I have added a simple facility for adding user defined

Re: [Bug-apl] A modest proposal: user-defined commands

2014-05-06 Thread David B. Lamkins
Thank you, Jürgen! That'll do what I need. FYI, I'm seeing a bit of cruft on the REMOVE: ]usercmd remove ]foo User-defined command \371\217\212\277\200 (Tested in both gnu-apl-mode [as above] and in a terminal. Only difference is that the terminal shows unprintable `?' glyphs instead o

Re: [Bug-apl] A modest proposal: user-defined commands

2014-05-06 Thread Juergen Sauermann
Hi Elias, just loop around user_commands: *loop(u, user_commands.size()) { user_commands[u].prefix ... // the command user_commands[u].apl_function ... // the APL function called ... }* in SVN 250 you have to add *public: *before the declaration of user_commands

Re: [Bug-apl] A modest proposal: user-defined commands

2014-05-06 Thread Elias Mårtenson
Right now I'm using the .def files to retrieve the list of ]-commands (for tab-expansion). Clearly this will not be enough if there is a facility to add new ones at runtime. What method should I use to get a full list of these commands from within a native function? Regards, Elias On 6 May 2014

Re: [Bug-apl] A modest proposal: user-defined commands

2014-05-06 Thread Juergen Sauermann
Hi David, Peter, I have added a *simple* facility for adding user defined commands (the command being implemented in APL (possibly as native function)). I will no go as far as described in Dyalog's document below, however. This could also be used for experimental commands or commands "missing