Re: [Jprogramming] NuVoc page for debug

2022-04-06 Thread Ian Clark
Yes I suppose it should. More manageable.

Be nice if the result could look more like first aid than a semester course.

On Tue, 5 Apr 2022 at 22:33, chris burke  wrote:

> Shouldn't all debug pages go on or under the page
> https://code.jsoftware.com/wiki/Debug? For now this page is primarily for
> the gui debugger, but should be expanded to include all the foreign debug
> functions. Then NuVoc can point to this page.
>
> On Tue, Apr 5, 2022 at 11:03 AM Henry Rich  wrote:
>
> > Right.  The Foreigns page is just for reference.  We still need a page
> > devoted to Debug and how to use it.
> >
> > Henry rich
> >
> > On 4/5/2022 1:59 PM, Ian Clark wrote:
> > > That's certainly the logical place for it, and it's the logical format
> > for
> > > the Foreigns page of NuVoc.
> > >
> > > A beginner might still need a bit more guidance however...
> > >
> > > I've written a stub page:
> > https://code.jsoftware.com/wiki/Vocabulary/Debug
> > > which I invite someone else to finish who knows *debug* better than I
> do.
> > >
> > > How about a simple worked example for how to debug an error in jconsole
> > (or
> > > jqt used in a jconsoling way)...?
> > > How to do it with Run > Debug ⌘K is best described elsewhere, e.g.
> under
> > > [[Debug]].
> > >
> > > Ian Clark
> > >
> > > On Tue, 5 Apr 2022 at 00:33, Henry Rich  wrote:
> > >
> > >> I have copied most of the information from
> > >> https://www.jsoftware.com/help/dictionary/dx013.htm to
> > >> https://code.jsoftware.com/wiki/Vocabulary/Foreigns#m13 with very
> > little
> > >> added.
> > >>
> > >> Henry Rich
> > >>
> > >> On 4/3/2022 8:13 PM, Ian Clark wrote:
> > >>> IMHO debugging in J is not the happy reassuring experience it could
> be.
> > >> Any
> > >>> newbie who consults NuVoc looking for debug enlightenment is all set
> to
> > >>> spend a distressing two hours.
> > >>>
> > >>> Is that just my lack of familiarity with the geewhiz stuff that's
> > there?
> > >>> Because I only resort to (13!:) and the debugger When All Else Fails.
> > >>>
> > >>> Then I go straight to
> > >> https://www.jsoftware.com/help/dictionary/dx013.htm
> > >>> which for me is the most helpful page in the whole of J Help.
> > >>>
> > >>> It's a tall order to improve on it. If NuVoc is going to get an
> > ancillary
> > >>> page on Debugging, it could do worse than link dx013 and leave it at
> > >> that.
> > >>> Actually I do have a small improvement on dx013 to offer. For my own
> > use
> > >>> I've replaced every 13!:* reference with the corresponding stdlib
> cover
> > >>> verb. I attach the resulting doctored webpage as a .webarchive,
> hoping
> > it
> > >>> won't get stripped off.
> > >>>
> > >>> If it does, then PM me for a copy.
> > >>>
> > >>> On Sun, 3 Apr 2022 at 16:04, Raul Miller 
> > wrote:
> > >>>
> >  I have ported debug_verbs.htm over as Debug/Verbs, and included it
> in
> >  the debug navigator.
> > 
> >  Someone (probably me) should go in and "merge" the two tables of
> >  contents on the page. (In other words, add the __NOTOC__ keyword to
> >  disable the wiki generated table after replicating its functionality
> >  in the table with descriptive comments a short distance down on the
> >  page.)
> > 
> >  Thanks,
> > 
> >  --
> >  Raul
> > 
> >  On Sun, Apr 3, 2022 at 10:54 AM chris burke 
> > >> wrote:
> > >> I haven't found a replacement for
> > > https://www.jsoftware.com/docs/help602/user/debug_verbs.htm yet.
> > >
> > > This should be a new child page of
> > >> https://code.jsoftware.com/wiki/Debug
> >  .
> > >
> > > On Sun, Apr 3, 2022 at 12:00 AM Raul Miller  >
> >  wrote:
> > >>
> > https://code.jsoftware.com/mediawiki/index.php/Guides/Covering_a_verb
> > >> seems useful, but I haven't found a replacement for
> > >> https://www.jsoftware.com/docs/help602/user/debug_verbs.htm yet.
> > >>
> > >> Thanks,
> > >>
> > >> --
> > >> Raul
> > >>
> > >> On Sat, Apr 2, 2022 at 11:55 PM Henry Rich 
> >  wrote:
> > >>> That's pretty good.  It needs to be referred to from the NuVoc
> >  ancillary
> > >>> pages.
> > >>>
> > >>> It seems to be about the graphical debugger.  Some users, as I
> > >>> understand, use debug commands from the keyboard.  Some
> > documentation
> > >>> for them would be wolcome.
> > >>>
> > >>> Henry Rich
> > >>>
> > >>> On 4/2/2022 10:24 PM, Raul Miller wrote:
> >  What about https://code.jsoftware.com/wiki/Debug?
> > 
> >  Thanks,
> > 
> > >>> --
> > >>> This email has been checked for viruses by AVG.
> > >>> https://www.avg.com
> > >>>
> > >>>
> > 
> --
> > >>> For information about J forums see
> >  http://www.jsoftware.com/forums.htm
> > >>
> > --
> > >> For informat

