Re: [Bug-apl] box and unbox that work uniformly and without exceptions

2014-05-17 Thread Blake McBride
I tried the ravel everything method, but that lead to APL2 disclosing a vector into a matrix APL2 fought me touth and nail. I gave up and wrote box/unbox. --blake On Sat, May 17, 2014 at 11:18 PM, Frederick H. Pitts wrote: > Blake, > > Thanks for the detailed response. I unders

Re: [Bug-apl] Emacs lib loaded automatically

2014-05-17 Thread Elias Mårtenson
In implementing support for this, I realise that that I'm breaking backwards compatibility. That is, the latest version of gnu-apl-mode will not be able to control an older version of GNU APL. When were you planning to release GNU APL 1.4? I think it might be needed to make sure everything is in s

[Bug-apl] A question about ⎕EA and ⎕EC

2014-05-17 Thread David B. Lamkins
I want to make sure that I correctly understand ⎕EA and ⎕EC. Should these be able to clean up after failed execution of a defined function? What I'm seeing is that ⎕EA and ⎕EC perform as expected given an expression of variables and primitive functions (including expressions that fail to execute)

Re: [Bug-apl] box and unbox that work uniformly and without exceptions

2014-05-17 Thread Elias Mårtenson
That bring be back to my previous argument that the APL designers made a mistake when they defined 'a' to be a character instead of a single-element array. It's inconsistent, and leads to ugly code where all single-character-strings have to be escaped as such: (,'a'), or as you put it: (1⍴'a') whic

Re: [Bug-apl] box and unbox that work uniformly and without exceptions

2014-05-17 Thread Frederick H. Pitts
Blake, Thanks for the detailed response. I understand the issue more clearly now. I think I would ask the user to reshape scalar arguments to vectors (e.g. (1⍴'k')(1⍴'v')). But then, that is as onerous as having to remember to use box everywhere its required. Regards, Fred On

Re: [Bug-apl] Emacs apl mode broken?

2014-05-17 Thread David B. Lamkins
I tripped on that this morning. Temporary workaround while waiting for the patch: gnu-apl-interactive.el, line 234: change "--emacs" to "--emacs foo" That was enough to get it going again on my systems. On Sun, 2014-05-18 at 11:07 +0800, Elias Mårtenson wrote: > Yes. Known problem. The interfac

Re: [Bug-apl] box and unbox that work uniformly and without exceptions

2014-05-17 Thread Blake McBride
Lastly, ⍴(box 'abc'),box 'def' ┌→┐ │2│ └─┘ Blake

Re: [Bug-apl] box and unbox that work uniformly and without exceptions

2014-05-17 Thread Blake McBride
Oh, and I should point out this too: ⍴(box 'k'),box 'v' ┌→┐ │2│ └─┘ ⍴'kv' ┌→┐ │2│ └─┘ Blake On Sat, May 17, 2014 at 9:59 PM, Blake McBride wrote: > Greetings, > > I suppose my examples were meant to show that my box and unbox function as > I hoped, and that they functioned consi

Re: [Bug-apl] Emacs apl mode broken?

2014-05-17 Thread Blake McBride
Thanks. Your APL mode for Emacs is hard to live without! Blake On Sat, May 17, 2014 at 10:07 PM, Elias Mårtenson wrote: > Yes. Known problem. The interface has changed and I will fix it today. > > Regards, > Elias > On 18 May 2014 11:05, "Blake McBride" wrote: > >> Greetings, >> >> With the

Re: [Bug-apl] Locked functions do not stay locked after )LOAD

2014-05-17 Thread Blake McBride
Works great. Thanks! Blake On Sat, May 17, 2014 at 9:17 AM, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi Blake, > > thanks, fixed in SVN 270. > > Please note that ⎕AT is not standard and that the attributes other > than "locked" will not be supported by GNU APL. > > Note als

Re: [Bug-apl] Emacs apl mode broken?

2014-05-17 Thread Elias Mårtenson
Yes. Known problem. The interface has changed and I will fix it today. Regards, Elias On 18 May 2014 11:05, "Blake McBride" wrote: > Greetings, > > With the latest version of GNU APL and Emacs APL mode, I now get: > > Process apl exited abnormally with code 2 > > This worked fine until I up

[Bug-apl] Emacs apl mode broken?

