Henry,
congratulations with this tool it's really an excellent help for debugging
complex things, and explaining J phrases to beginners.

I ran into some errors though, when playing around with conjunctions:

    Lev =: 2 : 'u'
    1 Lev 2 Lev 3'
1
    dissect '1 Lev 2 Lev 3'
value error

|value error: Lev

| exeobj=.1 (Lev)2


and


pow =: ^:

dissect '+: ^: 4 [6' NB. works as expected
dissect '+: pow 4 [ 6'
dissect error: internal result does not match the result from the J
session! Aborting.

y=

┌────┬┐

│┌──┐││

││96│││

│└──┘││

└────┴┘


With the first one (+: ^: 4 [6) it shows the window as expected, and also
the recursions when clicked on the final result, but clicking on any
intermediate result gives an error message.


For the Quicksort example you gave it does work though.

Just to let you know.


As I said, I really like dissect, but I'm having a bit of a hard time
navigating around. To me, it's not really clear what is clickable and why.
It would also be nice to have a way to undo expansions, or go to a previous
view (like a back button), especially when tracing around in something like
the Quicksort example.

Kind regards,

Jan-Pieter

2014-12-13 22:31 GMT+01:00 Henry Rich <[email protected]>:
>
> Dissect, the 2-D sentence debugger, now supports all J primitives, in most
> of their forms (it doesn't handle gerunds on partitioning modifiers or }).
> It is an addon and is described at
>
> http://www.jsoftware.com/jwiki/Vocabulary/Dissect
>
> Dissect is especially useful if you are teaching J.  Suppose a student
> reads that +//.@(*/) does polynomial multiplication.  How much fun is it
> going to be to explain THAT?  Just let em run
>
> dissect '4 1 2 3 +//.@(*/) _1 4 0 2 6'
>
> and they can happily click on individual numbers and see where they came
> from.
>
> Even if you're an expert you will want to use dissect if you have a
> complicated sentence that is failing.  For example:
>
>    ]a =. (<0 1);<(<2 3 4);(1);<<5 6;7 8
> +-----+-----------------------+
> |+---+|+-------+-+-----------+|
> ||0 1|||+-----+|1|+---------+||
> |+---+|||2 3 4|| ||+---+---+|||
> |     ||+-----+| |||5 6|7 8||||
> |     ||       | ||+---+---+|||
> |     ||       | |+---------+||
> |     |+-------+-+-----------+|
> +-----+-----------------------+
>    a: ,L:1 a
> |domain error
> |   a:    ,L:1 a
>
> You might not be one of the very few people, if indeed there are any, who
> can see right off why this sentence failed.  But if you run
>
>    dissect 'a: ,L:1 a'
>
> or just use a PFkey set up to dissect the last line that failed, you will
> immediately see the source of the problem.  (The Wiki shows how to set up a
> PFkey).
>
> How about debugging recursions?  Bring back some painful memories? Looking
> at an error message like
>
>    'b c' =. 'a';5
>    >:`($:&.>)@.(0<L.) 1 2 3;<4 5;<<b;c
> |domain error
> |       >:`($:&.>)@.(0<L.)1 2 3;<4 5;<<b;c
>
> ?
>
> Run
>
>    dissect '>:`($:&.>)@.(0<L.) 1 2 3;<4 5;<<b;c'
>
> and you'll see the results of all the recursions, with the failing one
> exposed in detail; you can look through them one at a time if you like.
>
> For fun, you can see quicksort (as described in the J Wiki) all at once
> with
>
> a =. 20 ? 50
> dissect '(($:@(<#[) , (=#[) , $:@(>#[)) ({~ ?@#)) ^: (1<#) a'
>
> 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

Reply via email to