[Jprogramming] J cheat sheet (or an alternative view for the NuVoc table)

2022-04-06 Thread 'Sergey S' via Programming
Hi everyone,
 
I made a cheatsheet for all J primitives about a year ago. I thought somebody 
might find it useful too. Here's the link: 
https://sergeyqz.github.io/jcheatsheet/. 
The main idea was to have a one-page plain HTML table of all primitives with 
short descriptions, synonyms (e.g. Member (In) has "contains, includes"), and 
argument types. It's far from perfect, I'm sure there are mistakes. For 
example, I didn't pay much attention to types yet, some descriptions are not 
clear enough, but I find it helpful as it is.

I posted it on r/apljk last month and got thoughtful comments from 
u/moon-chilled. Maybe somebody here have more to say, I'd appreciate any 
feedback.
 
Thanks,
Sergey
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] J cheat sheet (or an alternative view for the NuVoc table)

2022-04-06 Thread Pablo Landherr
Your cheatsheet is very nice. However, in my browser I keep a tab
with file:///Applications/j64-807/addons/docs/help/dictionary/vocabul.htm open
always and at all times. And why it wins out over NuVoc etc is because it
fits on the screen. I never have to scroll to find the relevant
information. Years ago someone (I forget who) made a reference card for
J6.02. I still have it on my desk (two pages, printed on a single piece of
paper) for the same reason. Minimum amount of work to remind myself of the
exact spelling of something I know is there. White space is mostly a waste
on reference pages/cards.



On Wed, Apr 6, 2022 at 10:37 AM 'Sergey S' via Programming <
programm...@jsoftware.com> wrote:

> Hi everyone,
>
> I made a cheatsheet for all J primitives about a year ago. I thought
> somebody might find it useful too. Here's the link:
> https://sergeyqz.github.io/jcheatsheet/.
> The main idea was to have a one-page plain HTML table of all primitives
> with short descriptions, synonyms (e.g. Member (In) has "contains,
> includes"), and argument types. It's far from perfect, I'm sure there are
> mistakes. For example, I didn't pay much attention to types yet, some
> descriptions are not clear enough, but I find it helpful as it is.
>
> I posted it on r/apljk last month and got thoughtful comments from
> u/moon-chilled. Maybe somebody here have more to say, I'd appreciate any
> feedback.
>
> Thanks,
> Sergey
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] NuVoc page for debug

2022-04-06 Thread Raul Miller
On Wed, Apr 6, 2022 at 4:20 AM Ian Clark  wrote:
> Be nice if the result could look more like first aid than a semester course.

Something like this?

http://www.andyheld.com/wfr_info.htm

Or more like this?

https://winapps.umt.edu/winapps/media2/wilderness/toolboxes/documents/ranger/SAW_WFA%20Ref%20Cards.pdf

Or more like this?

https://tools.niehs.nih.gov/wetp/public/Course_download2.cfm?tranid=10038

Thanks,

-- 
Raul
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] J cheat sheet (or an alternative view for the NuVoc table)

2022-04-06 Thread Raul Miller
On Wed, Apr 6, 2022 at 4:37 AM 'Sergey S' via Programming
 wrote:
> I made a cheatsheet for all J primitives about a year ago. I thought somebody 
> might find it useful too. Here's the link: 
> https://sergeyqz.github.io/jcheatsheet/.

That looks like it would be nice as a wiki page, with
[[Category:Index]] and of course the appropriate wikilinks for each of
the primitives.

Thanks,

-- 
Raul
--
For information about J forums see http://www.jsoftware.com/forums.htm


[Jprogramming] Report of the J Wiki Group meeting of March 31st, 2022

2022-04-06 Thread 'robert therriault' via Programming
Present: Art Anger, Jon Hough, Devon McCormick,Raul Miller, Bob Therriault

1) After some discussion it was decided that we would look at setting up the J 
playground as an independent project. It has accomplished much of what the J 
wiki requires with every indication that it will be able to do much more as its 
own project and part of that may be to find a better name as it is becoming 
much more than a place to play. Of course participation in the J wiki group 
would still be encouraged as there are strong ties between two projects. Kudos 
to Joe Bogner, Will Gajate and Jon Hough for the work that has contributed to 
the J Playgrounds successful development. 
https://jsoftware.github.io/j-playground/bin/html/emj.html#code='key%20sin(exp)%2Ccos(exp)'%20plot%20(%3B(sin%2C%3Acos)%40%3A%5E)%20-%3A%20%3E%3A%20i%3A3j100
2) A great deal of discussion on the help section being brought over from the 
jsoftware site and being set up with temporary reconnects to the index. This 
would allow the correct and current information be added gradually as it is 
reviewed. This is an ongoing challenge and Raul Miller has been working 
diligently to create a framework that will provide a good foundation for future 
development. https://code2.jsoftware.com/mediawiki/index.php/Main_Page 
3)This was followed by a discussion about the ways that we could build some 
projects that would encourage more involvement in the wiki. We will consider 
providing short tasks to clean up of imported pages as a way to encourage more 
participation by the community.

