OK, I have fixed all the problems reported.
Ian,
The script you pointed to has a line
[: 0
and a place where the name
tte_r
, which was created by 5!:0, has unknown type. Use lint directives to
get a clean run.
Bill,
jzgrid and jzplot now run without crashing. They produce 1300 and
1000 errors respectively, mostly names that are defined by a verb. The
next step would be to use lint directives, and ordering of the code, to
eliminate the errors. Seeing how many break. and continue. words are
used (they caused lint trouble and they will cause a human analyzer
trouble too!), this might be a worthwhile project - but not one I plan
to undertake.
Thanks to all for the bug reports, which uncovered about 6 program
logic errors. If anyone reading has a program they want to try, bring
it on - you might be surprised, as I have been, about what errors lurk
in a supposedly-debugged program.
Henry Rich
On 9/4/2012 9:46 PM, bill lam wrote:
I also find lint failed for explicit noun that contain quote,
---- a1.ijs
foo=: 0 : 0
I don't know
)
will crash
lint 'a1.ijs'
|open quote
| I don't know
| ^
| estartx=.I._1~:(<0 0)&{::@(exppatt&rxmatch)@>
}:^:('NB.'-:3{.>@{:)&.;:&.>lines
Втр, 04 Сен 2012, Henry Rich писал(а):
If you have something that makes lint crash, I'd like to see it (I'm
working through plot now).
You shouldn't expect every working script to fly through lint. In
particular, global initialization inside a verb will require that you
use lint directives to notify lint what's happening.
But I have gotten some pretty long apps to go cleanly through after I
told lint what was going on.
Henry Rich
On 9/4/2012 9:28 PM, Ian Clark wrote:
Yes, I've found a script or two which makes lint fall over...
But IMO the facility is useful and important enough to deploy it now,
even in its "alpha" state (as I think Henry called it). Every addon
has bugs.
On Wed, Sep 5, 2012 at 2:16 AM, bill lam <[email protected]> wrote:
I found lint incapable for checking more complex scripts. specifically
lint 'jzplot' or lint' jzgrid' will raise strange error.
Втр, 04 Сен 2012, Henry Rich писал(а):
OK, I changed the menu to make the Ctrl-1 key available (will not be
available for a little while, whenever Chris rebuilds the base).
The lint menu becomes available for any window created AFTER you load
lint. So if you do
load 'debug/lint'
you'll have it for scripts opened thereafter. But I assumed that any
lint user would load it during startup, as you ended up doing.
Yes, it's a shy facility! I was reluctant to make a change that
would surprise anybody. But I like your idea, which I will repeat as
0. Make the menu line visible if ~addons/debug/lint/lint.ijs is found
1. Make the menu line enabled for IJS
2. If the menu line is selected, require 'debug/lint' before running lint
I'm willing to do this, but not without general agreement. Does this
sound OK, guys?
Henry Rich
On 9/4/2012 8:32 PM, Ian Clark wrote:
Very nice, Henry.
May I offer some suggestions to gild the lily? Sorry if there's too
much detail here. It's meant to clarify my meaning, rather than try to
tell you what you'll know even better than I do.
I'm running on a Macintosh, so what I say may not be quite the
behavior under Windows, but here goes...
This is a very "shy" facility, and IMO it will be easily overlooked by
a casual user. I had to read the code in ~system/extras/util/jijs.ijs
to find out how to make the said menu item appear.
I was only able to do so by inserting the line:
load 'debug/lint'
in my startup.ijs. It didn't work to enter the above line in the session window.
Even then, I could only see the new menu item: Run > Window and Syntax
Check (Ctrl+1) when a script was opened in an IJS window and the
window was uppermost (=selected).
AFAICS the script jijs.ijs sets a flag "nolint" by detecting the
presence of the verb: lint_lint_ .
I suggest instead setting "nolint" by detecting the presence of the
script: ~addons/debug/lint/lint.ijs .
If the script is present, configure the Run menu to show "Window and
Syntax Check" all the time, but grayed out unless an IJS window is
open and selected.
...In fact, more like the behavior of menu item "editlint": Edit >
Format Script ⌘L
If the menu item: Run > Window and Syntax Check is selected, only then
load lint.ijs, so the _lint_ locale is only present if required. I
guess this can be done by having the verb: "runlint" execute:
require 'debug/lint'
just before the "runimmx1" sentence.
...Again, much as is done in verb: "lint" -the prettyprinter which
runs when "editlint" is selected.
And BTW the "runlint" entry in noun: JIJSMAC needs to be:
menu runlint "Window and Syntax &Check" "Ctrl+1" "" "";
instead of:
menu runlint "Window and Syntax &Check (Ctrl+1)" "" "" "";
This then shows correctly in the Run menu on the Mac as:
Window and Syntax Check ⌘1
and the shortcut ⌘1 (=Maccy name for hotkey) then works okay (at least
it does for me).
Ian
On Thu, Aug 30, 2012 at 11:57 PM, Henry Rich <[email protected]> wrote:
In the latest J602 base library, if you have lint installed, you will get a
Run menu option to run lint on the current window. Ctrl-1 is the shortcut
for this action.
Henry Rich
----------------------------------------------------------------------
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
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
----------------------------------------------------------------------
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