[Bug-apl] ⎕←... with boxing on not affected

2016-03-05 Thread Louis de Forcrand
I already mentioned this is a thread about FILEIO; ]BOXING 2 (1 2)(3 4)(5 (6 7)) .→--. .→--. .→--. |1 2| |3 4| |5 .→--.| '---' '---' | |6 7|| | '---'| '∊--' ⎕←(1 2)(3 4)(5 (6 7)) 1 2 3 4 5 6 7 Good luck, Louis

Re: [Bug-apl] working with )HOST

2016-03-05 Thread Louis de Forcrand
Correction; to feed it a var, simply catenate the file name like: FILE←¯1↓‘)HOST cat ‘ , filename←’relative_or_absolute/path/to/blablabla.txt’ Keep in mind your current dir is the one you started GNU APL from, so it can change. Using ~/… or an absolute path is probably safer. Louis > On 06 Mar 20

Re: [Bug-apl] working with )HOST

2016-03-05 Thread Louis de Forcrand
I am not very good with files and such, but from what I understand: ⎕←T←⊃¯1↓⍎')HOST date' Sun Mar 6 01:11:48 CET 2016 ⍴T 2 28 So you can save the result of )HOST in a variable if you use ⍎. To feed it a var, I would try something like: ]BOXING 2 ⎕←FILE←⍎')HOST cat test.

Re: [Bug-apl] 30 ≢ 30 ?

2016-03-05 Thread Louis de Forcrand
(,30)≡⍴'Content-Disposition: form-data’ 1 Don’t forget; the result of ⍴ is always a vector! Louis > On 06 Mar 2016, at 01:01, > wrote: > > ⍴'Content-Disposition: form-data'

[Bug-apl] 30 ≢ 30 ?

2016-03-05 Thread alexweiner
hi bug-apl,why are these not exactly equal:  ⍴'Content-Disposition: form-data'╔══╗║30║╚══╝  30╔══╗║30║╚══╝  30≡⍴'Content-Disposition: form-data'╔═╗║0║╚═╝-Alex

Re: [Bug-apl] indexing of the array

2016-03-05 Thread Juergen Sauermann
Hi, so Dyalog APL behaves differently than IBM APL2. In such conflict cases GNU APL almost always follows IBM APL2. /// Jürgen On 03/05/2016 05:20 PM, Alexey Veretennikov wrote: Hi, I've just checked, Dyalog AP

Re: [Bug-apl] ⎕fio

2016-03-05 Thread Christian Robert
right ! It was late ... On 2016-03-05 08:14, Kacper Gutowski wrote: On Sat, Mar 5, 2016 at 6:45 AM, Christian Robert wrote: [0] z←Execute cmd;⎕io;fh [7] Fini: ⎕FIO[25] fh [8] ⊃⊃z (...) I do not understand why it repeat the result twice. one via stdout and one via boxing as I can guess.

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Louis de Forcrand
To add to the confusion, while ( {+⌿ ÷ ≢} y) ≡ ( +⌿y) ÷ ≢y (x {+⌿ ÷ ≢} y) ≡ (x+⌿y) ÷ x≢y whatever that does. I completely agree, it’s quite obscure, especially if one is not accustomed to tacit definition. This by the way is a fork, and is basically a way to avoid parentheses. M

Re: [Bug-apl] indexing of the array

2016-03-05 Thread Alexey Veretennikov
Hi, I've just checked, Dyalog APL returns exactly what you are expecting from it: 2 a[1] 2 b←⍳5 9 8 b 9 8 1 2 3 4 5 9 8 b[2] 8 Elias Mårtenson writes: > On 5 March 2016 at 19:12, Juergen Sauermann > wrote: > > > Hi Alexey, > > the IBM APL2 binding rules say

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Elias Mårtenson
On 5 March 2016 at 23:28, Louis de Forcrand wrote: > That would be a great idea. However, it would indeed take not only quite a > bit of > time to set up, but would also need constant checking to make sure the > updates > in the main branch don’t conflict with additions. > While I just said that

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Louis de Forcrand
That would be a great idea. However, it would indeed take not only quite a bit of time to set up, but would also need constant checking to make sure the updates in the main branch don’t conflict with additions. While I just said that I believe the main branch should probably concentrate on the sta

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Elias Mårtenson
On 5 March 2016 at 23:09, Louis de Forcrand wrote: > While talking about features to add, instead of introducing a new function > header > style, IMHO a new local assignment function would be more useful. > For example, instead of typing > ∇Z←X F Y;A;B;C > to declare local variables, instead one

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Louis de Forcrand
Then again, I feel the goal of GNU APL is really to implement a complete, sturdy, and (eventually) fast version of the standard. If some extensions are implemented, then why not implement all of them? If Jürgen prefers to polish off an exact copy of the standard before adding features, then let’

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Louis de Forcrand
While talking about features to add, instead of introducing a new function header style, IMHO a new local assignment function would be more useful. For example, instead of typing ∇Z←X F Y;A;B;C to declare local variables, instead one would simply type ∇Z←X F Y and then assign varia

