Greetings,
I am frustrated by the behavior of APL2 because two projects I have
embarked on so far with GNU APL were easy and straight forward until I ran
into nested array special cases. In both cases I spent an inordinate
amount of time in search of a solution without success.
I am deeply appre
Hi,
looks like a bug, I will look into it.
/// Jürgen
On 05/12/2014 07:35 PM, David B. Lamkins wrote:
I'm forwarding this post to the list under a new topic so it doesn't get
buried in the other discussion:
I'm forwarding this post to the list under a new topic so it doesn't get
buried in the other discussion:
--- Begin Message ---
> ⍬≡⊃⊂⍬
> 0
That looks like a bug in GNU APL. It's true in IBM APL2 and Dyalog APL.
Jay.
--- End Message ---
Perhaps "Principles of APL 2" by Dr. James A. Brown (the "inventor"[*]
of APL 2) will shed some light on the behaviors you're seeing.
http://www.softwarepreservation.org/projects/apl/Papers/PRINCIPLESOFAPL2/view
The entire document is worth reading, as it explains how and why APL 2
differs from A
Hi,
looks like a bug, I will look into it.
/// Jürgen
On 05/12/2014 05:28 PM, Jay Foad wrote:
⍬≡⊃⊂⍬
0
That looks like a bug in GNU APL. It's true in IBM APL2 and Dyalog APL.
Jay.
Thank you very much!
On Mon, May 12, 2014 at 10:31 AM, Juergen Sauermann <
juergen.sauerm...@t-online.de> wrote:
> Hi Blake,
>
> thanks, found the fault. Fixed in SVN 261.
>
> /// Jürgen
>
>
>
> On 05/12/2014 03:57 PM, Blake McBride wrote:
>
> Here is is. Thanks.
>
>
> On Mon, May 12, 2014 at
One can make up a set of, perhaps arbitrary, rules, and apply them
consistently only to end up with something unintelligible and difficult to
use. Enclose "turns into a scalar" rather than enclose "adds a level of
boxing" is the perfect example.
I programmed in APL for five years. Not having acc
In a lot of respects, enclose (as defined by me) would function like nested
C structures. C structures have proven their value tremendously. Each
enclose would essentially create a new structure with the thing it encloses
as an element of the new structure. Structures containing scalars or
array
Having 35 years programming experience, it is my opinion that languages
should work to maximize human's expressiveness rather than the other way
around.
Blake
On Mon, May 12, 2014 at 10:34 AM, Elias Mårtenson wrote:
> Well, I would argue that you are trying to solve a non-existent problem.
> I
Well, I would argue that you are trying to solve a non-existent problem. If
you look at all the existing APL functions, none of them behave in the way
you are attempting to create. It could be argued that it would make more
sense to not try to be too smart about this and instead let the developer
d
Hi Blake,
thanks, found the fault. Fixed in SVN 261.
/// Jürgen
On 05/12/2014 03:57 PM, Blake McBride wrote:
Here is is. Thanks.
On Mon, May 12, 2014 at 6:44 AM, Juergen Sauermann
mailto:juergen.sauerm...@t-online.de>>
wrote:
Hi Blake,
I have changed the cope so that ⎕SVE is n
> ⍬≡⊃⊂⍬
> 0
That looks like a bug in GNU APL. It's true in IBM APL2 and Dyalog APL.
Jay.
Dear Elias,
Having many years of APL (not APL2) under my belt, I understand and
appreciate the difference between a scalar (zero dimension array) and
a vector (one dimension array) - (both arrays).
I started to solve the problem with ravel as you suggest, but there are two
problems with it. Firs
Well, the enclose function's role is not to "add a layer of boxing". Its
role is to "ensure the argument is a scalar". If the argument is already a
scalar, it doesn't have to do anything.
I'm not even sure it's possible to have a scalar enclosing another scalar.
For all intents and purposes a doub
I noticed that my error messages were not coloured anymore, and I
discovered that the special control sequences were not sent anymore.
The solution is to set use_curses to false where the special symbols are
set up in main.cc (line 318 to 347).
Regards,
Elias
If that is true, I can sure live with and respect that. What would the
idiom be to have enclose do nothing but add a single layer of boxing to ANY
data? What would the idiom be to have disclose do nothing more than remove
a single layer of a single boxed item? (Both without making any
modificati
Blake,
APL is actually quite consistent. What you are complaining about is the
fact that the *parser* interprets 'x' as a character, as opposed to a
one-character string. I agree this can be confusing.
It's all a syntax thing, once your text has been read into the interpreter,
characters vs. stri
'333' '5' is shorthand for (⊂'333'), ⊂'5' and would give you what
it does now (presuming neither is a scalar!!)
⊃'333' '5' would be meaningless because you'd end up with two
independent values. APL deals with one at a time.
You could do: ⊃('333' '5')[1] to give '333'
Perhaps so
That's not true though:
* ⍬≡⊃⊂⍬*
0
Regards,
Elias
On 12 May 2014 23:05, Jay Foad wrote:
> On 12 May 2014 15:43, Blake McBride wrote:
> > But if I enclose
> > and then disclose, I end up with something different - sometimes.
>
> That's not true. Disclose is a "left inverse" of Enclose:
>
Hi Blake,
maybe what you are after is ⊃¨ instead of ⊃:
⊃'333' '5'
333
5
⊃¨'333' '5'
333 5
I guess they thought 'why do something that already exists by other
means (ie. ⊃¨) and do something different (ie. ⊃)
that could be useful elsewhere'.
/// Jürgen
On 05/12
On 12 May 2014 15:43, Blake McBride wrote:
> But if I enclose
> and then disclose, I end up with something different - sometimes.
That's not true. Disclose is a "left inverse" of Enclose:
X ≡ ⊃⊂X ⍝ for all X
Jay.
The only way to make it more consistent is to make behaviours that today
are allowed into an error.
What would you expect ⊃'333' '5' to do?
Regards,
Elias
On 12 May 2014 22:43, Blake McBride wrote:
> Thanks. I have to say, with no reflection on present company, I am about
> as frustrated
Thanks. I have to say, with no reflection on present company, I am about
as frustrated and disgusted with nested arrays, as defined by IBM, as I
could be. Having enclose do one thing for all arrays and another for
scalars has caused me endless hours of frustration. (Isn't a scalar just a
zero d
Hi Blake,
if I remember correctly then I was equally surprised when I saw it first.
But for me as an APL designer, the IBM reference manual was by far the
most valuable, so I took it as the authoritative reference for GNU APL.
/// Jürgen
On 05/12/2014 04:13 PM, Blake McBride wrote:
Your repres
Your representation is inconsistent with my memory and inconsistent with
non-IBM books I have (Gilman&Rose, Polivka&Pakin, etc). The IBM references
do show it as you do however.
Thanks!
Blake
On Mon, May 12, 2014 at 6:29 AM, Juergen Sauermann <
juergen.sauerm...@t-online.de> wrote:
> Hi Blak
hi David,
thank you very much for your feedback. See some answers inline below...
/// Jürgen
On 05/10/2014 08:40 PM, David B. Lamkins wrote:
First, my thanks to Jürgen for all the time and effort that went into
this proposal.
I found some of the specification regarding components to be mildl
Hi Blake,
I have changed the cope so that ⎕SVE is not )COPYd.
However, this may only hide some other fault. I was not able to
reproduce the fault on my machine because I did not have the workspace
file gg.xml.
If you could send me that file then I can have a deeper look.
Thanks,
/// Jürgen
Hi Blake,
the asterisk marks an own SI entry for immediate execution, so
it does not belong to fun and should be on a separate line, see below.
/// Jürgen
]SI
Depth:3
Exec: 0x98373a8
Pmode:∇ fun[1]
PC: 1 ENDL
Stat: fun2
err_code: 0x30001
thrown: at Symbol.cc:679
e
APL2's Disclose (Dyalog calls it Mix) will convert a vector of vectors
into a matrix:
⊃'timor' 'mortis'
┌→─┐
↓timor │
│mortis│
└──┘
Your second application of Disclose is applied to a 1-vector of
1-vectors (,⊂,7), so it returns a 1x1 matrix.
Jay.
On 12 May 2014 06:03, Blake McBrid
29 matches
Mail list logo