I think ragged lines in this context means delimited text (not fixed width).

It sounds like the author recognizes the options:

"For J the choice is not quite as clear. One way of loading the data
would be to `box' each line and then create a vector of boxes to
represent all of the data in the file. This works fine, but whenever
we want to work with the characters within a line, we'd have to unbox
it before doing so. An alternative would be to load the file as a
character array, but this would necessitate `squaring up' the data,
padding each of the lines out to match the length of the longest
single line, thus producing a rectangular matrix. While either of
these choices could be made to work, they generally seem, to me at
least, to be somewhat cumbersome in comparison with K's much more
straightforward treatment."


What's unclear to me is what the author means by this: "but whenever
we want to work with the characters within a line, we'd have to unbox
it before doing so." - specifically what "work with the characters"
means.

tbl =: < ;._2@,&' ';._2 (0 : 0)
hello world
foo bar
test test
)


No unboxing is needed to check for a match:

(0{"1 tbl) i. (<'hello')
(<'hello') = (0{"1 tbl)

but if we did want to substring one of those cells, you would need to unbox:

0{"1 each 0{"1 tbl

but I don't see that as a material inconvenience and is rather unusual
in my experience





On Wed, Nov 4, 2015 at 3:48 PM, Raul Miller <[email protected]> wrote:
> Interesting that he says J would cost him to use, and K is free for him to 
> use.
>
> My experience has been exactly the opposite.
>
> (Also, I didn't see any specific examples involving textual ragged lines.)
>
> Thanks,
>
> --
> Raul
>
>
> On Wed, Nov 4, 2015 at 2:53 PM, Wendell P <[email protected]> wrote:
>>> I don't understand the issue with uneven lines. I haven't encountered
>>> that before. Can you give a more concrete example of it?
>>
>> David Ness wrote are few things here and there about ragged lines. In
>> this essay, for example.
>> http://www.nesssoftware.com/home/dn/JKExperiments/fog0000000012.html
>>
>>> Sidebar: Jan-Pieter Jacobs has shared some J ML code at
>>> https://gist.github.com/jpjacobs
>>
>> Here is someone doing ML with Q.
>> https://mlwkdb.wordpress.com/
>>
>>
>> --
>> http://www.fastmail.com - Accessible with your email software
>>                           or over the web
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to