Everything is as expected with Windows 10. 

  In the absence of mean, running the statement   trajectory U   with
the J debugger raises the value error and the stack gives the line of
the error with the usual spaces before the culprit token:

value error
Fold_j_[42] S=:S-e*    mean y,V
trajectory[0] u F: v y

  That is much much better and allows to debug complex programs easily.

  Perfect!

===

  About the Qt IDE, I note

Windows: Qt IDE: 1.8.4/5.12.5

Linux: Qt IDE: 1.8.1/5.5.1

  Let's hope for a Linux catch up. The solution is perhaps there.

  ~ Gilles

Le 2019-10-17 à 19:25, 'robert therriault' via Beta a écrit :
> I commented out mean by putting NB. at the front of the line of its 
> definition. The script that I ran is the one that is attached to the email 
> below and I see 
>
>>> NB.mean =: +/ % #  NB. definition of mean - VERB
> immediately above the definition of trajectory. 
>
> I am running 
>
> iMac Pro (2017)
> Processor 3 GHz Intel Xeon W
> Memory 64 GB 2666 MHz DDR4
> Graphics Radeon Pro Vega 64 16 GB
>
> macOS Mojave Version 10.14.6
>
> Cheers, bob
>
>> On Oct 17, 2019, at 4:17 PM, Henry Rich <[email protected]> wrote:
>>
>> It doesn't fail for me under Windows.  The script you sent didn't have 
>> 'mean' commented out, but when I commented it out it still didn't fail.
>>
>> Henry Rich
>>
>> On 10/17/2019 7:03 PM, 'robert therriault' via Beta wrote:
>>> Okay Henry,
>>>
>>> I started a fresh session
>>>
>>>     JVERSION
>>> Engine: j901/j64avx2/darwin
>>> Beta-m: commercial/2019-10-02T11:28:59
>>> Library: 9.01.10
>>> Qt IDE: 1.8.3/5.12.3
>>> Platform: Darwin 64
>>> Installer: J901 install
>>> InstallPath: /users/bobtherriault/j901
>>> Contact: www.jsoftware.com
>>>
>>> Opened debug (no verbs)
>>>
>>> loaded the following script from a temp file
>>>
>>>  cocurrent 'base'
>>> require 'plot'
>>> MAXITER=: 50    NB. safety long-stop
>>> S=: 100         NB. height above ground (m) - UPDATED
>>> T=: 0           NB. time at end of current epoch (s) - UPDATED
>>> e=: 0.1         NB. time interval of simulation epoch (s) - CONST
>>> U=: 0           NB. starting velocity (m/s) - CONST
>>> V=: U           NB. velocity at end of current epoch (s) - UPDATED
>>> g=: 9.81        NB. acceleration due to gravity at earth surface (m/s^2) - 
>>> CONST
>>> NB.mean =: +/ % #  NB. definition of mean - VERB
>>>
>>> trajectory=: monad : 'u F: v y'
>>>
>>> u=: monad define
>>>   NB. Trajectory of solid object in free-fall
>>> _3 Z: MAXITER             NB. Stop Fold when there have been too many 
>>> iterations
>>> _2 Z: S<:0                NB. Stop Fold when object hits the ground
>>>   NB. Recurrence relation is based on free-fall formula: V = U + gt
>>> V=: y + g*e               NB. free-fall: vertical velocity at end of epoch
>>> S=: S - e*mean y,V        NB. free-fall: vertical height at end of epoch
>>> T=: T + e                 NB. time of flight at end of epoch
>>> if. S<:0 do. smoutput '+++ LANDED: T=',":T end.
>>> V return.
>>> )
>>>
>>> v=: monad : 'S'
>>>
>>> plot trajectory U
>>>
>>>
>>> Note that 'mean' is commented out, and when I loaded this script the 
>>> session crashed.
>>>
>>> I am emailing the crash report directly to you.
>>>
>>> Let me know if there is anything else you require.
>>>
>>> Cheers, bob
>>>
>>>> On Oct 17, 2019, at 3:51 PM, Henry Rich <[email protected]> wrote:
>>>>
>>>> Certainly, if you have a crash I'd like to know about it.  What I need is 
>>>> a script that will crash when run from a fresh session.
>>>>
>>>> Henry Rich
>>>>
>>>> On 10/17/2019 6:47 PM, 'robert therriault' via Beta wrote:
>>>>> Sorry about that Henry, I have updated now.
>>>>>
>>>>> On the last run, I ended up having to go into the Activity Monitor to 
>>>>> force quit the J process.
>>>>>
>>>>> When I reopened the session, I updated the addons (including base) and 
>>>>> restarted and the reloaded the project that the trajectory script was in. 
>>>>> When I loaded that script the first time:
>>>>>
>>>>>     load '/users/bobtherriault/j901-user/projects/enhanced/jig6.ijs'
>>>>> |fold limit: trajectory
>>>>> |       u F:v y
>>>>> |[-346] /users/bobtherriault/j901-user/projects/enhanced/jig6.ijs
>>>>>
>>>>> Subsequent loading of the script results in everything running smoothly 
>>>>> even after executing clear '' plots display as expected
>>>>>
>>>>> Loading with mean commented out and debug off I get
>>>>>
>>>>>     load '/users/bobtherriault/j901-user/projects/enhanced/jig6.ijs'
>>>>> |value error: trajectory
>>>>> |       u F:v y
>>>>> |[-346] /users/bobtherriault/j901-user/projects/enhanced/jig6.ijs
>>>>>
>>>>> Turning debug on after executing clear '' of course revealed no verbs in 
>>>>> the base locale. Loading the script again caused J to crash ( I can send 
>>>>> the crash report if that is useful)
>>>>>
>>>>> Restarting J and running the script I once again get the expected:
>>>>>
>>>>>     load '/users/bobtherriault/j901-user/projects/enhanced/jig6.ijs'
>>>>> |value error: trajectory
>>>>> |       u F:v y
>>>>> |[-346] /users/bobtherriault/j901-user/projects/enhanced/jig6.ijs
>>>>>
>>>>> Then I clear '' and this time load the script first and then start the 
>>>>> debugger (the default is trajectory). Loading script crashes again ( 
>>>>> crash report saved for this one as well)
>>>>>
>>>>> Let me know if you want the crash reports.
>>>>>
>>>>> Cheers, bob
>>>>>
>>>>>> On Oct 17, 2019, at 3:17 PM, Henry Rich <[email protected]> wrote:
>>>>>>
>>>>>> You have not updated the dev/fold addon to 1.0.5 level.
>>>>>>
>>>>>> Henry Rich
>>>>>>
>>>>>> On 10/17/2019 6:14 PM, 'robert therriault' via Beta wrote:
>>>>>>> Hi Gilles,
>>>>>>>
>>>>>>> When I comment out the definition of mean and then clear the base 
>>>>>>> locale and run with debug on I get the following in the top pane of the 
>>>>>>> debugger I get 59 lines with a '>' indicating line 41 (would be simpler 
>>>>>>> if I could copy the results that show up in the pane but don't know 
>>>>>>> how).
>>>>>>>
>>>>>>> In the second pane I get:
>>>>>>> value error
>>>>>>> Fold_j_[41] 13!:8 ] 13!:11''[FoldZv_j_=:fzv
>>>>>>> trajectory[0] u F: v y
>>>>>>> script[0] {: 3 : '0!:0 y [ 4!:55<''y''' jpath_z_&.:>
>>>>>>> fn[tacit] script
>>>>>>> load[7] fn fl
>>>>>>> load[0] 0 load y
>>>>>>>
>>>>>>> I am not sure how to interpret that, but is the result that I get. I am 
>>>>>>> running it by loading a script with the definitions and final line:
>>>>>>>
>>>>>>> plot trajectory U
>>>>>>>
>>>>>>> I get the same result running that line in the Qt IDE
>>>>>>>
>>>>>>> And now the debugger has become non operational. Buttons do highlight, 
>>>>>>> but do not do anything and the debugger will not clear or exit. The 
>>>>>>> script window can be edited and loaded but the execution window only 
>>>>>>> responds with the load command and does not update. Toggling between 
>>>>>>> windows does not include the debug window, although it can be selected 
>>>>>>> when clicked on.
>>>>>>>
>>>>>>> Hope this helps!
>>>>>>>
>>>>>>> Cheers, bob
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> On Oct 17, 2019, at 2:26 PM, Gilles Kirouac <[email protected]> wrote:
>>>>>>>>
>>>>>>>> Bob
>>>>>>>>
>>>>>>>>   The trajectory script uses *mean* in the definition of u. If you run
>>>>>>>> trajectory *without* the  definition of mean, it should result in a
>>>>>>>> value error. Right?
>>>>>>>>
>>>>>>>>   Now run the same under the J debugger to see if it can pinpoint that
>>>>>>>> the value error is on *mean*.
>>>>>>>>
>>>>>>>>   I will do the same on Win10 shortly.
>>>>>>>>
>>>>>>>>   ~ Gilles
>>>>>>>>
>>>>>>>> Le 2019-10-17 à 17:05, 'robert therriault' via Beta a écrit :
>>>>>>>>> Trajectory runs fine for me on a Mac.
>>>>>>>>>
>>>>>>>>>    JVERSION
>>>>>>>>> Engine: j901/j64avx2/darwin
>>>>>>>>> Beta-m: commercial/2019-10-02T11:28:59
>>>>>>>>> Library: 9.01.08
>>>>>>>>> Qt IDE: 1.8.3/5.12.3
>>>>>>>>> Platform: Darwin 64
>>>>>>>>> Installer: J901 install
>>>>>>>>> InstallPath: /users/bobtherriault/j901
>>>>>>>>> Contact: www.jsoftware.com
>>>>>>>>>
>>>>>>>>> I note that the Qt IDE and the libraries differ from Gilles, but this 
>>>>>>>>> would be natural for a different operating system, right?
>>>>>>>>>
>>>>>>>>> Cheers, bob
>>>>>>>>>
>>>>>>>>>> On Oct 17, 2019, at 1:51 PM, Henry Rich <[email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>> I don't have Linux.  It runs correctly on Windows for me.
>>>>>>>>>>
>>>>>>>>>> Henry Rich
>>>>>>>>>>
>>>>>>>>>> On 10/17/2019 4:30 PM, Gilles Kirouac wrote:
>>>>>>>>>>>  I am now getting an interpreter crash.
>>>>>>>>>>>
>>>>>>>>>>>  I updated three scripts through PacMan. dev/fold is now at level
>>>>>>>>>>> 1.0.5. Then ran the same Trajectory script. Without the debugger, I 
>>>>>>>>>>> get
>>>>>>>>>>> the normal value error: trajectory. Doing the same with the J 
>>>>>>>>>>> debugger
>>>>>>>>>>> but with the J session run under gdb here is the result:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> gilles@T530gk ~/j901 $ gdb bin/jqt
>>>>>>>>>>> ...
>>>>>>>>>>> (gdb) run
>>>>>>>>>>> Starting program: /home/gilles/j901/bin/jqt
>>>>>>>>>>> [Thread debugging using libthread_db enabled]
>>>>>>>>>>> Using host libthread_db library 
>>>>>>>>>>> "/lib/x86_64-linux-gnu/libthread_db.so.1".
>>>>>>>>>>> [New Thread 0x7fffe4b49700 (LWP 8058)]
>>>>>>>>>>>
>>>>>>>>>>> Thread 1 "jqt" received signal SIGSEGV, Segmentation fault.
>>>>>>>>>>> 0x00007fffda5cd1ed in suspset () from /home/gilles/j901/bin/libj.so
>>>>>>>>>>> (gdb)
>>>>>>>>>>>
>>>>>>>>>>>  I did it twice to make sure I was not doing something silly.
>>>>>>>>>>>
>>>>>>>>>>>  ~ Gilles
>>>>>>>>>>>
>>>>>>>>>>> Le 2019-10-17 à 11:51, Henry Rich a écrit :
>>>>>>>>>>>> Gilles,
>>>>>>>>>>>>
>>>>>>>>>>>>  I have modified the Fold script so that it allows messages from
>>>>>>>>>>>> execution of the user's verb to be displayed and debugged.  Use
>>>>>>>>>>>> Package Manager to update dev/fold - no need for a new beta.
>>>>>>>>>>>>
>>>>>>>>>>>>  I hope that suits better.
>>>>>>>>>>>>
>>>>>>>>>>>> Henry Rich
>>>>>>>>>>>>
>>>>>>>>>>>> On 10/11/2019 11:27 AM, Gilles Kirouac wrote:
>>>>>>>>>>>>> I installed beta-k then m on Linuxmint 64b
>>>>>>>>>>>>>
>>>>>>>>>>>>> My desktop directory is named Bureau, not Desktop. The installer 
>>>>>>>>>>>>> is thus
>>>>>>>>>>>>> unable to install shortcuts on Desktop. Minor annoyance. I 
>>>>>>>>>>>>> created a
>>>>>>>>>>>>> link to Bureau for next time. May be suggest to do so in install
>>>>>>>>>>>>> instructions. I added a few qt5 missing packages.
>>>>>>>>>>>>>
>>>>>>>>>>>>> With the current IDE, to find the syntax of std lib utilities 
>>>>>>>>>>>>> (e.g.
>>>>>>>>>>>>> dates, files, strings, text), I have to go through Help, Help, 
>>>>>>>>>>>>> Usr,
>>>>>>>>>>>>> Standard Library, ... More importantly I have to KNOW that the 
>>>>>>>>>>>>> std lib
>>>>>>>>>>>>> doc is there.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Do you think a newcomer will easily explore to that level? The 
>>>>>>>>>>>>> Library
>>>>>>>>>>>>> is a selling point. It should be easy to get to. And IMO the Lib 
>>>>>>>>>>>>> is more
>>>>>>>>>>>>> useful to anyone than Foreigns.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Two years ago, I proposed to add a line to the Help Menu pointing 
>>>>>>>>>>>>> to the
>>>>>>>>>>>>> std lib doc. IIRC the proposal was accepted, but ... so I 
>>>>>>>>>>>>> reiterate.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Having launched jqt through a terminal, I received the following:
>>>>>>>>>>>>>
>>>>>>>>>>>>> QPaintDevice::metrics: Device has no metric information
>>>>>>>>>>>>>
>>>>>>>>>>>>> Should I worry?
>>>>>>>>>>>>>
>>>>>>>>>>>>> I briefly experimented with Fold after reading the Release Notes. 
>>>>>>>>>>>>> Those
>>>>>>>>>>>>> could include a link to 
>>>>>>>>>>>>> https://code.jsoftware.com/wiki/Vocabulary/fcap,
>>>>>>>>>>>>> which I found through a web search.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I tried to run the Trajectory example from that page and got a 
>>>>>>>>>>>>> value
>>>>>>>>>>>>> error. Where? A visual look at the script revealed a susceptible
>>>>>>>>>>>>> culprit: mean. Added require 'stats/base' and it ran.
>>>>>>>>>>>>>
>>>>>>>>>>>>> While trying the Trajectory, I ran the script with the debugger. 
>>>>>>>>>>>>> [The
>>>>>>>>>>>>> debugger did not fail, great!] The value error on mean was not 
>>>>>>>>>>>>> obvious.
>>>>>>>>>>>>> The stack is given as:
>>>>>>>>>>>>> value error
>>>>>>>>>>>>> Fold_j_[40] 13!:8]13!:11''[FoldZv_j_=:fzv
>>>>>>>>>>>>> trajectory[0] u F: v y
>>>>>>>>>>>>>
>>>>>>>>>>>>> This Trajectory example is a simple case. I suspect that errors 
>>>>>>>>>>>>> in more
>>>>>>>>>>>>> complex cases may not be easy to analyze.
>>>>>>>>>>>>>
>>>>>>>>>>>>> From a notational point of view, the Fold family is a great 
>>>>>>>>>>>>> addition, I
>>>>>>>>>>>>> think.
>>>>>>>>>>>>>
>>>>>>>>>>>>>    JVERSION
>>>>>>>>>>>>> Engine: j901/j64avx/linux
>>>>>>>>>>>>> Beta-m: commercial/2019-10-02T09:15:44
>>>>>>>>>>>>> Library: 9.01.10
>>>>>>>>>>>>> Qt IDE: 1.8.1/5.5.1
>>>>>>>>>>>>> Platform: Linux 64
>>>>>>>>>>>>> Installer: J901 install
>>>>>>>>>>>>> InstallPath: /home/gilles/j901
>>>>>>>>>>>>> Contact: www.jsoftware.com
>>>>>>>>>>>>>      ~ Gilles
>>>>>>>>>>>>>
>>>>>>>>>>>>> ----------------------------------------------------------------------
>>>>>>>>>>>>> For information about J forums see 
>>>>>>>>>>>>> http://www.jsoftware.com/forums.htm
>>>>>>>>>>> ----------------------------------------------------------------------
>>>>>>>>>>> For information about J forums see 
>>>>>>>>>>> http://www.jsoftware.com/forums.htm
>>>>>>>>>> -- 
>>>>>>>>>> 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
>>>>>>>>> ----------------------------------------------------------------------
>>>>>>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>>>>> ----------------------------------------------------------------------
>>>>>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>>>> ----------------------------------------------------------------------
>>>>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>>> ----------------------------------------------------------------------
>>>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>> ----------------------------------------------------------------------
>>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to