I've gotten a job to produce training data for an AI programming assistant, a pair programmer.  Training takes place by my choosing the best of 5 answers it offers, and in some cases write better answers.  Anyway, I'm showing j to it.

Assistant
check_columns=: (0 -.@:e. [: , (0 1,9 1) validate_block;.3 ])
Human
Good, but that (0 1,9 1)  needs to be laminated, not concatenated.  The x argument to this cut is a matrix.
Assistant
:,
Human
,:  NB. laminate
Assistant
check_columns=(0 -.@:e. [:, (0 1; 9 1) validate_block;.3 ])
Human
Instead of laminate, open boxes is another common way to create a matrix.    (> 0 1; 9 1)
Assistant
Yes, and now the test above passes.
Human
True, although I suspect you guessed.
Assistant
Let's put it all together.

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

Reply via email to