Re: [Bug-apl] ⍋ on complex data

2016-03-05 Thread Louis de Forcrand
Hmm. In J they are sorted first by real part, then by imaginary part. Louis > On 05 Mar 2016, at 15:46, Elias Mårtenson wrote: > > On 5 March 2016 at 20:12, Alexey Veretennikov > wrote: > > Complex numbers are incomparable in mathematical sense. In Dyalog

Re: [Bug-apl] ⍋ on complex data

2016-03-05 Thread Elias Mårtenson
On 5 March 2016 at 20:12, Alexey Veretennikov wrote: Complex numbers are incomparable in mathematical sense. In Dyalog APL > this leads to DOMAIN ERROR however. This is the intended behaviour in GNU APL as well. This can be seen in the function Bif_F12_SORT::sort(): loop(bz, len_BZ)

Re: [Bug-apl] indexing of the array

2016-03-05 Thread Elias Mårtenson
On 5 March 2016 at 19:12, Juergen Sauermann wrote: > Hi Alexey, > > the IBM APL2 binding rules say that [] binds stronger than vector notation > (IBM APL2 > language reference page 34). That is, > > *100 200[1] *is* 100 (200[1])* > > IBM APL2 behaves in the same way as GNU APL. > At first I wa

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Elias Mårtenson
On 5 March 2016 at 19:29, Juergen Sauermann wrote: IMHO a language does not get any better if it provides > different syntactic constructs for (almost) the same thing. The complexity > of the > language is being increased without a noticeable benefit. I would also > claim > that the best language

Re: [Bug-apl] ⎕fio

2016-03-05 Thread Kacper Gutowski
On Sat, Mar 5, 2016 at 6:45 AM, Christian Robert wrote: > [0] z←Execute cmd;⎕io;fh > [7] Fini: ⎕FIO[25] fh > [8] ⊃⊃z (...) > I do not understand why it repeat the result twice. one via stdout and one > via boxing as I can guess. The function returns z as indicated in its header, but before d

Re: [Bug-apl] ⍋ on complex data

2016-03-05 Thread Alexey Veretennikov
Hi, Complex numbers are incomparable in mathematical sense. In Dyalog APL this leads to DOMAIN ERROR however. Louis de Forcrand writes: > Grade-up on complex data yields nothing for me: > > J←0J1 1J0 1J1 ¯1J2 > ⍋J > ⍴⍋J > ⍴⍴⍋J > J[⍋J] > ⍴J[⍋J] > ⍴⍴J[⍋J]

Re: [Bug-apl] indexing of the array

2016-03-05 Thread Alexey Veretennikov
Thanks for clarification! Juergen Sauermann writes: > Hi Alexey, > > the IBM APL2 binding rules say that [] binds stronger than vector notation > (IBM APL2 > language reference page 34). That is, > > 100 200[1] is 100 (200[1]) > > IBM APL2 behaves in the same way as GNU APL. > > /// Jürgen > >

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Alexey Veretennikov
Hi, I believe what in this particular case the syntaxic sugar makes sense since the original way of doing it (explicitely introducing local variables and using destructive bind) is a drawback rather than benefit, and looks like was blindly following the concept of having only 2 arguments of a func

Re: [Bug-apl] Feature suggestion: multiple function arguments

2016-03-05 Thread Juergen Sauermann
Hi Alexey, as Christian has pointed out, the IBM APL2 equivalent of Dyalog's ∇multi(a1 a2 a3) is: ∇multi a (a1 a2 a3)←a IMHO a language does not get any better if it provides different syntactic constructs

Re: [Bug-apl] ⍋ on complex data

2016-03-05 Thread Louis de Forcrand
⍒J doesn’t work either, for obvious reasons. > On 05 Mar 2016, at 12:23, Louis de Forcrand wrote: > > Grade-up on complex data yields nothing for me: > > J←0J1 1J0 1J1 ¯1J2 > ⍋J > ⍴⍋J > ⍴⍴⍋J > J[⍋J] > ⍴J[⍋J] > ⍴⍴J[⍋J] > 3=⍴⍋J > > No empty lines,

[Bug-apl] ⍋ on complex data

2016-03-05 Thread Louis de Forcrand
Grade-up on complex data yields nothing for me: J←0J1 1J0 1J1 ¯1J2 ⍋J ⍴⍋J ⍴⍴⍋J J[⍋J] ⍴J[⍋J] ⍴⍴J[⍋J] 3=⍴⍋J No empty lines, nothing. Literally just nothing. Thanks, Louis

Re: [Bug-apl] indexing of the array

2016-03-05 Thread Juergen Sauermann
Hi Alexey, the IBM APL2 binding rules say that [] binds stronger than vector notation (IBM APL2 language reference page 34). That is, 100 200[1]  is  100 (200[1]) IBM APL2 behaves in the same way as GNU APL. /// Jürgen