Re: [Jprogramming] A practical problem: minimum distance with penalties

2016-02-29 Thread Henry Rich
I can't follow what the verb is doing, but I tried it on some other cases & it produced correct results. Needless to say, a much faster version is needed. Even the little piece excP, which potentially runs the verb < on each atom, would be too slow. Henry Rich On 2/29/2016 5:36 PM, Brian Sc

Re: [Jprogramming] Fractals, Visualization and J, Fourth edition, Part 1

2016-02-29 Thread Cliff Reiter
Ian, Thanks for your kind words. The link I gave was a page of mine that had links plus sample sections and the table of contents. http://webbox.lafayette.edu/~reiterc/j/fvj4/index.html Cool to know the amazon link is up and running. Though lulu is cheaper. Lulu also has a pdf version: http://ww

Re: [Jprogramming] A practical problem: minimum distance with penalties

2016-02-29 Thread Brian Schott
I have a non iterative script which seems to work on the test sample. Can you tell me if it works more generally, please? H =: 99 NB. can be any large value, like 1e6 L =: _1 D =: H, H, 1, H, 5, H, 8, H, 11, L, L, H, H, 20,3 P =: 1, 1, 1, 2, 4, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2 excP =: (1,L=])<;._1

Re: [Jprogramming] Fractals, Visualization and J, Fourth edition, Part 1

2016-02-29 Thread William Tanksley, Jr
I think you should post THAT review on Lulu -- it persuaded me. On Sun, Feb 28, 2016 at 6:38 PM Ian Clark wrote: > Thanks for bringing this up-to-date, Cliff. Eager for Part 2. > > This has long been on my bucket-list for serious study, of the sort I > last gave to "At Play With J" by J doyen Ge

Re: [Jprogramming] Imaginary Squares

2016-02-29 Thread Michal Wallace
Hrm. I don't understand. It should definitely be (| j. 1:), not (] j. 1:). The idea is that you're taking a line with length (%: n) and using it to construct a line with length (%: n+1). So for example, the distance (|) from 0j0 to 1j1 is (%: 2). Now you want to make a right triangle whose sides