Thank you for sticking with me. We've uncovered inconsistencies. I
hope someone of authority is listening. In addition to what you pointed
out about fetch (copied below), is this:
file:///usr/local/j64-602/help/dictionary/dscapco.htm , the dictionary
entry for spread says:
11 {. t (; <@;) S: 0 1 {:: t NB. A 2-column table of leaves and
paths
Allowing for the foreshortening by 11{. , is wrong in general because
razing changes the data '' -: ; ,^:4 a: is 1. For example, these
structures differ in level but have the same 2-column table of leaves
and paths.
t (; <@;) S: 0 1 {:: t =: a: ; <a:
++-+
||0|
++-+
||1|
++-+
L.t
2
t (; <@;) S: 0 1 {:: t =: < a: ; <a:
++-+
||0|
++-+
||1|
++-+
L.t
3
The dictionary provides a model thus clearly states action---though
difficult. The dictionary {:: entry shows
t ,&< S: 0 1 {:: t
A 2-column table of
leaves and paths
which looks right to me in general.
I favor an incompatible change to j that resolves the issue knowing full
well it is unpopular. Of course, my code investment is nil and it still
takes me three days to understand t (; <@;) S: 0 1 {:: t
On Tue, 2010-03-23 at 12:00 +0800, [email protected]
wrote:
> Date: Mon, 22 Mar 2010 09:27:53 -0400
> From: Raul Miller <[email protected]>
> Subject: Re: [Jprogramming] {:: a: design decision
> To: Programming forum <[email protected]>
> Message-ID:
> <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Sun, Mar 21, 2010 at 10:25 PM, David Ward Lambert
> <[email protected]> wrote:
> > Puzzle: Find the Noun below that returns a as shown.
> > ? Noun {:: <'ab'
> > a
>
> ('';0) {:: <'ab'
> a
>
> Translation:
>
> First use '' to select the contents of the only box.
>
> Second, use 0 to select the letter 'a'.
>
> Note also that {:: does not seem to follow the indexing rules
> of { -- I do not know if this is a dictionary bug or not because
> I do not know what "based on {" means in the dictionary entry
> for fetch.
>
> But, for example, ''&{@< 'ab' gives an empty result, and this
> of course applies if 'ab' is replaced with something else.
>
> It makes sense to me that '' { 'ab' would return empty but
> I am not certain how to resolve the behaviors of { and {::
> with empty left arguments and scalar right arguments. If
> the existing implementation is correct I think dictionary entry
> for fetch should explicitly mention this issue.
>
> --
> Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm