On Sat, Jan 06, 2024 at 09:00:53AM +0800, Qian Yun wrote:
>
>
> On 1/6/24 06:05, Waldek Hebisch wrote:
> > On Thu, Jan 04, 2024 at 07:12:33PM +0800, Qian Yun wrote:
> > > How do you suggest to proceed the "looping in recursive stats"
> > > problem?
> >
> > ATM removing 'initializeTimedNames' from 'processInteractive' looks
> > like safest and simplest fix. But it needs a bit more testing.
> 2 problems:
>
> 1. "$timedNameStack" will keep growing when throw to toplevel, e.g:
>
> 1/0
Yes, we need to do something with this.
> 2. "initializeTimedNames" also clears old stats information stored
> in symbols of "$interpreterTimedNames". Otherwise the stats keep
> accumulating.
Well, much of the trouble is that AFAICS in some cases we prefer
to keep accumulating stats. In other cases we want separate
stats (in particular for ')read' we want separate stats).
In short term I see two possibilities:
1) use my original patch
2) use your dynamic variable change to 'processInteractive'
Both changes get rid of crashes and consequently solve problem
in case when we do not need statistics. AFAICS both have
problem that commands that throw will be accounted in wrong
way, my patch will effectively ignore them, your will charge
time spent in inner context to outer context.
> This will not be a problem once I store the stats info in
> "$timedNameStack".
I think that still there will be issue: different ways of
calling interpreter should behave differently.
BTW: AFAICS trouble with system commands affects not only ')read':
many system commands use 'terminateSystemCommand' which throws to
reader. This aborts statement calling 'systemCommand'. And
effects on statistic subsystem are strange (IIUC system commands
normally are not subject to reporting statistics).
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/ZZq81pstFn-AYAWp%40fricas.org.