I think that means your base library is out of date.  The names

IFJ6 and IFCONSOLE

should be defined in C:\J\system\main\sysenv.ijs.

I will be working presently on getting it to run under J7 grid.

Henry Rich

On 12/29/2012 4:30 AM, Linda Alvord wrote:
Henry, I have not used j6 in a long time and I updated everything and then
tried to use your program.

Load 'debug/dissect'
|control error: script
|       3 :0''
|[-49] C:\Users\owner\j602\addons\debug\dissect\dissect.ijs

Linda

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Henry Rich
Sent: Friday, December 28, 2012 1:27 PM
To: Programming forum
Subject: [Jprogramming] Announcing: dissect, the 2-D J sentence analyzer;
and request for a collaborator

I have written a grid-based application that displays the execution of a J
sentence in a 2-D grid and allows you to poke around and see what happened.
I hope that this will speed up the learning curve for new J users.  It is a
revolutionary way to view J execution.  J is one of the few languages where
such a display would work, and it might help users overcome the barrier of
visualization.

The package is debug/dissect, downloaded from Package Manager.  It works
only for J6, and that is why I am asking for a collaborator.  If it just had
a better UI, with little boxes and arrows instead of a grid...

When you download the package, make sure you update your base library, which
has updates needed for dissect.

Once you have loaded the package, you can try it on sentences.  Here is one
from recent Forum traffic:

     20 5 0(*`%/"2@(,: (%:@* -.))@((,: , 1"1) % +/@[))10

clear, eh?  But maybe you'd like to see it in 2D:

     ds '20 5 0(*`%/"2@(,: (%:@* -.))@((,: , 1"1) % +/@[))10'

You can click on a cell to get more detail, or CTRL-click to get more detail
for the cell and all its ancestors.  With detail, the shapes are shown, with
a slash separating the shape from the frame.  When there is a modifier with
a frame, you will get a 'selector' - a bright green box where you can enter
the indexes of the cell you want to look at.
Double-click the selector to edit it, and when you press ENTER the selected
operands, and the corresponding result, will be displayed.

Individual verbs that have a frame can be inspected by clicking the verb;
rank operators can be drilled into by clicking.  You will get selectors that
you can use to go deeper.

If your sentence blew up, ds will show you what was happening just before
the explosion.

     left =. 3 2;5 1 3;4 6
     right =. 3 2;4;,4
     left +&.> right
|length error
|   left    +&.>right

Where did it blow up?

     ds 'left +&.> right'

will take you right to the error.

This is half-finished, pre-alpha code.  I am releasing it because, as
indispensable as grid has been for prototyping, I think dissect could be
really great if freed from the formatting requirements of grid.  If the
blocks were placed on the screen in pixel positions rather than grid cells,
the layout would be more compact and more stable during inspection.

On J6, that would mean managing an isigraph.  As I understand it, J7 doesn't
have isigraph controls, but it sounds like there are other graphics features
that might do the job.  (The first step might be to get the grid version
working on J7.)  So I am asking for someone to step up and write the screen
interface for J7. This would involve designing the new look, and then
translating my verbs that format the display (basically, I have one verb for
each J modifier) and handling clicks.  I will be working on finishing the
engine.  The screen-interface code that I am asking for is a small fraction
of the total code for the project.

As of now, dissect handles verbs, nouns, and the structural modifiers:

@ @: & &: &. &.: " ~ ` hook fork

It also treats ] [ [: as flow control, and removes them from the display.

Missing are the computational modifiers / ;: ^: etc.  I need to handle them
one by one: decide the display, decide what selections will be supported,
then implement.  This is what I will be doing next (after I finish fixing
display errors and other bugs).

Even in its skeletal form, dissect can make learning J easier.  I will be
giving it to my students to try next semester.

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

Reply via email to