If you would like to get involved in this project, email the general forum so 
that we can add you to meeting notification.

Cheers, bob

For access to previous meeting reports 
https://code.jsoftware.com/wiki/Wiki_Development
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] NuVoc page for debug

2022-04-06 Thread Ian Clark
Ha-ha!
(…and I thought J online help was bad!)

What was I hoping for when I said "First Aid"? If I'd said "In Case Of
Fire" you'd find equally hideous examples.

I meant "First Aid for the J novice". I was hinting at something brief and
helpful.

But what's the briefest, most helpful thing one can say to the J novice,
faced with a bug in their explicit verb?
Something like this?

How To Use Debug
Don't.


It doesn't matter. I've already answered Raul's question on a different
thread. On reflection I'd go for something like this:

https://code.jsoftware.com/wiki/Plot




On Wed, 6 Apr 2022 at 17:52, Raul Miller  wrote:

> On Wed, Apr 6, 2022 at 4:20 AM Ian Clark  wrote:
> > Be nice if the result could look more like first aid than a semester
> course.
>
> Something like this?
>
> http://www.andyheld.com/wfr_info.htm
>
> Or more like this?
>
>
> https://winapps.umt.edu/winapps/media2/wilderness/toolboxes/documents/ranger/SAW_WFA%20Ref%20Cards.pdf
>
> Or more like this?
>
> https://tools.niehs.nih.gov/wetp/public/Course_download2.cfm?tranid=10038
>
> Thanks,
>
> --
> Raul
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] NuVoc page for debug

2022-04-06 Thread Henry Rich

I think that's a little harsh on the debugger.

For my first 20 years of programming I single-stepped through every 
program before trying anything bigger.  That's an effective way to 
develop IMO.  If you keep your eyes open you can find most of your 
errors.  The J visual debugger has good support for this approach.


When I started with J, the debugger couldn't be relied on, and I got 
into the habit of debugging by other means.  I make my code work but I 
miss the intimacy of watching each line run.


I think the debugger is robust enough now that I could single-step 
again.  Maybe I'll try.  I certainly wouldn't discourage a newcomer who 
wanted to do that.


Henry Rich

On 4/6/2022 4:50 PM, Ian Clark wrote:

Ha-ha!
(…and I thought J online help was bad!)

What was I hoping for when I said "First Aid"? If I'd said "In Case Of
Fire" you'd find equally hideous examples.

I meant "First Aid for the J novice". I was hinting at something brief and
helpful.

But what's the briefest, most helpful thing one can say to the J novice,
faced with a bug in their explicit verb?
Something like this?

How To Use Debug
Don't.


It doesn't matter. I've already answered Raul's question on a different
thread. On reflection I'd go for something like this:

https://code.jsoftware.com/wiki/Plot




On Wed, 6 Apr 2022 at 17:52, Raul Miller  wrote:


On Wed, Apr 6, 2022 at 4:20 AM Ian Clark  wrote:

Be nice if the result could look more like first aid than a semester

course.

Something like this?

http://www.andyheld.com/wfr_info.htm

Or more like this?


https://winapps.umt.edu/winapps/media2/wilderness/toolboxes/documents/ranger/SAW_WFA%20Ref%20Cards.pdf

Or more like this?

https://tools.niehs.nih.gov/wetp/public/Course_download2.cfm?tranid=10038

Thanks,

--
Raul
--
For information about J forums see http://www.jsoftware.com/forums.htm


--
For information about J forums see http://www.jsoftware.com/forums.htm



--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] NuVoc page for debug

2022-04-06 Thread Raul Miller
On Wed, Apr 6, 2022 at 5:01 PM Henry Rich  wrote:
> I think the debugger is robust enough now that I could single-step
> again.  Maybe I'll try.  I certainly wouldn't discourage a newcomer who
> wanted to do that.

In my experience, single stepping is fairly robust, with one exception
(which might be fixed in the latest builds of the j engine --
returning from an explicit function into an "each" statement would
drop into the next item in that "each" sequence and back into the
start of the explicit function).

However, in some cases, catching errors when they happen has popped up
too far (into the load verb for the script when the error happened
inside some other explicit verb). These are difficult to isolate. (And
there may be other issues.)

FYI,

-- 
Raul
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] J cheat sheet (or an alternative view for the NuVoc table)

2022-04-06 Thread Ian Clark
I too would like to see Sergey's cheatsheet on J Wiki.
There's no rule that says NuVoc should only have one portal.

