David Lambert wrote:
> I wrote the rosetta code red-black tree entry.
I haven't read/reviewed the Red-Black tree implementation on RosettaCode,
but it did remind me of an argument I once made for supplying I. with an
inverse [1]:
> I.-space is useful, particularly when the domain (input & ou
I wrote the rosetta code red-black tree entry. As Devon guessed, I
followed Robert Sedgewick's left leaning red-black tree paper. As the
notes page indicates, merely giving an example of symbols relies on
implementation detail. I'll post such an entry if there's an
agreement. 1r3 of the cod
Wed, Sep 10, 2014 at 10:44 AM, Dan Bron wrote:
>
>> I would be interested to see a model of
>> arrays-and-trees-as-ordinal-fractions in J. With such things as indexing,
>> catenation, etc.
>>
>> -Dan
>>
>> - Original Message ---
>>
>&
th such things as indexing,
> catenation, etc.
>
> -Dan
>
> - Original Message -------
>
> Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
>From: "'Bo Jacoby' via Programming"
>Date: Tue, 9 Sep 2014 12:41:14 +0100
> To:
I would be interested to see a model of
arrays-and-trees-as-ordinal-fractions in J. With such things as indexing,
catenation, etc.
-Dan
- Original Message ---
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
From: "'Bo Jacoby' via Programming"
ifference here).
>>>
>>> Linda
>>>
>>> -Original Message-
>>> From: programming-boun...@forums.jsoftware.com [mailto:
>>> programming-boun...@forums.jsoftware.com] On Behalf Of Michal D.
>>> Sent: Tuesday, Sept
>>
>> Linda
>>
>> -Original Message-
>> From: programming-boun...@forums.jsoftware.com [mailto:
>> programming-boun...@forums.jsoftware.com] On Behalf Of Michal D.
>> Sent: Tuesday, September 09, 2014 1:14 AM
>> To: programm...@jsoftwa
eptember 09, 2014 1:14 AM
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
>
> One can imagine that it's possible for
>
>] x =. (<@i."0) 1+i.3
> +-+---+-+
> |0|0 1|0 1 2|
> +-+---+-+
>
> to be laid out in m
On Tue, Sep 9, 2014 at 6:45 PM, David Leibs wrote:
> I just think the Array Theory body work is worth looking at and
> understanding as it is a very interesting bit of the history of APL.
> "Nested Array Theory" gives you nested arrays without any need for boxing
> or unboxing.
That's sort of lik
Raul Miller wrote:
>Anything which puts infinity n the "must use routinely" path is going to
cause
>schisms.
>There's an infinity of ways of dealing with infinities, and people can
only do
>so much.
>
>Then again, some people like schisms.
>
>They are probably best left alone (as much as they will
r arrays).
In other words: this (seamless integration of trees in J) is a worthy
objective, but not an easy one to achieve. Personally, I'd be happy to
contribute to such an initiative, but I lack the self-confidence to lead
it.
-Dan
- Original Message -------
Subject: Re: [J
On Tue, Sep 9, 2014 at 1:50 PM, David Leibs wrote:
> This influenced APL2. Some say that this caused "a schism" in the APL
> community.
Anything which puts infinity n the "must use routinely" path is going to cause
schisms.
There's an infinity of ways of dealing with infinities, and people can o
Trenchard More worked on a theory of nested arrays for a long time.
For those interested you should google Trenchard More and Array Theory.
Trenchard More worked with Mike Jenkins for a long time on a language
called Nial
http://www.nial.com/ArrayTheory.html
You can think of Trenchard More's wo
r of invoices, but can't naively use L: because
> a customer might also have nested phone numbers or other data. The point
> of this blabbering is that sometimes # is domain specific.
>
>
>
>
> - Original Message -
> From: Dan Bron
> To: programm...@jsoftware.com
> Cc:
>
nitions as they apply to rectilinear arrays).
>
> In other words: this (seamless integration of trees in J) is a worthy
> objective, but not an easy one to achieve. Personally, I'd be happy to
> contribute to such an initiative, but I lack the self-confidence to lead
> it.
>
>
seamless integration of trees in J) is a worthy
objective, but not an easy one to achieve. Personally, I'd be happy to
contribute to such an initiative, but I lack the self-confidence to lead
it.
-Dan
- Original Message -------
Subject: Re: [Jprogramming] Ragged Array Shapes are Tr
Michael was speaking in the context of a hypothetical, extended version of
J. His comments needn't be applied to our current, actual language.
- Original Message ---
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
From: "Linda Alvord"
Date: Tue,
mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Michal D.
Sent: Tuesday, September 09, 2014 1:14 AM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
One can imagine that it's possible for
] x =. (<@i."0) 1+i.3
+-+---+-+
|0|0 1|0 1 2|
+-+---
agged Array Shapes are Trees
Here's a question to chew on. What's the # of a tree?
- Original Message ---
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
From: "Michal D."
Date: Mon, 8 Sep 2014 23:04:34 -0700
To: programm...@jsoftware.
problem in J and
> attempted to solve it. Has anyone read the paper? Does anyone have a public
> version of the article to share?
>
>
> > [2] Though the Wiki article above links to it, it's worth calling out
> > specifically Devon's summary of "A Programming Lanaugage&q
of the article to share?
> [2] Though the Wiki article above links to it, it's worth calling out
> specifically Devon's summary of "A Programming Lanaugage"'s proposal for
> trees.
> http://www.jsoftware.com/jwiki/DevonMcCormick/APLTree
>
>
> --
Linda wrote:
> Things are not always as they seem!
>
> ]x=:?5#10
> 9 8 5 7 4
>
> +/"1 x
> 33
> +/x
> 33
>
> +/&.>x
> +-+
> ¦9¦8¦5¦7¦4¦
> +-+
What are you trying to say here?
-Dan
Of Michal D.
Sent: Tuesday, September 09, 2014 1:14 AM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
One can imagine that it's possible for
] x =. (<@i."0) 1+i.3
+-+---+-+
|0|0 1|0 1 2|
+-+---+-+
to be laid out in memory as [0 0 1
Here's a question to chew on. What's the # of a tree?
- Original Message ---
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
From: "Michal D."
Date: Mon, 8 Sep 2014 23:04:34 -0700
To: programm...@jsoftware.com
Thanks for the
gt;>> > | |+-+---+|
>>> > +-+---+
>>> >
>>> > There's no specific problem I'm trying to solve directly in J at the
>>> > moment. It's more of a language design problem. My interest in this is
>>> a
>>> > J like
t; boxing. Failing that, we could have some optimization guarantees like
>> 'an
>> > array of boxes containing equal rank values are allocated contiguously'.
>> >
>> > Cheers,
>> >
>> > Mike
>> >
>> >
>> >
>> > On Sat, Sep 6, 2014 at 9:28 AM, 'Pascal Jasmin
┘
>
> while it seems complicated, each use of "each" creates an open after
> selecting from right to left. It provides a way to update trees with a verb
>
>
>
> - Original Message -
> From: Dan Bron
> To: programm...@jsoftware.com
&g
e-in-cheek, though I do believe "redesign the language" makes
> "improve the performance of trees" seem easy by comparison.)
>
>
>
> - Original Message ---
>
> Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
>From: Raul Mil
.@jsoftware.com> wrote:
> >
> >> Hi Michal,
> >>
> >> maybe this is an interesting representation for what you want?
> >>
> >>([:|. $ ;~ $ each) (i. 2 3) ; (,0) ; 0 1
> >> ┌─┬─┐
> >> │3│┌───┬─┬─┐│
> >> │ ││2 3│1│2
awesome, Thomas. For those who didn't load the code, its
> much easier to use than it looks as everything is a verb, and the whole
> thing is like a mini stack language, and each operation produces intuitive
> and visible results.
> >
> >
> >
> >
> >- Origina
That's it! Thanks. Linda
-Original Message-
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller
Sent: Monday, September 08, 2014 9:03 PM
To: Programming forum
Subject: Re: [Jprogramming] Ragged Array Shapes are
> From: programming-boun...@forums.jsoftware.com
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Michal D.
> Sent: Monday, September 08, 2014 11:01 AM
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
>
> Thanks P
Point taken.
But neither you nor I (for example) have bothered to be interested
enough in Red Black trees to implement anything better. And for a
problem that size, it's really not right to put an hour into
criticizing it when an hour could have been used to show what you mean
using an actual impl
oftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Michal D.
Sent: Monday, September 08, 2014 11:01 AM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
Thanks Pascal, that's a nice formulation for the 2-level deep case. It
Yes, but to Devon's point, having a direct transliteration of an algorithm
originally expressed in a (very) different language doesn't tell us anything
about J's power (or not) to express that algorithm.
Any programming language worth discussing is Turing complete. Which means
they're all *capa
It is, nevertheless, an implementation.
And anyone that feels like doing so can supply other alternates (or
replace it, if they feel theirs is good enough).
Thanks,
--
Raul
On Mon, Sep 8, 2014 at 5:28 PM, Devon McCormick wrote:
> This looks like a transliteration from another language - not
>easier to use than it looks as everything is a verb, and the whole thing is
>like a mini stack language, and each operation produces intuitive and visible
>results.
>
>
>
>
>- Original Message -
>From: Thomas Costigliola
>To: J Programming Forum
>Cc:
&g
This looks like a transliteration from another language - not J-like at
all. Once clue is that it's several times as long as many of the other
implementations.
On Mon, Sep 8, 2014 at 4:05 PM, Joe Bogner wrote:
> I found an implementation of red-black trees on rosettacode:
> http://rosettacode.
homas Costigliola
To: J Programming Forum
Cc:
Sent: Monday, September 8, 2014 4:04 PM
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
Array representations and "pointer" representations of trees both have
their uses. In the end it depends on what problem you are trying to
I found an implementation of red-black trees on rosettacode:
http://rosettacode.org/wiki/Pattern_matching#J ... It might be relevant or
may not be.
On Mon, Sep 8, 2014 at 3:45 PM, Devon McCormick wrote:
> A little research clarified what we see here: apparently it's part of the
> definition of
Array representations and "pointer" representations of trees both have
their uses. In the end it depends on what problem you are trying to solve.
As Devon demonstrated, for his purpose, array representation was not a
hindrance at all. But, as Dan mentions, trees are also used to implement
abstract
A little research clarified what we see here: apparently it's part of the
definition of a binary tree that the left node be smaller than its parent
but the right one is greater. Right away, I see a problem for the
predecessor-index representation of a tree that I'm advocating as it does
not distin
l repeat that I agree that }:: (with compatible indexing to {::) would
be a big improvement, though the above uses a fairly simple workaround.
- Original Message -
From: Dan Bron
To: programm...@jsoftware.com
Cc:
Sent: Monday, September 8, 2014 2:30 PM
Subject: Re: [Jprogramming] Ragge
At a minimum, I hope we can be a tad more elegant than this:
http://www-cs.ccny.cuny.edu/~peter/dstest/h_bl_tree.c .
On Mon, Sep 8, 2014 at 3:03 PM, Devon McCormick wrote:
> Do you have a reference to a good example of this? Looking at the
> "before" and "after" pictures on the right here -
>
Do you have a reference to a good example of this? Looking at the "before"
and "after" pictures on the right here -
http://en.wikipedia.org/wiki/Self-balancing_binary_search_tree - the
rebalancing seems arbitrary as it preserves some relations but changes
others.
On Mon, Sep 8, 2014 at 2:30 PM,
tus of J, but certainly not final; if we put our backs into it,
>> we could get this done).
>>
>> -Dan
>>
>> [1] Old thoughts on the question of trees in J:
>> http://www.jsoftware.com/jwiki/DanBron/Temp/Tree
>>
>> [2] Though the Wiki article ab
Raul wrote:
> Note that J already supports trees.
Devon wrote:
> I have J code that uses trees which I run daily and
> have been doing so for years.
Pascal wrote:
> I think trees are done at least ok, if not "right" already.
Challenge: express, in J, the logic of rebalancing a heap (say, a Fi
von's summary of "A Programming Lanaugage"'s proposal for
trees.
http://www.jsoftware.com/jwiki/DevonMcCormick/APLTree
- Original Message ---
Subject: [Jprogramming] Ragged Array Shapes are Trees
From: "Michal D."
Date: Sat, 6 Sep 2014
S/SMOP.html
(tongue-in-cheek, though I do believe "redesign the language" makes
"improve the performance of trees" seem easy by comparison.)
- Original Message -------
Subject: Re: [Jprogramming] Ragged Array Shapes are Trees
From: Raul Miller
Date: Mon,
iki article above links to it, it's worth calling out
> specifically Devon's summary of "A Programming Lanaugage"'s proposal for
> trees.
> http://www.jsoftware.com/jwiki/DevonMcCormick/APLTree
>
>
> - Original Message ---
>
> Subj
e question of trees in J:
> http://www.jsoftware.com/jwiki/DanBron/Temp/Tree
>
> [2] Though the Wiki article above links to it, it's worth calling out
> specifically Devon's summary of "A Programming Lanaugage"'s proposal for
> trees.
> http://w
.
http://www.jsoftware.com/jwiki/DevonMcCormick/APLTree
----- Original Message ---
Subject: [Jprogramming] Ragged Array Shapes are Trees
From: "Michal D."
Date: Sat, 6 Sep 2014 09:06:38 -0700
To: programm...@jsoftware.com
I just came to the realization that ragged array
; maybe this is an interesting representation for what you want?
>>
>>([:|. $ ;~ $ each) (i. 2 3) ; (,0) ; 0 1
>> ┌─┬─┐
>> │3│┌───┬─┬─┐│
>> │ ││2 3│1│2││
>> │ │└───┴─┴─┘│
>> └─┴─────────┘
>>
>>
>>
>> - Original Messag
([:|. $ ;~ $ each) (i. 2 3) ; (,0) ; 0 1
> ┌─┬─┐
> │3│┌───┬─┬─┐│
> │ ││2 3│1│2││
> │ │└───┴─┴─┘│
> └─┴─┘
>
>
>
> - Original Message -
> From: Michal D.
> To: programm...@jsoftware.com
> Cc:
> Sent: Saturday, September 6, 2014 12:06 PM
> Sub
age -
>From: Michal D.
>To: programm...@jsoftware.com
>Cc:
>Sent: Saturday, September 6, 2014 12:06 PM
>Subject: [Jprogramming] Ragged Array Shapes are Trees
>
>I just came to the realization that ragged array shapes, regardless of how
>you want to represent them, are
, September 6, 2014 12:06 PM
Subject: [Jprogramming] Ragged Array Shapes are Trees
I just came to the realization that ragged array shapes, regardless of how
you want to represent them, are trees. I would be interested in any
references to prior exploration of this idea.
Some example data (boxes are
Trees are an abstraction.
Conceptually speaking all arrays - even non-ragged - can be thought of
as trees. Whether they are very flat trees (only one level deep) or
very tall and skinny trees (only one child at each node) or whether
they are something else is not pre-determined.
And that's the pr
I just came to the realization that ragged array shapes, regardless of how
you want to represent them, are trees. I would be interested in any
references to prior exploration of this idea.
Some example data (boxes are used to display ragged arrays, but otherwise
have no semantic meaning):
] A
58 matches
Mail list logo