Re: [Jprogramming] The n-cell model of an array

2017-12-21 Thread Erling Hellenäs
The closest J-related concept is boxed arrays? /Erling Den 2017-12-20 kl. 18:52, skrev 'Bo Jacoby' via Programming: I am impressed by the J programming language and by the array concept. However, boxed arrays and sparse arrays and empty arrays illustrate shortcomings in the array concept of J

Re: [Jprogramming] The n-cell model of an array

2017-12-21 Thread Erling Hellenäs
Hi all ! This is SGML, HTML, XML, the Windows Registry and LDAP. It's old hierarchical databases? At least related? Could the algebra proposed help us handle them? Cheers, Erling Hellenäs Den 2017-12-20 kl. 18:52, skrev 'Bo Jacoby' via Programming: I am impressed by the J programming lang

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
I move the thread to the Chat forum. Subscription is here: http://www.jsoftware.com/mailman/listinfo/chat /Erling On 2017-12-20 19:45, Raul Miller wrote: Then this thread belongs on the chat forum. As documented on http://forums.jsoftware.com: chat - all other discussions on computer languages

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Raul Miller
Then this thread belongs on the chat forum. As documented on http://forums.jsoftware.com: chat - all other discussions on computer languages and J Thanks, -- Raul On Wed, Dec 20, 2017 at 1:32 PM, Erling Hellenäs wrote: > Hi all! > > Thanks, I will look into the details tomorrow, but yes ,

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
Hi all! Thanks, I  will look into the details tomorrow, but yes , and I see a number of problems with this as mentioned in this post: http://www.jsoftware.com/pipermail/programming/2017-December/050179.html In this thread I am trying to discuss strategies to solve these problems. Pesch[1986] mi

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Raul Miller
Ick. -- Raul On Wed, Dec 20, 2017 at 12:52 PM, 'Bo Jacoby' via Programming wrote: > I am impressed by the J programming language and by the array concept. > However, boxed arrays and sparse arrays and empty arrays illustrate > shortcomings in the array concept of J. > I suggest using ordinal

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread 'Bo Jacoby' via Programming
I am impressed by the J programming language and by the array concept. However, boxed arrays and sparse arrays and empty arrays illustrate shortcomings in the array concept of J.  I suggest using ordinal fractions for structuring, storing and handling data. Then there is no need for boxing, nor

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Jimmy Gauvin
There is a bit of information in this thread: https://stackoverflow.com/questions/46967744/rank-operator-vs-axis-notation On Wed, Dec 20, 2017 at 4:37 AM, Erling Hellenäs wrote: > What I found in this paper is that Rank was a concept already in some APL > dialects. It was not new to J. I did no

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Jose Mario Quintana
> For this to happen J functions have to be defined for handling arrays of nothing? I have not followed this thread, or any other recent thread, closely but this might shed some light: " Zero Frame. If the frame contains 0 (as in 3 *"1 i. 0 4), there are no argument cells to apply v to, and the s

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Raul Miller
That might be, but that phrasing still doesn't make sense: */ '' 1 There's no list result here - that's a rank 0 result. Thanks, -- Raul On Wed, Dec 20, 2017 at 9:41 AM, 'Mike Day' via Programming wrote: > I think Erling meant "add" in the sense of appending 1 to the empty list, > rather

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread 'Mike Day' via Programming
I think Erling meant "add" in the sense of appending 1 to the empty list, rather than "add" as an arithmetical operation. That's my n-penny-worth! Mike On 20/12/2017 12:25, Raul Miller wrote: You are multiplying, not adding. -- Raul On Wed, Dec 20, 2017 at 3:39 AM, Erling Hellenäs wrote:

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Raul Miller
(1) this is not a problem with the Rank operator (2) wrong forum - almost none of the messages here have any programming in them and almost none of this is about writing j programs. Thanks, -- Raul On Wed, Dec 20, 2017 at 9:00 AM, Erling Hellenäs wrote: > We have a problem in the Rank operator

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Raul Miller
For u/ '' the interpreter uses the value of 'x' 1 :(u b. 1) 'x' I'm not sure why J returns a linear representation rather a verb, but I'd rather complain about that than its use of identities when the user asks it to insert a verb between nothing. Thanks, -- Raul On Wed, Dec 20, 2017 at 8:57

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
Hi all! These two F# programs describe what initiates the special handling. It might be different in J, but the functionality should be the same, at least from what my tests show. Except from the error case. JWithATwist hides no error cases.    let rec RankMonadic uVerb functionRank  xNoun :

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
We have a problem in the Rank operator, which I described. I am trying to create a discussion about solutions to this problem. /Erling Den 2017-12-20 kl. 13:31, skrev Raul Miller: Actually, J does support arrays of nothing. That's what i.0 is, after all. And, if you want a scalar containing a

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
The interpreter adds different startvalues depending on the left verb argument to Insert. /Erling Den 2017-12-20 kl. 13:25, skrev Raul Miller: You are multiplying, not adding. -- For information about J forums see http://ww

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Raul Miller
Actually, J does support arrays of nothing. That's what i.0 is, after all. And, if you want a scalar containing an array of nothing, then a: matches that specification. And we have an algebra here - though if (as in your previous message) you do multiplication and call it addition, this becomes v

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Raul Miller
You are multiplying, not adding. -- Raul On Wed, Dec 20, 2017 at 3:39 AM, Erling Hellenäs wrote: > */i.0 > > 1 > > Here the interpreter automatically adds a 1 to get this peculiar result. > > /Erling > > Den 2017-12-19 kl. 20:01, skrev Raul Miller: >> >> An empty tank zero array would be incons

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
What I found in this paper is that Rank was a concept already in some APL dialects. It was not new to J. I did not find any direct comparison between the axis notation and the rank notation which could justify the selection of the latter for J. /Erling Den 2017-12-19 kl. 16:31, skrev Erling H

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
We have two questions here. One is if it is natural that an array without dimensions have one item. The other one is if there could be an item, but an empty one. /Erling Den 2017-12-19 kl. 20:01, skrev Raul Miller: An empty tank zero array would be inconsistent. The number of elements in an

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
Hi all ! Could we avoid doing these peculiar things in the rank operator if we enabled the handling of arrays of nothing? The verb injected in Rank would then have to give a valid result for an array of nothing? For this to happen J functions have to be defined for handling arrays of nothi

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
This is a mathematical concept: https://en.wikipedia.org/wiki/Empty_product /Erling Den 2017-12-20 kl. 09:39, skrev Erling Hellenäs: */i.0 1 Here the interpreter automatically adds a 1 to get this peculiar result. /Erling Den 2017-12-19 kl. 20:01, skrev Raul Miller: An empty tank zero arr

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
*/i.0 1 Here the interpreter automatically adds a 1 to get this peculiar result. /Erling Den 2017-12-19 kl. 20:01, skrev Raul Miller: An empty tank zero array would be inconsistent. The number of elements in an array is the product of its dimensions, and the multiplicative identity is 1, not