2014-05-17 Thread Blake McBride
Greetings, With the latest version of GNU APL and Emacs APL mode, I now get: Process apl exited abnormally with code 2 This worked fine until I updated to the latest GNU APL. I tried rebuilding Emacs mode native library, but it didn't help. Thanks. Blake

Re: [Bug-apl] box and unbox that work uniformly and without exceptions

2014-05-17 Thread Blake McBride
Greetings, I suppose my examples were meant to show that my box and unbox function as I hoped, and that they functioned consistently with all data configurations. I wasn't intending to point out the benefits. I suppose I thought that might be clear from my earlier emails. In response to you, ho

Re: [Bug-apl] quad-FX

2014-05-17 Thread David B. Lamkins
BTW, I actually have a use for redefining a pendent function. The package manager may unload itself by ⎕ex-ing all of its names. It does this, of course, while the main package manager function is pendent. If that's all I did, then the main function would be missing when I called the ]pkg user co

Re: [Bug-apl] quad-FX

2014-05-17 Thread David B. Lamkins
Looks good. Thank you. On Sat, 2014-05-17 at 20:10 +0200, Juergen Sauermann wrote: > Hi David, > > I have changed the handling of function pending on the SI. You can now > ⎕FX functions if the pending function name is localized. This is, I believe, > what the standard tries to say ("locally-erasa

[Bug-apl] ]usercmd patch attached

2014-05-17 Thread David B. Lamkins
Here's a patch to let ]usercmd accept restatement of an existing user command definition so long as the associated function name and mode are identical. ]usercmd ]foo foo 1 User-defined command ]foo installed. ]usercmd ]foo foo 1 ⍝ without the patch there'd be a BAD COMMAND r

Re: [Bug-apl] quad-FX

2014-05-17 Thread Juergen Sauermann
Hi David, I have changed the handling of function pending on the SI. You can now ⎕FX functions if the pending function name is localized. This is, I believe, what the standard tries to say ("locally-erasable") but does not go as far as IBM. I guess in practice this will be confusing anyhow. SV

Re: [Bug-apl] Emacs lib loaded automatically

2014-05-17 Thread Elias Mårtenson
Fair enough. I'll implement this tomorrow and will let you know how it went. Regards, Elias On 17 May 2014 22:51, Juergen Sauermann wrote: > Hi Elias, > > SVN 271. > > I think emacs mode is special because it survives )LOAD and is not visible > on APL level. > > If we would allow that in genera

Re: [Bug-apl] Emacs lib loaded automatically

2014-05-17 Thread Juergen Sauermann
Hi Elias, SVN 271. I think emacs mode is special because it survives )LOAD and is not visible on APL level. If we would allow that in general then troubleshooting could become rather tricky because you cannot easily figure the state of the interpreter. By enforcing the use native functions

Re: [Bug-apl] Locked functions do not stay locked after )LOAD

2014-05-17 Thread Elias Mårtenson
Regardless of the thinking behind the GPL, I don't see the benefit of ever locking or "hiding" a function, ever. In fact, I can't think of any other programming language that has a feature like that. Regards, Elias On 17 May 2014 22:17, Juergen Sauermann wrote: > Hi Blake, > > thanks, fixed in

Re: [Bug-apl] Locked functions do not stay locked after )LOAD

2014-05-17 Thread Juergen Sauermann
Hi Blake, thanks, fixed in SVN 270. Please note that ⎕AT is not standard and that the attributes other than "locked" will not be supported by GNU APL. Note also that ⎕CR shows an empty result when a function is locked, while 10 ⎕CR and )DUMP display it even if locked. This is because I believe

Re: [Bug-apl] Emacs lib loaded automatically

2014-05-17 Thread Elias Mårtenson
I am OK with this, and it would certainly fill all current needs for the Emacs mode. I personally feel that this should be more generic (ability to load more than one library; decoupling it from the --emacs flag). The decision is yours though, and the Emacs mode works equally well regardless of wh

Re: [Bug-apl] Emacs lib loaded automatically

2014-05-17 Thread Juergen Sauermann
Hi Elias, my proposal would be this: 1. we give the --emacs command line option an argument. So apl would be started like: *apl --emacs emacs_arg* 2. the libemacs library provides a function emacs_start() with two char * arguments: *void emacs_start(const char * emacs_arg, const c