This is fixed for the next beta.

Henry Rich

On 3/28/2021 2:22 PM, 'Michael Day' via Beta wrote:
Thanks, though I don't recall "PPPP;" Wiki reveals some unlikely matches, including
Pigeons Playing Ping Pong.

I agree that the timing numbers are "correct."  I don't know the same about the numbers replacing parts of the code.  The display is still quite useful, but it is of course preferable
to see what one has typed.

I've just checked back in J902 - the display is ok for F[14] and I didn't manage to get jpm to misbehave otherwise as it had done for me recently!  I'll try to remember to report when
and if I encounter the problem I have in mind.

Happy hunting!

Mike


On 28/03/2021 17:44, Henry Rich wrote:
Thanks for taking up beta-g so promptly!

I believe you have hit a problem related to PPPP.  Starting with beta-g the sequence  (2*+/@:e.~) is detected at function-definition time and parsed then, saving time during execution of the verb.  I have no reason to suspect an error in that, and I think the numbers in the result are correct.

The error is in the display generated by showdetail.  Before PPPP, the only things that could possibly be in an explicit definition were primitives and names.  Now, they include anonymous compounds, and something doesn't know how to format them.  I thought I had found where the explicit definition was displayed but there must be another place.

I'll have to look into showdetail and see where it picks up its view of the executing definition.  If anybody knows that & can tell me, I'd be obliged.

Henry Rich

On 3/28/2021 12:25 PM, 'Michael Day' via Beta wrote:
I haven't noticed this before using jpm, using beta g here.
The showdetail_jpm_ display is now sometimes showing apparent
constants replacing parts of an expression.  I doubt the constants
are constant,  but haven't checked.  I also doubt whether it matters
much what the function is trying to do.

It is however satisfying that jpm works at all;  I've had trouble avoiding errors preventing showdetail recently,  not reported because difficult to
pin down,  explain what I'm doing.

   JVERSION
Engine: j903/j64avx2/windows
Beta-g: commercial/2021-03-27T13:01:30
Library: 9.03.01
Qt IDE: 1.9.2/5.12.10(5.12.10)
Platform: Win 64
Installer: J903 install
InstallPath: c:/d/j903-beta
Contact: www.jsoftware.com

   start_jpm_ 100000000
1785713

   timer'F p:300'
+---------+-------+
|0.0170059|1326672|
+---------+-------+

NB. look at line [14] in this display cf the Function listing further below.
NB. I've tried setting fixed width below,  without apparent success!

showdetail_jpm_ 'F'

Time (seconds)

+--------+--------+----+--------------------------------------+

|all |here |rep |F |

+--------+--------+----+--------------------------------------+

|0.000001|0.000001| 1|monad |

|0.000001|0.000001| 1|[0] p=.y |

|0.000006|0.000001| 1|[1] by=.p mtimes |

|0.000004|0.000001| 1|[2] ad=.p madd |

|0.000001|0.000001| 1|[3] echo |

|0.000024|0.000017| 1|[4] all3=.}.a3=.a by*:a=.i.p |

|0.000010|0.000010| 1|[5] if. p=#~.a3 do. (-~2*:)<:p return.|

|0.000000|0.000000| 0|[6] else. |

|0.000000|0.000000| 1|[8] end. |

|0.000000|0.000000| 1|[9] echo |

|0.000015|0.000009| 1|[10] t=.+/}.a3 e.~ad~a3 |

|0.000104|0.000104| 1|[11] for_i. i.<:p do. |

|0.001148|0.001148|1992|[12] a3=.}.a3 |

|0.005897|0.001223|1992|[13] try=.({.ad}.)a3 |

|0.005955|0.005955|1992|[14] t=.t+ti=.all3(23*)try |

|0.000090|0.000090|1992|[16] end. |

|0.000003|0.000003| 1|[17] t |

|0.013259|0.008565| 1|total monad |

+--------+--------+----+--------------------------------------+



   F
3 : 0
p =. y
by=. p mtimes
ad=. p madd
echo
all3 =. }. a3=. a by *: a =. i.p
if. p = #~.a3 do. (-~*:) <: p return.
else.
end.
echo
t =. +/ }. a3 e.~ ad~ a3
for_i. i.<:p do.
   a3       =. }. a3
   try      =. ({.ad}.)a3
   t        =. t + ti =. all3 (2*+/@:e.~)  try     NB. where does "23" come from
end.
t
)

Cheers,

Mike








--
This email has been checked for viruses by AVG.
https://www.avg.com

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

Reply via email to