Why does https://code.jsoftware.com/wiki/NuVoc take the form it does?
Because it's the best cheat-sheet? No – that's never been established.
If memory serves, it aimed to resemble Voc (see line 3 of the above link) in
the built-in J online help:
https://www.jsoftware.com/help/dictionary/vocabul.htm
because Voc was familiar, and NuVoc was being tentatively offered as an
alternative.

Voc did at least fit on one screen, more-or-less. Screens as they were 20
years ago.

In this age of iPhones, the all-on-one-page cheat-sheet is a lost cause.
But there may be no all-round best replacement. Rather: horses for courses.

Might a newcomer prefer something like this? –

5!:5 <'dlb'

}.~ (=&' ' (i.) 0:)


xp 5!:5 <'dlb'

}. Behead * Drop

~ Reflex * Passive / Evoke

( Left Parenthesis

= Self-Classify * Equal

& Bond / Compose

' ' Const or Pronoun/verb

( Left Parenthesis

i. Integers * Index Of

) Right Parenthesis

0: Constant Function

) Right Parenthesis

5!:5 <'words'

[: jpath '~proj/words/' , ijs


xp 5!:5 <'words'

[: Cap

jpath Const or Pronoun/verb

'~proj/words/' Const or Pronoun/verb

, Ravel * Append

ijs Const or Pronoun/verb


Yes, xp exists, and I've used it for years. But I never got round to
distributing it, not wanting to clutter stdlib with my numerous cerebral
crutches – it's big enough. PM me for a copy.

On Wed, 6 Apr 2022 at 19:55, Raul Miller  wrote:

> On Wed, Apr 6, 2022 at 4:37 AM 'Sergey S' via Programming
>  wrote:
> > I made a cheatsheet for all J primitives about a year ago. I thought
> somebody might find it useful too. Here's the link:
> https://sergeyqz.github.io/jcheatsheet/.
>
> That looks like it would be nice as a wiki page, with
> [[Category:Index]] and of course the appropriate wikilinks for each of
> the primitives.
>
> Thanks,
>
> --
> Raul
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] NuVoc page for debug

2022-04-06 Thread Henry Rich
It surprises me that the results are unpredictable.  The code seems 
clear: debug suspension happens after an error or before a stop, but 
always between sentences (except for stops on tacit verbs).  If anyone 
finds anomalies let me know.


Henry Rich

On 4/6/2022 5:06 PM, Raul Miller wrote:

On Wed, Apr 6, 2022 at 5:01 PM Henry Rich  wrote:

I think the debugger is robust enough now that I could single-step
again.  Maybe I'll try.  I certainly wouldn't discourage a newcomer who
wanted to do that.

In my experience, single stepping is fairly robust, with one exception
(which might be fixed in the latest builds of the j engine --
returning from an explicit function into an "each" statement would
drop into the next item in that "each" sequence and back into the
start of the explicit function).

However, in some cases, catching errors when they happen has popped up
too far (into the load verb for the script when the error happened
inside some other explicit verb). These are difficult to isolate. (And
there may be other issues.)

FYI,




--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] J cheat sheet (or an alternative view for the NuVoc table)

2022-04-06 Thread Henry Rich
The card that Ric Sherlock & I did, 
https://code.jsoftware.com/wiki/File:J602_RefCard_color_letter_current.pdf, 
tries to get it all on 2 pages.  We are working on a J9 version, as a 
very-low-priority task.


Henry Rich

On 4/6/2022 5:38 PM, Ian Clark wrote:

I too would like to see Sergey's cheatsheet on J Wiki.
There's no rule that says NuVoc should only have one portal.

Why does https://code.jsoftware.com/wiki/NuVoc take the form it does?
Because it's the best cheat-sheet? No – that's never been established.
If memory serves, it aimed to resemble Voc (see line 3 of the above link) in
the built-in J online help:
https://www.jsoftware.com/help/dictionary/vocabul.htm
because Voc was familiar, and NuVoc was being tentatively offered as an
alternative.

Voc did at least fit on one screen, more-or-less. Screens as they were 20
years ago.

In this age of iPhones, the all-on-one-page cheat-sheet is a lost cause.
But there may be no all-round best replacement. Rather: horses for courses.

Might a newcomer prefer something like this? –

5!:5 <'dlb'

}.~ (=&' ' (i.) 0:)


xp 5!:5 <'dlb'

}. Behead * Drop

~ Reflex * Passive / Evoke

( Left Parenthesis

= Self-Classify * Equal

& Bond / Compose

' ' Const or Pronoun/verb

( Left Parenthesis

i. Integers * Index Of

) Right Parenthesis

0: Constant Function

) Right Parenthesis

5!:5 <'words'

