Re: [Jprogramming] A normal exit from a deeply embedded function to a terminal prompt, how?

2017-12-30 Thread Nick S
You are right about that, Raul. Honestly, I may do so - but I am not 100% sure the solving method will work, so I am grafting it in crudely, with stacked environments and so forth. If it does work I will do a redesign and tie things in tighter, for one thing it would allow me to see that the trial

Re: [Jprogramming] A normal exit from a deeply embedded function to a terminal prompt, how?

2017-12-30 Thread Raul Miller
The exit mechanism, throws, errors and returns are basically your options. You can combine them, of course. For example, you can catch a throw and then return. Or you can run a J instance in a separate process and then exit from that and return from the routine that started the process. Or maybe y

Re: [Jprogramming] A normal exit from a deeply embedded function to a terminal prompt, how?

2017-12-30 Thread Jimmy Gauvin
exit quits the J environment maybe a return. directive with an appropriate return code would do the job On Sat, Dec 30, 2017 at 7:48 PM, Nick S wrote: > Well, exit'' takes J down completely. > > -- For information about J forums

[Jprogramming] A normal exit from a deeply embedded function to a terminal prompt, how?

2017-12-30 Thread Nick S
Well, exit'' takes J down completely. I have read through most of the foreigns again, and through doc, and I searched the messages from this forum for a bit. Either I can't find the right search string or it has not been discussed since I have begun following this. I just can't find an answer.

Re: [Jprogramming] new years eve puzzle

2017-12-30 Thread Jimmy Gauvin
Still thinking about the puzzle. Some tools to explore the properties of the conjecture: NB. pretty print toca =: '0123456789' {~ ] tobi =: 3 : '(2#~1+>.2^.>./y)#:y' todc =: 3 : '(10#~>.10^.>./y)#:y' todcc =: 3 : '(1+>.10^.>./y)":,.y' NB. divisor formula from Roger Hui, http://cod

[Jprogramming] new years eve puzzle

2017-12-30 Thread R.E. Boss
From http://list.seqfan.eu/pipermail/seqfan/2017-December/018222.html " Consider the divisors of 136 (A018299): 1, 2, 4, 8, 17, 34, 68, 136. 136 in binary is 10001000. Reading off successive bits from the left we have: 1 1 10 2 1004 1000 8 10001 17 10001034 1

Re: [Jprogramming] Boxing words

2017-12-30 Thread Jimmy Gauvin
The outermost pair of quotes are enclosing the inner pairs. So you count the pairs and subtract one. The formula below gives the table but builds it the other way around. It calculates how many pairs are needed to produce n quotes. (,.~+:&>:)i.10 2 0 4 1 6 2 8 3 10 4 12 5 14 6 16 7 1

Re: [Jprogramming] Boxing words

2017-12-30 Thread Linda Alvord
Thanks for all the help on explaining T and U. Here is my next question: ]V=:((i.8) >:/4#i.8){' '''