Re: [Jprogramming] The n-cell model of an array

2017-12-20 Thread Erling Hellenäs
Hard to follow how this leads to a rank 0 array containing one item. /Erling Den 2017-12-19 kl. 20:01, skrev Raul Miller: An empty tank zero array would be inconsistent. The number of elements in an array is the product of its dimensions, and the multiplicative identity is 1, not 0. Thanks,

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread Raul Miller
Ok, yes - rank is itself a rank zero array. Empty shape, zero rank. Thanks, -- Raul On Tue, Dec 19, 2017 at 2:11 PM, Jimmy Gauvin wrote: > not empty rank rather o rank > > On Tue, Dec 19, 2017 at 2:01 PM, Raul Miller wrote: > >> An empty tank zero array would be inconsistent. >> >> The numb

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread Jimmy Gauvin
not empty rank rather o rank On Tue, Dec 19, 2017 at 2:01 PM, Raul Miller wrote: > An empty tank zero array would be inconsistent. > > The number of elements in an array is the product of its dimensions, and > the multiplicative identity is 1, not 0. > > Thanks, > > -- > Raul > > On Tuesday, Dec

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread Raul Miller
An empty tank zero array would be inconsistent. The number of elements in an array is the product of its dimensions, and the multiplicative identity is 1, not 0. Thanks, -- Raul On Tuesday, December 19, 2017, Jimmy Gauvin wrote: > Hi, > > Thinking about nothing, specifically about the empty

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread Jimmy Gauvin
Hi, Thinking about nothing, specifically about the empty scalar or empty 0-cell. Erling H. - " I experience an inconsistency in this model in the sense that an array of rank greater than zero can be empty, a 0-cell can not." The internal structure of a J array could support a rank 0 empty objec

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread Erling Hellenäs
The paper is here: http://www.jsoftware.com/papers/APLDictionary.htm /Erling Den 2017-12-19 kl. 16:00, skrev John Baker: Dictionary APL -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread John Baker
You might want to look up Ken Iverson’s 1980s era paper Dictionary APL. I believe Roger maintains an online version. This document clearly explains a lot of what you see in J. Sent from my iPhone > On Dec 19, 2017, at 7:22 AM, Raul Miller wrote: > > Well.. the issue I remember was that axis n

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread Raul Miller
Well.. the issue I remember was that axis notation specifically and bracket notation in general was inconsistent with the rest of the syntax for APL. There were at least two ways out of this - one would be to generalize bracket notation (I think that K might have followed that path). The other wou

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread Erling Hellenäs
Hi all! IBM, APL2 Programming: Language Reference http://publibfp.boulder.ibm.com/epubs/pdf/h2110611.pdf You were right in that a scalar was considered an array. There is a difference in that we used the AXIS notation instead of what is Rank? See page 55. This means the functions did not n

Re: [Jprogramming] The n-cell model of an array

2017-12-19 Thread Raul Miller
I'm not completely sure what you are getting at here, actually. When I was learning APL, I was taught that a scalar was a rank zero array. And it seems to me that J uses the same design. If you look at J's 3!:1 and 3!:2 foreigns (or you can use 3!:3 instead of 3!:1 if you prefer), you'll see that

[Jprogramming] The n-cell model of an array

2017-12-19 Thread Erling Hellenäs
Hi all ! In APL we had the same array model as in Fortran. An array was an array and you indexed it like in most other languages, except that you could use an array as index and therefore could get very varying results. The only problems I personally experienced with this model was that you c