Rosettacode's mandelbrot page has this, for J:
mcf=. (<: 2:)@|@(] ((*:@] + [)^:((<: 2:)@|@])^:1000) 0:) NB. 1000
iterations test
domain=. |.@|:@({.@[ + ] *~ j./&i.&>/@+.@(1j1 + ] %~ -~/@[))&>/
load'graph'
viewmat mcf "0 @ domain (_2j_1 1j1) ; 0.01 NB. Complex interval and
resolution
But the page does not display the result of viewmat, so I thought I
would run that in jhs, to make sure it works under jhs and to see if I
could easily post the result back into rosettacode.
But, when I hit return on the viewmat line, nothing seemed to happen.
Had I not hit the return key correctly? Was J busy, working for me,
and I just needed to wait? I looked for some kind of indicator but
saw nothing. So I hit return and got a popup about how J was busy and
that I should wait, and I got a newline displayed this time...
I think this could be better. Why do I get a newline on my second
attempt when I did not get one on my first attempt? Is it queuing up
my newlines somehow? If I entered a second sentence, and hit return
before the server was ready, would this sentence be sent later? If
so, how would I cancel it if I thought better of it? Do I even want to
perform this experiment?
Anyways, I think that perhaps we should have the jhs client code
update the page in some way (add a class, perhaps) when the request is
sent to the server and revert that change (remove the class from the
page?) when the response arrives. This could then change the page
color, or perhaps the mouse, or something, to let the user know that
the page is "waiting" on the server. (And, no, I am not going to do
that this month -- I already have another task I was going to do, for
jhs, which I have half forgotten about, and I am busy enough in real
life that it's going to be a bit of time before I can get back to
doing anything major -- I don't have a good, non-destructive approach
for playing with jhs changes, because I do not understand enough of
how the files which specify it are architected yet to know how to
organize my explorations. Later, I hope...)
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm