Second though, it looks like a piece of debug code forgotten in the source ...
Xtian.
On 2016-03-03 20:51, Christian Robert wrote:
]boxing off
(⊂10 1) ⍕ 1+10⍴1e15
left argument of ⍕:
┏━━┓
┃┏→━━━┓┃
┃┃10 1┃┃
┃┗┛┃
┗∊━┛
DOMAIN ERROR
(⊂10 1)⍕1+10⍴1000
]boxing off
(⊂10 1) ⍕ 1+10⍴1e15
left argument of ⍕:
┏━━┓
┃┏→━━━┓┃
┃┃10 1┃┃
┃┗┛┃
┗∊━┛
DOMAIN ERROR
(⊂10 1)⍕1+10⍴1000
^ ^
I love the way it display by default the argument in error (eg: in boxing mode).
Is this new ? If not, I never noticed
You can also use something like this
∇multi a;a1;a2;a3
[1] (a1 a2 a3)←a
[2] ⍕a1
[3] ⍕a2
[4] ⍕a3
[5] ∇
multi 3 5 7
3
5
7
I think that implementing this "a la Dyalog" way is possible
but would not be trivial source changes.
Xtian.
On 2016-03-03 17:17, Alexey Veretennikov wrote:
Hi,
Hi,
In GNU APL in order to supply several (>2) arguments to the function I
have to write something like this:
∇multi a;a1;a2;a3
a1←a[1]
a2←a[2]
a3←a[3]
⍕a1
⍕a2
⍕a3
In Dyalog APL I can just write
∇multi(a1 a2 a3)
⍕a1
⍕a2
⍕a3
The same syntax in GNU APL lead to an errer in function header. Can we
Hi Elias,
yes, thanks. SVN 700.
/// Jürgen
On 03/03/2016 02:41 PM, Elias Mårtenson
wrote:
The original question is as of yet unresolved
though. Wouldn't it make sense to extend GNU APL's iota function
Hi Mike,
I probably did not get it back in September. To me it is not
quite obvious why enclosing a nested scalar is different from
enclosing a simple scalar. But since ISO and APL2 agree in
this regard, I should follow suit.
/// Jürgen
Hi Jürgen,
I commented on this enclose issue back on the 14th of September. I
actually liked the way GNU APL did it.
https://lists.gnu.org/archive/html/bug-apl/2015-09/msg00061.html
Regards,
Mike
Hi,
I'm playing with this definition and noticed that if the argument was
scalar (if the term is correct) and more than 2 then it returns
strange result
i 1
┌─┐
│1│
└─┘
i 2
┌2──┐
│1 2│
└───┘
i 3
┌2──┐
│┌2──┐ ┌2──┐│
││1 2│ │1 3││
│└───┘ └───┘│
└∊──┘
i 4
┌2──
Hi,
I have changed GNU APL so that B ≡ ⊂B if and only if B is a simple
scalar.
Before the change B ≡ ⊂B
also for non-simple scalar B.
Unfortunately Elias' correct observation that (⊂⊂B) ≡ ⊂B in GNU APL was
almost
an axiom in GNU APL
The original question is as of yet unresolved though. Wouldn't it make
sense to extend GNU APL's iota function to do the same as Dyalog? It
wouldn't cause any compatibility issues since it raises an error right now.
Regards,
Elias
On 3 March 2016 at 20:26, Juergen Sauermann
wrote:
> Hi,
>
> I s
Hi,
I see. I guess I overlooked the 'simple' attribute in both
definitions.
I will fix this in GNU APL.
/// Jürgen
On 03/03/2016 12:53 PM, Kacper Gutowski
wrote:
On Thu, Mar 3, 2016 at 12:40
On Thu, Mar 3, 2016 at 12:40 PM, Juergen Sauermann
wrote:
> the IBM APL2 language reference says (page 111):
>
> If R is a simple scalar, ⊂ R is R. If R is not a simple scalar, the depth of
> R is 1+ ≡R.
>
> And the ISO standard says the same (page 169):
>
> Z ← ⊂B
> Note: If B is a simple-scalar
On 3 March 2016 at 11:40, Juergen Sauermann
wrote:
> Therefore I believe Elias' statement
>
> My understanding was that (⊂⊂x)≡⊂x for all x?
>
> is correct as far as ISO, IBM APL2, and GNU APL are concerned.
It is clearly not true in APL2!
x←1 2 3
(⊂⊂x)≡⊂x
0
(Same result in NARS2000
Hi,
the IBM APL2 language reference says (page 111):
If R is a simple scalar, ⊂R is R. If R is not a simple scalar,
the depth of R is 1+≡R.
And the ISO standard says the same (page 169):
Z ← ⊂B
Note: If B is a simple-s
On 3 March 2016 at 08:12, Elias Mårtenson wrote:
> What is the purpose of the double-enclose ⊂⊂⍬ ?
>
> My understanding was that (⊂⊂x)≡⊂x for all x?
No! ⊂ is a no-op on simple scalars like 42, but not on enclosures like
⊂⍬. You can enclose most arrays (i.e. anything except simple scalars)
as many
What is the purpose of the double-enclose ⊂⊂⍬ ?
My understanding was that (⊂⊂x)≡⊂x for all x?
Regards,
Elias
On 3 March 2016 at 16:05, Jay Foad wrote:
> Right. Here's a variation on Elias's solution that gets IOTA ⍬ right,
> but doesn't handle the singleton cases correctly!
>
> IOTA ← {⊃∘.,/(⍳
Right. Here's a variation on Elias's solution that gets IOTA ⍬ right,
but doesn't handle the singleton cases correctly!
IOTA ← {⊃∘.,/(⍳¨⍵),⊂⊂⍬}
On 3 March 2016 at 01:08, Nick Lobachevsky wrote:
> There is at least one other degenerate case, namely the "legacy"
> singleton, or one element vector.
17 matches
Mail list logo