This script helped save my sanity... 2 2$8;9 (<4;(<7;8)); 2 2$ 8;9 (< 5;6);(<4;<7;8); 2 2$ 8;9 4 ; (< 5;6);(<4;(<7;8)); 2 2$ 8;9 3; 4 ; (< 5;6);(<4;(<7;8)); 2 2$ 8;9 2 3 2 $ 3; 4 ; (< 5;6);(<4;(<7;8)); 2 2$ 8;9
Linda -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of bob therriault Sent: Wednesday, June 05, 2013 2:27 AM To: [email protected] Subject: Re: [Jprogramming] Request for a tool: noun explorer Hi Henry, I have spent a fair amount of time thinking about how to represent multidimensional arrays visually. It is a bit tricky especially when it comes to 0's within the shape. I think that I have worked out most of that here: http://bobtherriault.wordpress.com/2012/03/30/augmented-view-of-arrays-redux/ But your proposed tool involves something that I had not yet considered and that is boxed structures. For most of the structures that I have seen it is possible to do this in a topographic type layout such as the boxed representation of a verb. t=:+/\@}:@(-//.@('()'"_ =/ ])) t ┌────────────────┬─┬─────────────────────────────────┐ │┌─────────┬─┬──┐│@│┌──────────┬─┬──────────────────┐│ ││┌─────┬─┐│@│}:││ ││┌─────┬──┐│@│┌────────┬─────┬─┐││ │││┌─┬─┐│\││ │ ││ │││┌─┬─┐│/.││ ││┌──┬─┬─┐│┌─┬─┐│]│││ ││││+│/││ ││ │ ││ ││││-│/││ ││ │││()│"│_│││=│/││ │││ │││└─┴─┘│ ││ │ ││ │││└─┴─┘│ ││ ││└──┴─┴─┘│└─┴─┘│ │││ ││└─────┴─┘│ │ ││ ││└─────┴──┘│ │└────────┴─────┴─┘││ │└─────────┴─┴──┘│ │└──────────┴─┴──────────────────┘│ └────────────────┴─┴─────────────────────────────────┘ The challenge for me is when you allow multidimensional boxes. 2 3 4 $ 3 ; 4 ; (< 5;6) ┌─────┬─────┬─────┬─────┐ │3 │4 │┌─┬─┐│3 │ │ │ ││5│6││ │ │ │ │└─┴─┘│ │ ├─────┼─────┼─────┼─────┤ │4 │┌─┬─┐│3 │4 │ │ ││5│6││ │ │ │ │└─┴─┘│ │ │ ├─────┼─────┼─────┼─────┤ │┌─┬─┐│3 │4 │┌─┬─┐│ ││5│6││ │ ││5│6││ │└─┴─┘│ │ │└─┴─┘│ └─────┴─────┴─────┴─────┘ ┌─────┬─────┬─────┬─────┐ │3 │4 │┌─┬─┐│3 │ │ │ ││5│6││ │ │ │ │└─┴─┘│ │ ├─────┼─────┼─────┼─────┤ │4 │┌─┬─┐│3 │4 │ │ ││5│6││ │ │ │ │└─┴─┘│ │ │ ├─────┼─────┼─────┼─────┤ │┌─┬─┐│3 │4 │┌─┬─┐│ ││5│6││ │ ││5│6││ │└─┴─┘│ │ │└─┴─┘│ └─────┴─────┴─────┴─────┘ 2 3 2 $ 3 ; 4 ; (< 5;6);(<4;(<7;8)); 2 2$ 8;9 ┌───────────┬───────────┐ │3 │3 │ │ │ │ │ │ │ │ │ │ │ │ │ ├───────────┼───────────┤ │4 │4 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───────────┴───────────┘ ┌───────────┬───────────┐ │┌─────┐ │┌─────┐ │ ││┌─┬─┐│ ││┌─┬─┐│ │ │││5│6││ │││5│6││ │ ││└─┴─┘│ ││└─┴─┘│ │ │└─────┘ │└─────┘ │ ├───────────┼───────────┤ │┌─────────┐│┌─────────┐│ ││┌─┬─────┐│││┌─┬─────┐││ │││4│┌─┬─┐│││││4│┌─┬─┐│││ │││ ││7│8││││││ ││7│8││││ │││ │└─┴─┘│││││ │└─┴─┘│││ ││└─┴─────┘│││└─┴─────┘││ │└─────────┘│└─────────┘│ └───────────┴───────────┘ ┌───────────┬───────────┐ │8 │9 │ │ │ │ │ │ │ │ │ │ │ │ │ ├───────────┼───────────┤ │8 │9 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───────────┴───────────┘ ┌───────────┬───────────┐ │3 │3 │ │ │ │ │ │ │ │ │ │ │ │ │ ├───────────┼───────────┤ │4 │4 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───────────┴───────────┘ ┌───────────┬───────────┐ │┌─────┐ │┌─────┐ │ ││┌─┬─┐│ ││┌─┬─┐│ │ │││5│6││ │││5│6││ │ ││└─┴─┘│ ││└─┴─┘│ │ │└─────┘ │└─────┘ │ ├───────────┼───────────┤ │┌─────────┐│┌─────────┐│ ││┌─┬─────┐│││┌─┬─────┐││ │││4│┌─┬─┐│││││4│┌─┬─┐│││ │││ ││7│8││││││ ││7│8││││ │││ │└─┴─┘│││││ │└─┴─┘│││ ││└─┴─────┘│││└─┴─────┘││ │└─────────┘│└─────────┘│ └───────────┴───────────┘ ┌───────────┬───────────┐ │8 │9 │ │ │ │ │ │ │ │ │ │ │ │ │ ├───────────┼───────────┤ │8 │9 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───────────┴───────────┘ I will think about this for a while but any hints that you might have about how to represent these structures that allows the user to find a greater understanding while manipulating would be welcome. I'll post as I come up with ideas. The actual representation may be done in SVG or perhaps a 3-dimensional space such as three.js http://threejs.org/examples/webgl_geometries.html Cheers, bob On 2013-06-04, at 6:51 PM, Henry Rich wrote: > I am thinking of a tool that would really be helpful, and I hope someone will > write it. It would be called the Noun Explorer. > > It would receive a noun, of any type, shape, boxing, etc., and it would > display the noun, with enough selectors and clicks and what-all to allow the > user to understand the noun. It could also allow some level of search, > possibly editing, and possibly allow sentences to be run against parts of the > noun. This can be a pain with heavily boxed nouns. > > I would use such a tool in dissect. Currently I launch a grid to show large > nouns, but grid is really designed for flat arrays and doesn't display boxes > well. I have thought of improving the display in grid, but doing a > first-class job would require more - at least supporting grids nested in > grids, not a bad idea but not something I want to take on right now. > > If anyone wants to do a service to J and write the Noun Explorer, I'll be > your first tester. > > 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
