Hello!
Christian Robert
writes:
> You can force binding monadic like this
>
> 1 ({⍵} 2)
> 1 2
What I meant was that in Dyalog and NGN:
1 {⍵} 2
2
Regards,
Daniel
Hello!
Christian Robert
writes:
> ∇z←OMEGA n
> [1] z←n
> [2] ∇
> 1 OMEGA 2
> VALENCE ERROR
> 1 OMEGA 2
> ^ ^
> 1 (OMEGA 2)
> 1 2
As I said in my other answer, what I meant was that
1 {⍵} 2
2
works in both Dyalog and NGN. I.e. the lambda can be used monadica
Hello!
On r734:
1 {⍵} 2
VALENCE ERROR
1 λ1 2
^ ^
Unless I'm mistaken, this used to work. I assumed it to be a regression,
but reading the info section about lambdas, it actually seems to be
intended behavior. ("If only ⍵ is present then it is monadic, and if
neither ⍺ nor ⍵ is
Hello!
Juergen Sauermann
writes:
> the link to the ISO standard is a gzip'ed file despite of its .pdf
> extension.
> I have updated README-7-more-info to explain how to fetch it. The ISO
> standard seems to have a few more operators than IBM APL2.
Thank you very much. I actually tried unpacking
Hello!
Blake McBride
writes:
> On Mon, Jun 2, 2014 at 7:08 PM, Daniel H. Leidisch
> wrote:
>
>> Left returns its left argument:
>>
>> 1 ⊣ 2
>> 1
> […]
>
> Thanks. That operator is not on my keyboard, and cutting-and-pasting
> it into GNU APL
Hello!
Blake McBride
writes:
> […] we defined ∆ that took two arguments and returned the left. […]
>
> All my code was written with the old ∆ function. I suppose I'll switch
> to the diamond operator sometime soon.
Left returns its left argument:
1 ⊣ 2
1
Maybe this helps.
Regards,
Da
Hello!
Juergen Sauermann
writes:
> 1. the del editor (?) removes leading spaces from lines entered:
> […]
> 2. The ?-editor indents lines that are not comments or labels by one
> space. This was not so earlier but was requested recently:
> […]
Ah, now I see. When using the Emacs mode, it seems
Hello!
Workspaces saved with )DUMP mess with my identation. Looking at the .apl
files, some kind of automatic indentation seems to take place, and when
I edit functions, there is no indentation at all. This does not happen
with workspaces saved via )SAVE, or with functions saved via )OUT.
Since s
Hello!
Elias Mårtenson
writes:
> Finally, about extensions, I have actually considered implementing a
> new language (on top of Common Lisp most likely) that implements the
> essence of the APL syntax and functions but with Lisp integration. And
> rest assured that this thing will not be called
Hello!
Blake McBride
writes:
> I'm not sure of this but - if you try to )ERASE something that isn't there,
> shouldn't it display a not found message on the ones not found?
>
> The problem is, if you erase something and mistype it, there is no message.
> You have no idea you didn't erase it. I
Hello!
Blake McBride
writes:
> x←'abcd' 'efg' 'hijkl'
>
> Now, if I have:
>
> y←'hijkl'
>
> z←'hhh'
>
> How can I tell if y is in x? How can I tell if z is in x?
Or for both at once:
(y z)∊x
1 0
Regards,
Daniel
Hello!
Blake McBride
writes:
> x←'abcd' 'efg' 'hijkl'
>
> Now, if I have:
>
> y←'hijkl'
>
> z←'hhh'
>
> How can I tell if y is in x? How can I tell if z is in x?
(⊂y)∊x
Regards,
Daniel
Hello!
First, thank you for the nice explanation in my absence. I couldn't have
done it better. Let me just explain where I see things a little
differently.
Tobia Conforto
writes:
> Even the classic example of a fork (+/÷≡) is harder to read than its
> functional version {(+/⍵)÷≡⍵} and it goes
Hello!
Juergen Sauermann
writes:
> I see, thanks for the explanation.
Thanks from me too. He explained it better than I would probably have.
Tobia Conforto
writes:
> I would be wary of bracket notation on the rank operator, because it
> has a different meaning in Nars2000 (which I'm not sure
Hello!
Jay Foad writes:
> I don't know how to do it in GNU APL. In Dyalog you can play silly
> games with ∘ (function composition) and ⍨, e.g.:
I don't think that the support for tacit programming in modern APL
implementations counts as "pure SO APL". :) Then again, I'm not sure
what "SO" means
Hello!
Juergen Sauermann
writes:
> What you probably intended to do is:
>
> * {'foo',⍵}⍤1 (4 5⍴⍳10)*
> foo 1 2 3 4 5
> foo 6 7 8 9 10
> foo 1 2 3 4 5
> foo 6 7 8 9 10
Shouldn't this work, too?
({'foo',⍵}⍤1) 4 5⍴⍳10
RANK ERROR
(λ1⍤1)4 5⍴⍳10
^^
Works in NARS200
Hello Jürgen!
Juergen Sauermann
writes:
> I would like to explain my point of view regarding Lambdas aka.
> D-funs.
Thanks. I should mention that I am an APL beginner, so my answer will
draw from my experiences with other languages, especially functional
ones (in the functions as first class ob
Hello!
Juergen Sauermann
writes:
> I have added command ]BOXING which takes an argument OFF, 2, 3, 4, 7,
> 8, or 9.
> See SVN 152.
Great, thank you very much!
Regards,
Daniel
Juergen Sauermann
writes:
> I believe this relates to an earlier discussion on this list (around
> Feb. 24, 2014).
>
> You can put the left arg of /⍨ in parentheses which marks it as a
> value at ⎕FX time
> (the default interpretation is function) like this:
>
> (v)/⍨2|v←⍳4
>
> 1 3
Ah, tha
Elias Mårtenson
writes:
> Yay, an Emacs user. :-)
Yes, and one who is glad that there is an Emacs mode for GNU APL. So
thanks again. By the way, we already met on GitHub – I was the one
nagging about the standard keybindings.
> I've been thinking of a feature that would display the result of th
Hello!
When experimenting at the REPL, I often find myself typing n⎕CR
repeatedly at the beginning of lines. As an Emacs user, it wouldn't be a
problem for me to adapt Elias' mode to insert that for me automatically,
but wouldn't it be convenient to have it as a feature of the system
itself?
Mayb
Hello!
Multiply and add doesn't seem to work with axis specifications:
(3 5⍴1) ×[1] ⍳3
INDEX ERROR
(3 5⍴1)×[1]⍳3
^ ^
INDEX ERROR
(3 5⍴1)+[1]⍳3
^ ^
This works in NARS2000 and Dyalog:
(3 5⍴1) ×[1] ⍳3
1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
(3 5⍴1)
Hello!
Bindings from inside d-fns/lambdas leak into the global environment:
x
VALUE ERROR
x
^
{x←⍵}1
1
x
1
I didn't read much about this, but as far as I understand, bindings
introduced in these functions are supposed to be lexical locals. Anyway,
this doesn't happe
Hello!
Nesting d-fns doesn't seem to work:
{⍵+{⍵}1}1
DEFN ERROR
This works in NARS2000, NGN and Daylog. I'm at r148.
Regards,
Daniel
Hello!
Commuting compress results in a syntax error:
v/⍨2|v←⍳4
This works in NARS2000, Dyalog, and NGN. I'm at r148.
Regards,
Daniel
Hello!
Each first of a nested lists behaves weirdly.
↑¨(1 2) (3 4)
1 3
≡↑¨(1 2) (3 4)
1
So far so good, but:
8⎕cr ↑¨(1 2) (3 4)
┌→──┐
│┌─┐ ┌─┐│
││1│ │3││
│└─┘ └─┘│
└───┘
(↑¨(1 2) (3 4))⍳3
3
This works (i.e. returns ⎕io+1) in NARS2000 and NGN.
Regards,
Daniel
Hello!
baruc...@gmx.com writes:
> Hi, since I am a novice in APL, I can't be sure wether it is a bug or
> not, but I can't make the diamond separator work in direct functions
> {}.
>
> For instance, something like:
> { A ← ⍵ ⋄ A+1 } 2
>
> works with Dyalog APL as well as with NGN APL, but it ra
Hello!
I think these should be domain errors:
⍳¯1
¯1⍴1
Reduction on their results crashes GNU APL:
+/¯1⍴1
==
Assertion failed: 0
in Function: init
in file: Cell.cc:47
[…]
I'm on r136.
Hello!
Using duplicate on laminate with axis results in a syntax error:
,[0.5]⍨'foo'
SYNTAX ERROR
,[0.5]⍨'foo'
^ ^
Unless I'm mistaken, it should yield the same result as
'foo',[0.5]'foo'. (Works in NARS2000 and Dyalog.) I'm at r133.
Regards,
Daniel
Hello!
Unique with nested arrays results in a domain error:
∪1⍴¨1 2 3 4 1
DOMAIN ERROR
∪1⍴¨1 2 3 4 1
^
∪'foo' 'bar' 'baz' 'foo'
DOMAIN ERROR
∪'foo' 'bar' 'baz' 'foo'
^
Both examples work in Dyalog, NGN, and, according to their
documentation, MicroAPL. I'm at r
30 matches
Mail list logo