Addons/debug/jig

From J Wiki
Jump to navigation Jump to search

An Updated Version of Jig


Jig is an application that extends the standard textual output of J using SVG (Scalable Vector Graphics) to provide far more information for users.

  • As an example, in a Jig display, nouns with a shape of 1 2 can be easily distinguished from nouns with shape 2 as noun shapes with leading 1's are lightly shaded.
Jig visual for 1 2 $ 7 versus 2 $ 7














  • Jig also solves the issue of ragged edged boxes when dealing with unicode, since the size of the box is calculated according to its displayed contents rather than the number of monotype characters.
Boxed Unicode: J textual display versus Jig display













  • Many nouns that cannot be distinguished in the textual format are easily discerned with Jig. Examples are '1'(literal) and 1 (boolean)
or 2 (integer) and 2.1 - 0.1 (floating)
Jig display of Literal versus Boolean types
Jig display of Integer versus Floating types

























  • Interaction provides the user with additional information. By hovering over the display it is possible to quickly retrieve the utf-8, unicode and unicode4 encodings of text. Clicking on the display will create a popup which is a larger version of the tooltip.
Encodings for Literal, Unicode and Unicode4 using tooltips













  • For some of the more esoteric types such as sparse arrays and symbols there is more useful information available through interaction.
Sparse and Symbol Representations with Jig using tooltips













Depth and Path information shown for Boxed Structures using tooltips













If you would like to use the F6 function key to enable a Jig view in Jqt environment then:

  • Choose Edit | Configure | User Keys from the Jqt menu and add this line to the user keys.cfg file when it appears
  F6|0|Jig Augmented Display|((1 ; coname '') visual_jig_ 0)  
  • Close the Jqt session and restart
  • Now the Jig window should appear for any line that your cursor is on when you press F6


The new Jig version also allows you to save and retrieve displays.

  • The Retrieve button at the bottom of the Jig Display will create a pop-up that will allow access of either the current 10 display rotation or archived displays created by using the Save button.
Retrieve Button located at the bottom of the Jig Display
Current available displays and saved displays are retrieved from the popup activated by the Retrieve button.


























  • The Save button converts the display to display only mode (no resizing or font options) and stores the page in the saved archive.
The Save version of the Jig Display














  • These affordances were put in place to limit the number of processes that are created with the Jig display.
    In order to clear the archive of saved displays, reload Jig to start over.
    In order to remove all processes running in the background, restart the J session.