[: jpath '~proj/words/' , ijs


xp 5!:5 <'words'

[: Cap

jpath Const or Pronoun/verb

'~proj/words/' Const or Pronoun/verb

, Ravel * Append

ijs Const or Pronoun/verb


Yes, xp exists, and I've used it for years. But I never got round to
distributing it, not wanting to clutter stdlib with my numerous cerebral
crutches – it's big enough. PM me for a copy.

On Wed, 6 Apr 2022 at 19:55, Raul Miller  wrote:


On Wed, Apr 6, 2022 at 4:37 AM 'Sergey S' via Programming
 wrote:

I made a cheatsheet for all J primitives about a year ago. I thought

somebody might find it useful too. Here's the link:
https://sergeyqz.github.io/jcheatsheet/.

That looks like it would be nice as a wiki page, with
[[Category:Index]] and of course the appropriate wikilinks for each of
the primitives.

Thanks,

--
Raul
--
For information about J forums see http://www.jsoftware.com/forums.htm


--
For information about J forums see http://www.jsoftware.com/forums.htm



--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] J cheat sheet (or an alternative view for the NuVoc table)

2022-04-06 Thread Ian Clark
…now that's a card I did make use of!

As it should be used: printed out 2-sided, laminated and propped-up beside
the screen.

On Wed, 6 Apr 2022 at 22:52, Henry Rich  wrote:

> The card that Ric Sherlock & I did,
> https://code.jsoftware.com/wiki/File:J602_RefCard_color_letter_current.pdf,
>
> tries to get it all on 2 pages.  We are working on a J9 version, as a
> very-low-priority task.
>
> Henry Rich
>
> On 4/6/2022 5:38 PM, Ian Clark wrote:
> > I too would like to see Sergey's cheatsheet on J Wiki.
> > There's no rule that says NuVoc should only have one portal.
> >
> > Why does https://code.jsoftware.com/wiki/NuVoc take the form it does?
> > Because it's the best cheat-sheet? No – that's never been established.
> > If memory serves, it aimed to resemble Voc (see line 3 of the above
> link) in
> > the built-in J online help:
> > https://www.jsoftware.com/help/dictionary/vocabul.htm
> > because Voc was familiar, and NuVoc was being tentatively offered as an
> > alternative.
> >
> > Voc did at least fit on one screen, more-or-less. Screens as they were 20
> > years ago.
> >
> > In this age of iPhones, the all-on-one-page cheat-sheet is a lost cause.
> > But there may be no all-round best replacement. Rather: horses for
> courses.
> >
> > Might a newcomer prefer something like this? –
> >
> > 5!:5 <'dlb'
> >
> > }.~ (=&' ' (i.) 0:)
> >
> >
> > xp 5!:5 <'dlb'
> >
> > }. Behead * Drop
> >
> > ~ Reflex * Passive / Evoke
> >
> > ( Left Parenthesis
> >
> > = Self-Classify * Equal
> >
> > & Bond / Compose
> >
> > ' ' Const or Pronoun/verb
> >
> > ( Left Parenthesis
> >
> > i. Integers * Index Of
> >
> > ) Right Parenthesis
> >
> > 0: Constant Function
> >
> > ) Right Parenthesis
> >
> > 5!:5 <'words'
> >
> > [: jpath '~proj/words/' , ijs
> >
> >
> > xp 5!:5 <'words'
> >
> > [: Cap
> >
> > jpath Const or Pronoun/verb
> >
> > '~proj/words/' Const or Pronoun/verb
> >
> > , Ravel * Append
> >
> > ijs Const or Pronoun/verb
> >
> >
> > Yes, xp exists, and I've used it for years. But I never got round to
> > distributing it, not wanting to clutter stdlib with my numerous cerebral
> > crutches – it's big enough. PM me for a copy.
> >
> > On Wed, 6 Apr 2022 at 19:55, Raul Miller  wrote:
> >
> >> On Wed, Apr 6, 2022 at 4:37 AM 'Sergey S' via Programming
> >>  wrote:
> >>> I made a cheatsheet for all J primitives about a year ago. I thought
> >> somebody might find it useful too. Here's the link:
> >> https://sergeyqz.github.io/jcheatsheet/.
> >>
> >> That looks like it would be nice as a wiki page, with
> >> [[Category:Index]] and of course the appropriate wikilinks for each of
> >> the primitives.
> >>
> >> Thanks,
> >>
> >> --
> >> Raul
> >> --
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> > --
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
For information about J forums see http://www.jsoftware.com/forums.htm


[Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Henry Rich
dbcut (13!:19) seems to go up one stack level and immediately reexecute 
the line that failed.  Huh?


Unless you have a stop on that line, you will rerun it and it will fail 
again.  If you do have a stop on the line, the reexecution is nugatory.


Can anyone suggest a reason why 'cut back' should not just cut the stack 
back and remain in suspension?


[It is possible that I have read the code wrong.]

Henry Rich




--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


[Jprogramming] Characterizing a defective graph.

2022-04-06 Thread Raul Miller
https://gist.githubusercontent.com/rdm/3ce3503ee63b51cd49c97ad185e1dd6f/raw/100e83ba7a87f10b844271180318c37fee1304dc/gph.txt

The text at that gist represents a "defective graph"

require'web/gethttp'
text=: gethttp url
'A B C'=: |:640 #.inv<.0".text rplc LF,' '

part1=: A=/B
part2=: B=/C

To get an idea of the structure, try inspecting part1 and part2 in viewmat.

part1 and part2 are almost the same, but not quite. In some cases, we
have nodes which are reflexive (point to themselves) in the one, but
not in the other.

Also, some nodes point "outside" the graph. In part1 and part2, these
connections are ignored, and that's fine for now.

I am trying to figure out a good way of detecting nontrivial cycles
(cycles which include at least two graph nodes) in either part 1, or
part 2, or the combination of the two (part1 and part2 together
represent connections involving these same nodes).

Does anyone here have a good approach for that?

Thanks,
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread bill lam
It works for me therefore I'm not sure if I understood what you said. Can
you give a simple example?

On Thu, 7 Apr 2022 at 7:20 AM Henry Rich  wrote:

> dbcut (13!:19) seems to go up one stack level and immediately reexecute
> the line that failed.  Huh?
>
> Unless you have a stop on that line, you will rerun it and it will fail
> again.  If you do have a stop on the line, the reexecution is nugatory.
>
> Can anyone suggest a reason why 'cut back' should not just cut the stack
> back and remain in suspension?
>
> [It is possible that I have read the code wrong.]
>
> Henry Rich
>
>
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Henry Rich

Raul provides this example:

https://github.com/jsoftware/jsource/issues/131

Run

example2 10

It fails (valence error in problem).  Suppose you want to look around in 
the caller's frame.  You try 13!:19'', but it restarts immediately, 
calls problem again, and fails.


What does it look like when it works for you?

Henry Rich

On 4/6/2022 7:25 PM, bill lam wrote:

It works for me therefore I'm not sure if I understood what you said. Can
you give a simple example?

On Thu, 7 Apr 2022 at 7:20 AM Henry Rich  wrote:


dbcut (13!:19) seems to go up one stack level and immediately reexecute
the line that failed.  Huh?

Unless you have a stop on that line, you will rerun it and it will fail
again.  If you do have a stop on the line, the reexecution is nugatory.

Can anyone suggest a reason why 'cut back' should not just cut the stack
back and remain in suspension?

[It is possible that I have read the code wrong.]

Henry Rich




--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


--
For information about J forums see http://www.jsoftware.com/forums.htm



--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Elijah Stone

Haven't used the debugger extensively and haven't used dbcut.  That said:

1. If you change some global state first, perhaps the code will start working

2. The dictionary says (emphasis mine):


Cut back one stack level, _stopping_ at the line at the next stack level


 -E

On Wed, 6 Apr 2022, Henry Rich wrote:

dbcut (13!:19) seems to go up one stack level and immediately reexecute 
the line that failed.  Huh?


Unless you have a stop on that line, you will rerun it and it will fail 
again.  If you do have a stop on the line, the reexecution is nugatory.


Can anyone suggest a reason why 'cut back' should not just cut the stack 
back and remain in suspension?


[It is possible that I have read the code wrong.]

Henry Rich




--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Henry Rich
Even with emphasis, I can't say I'm 100% sure what that sentence says.  
It means just what Roger chose it to mean, neither more nor less.


I am looking for comments on whether the current behavior is desirable.

Henry Rich

On 4/6/2022 7:33 PM, Elijah Stone wrote:

Haven't used the debugger extensively and haven't used dbcut.  That said:

1. If you change some global state first, perhaps the code will start 
working


2. The dictionary says (emphasis mine):


Cut back one stack level, _stopping_ at the line at the next stack level


 -E

On Wed, 6 Apr 2022, Henry Rich wrote:

dbcut (13!:19) seems to go up one stack level and immediately 
reexecute the line that failed.  Huh?


Unless you have a stop on that line, you will rerun it and it will 
fail again.  If you do have a stop on the line, the reexecution is 
nugatory.


Can anyone suggest a reason why 'cut back' should not just cut the 
stack back and remain in suspension?


[It is possible that I have read the code wrong.]

Henry Rich




--
This email has been checked for viruses by AVG.
https://www.avg.com

--
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


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread bill lam
I don't know. However why did the sentence
1 2+3 4 5
give domain error instead of length error?


On Thu, 7 Apr 2022 at 7:29 AM Henry Rich  wrote:

> Raul provides this example:
>
> https://github.com/jsoftware/jsource/issues/131
>
> Run
>
> example2 10
>
> It fails (valence error in problem).  Suppose you want to look around in
> the caller's frame.  You try 13!:19'', but it restarts immediately,
> calls problem again, and fails.
>
> What does it look like when it works for you?
>
> Henry Rich
>
> On 4/6/2022 7:25 PM, bill lam wrote:
> > It works for me therefore I'm not sure if I understood what you said. Can
> > you give a simple example?
> >
> > On Thu, 7 Apr 2022 at 7:20 AM Henry Rich  wrote:
> >
> >> dbcut (13!:19) seems to go up one stack level and immediately reexecute
> >> the line that failed.  Huh?
> >>
> >> Unless you have a stop on that line, you will rerun it and it will fail
> >> again.  If you do have a stop on the line, the reexecution is nugatory.
> >>
> >> Can anyone suggest a reason why 'cut back' should not just cut the stack
> >> back and remain in suspension?
> >>
> >> [It is possible that I have read the code wrong.]
> >>
> >> Henry Rich
> >>
> >>
> >>
> >>
> >> --
> >> This email has been checked for viruses by AVG.
> >> https://www.avg.com
> >>
> >> --
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> > --
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Elijah Stone
Suppose you want to look around in the caller's frame.  You try 
13!:19'', but it restarts immediately, calls problem again, and fails.


That seems like a valid use case.  More generally, it seems like it would 
be useful to poke around in _any_ stack frame, without destroying the ones 
beneath (or on top of, depending on which way your stacks grow) it.  But 
that leads to forking stacks and continuations.

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Henry Rich
That sentence never executed, because (problem) was executed dyadically 
and it has no dyadic definition.


Henry Rich

On 4/6/2022 7:41 PM, bill lam wrote:

I don't know. However why did the sentence
1 2+3 4 5
give domain error instead of length error?


On Thu, 7 Apr 2022 at 7:29 AM Henry Rich  wrote:


Raul provides this example:

https://github.com/jsoftware/jsource/issues/131

Run

example2 10

It fails (valence error in problem).  Suppose you want to look around in
the caller's frame.  You try 13!:19'', but it restarts immediately,
calls problem again, and fails.

What does it look like when it works for you?

Henry Rich

On 4/6/2022 7:25 PM, bill lam wrote:

It works for me therefore I'm not sure if I understood what you said. Can
you give a simple example?

On Thu, 7 Apr 2022 at 7:20 AM Henry Rich  wrote:


dbcut (13!:19) seems to go up one stack level and immediately reexecute
the line that failed.  Huh?

Unless you have a stop on that line, you will rerun it and it will fail
again.  If you do have a stop on the line, the reexecution is nugatory.

Can anyone suggest a reason why 'cut back' should not just cut the stack
back and remain in suspension?

[It is possible that I have read the code wrong.]

Henry Rich




--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


--
For information about J forums see http://www.jsoftware.com/forums.htm


--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


--
For information about J forums see http://www.jsoftware.com/forums.htm



--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Henry Rich
Quite right, but I don't want to go there yet.  I want to see if I'm 
misunderstanding 13!:19.


Henry Rich

On 4/6/2022 7:41 PM, Elijah Stone wrote:
Suppose you want to look around in the caller's frame.  You try 
13!:19'', but it restarts immediately, calls problem again, and fails.


That seems like a valid use case.  More generally, it seems like it 
would be useful to poke around in _any_ stack frame, without 
destroying the ones beneath (or on top of, depending on which way your 
stacks grow) it.  But that leads to forking stacks and continuations.

--
For information about J forums see http://www.jsoftware.com/forums.htm



--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Devon McCormick
I use 13!:19 often and have not seen the behavior you described.

On Wed, Apr 6, 2022 at 7:33 PM Elijah Stone  wrote:

> Haven't used the debugger extensively and haven't used dbcut.  That said:
>
> 1. If you change some global state first, perhaps the code will start
> working
>
> 2. The dictionary says (emphasis mine):
>
> > Cut back one stack level, _stopping_ at the line at the next stack level
>
>   -E
>
> On Wed, 6 Apr 2022, Henry Rich wrote:
>
> > dbcut (13!:19) seems to go up one stack level and immediately reexecute
> > the line that failed.  Huh?
> >
> > Unless you have a stop on that line, you will rerun it and it will fail
> > again.  If you do have a stop on the line, the reexecution is nugatory.
> >
> > Can anyone suggest a reason why 'cut back' should not just cut the stack
> > back and remain in suspension?
> >
> > [It is possible that I have read the code wrong.]
> >
> > Henry Rich
> >
> >
> >
> >
> > --
> > This email has been checked for viruses by AVG.
> > https://www.avg.com
> >
> > --
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 

Devon McCormick, CFA

Quantitative Consultant
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Raul Miller
On Wed, Apr 6, 2022 at 7:41 PM Elijah Stone  wrote:
> > Suppose you want to look around in the caller's frame.  You try
> > 13!:19'', but it restarts immediately, calls problem again, and fails.
>
> That seems like a valid use case.  More generally, it seems like it would
> be useful to poke around in _any_ stack frame, without destroying the ones
> beneath (or on top of, depending on which way your stacks grow) it.  But
> that leads to forking stacks and continuations.

Yes.

Still, ... destroying an inner stack frame to reach the next outer
stack frame (which is what I believe 13!:19]1 is supposed to
accomplish) seems like a reasonable compromise.

Thanks,

-- 
Raul
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Devon McCormick
Just did this:

foo0=: 3 : 0
   y=. >:y
   foo1 y
)

foo1=: 3 : 0
   y=. y,XX
   y=. y*10
)

   4!:55 <'XX'
