J sentences are lines, except that some lines may contain multiple
sentences (for example, in explicit definitions).

This is a very powerful formalism, when working interactively,
but can cause problems in some contexts.  Email programs may
arbitrarily split lines which are "too long".  And, when working
with long names, otherwise reasonable sentences might not fit on
a reasonable line.

For example, consider trying to send an email message which
contains an opengl sentence which uses one opengl verb and
four opengl nouns

   > (\: #@>)nl_jgl3_ i.3 [ require'opengl'
GL_TEXTURE_COORD_ARRAY_POINTER_EXT
GL_COLOR_TABLE_INTENSITY_SIZE_EXT
GL_COLOR_TABLE_LUMINANCE_SIZE_EXT
GL_TEXTURE_COORD_ARRAY_STRIDE_EXT
GL_CURRENT_RASTER_POSITION_VALID
...

One solution for this conflict involves breaking up the sentence
into smaller sentences which can each fit on a single line and then
building up from there.  However, this approach can obscure the
important operations by burying them in trivia.

Another approach uses 0 :0 nouns

icosa_inds=: ".-.&(;:LF)&.;:0 :0
   0 4 1,  0 9 4,  9 5 4,  4 5 8,  4 8 1,
   8 10 1, 8 3 10, 5 3 8,  5 2 3,  2 7 3,
   7 10 3, 7 6 10, 7 11 6, 11 0 6, 0 1 6,
   6 1 10, 9 0 11, 9 11 2, 9 2 5,: 7 2 11
)

Hypothetically speaking, the key phrase here is
   ". 0 : 0

However, ". and ;: treat line feeds as a token which is
invalid in sentences, so they must be removed before the
multi-line sentence can be used.

I am wondering if one choice would be particularly good for the
long run, for people wanting to express coherent long sentences:

[0] do not use run-on sentences.

[1] use ".-.&(;:LF)&.;:0 :0

[2] define
   runon=:1 :'u 1 :(-.&(;:LF)&.;:0 :0)'
[2a] in each email message and file that uses run-on sentences.
[2b] in some miscellaneous library.
[2c] in the z locale for some future version of J.

[3] modify the dictionary, such that the line feed character
gets treated as a space by ;: (and, thus, modifying ".)

[4] modify the dictionary, such that 10 :0 reads and evaluates
a run-on sentence.

[5] something else?

[Obviously, any changes in J would be useless, until deployed.]

Thanks,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to