Jig – a way of looking at J

Initially, I had created a tree type view of J sentences. The sentence that I used was +/\@}:@(-//.@('()'"_ =/ ])), a monadic verb that returns the depth of a parenthesized sentence. It had enough complexity that it gave me a chance to see if the representation could handle some of the curves that this sentence threw at it. It could. The text box at the top is where the editing takes place and the resulting tree changes with each change to the sentence. Once the sentence is in place the tree gives an opportunity to click on different parts that then provide a zoomed in view to look at specific input and output  values for the part of the tree selected. The topographic representation under the sentence also allows the different parts of the sentence to be selected. The downside of this is that the tree representation takes up too much space and actually requires more nodes than are necessary to show the structure.

Jigtree

 

Tree view of the J sentence

 

The next option is based on nested set containers that are able to retain the structure of the tree with reduced complexity. This also allows the display itself to function as the zoomed in portion so that there is more space for the entry of the x and y arguments. The result in this case is three different representations depending on whether the resulting verb is monadic, dyadic or has yet to have its arguments set (ambivalent). It also has the topographic representation that lines up with the sentence. Downside is that it is still a bit complex and seems to have some distance between the meaning of the sentence and its representation. The topographic view also has colours that correspond to the types of speech for the operators. This is noticeable as the colours change between monadic, dyadic and ambivalent instances.

JigContainerAmbi

Set container view of J sentence with no arguments set (ambivalent)


JigContainerDyadic

Set container view of J sentence with two arguments (dyadic).

JigcontainerMonadic

Set container view of J sentence with one argument (monadic).

It was during the process of developing the set container versions that I realized that the more graphic views of set container and tree display were not really providing any information that the topographic view did not also contain. Additionally, the topographic display has a correspondence to the original sentence that provides a stronger sense of connection to the structure for the observer. An additional idea that has not yet been developed is that there could be a slider that allows the sentence evaluation advance step by step as the sentence is parsed. The fact that the structure is not quite so visual when in topographic also gives the observer a bit more latitude in considering the temporal in addition to the spacial components of the sentence execution.

JigtopoDyadic

Topographic view of J sentence with two arguments (dyadic).

JigtopoMonadic

Topographic view of J sentence with one argument (monadic).

JigtopoAmbi

Topographic view of J sentence with no arguments set (ambivalent).

As a preview of coming events, it is my intention to develop this a little further using SVG for the topographic display and then having the inputs and outputs of each component of the partial result showing up as the different areas are clicked or as the slider progresses through the parsing of the sentence. Comments as always are welcome and future posts will likely trace the issues that arise as this design is implemented.

Reflexive Adverb (monadic ~)

This is a bit more detailed look at the Reflexive Adverb, which is the ~ adverb applied to a verb with only one argument.

It is also a look at a proposed viewer for a J sentence comprising of four windows. The top window is a text box which contains the J sentence. The bottom window is a text description of the part of the sentence that is under observation. In between top and bottom are two larger windows. The left provides visual representation of the sentence with highlighted selection, the right provides either a closer look at the selection or, if that selection is a noun, a description of the noun and its value.

The shape of the objects in the visual window have the following meaning:

Colours also convey meaning:

Noun – Grey

Adverb – Gold

Conjunction – Red

Monadic Verb – Green

Dyadic Verb – Blue

Given that legend, have a look at this screencast and let me know if you think it is of use and how it might be improved.

Is J poetry?

It is appropriate that poetry has as its root the Greek origins of ‘poet’ or ‘maker’. In this way the programmer making computers act in a specific way is a poet in the traditional sense of the word. This is especially true in the J language, where the the thoughts and symbols are so compressed that the language transcends verse and condenses into a shorthand haiku. The depth of the programmer’s understanding is shown by the chosen symbols, and the matter of style becomes as important in illustrating the problem to other humans as instructing the computer. A question often raised in programming J of whether it is better to use a tacit or explicit style. Tacit is compressed, can be analyzed programmatically, and has a simplicity that is inherently beautiful to me. Explicit programming and the presence of the arguments allow for control words that often make algorithms more comprehensible to the human reader and programs that can be easier to debug. Tacit proponents will argue this point exhaustively, but it is clear that as in any other form of poetry deep understanding is required to be able to make choices that allow clear communication, and the choice between tacit and explicit styles is not always an obvious one.