Re: [Jprogramming] [Jsoftware] AoC 2016 day 4

2016-12-05 Thread Rob Hodgkinson
Agree, it’s not a bug … J is simply parsing all the characters as a single literal string (because of the absence of the space); '-''a-bbb-z-y-x' -'a-bbb-z-y-x compared to this (and now you can see how the first character is available to be “bound” to become the right argument to the

Re: [Jprogramming] [Jsoftware] AoC 2016 day 4

2016-12-05 Thread Ric Sherlock
I don't think that is a bug. Just a parsing issue. Is it 1 string with an escaped single quote or 2 strings (if you use the space) Much like <;._2 0 2 3 0 2 4 4 3 2 versus <;._2 ] 0 2 3 0 2 4 4 3 2 On Tue, Dec 6, 2016 at 11:44 AM, Brian Schott wrote: > Perhaps, this is the wrong place to ask t

Re: [Jprogramming] [Jsoftware] AoC 2016 day 4

2016-12-05 Thread Brian Schott
Perhaps, this is the wrong place to ask this, but is it a bug that the next 2 expressions produce different results (Notice the extra space character in the second one)? -.&'-''a-bbb-z-y-x' -.&'-' 'a-bbb-z-y-x' abbbzyx JVERSION Engine: j805/j64/darwin Beta-9: commercial/2016

Re: [Jprogramming] [Jsoftware] AoC 2016 day 4

2016-12-05 Thread Raul Miller
On Mon, Dec 5, 2016 at 3:12 PM, Moon S wrote: > Another approach could be to left-pad all the items to the same length, so > that 'open' would give a good char matrix. >;:'this is an example' this is an example |."1>|.&.>;:'this is an example' this is an example (but you need

Re: [Jprogramming] [Jsoftware] AoC 2016 day 4

2016-12-05 Thread Moon S
> (p#n)&> applies (p#n) to each atom of t. Yeah, and even if some results are empty, it's obliged to return the same number of elements that were on the input, so the result was filled with zeros. Another approach could be to left-pad all the items to the same length, so that 'open' would give a