1
   foo0 10
|value error: XX
|   y=.y*10
|foo1[1]
  y   NB. Currently undefined because XX is undefined
11 , XX
  13!:19''
|stop: foo0
|   foo1 y
|foo0[1]
  y  NB. Value at this level as expected
11
  XX=: 99NB. Define variable to avoid value error
  13!:4''NB. Resume execution in "foo0"
110 990

This works the same as I've seen it in the past.

On Wed, Apr 6, 2022 at 7:44 PM Henry Rich  wrote:

> Quite right, but I don't want to go there yet.  I want to see if I'm
> misunderstanding 13!:19.
>
> Henry Rich
>
> On 4/6/2022 7:41 PM, Elijah Stone wrote:
> >> Suppose you want to look around in the caller's frame.  You try
> >> 13!:19'', but it restarts immediately, calls problem again, and fails.
> >
> > That seems like a valid use case.  More generally, it seems like it
> > would be useful to poke around in _any_ stack frame, without
> > destroying the ones beneath (or on top of, depending on which way your
> > stacks grow) it.  But that leads to forking stacks and continuations.
> > --
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> --
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 

Devon McCormick, CFA

Quantitative Consultant
--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Elijah Stone
(To be clear, I do not think continuations are a _bad_ idea; but they do 
represent a unique set of challenges complications, as demonstrated e.g. 
by dynamic-wind.)


