---Oleg Kobchenko wrote:
> > ---Markus Schmidt-Gröttrup wrote:
> > > I'd like to emphasize Rauls hints to make use of the
> > > different displays.
  [snip Tree view]
> > >
> > > or the boxed display, the forks are seen, even before you
> > > what elements
> > > are adverbs or conjunctions.
> >
> From: "Sherlock, Ric"
> > Wow! Funnily enough I don't think I've ever tried the tree
> > display option.
   [snip]
>
> Here's how map display would've looked
>
>    maprep <'v1'
> [ {~ [: ? ] $ [: # [
>               └────┘
>           └────────┘
>   └┘ └─────────────┘
>
> We have so far,
>
>    map 5!:6 <'v1'
> [ ({~) ([: ? (] $ ([: # [)))
>                   └──────┘
>              └────────────┘
>   └──┘ └───────────────────┘

I've had a bit more of a look at Tree view, and as usual you don't get 
something for nothing!

My comments below could form the basis for a new wiki page describing the 
different displays. Does anybody have other points or points of view to add?

Tree view does the best job of showing the forks and hooks without prior 
knowledge of whether a primitive is a verb, conjuction or adverb, but you (or 
at least I) quickly lose any idea of what the verb does.

Box view does a reasonable job of showing how the code is parsed while 
retaining it in a form close enough to linear that it is pretty readable. 
However without knowing which primitives are conjunctions, they might be 
confused with forks and adverbs might be confused with hooks.

Parens view just complicates things for me - even more symbols to read/parse, 
but it may have its use in creating other views such as MapRep view.

The MapRep view envisiaged on the forum at the end of July, would be better 
than Box view (cleaner, clearer and displays the code in a reuseable format), 
although it still doesn't show forks and hooks as unambiguously as Tree view. 
For the more experienced J user, that isn't too big a deal as they are likely 
to recognize adverbs and conjunctions for what they are, without having to look 
them up.

Currently I find it useful to use a combination of Linear view (easy to cut and 
paste the executable form) and Box view (helps me parse the tacit code). If 
MapRep view was available it would serve both these roles at once and take up 
less space.

Beginners may also find Tree view useful to help identify forks and hooks.

   randStrngE
NB. Linear view
[ {~ ] [EMAIL PROTECTED] [EMAIL PROTECTED]

NB. Box view
+-+-----+-------------------+
|[|+-+-+|+-+-------+-------+|
| ||{|~|||]|+-+-+-+|+-+-+-+||
| |+-+-+|| ||?|@|$|||#|@|[|||
| |     || |+-+-+-+|+-+-+-+||
| |     |+-+-------+-------+|
+-+-----+-------------------+

NB. Tree view
  +- [
  +- ~ --- {
  |
--+     +- ]
  |     |     +- ?
  |     +- @ -+- $
  +-----+
        |     +- #
        +- @ -+- [
NB. Parens view
[ ({~) (] ([EMAIL PROTECTED]) ([EMAIL PROTECTED]))

NB. The yet-to-be-finished MapRep view
   maprep <'randStrngE'
[ {~ ] [EMAIL PROTECTED] [EMAIL PROTECTED]
       └─┘ └─┘
  └┘ └────────┘
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to