Just an update on the visualization of J results. 

I have done a second video/blog post on using CSS and HTML to display results 
on JHS. It provides examples of a system that allows you to distinguish between 
1 $ 1 ,  1 1 $1 , and 1 as well as displaying arrays with zeros in the shape 
such as 0 1 $ 1 and 1 0 $ 1. 

Blog post is here: 
http://bobtherriault.wordpress.com/2014/02/11/using-css-and-html-to-display-the-shapes-of-arrays-on-the-jhs-platform/?relatedposts_exclude=513

Cheers, bob

On Feb 4, 2014, at 8:25 AM, robert therriault <bobtherria...@mac.com> wrote:

> 
> On Feb 4, 2014, at 5:29 AM, Raul Miller <rauldmil...@gmail.com> wrote:
> 
>> 
>> Of course you will also get an error if you try to combine one of
>> those with another array of the wrong shape. Error conditions are one
>> of the cases where I like getting the shapes of arrays.
>> 
> 
> Sometimes the zeros can affect the result even though they can't be seen in 
> the display
> 
>   $ ( 0 2 3 $ 4), 5 7 $5
> 1 5 7
>   $ (0 0 2 3 $ 4), 5 7 $5
> 1 1 5 7
> 
> I am looking for ways to give the programmer some 'leverage' into these 
> situations by the ways that shapes are displayed
> 
>> One of my favorite tricks, if I am getting an error from an expression
>> that seems to be due to of a lack of shapeliness (like a length error)
>> is to replace the last verb with $ (or a variation like ;&$ or $&.> or
>> ;&($ L:0) or whatever else).
>> 
>> And that brings up another issue related to finding the shapes of
>> things: the shape inside a box will typically be different from the
>> shape outside the box (these shapes are "independent" of each other).
> 
> Yep, I am working on boxes at the moment and it is a challenge for display 
> while retaining the independent shape of contents.
> 
>> Also, the shape of transitory arrays (intermediate results) can also
>> matter. So familiarity with debugging tools and techniques can be
>> crucial - sometimes even more important for coding than familiarity
>> with shape and rank issues. (These are not, properly speaking, a part
>> of the language itself so much as they are a part of the environment.
>> But that's something of a technicality.)
> 
> No doubt. Display can't replace knowing how rank and shape work. I am hoping 
> that a little better way of displaying results will make it easier to see the 
> differences and may emphasize the importance of understanding the concepts to 
> those learning the language - that would be me!
> 
> Cheers, bob
> 
> ----------------------------------------------------------------------
> 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