Re: [Bug-apl] Lambda valence error

2016-06-04 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Lambda valence error

2016-06-04 Thread Daniel H. Leidisch
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

[Bug-apl] Lambda valence error

2016-06-04 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Announce: APL function editor written in APL

2014-06-03 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Announce: APL function editor written in APL

2014-06-03 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Announce: APL function editor written in APL

2014-06-02 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Messed up indentation with )DUMP

2014-05-31 Thread Daniel H. Leidisch
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

[Bug-apl] Messed up indentation with )DUMP

2014-05-30 Thread Daniel H. Leidisch
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

Re: [Bug-apl] SQL interface needs a workspace

2014-05-15 Thread Daniel H. Leidisch
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

Re: [Bug-apl] )ERASE should complain if not found?

2014-05-09 Thread Daniel H. Leidisch
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

Re: [Bug-apl] String element of general array

2014-05-09 Thread Daniel H. Leidisch
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

Re: [Bug-apl] String element of general array

2014-05-09 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-06 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Rank operator and function assignment

2014-03-06 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Non-bug: Help comparing solutions

2014-03-05 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Rank operator and function assignment

2014-03-04 Thread Daniel H. Leidisch
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

Re: [Bug-apl] D-fn binding leackage, Nested d-fns

2014-03-03 Thread Daniel H. Leidisch
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

Re: [Bug-apl] [Feature request] "]boxing on" analogue

2014-03-03 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Commute compress

2014-03-02 Thread Daniel H. Leidisch
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

Re: [Bug-apl] [Feature request] "]boxing on" analogue

2014-03-02 Thread Daniel H. Leidisch
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

[Bug-apl] [Feature request] "]boxing on" analogue

2014-03-02 Thread Daniel H. Leidisch
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

[Bug-apl] Multiply and add with axis

2014-03-02 Thread Daniel H. Leidisch
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)

[Bug-apl] D-fn binding leackage

2014-03-02 Thread Daniel H. Leidisch
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

[Bug-apl] Nested d-fns

2014-03-02 Thread Daniel H. Leidisch
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

[Bug-apl] Commute compress

2014-03-02 Thread Daniel H. Leidisch
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

[Bug-apl] Each first

2014-03-02 Thread Daniel H. Leidisch
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

Re: [Bug-apl] Diamond separator inside a lambda expression

2014-02-21 Thread Daniel H. Leidisch
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

[Bug-apl] Negative shape arguments

2014-02-21 Thread Daniel H. Leidisch
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.

[Bug-apl] Duplicate on laminate with axis

2014-02-19 Thread Daniel H. Leidisch
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

[Bug-apl] Unique of nested arrays doesn't work

2014-02-07 Thread Daniel H. Leidisch
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