On Wed, 6 Apr 2022, Elijah Stone wrote:

Suppose you want to look around in the caller's frame.  You try 
> 13!:19'', but it restarts immediately, calls problem again, and fails.


That seems like a valid use case.  More generally, it seems like it would 
be useful to poke around in _any_ stack frame, without destroying the ones 
beneath (or on top of, depending on which way your stacks grow) it.  But 
that leads to forking stacks and continuations.

--
For information about J forums see http://www.jsoftware.com/forums.htm


--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] Users of 13!:19 (dbcut), please speak up

2022-04-06 Thread Henry Rich
Thanks much.  That makes sense.  The key point is that it stopped in 
foo0 when you did the first 13!:19; in Raul's example it seemed to 
continue.  The stop is sensible behavior; I will look into what happened 
in Raul's example.


Henry Rich

On 4/6/2022 7:51 PM, Devon McCormick wrote:

Just did this:

foo0=: 3 : 0
y=. >:y
foo1 y
)

foo1=: 3 : 0
y=. y,XX
y=. y*10
)

4!:55 <'XX'
1
foo0 10
|value error: XX
|   y=.y*10
|foo1[1]
   y   NB. Currently undefined because XX is undefined
11 , XX
   13!:19''
|stop: foo0
|   foo1 y
|foo0[1]
   y  NB. Value at this level as expected
