[Jprogramming] Announcing: dissect, the 2-D J sentence analyzer; and request for a collaborator
Henry Rich
HenryHRich at nc.rr.com
Sat Dec 29 01:44:17 UTC 2012
I have no problems with J701, I just haven't tried it.
I was using richedit to highlight the portion of a sentence being
pointed to. I have now removed the richedit from the form. Then
perhaps it would work on J701?
Henry Rich
On 12/28/2012 8:34 PM, bill lam wrote:
> J7 GTK supports isigraph and gl2 even without gtkwd. For the grid
> addons, gtkwd should already support almost completely. Please
> elaborate your problems with J701.
>
> On a quick glance, I found your dissect uses richedit control which
> is MS Windows specific. Does it also run on J602 linux/mac?
>
> Пт., 28 дек. 2012, Henry Rich писал(а):
>> 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
>
More information about the Programming
mailing list