Re: [Bug-apl] Each bug

2014-07-13 Thread Elias Mårtenson
Interesting. Given the following definition of pp: ∇Z←X pp Y ⎕←'comparing' ⎕←' X=' (8⎕CR X) ⎕←' Y=' (8⎕CR Y) Z←X≡Y ∇ I get the following output: *(⊂'foo') pp¨ (,⊂'foo')* comparing X= ┌─┐ │┌→──┐│ ││foo││ │└───┘│ └∊┘ Y= ┌→

[Bug-apl] Each bug

2014-07-13 Thread Blake McBride
GNU APL: (⊂'myfile')≡¨⊂'myfile' 1 (⊂'myfile')≡¨,⊂'myfile' 0 IBM APL 2 returns 1 in both cases. I had a vector I was using. I got one result when I had 2 or more elements, and another result when there was only one element - even though it was still a vector. IBM's result is consi

Re: [Bug-apl] Formal format for function documentation

2014-07-13 Thread Elias Mårtenson
I like this idea a lot. Having the comment inside the function allows you to edit the text when using the Emacs function editor. If the comment is outside, it won't be part of the function per se. Secondly, as David pointed out, one can already access the comment from APL if it is inside the funct

Re: [Bug-apl] Formal format for function documentation

2014-07-13 Thread David B. Lamkins
Common Lisp has doc strings as part of the language definition. There's a mechanism defined as part of the language to read the doc string and stash it in the function definition so that the appropriate access functions can find it. There's really no equivalent to this in APL. A function definion

[Bug-apl] ⎕ES shouldn't return a value

2014-07-13 Thread Blake McBride
x←⎕ES'' works on GNU APL. It gives a VALUE ERROR in IBM APL 2. ⎕ES should not return a value. Thanks. Blake

Re: [Bug-apl] Formal format for function documentation

2014-07-13 Thread Kacper Gutowski
On 2014-07-14 00:01:13, Elias Mårtenson wrote: > Most modern (and some not-so-modern) languages have a standard way of > attaching > documentation to functions and other symbols. (...) I think the most natural way to describe a function is simply by starting function *body* with a comment: ∇ Z←

Re: [Bug-apl] ISO Component File API preview

2014-07-13 Thread Juergen Sauermann
Hi, sorry for answering that late, but I was busy with a major restructuring of GNU APL (APserver/shared variables). That created a bit of an headache but is looking fine now. Blake has asked for my opinion earlier. I am not really a database specialist though. The last database I worked with

[Bug-apl] ⎕ES/⎕EA bug

2014-07-13 Thread Blake McBride
GNU APL: )CLEAR CLEAR WS ∇test [1] '⎕ES''Hello'''⎕EA'3÷0' [2] ∇ test Hello '⎕ES'Hello'' ⎕EA '3÷0' ^^ IBM APL 2: )CLEAR CLEAR WS ∇TEST [1] '⎕ES''HELLO'''⎕EA'3÷0' [2] ∇ TEST HELLO TEST ^^ The error message shown

Re: [Bug-apl] Formal format for function documentation

2014-07-13 Thread Elias Mårtenson
And here I am, replying to myself instead of actually thinking through everything before posting. Oh well... I'd say that I personally prefer the last form. The reason for that is that this actually translates to one-line lambda functions quite nicely. Here's the one-line version of the last examp

[Bug-apl] Formal format for function documentation

2014-07-13 Thread Elias Mårtenson
Most modern (and some not-so-modern) languages have a standard way of attaching documentation to functions and other symbols. For example, in Java documentation looks like this: */*** * * Example method that adds 1 to its argument. The documentation* * * is a normal comment that comes