11
   XX=: 99NB. Define variable to avoid value error
   13!:4''NB. Resume execution in "foo0"
110 990

This works the same as I've seen it in the past.

On Wed, Apr 6, 2022 at 7:44 PM Henry Rich  wrote:


Quite right, but I don't want to go there yet.  I want to see if I'm
misunderstanding 13!:19.

Henry Rich

On 4/6/2022 7:41 PM, Elijah Stone wrote:

Suppose you want to look around in the caller's frame.  You try
13!:19'', but it restarts immediately, calls problem again, and fails.

That seems like a valid use case.  More generally, it seems like it
would be useful to poke around in _any_ stack frame, without
destroying the ones beneath (or on top of, depending on which way your
stacks grow) it.  But that leads to forking stacks and continuations.
--
For information about J forums see http://www.jsoftware.com/forums.htm


--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm






--
This email has been checked for viruses by AVG.
https://www.avg.com

--
For information about J forums see http://www.jsoftware.com/forums.htm


Re: [Jprogramming] J cheat sheet (or an alternative view for the NuVoc table)

2022-04-06 Thread Gilles Kirouac

We are working on a J9 version


GREAT!

Sergey's sheet is nice and well designed.

But IMO it is for a somewhat experienced J programmer, while the old 
J6.02 Reference Card had details and __examples__ useful to the newcomer 
e.g. Format. It is dense, can be printed and posted. Thanks to Henry 
(again!) and Ric.


Newcomers and old-timers will appreciate an updated card with perhaps a 
third page allowing expansions and covering new stuff like Fold.


~ Gilles

Le 2022-04-06 à 17:52, Henry Rich a écrit :
The card that Ric Sherlock & I did, 
https://code.jsoftware.com/wiki/File:J602_RefCard_color_letter_current.pdf, 
tries to get it all on 2 pages.  We are working on a J9 version, as a 
very-low-priority task.


Henry Rich


...
--
For information about J forums see http://www.jsoftware.com/forums.htm