Re: [Jprogramming] break from loading a script with 'load'

2021-09-01 Thread 'Mike Day' via Programming
Yes, a good point. As I said, I have a need for this facility occasionally, but not for production code. Most of my programming is recreational problem-solving. I think I used the block comment method a week or so ago in solving a numerical Times Listener crossword, number 4673, 21 August

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Devon McCormick
Ian's idea is even better: don't. On Tue, Aug 31, 2021 at 11:05 PM Ian Clark wrote: > Ruda wrote > > if I load a (longer) script, I sometimes want to ignore a part of it > > I take Ruda's use of "sometimes" to mean he wants the proposed feature to > be switchable. > > To anyone wanting to dabble

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Ian Clark
Ruda wrote > if I load a (longer) script, I sometimes want to ignore a part of it I take Ruda's use of "sometimes" to mean he wants the proposed feature to be switchable. To anyone wanting to dabble with such a feature, I have a word of advice. Don't. If there's part of your script you want to om

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Devon McCormick
I'm starting to like Mike Day's suggestion more, at this point, though it adds a small layer of necessary software for it to work. On Tue, Aug 31, 2021 at 3:38 PM Raul Miller wrote: > Something like > > Note'' > }} > ) > > would break this approach. > > A fix would be to change to something like

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Raul Miller
Something like Note'' }} ) would break this approach. A fix would be to change to something like Note'' NB.}} ) Or, like Note'' {{ }} ) Or, like Note'' '}}' ) Or, if you are using )n, like Note'' '}} ) FYI, -- Raul On Tue, Aug 31, 2021 at 2:46 PM Devon McCormick wrote: > > > @Devon:

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Devon McCormick
> @Devon: can you get this error in the 9.03 beta? If so, can you shorten > it to a replicable bug report? I will take a look. I don't actually know if that was the problem but something broke when I tried to comment out most of my large script using double curlies. On Tue, Aug 31, 2021 at 12:

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread John Baker
Actually Raul, JOD dump scripts see: https://github.com/bakerjd99/joddumps are very large J scripts that serialize code documentation databases. I've loaded dump scripts > 100 MBs without problems. Over the years I've hit various J system limits with these scripts that Roger and now Henry have

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Henry Rich
You are right.  And I can't produce the problem either. @Devon: can you get this error in the 9.03 beta?  If so, can you shorten it to a replicable bug report? Henry Rich On 8/31/2021 12:46 PM, Raul Miller wrote: If the word formation rules were changed, hmm... Indeed, I cannot get an error

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Raul Miller
If the word formation rules were changed, hmm... Indeed, I cannot get an error from statements like: {{'a' 0}}.'this is a test'}} nor {{pdn=. ((0{pdn),&.>1{pdn) 0}}.pdn}} (Even when I spread things out onto multiple lines and use the )n decoration,) So that reported premature terminatio

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Henry Rich
I deny it!  If I justified {{ }} on grounds of backwards-compatibility, I was drunk.  {{ }} were considered better than the alternatives, (which were (. ).  { }  and a Unicode pair) even though they changed the word-formation rules (to which they now conform). Henry Rich On 8/31/2021 12:23 PM

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Raul Miller
I remember wishing that the delimiters followed existing J word formation rules, for backwards compatibility reasons. However, I also remember being told that the new {{ and }} constructs were better for backwards compatibility reasons. In any event, replacing the }} in your script with } } would

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread chris burke
> .. if you're JQt, it's easy to select all the unwanted lines and switch on comments with ctrl-/ . You can later uncomment all those lines with another ctrl-/ on the same selection. Another way is to use ctrl-shift-/ which toggles on a Note. I often prefer this as the lines remain uncommented a

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Hauke Rehr
So this is open for silly ideas? Multiline comments ought to be nestable. Personally, I like the way lua does it. Both multiline strings and comments work like this: [[ an example string spanning two lines ]] [=[ … and another one ]=] [[ as many = signs as you want, so [[nesting]] is done by i

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread 'robert therriault' via Programming
Could the marker just be an unbalanced }} that shows up before the initiating {{? If further marking is required maybe stipulate that it has to start in the first column Cheers, bob > On Aug 31, 2021, at 08:28, Henry Rich wrote: > > I have wanted this often. If we could reach consensus on w

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Devon McCormick
I just tried appending together about 2 meg of scripts to do this stress test. Unfortunately, there is at least one valid instance of "}}" in the code which prematurely terminates the block: pdn=. ((0{pdn),&.>1{pdn) 0}}.pdn On Tue, Aug 31, 2021 at 11:28 AM Henry Rich wrote: > I have wanted thi

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Raul Miller
It's tempting to suggest that a bare return. would serve. But maybe it should be a different, invented keyword (to distinguish 0!:0 contexts from 3 :0 contexts)? Thanks, -- Raul On Tue, Aug 31, 2021 at 11:28 AM Henry Rich wrote: > > I have wanted this often. If we could reach consensus

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Henry Rich
I have wanted this often.  If we could reach consensus on what the best end-marker would be, I'll look into putting it in. Henry Rich On 8/31/2021 8:27 AM, 'Rudolf Sykora' via Programming wrote: Dear list, if I load a (longer) script, I sometimes want to ignore a part of it beyond a certain

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Henry Rich
That's good advice.  {{ }} does have to scan the lines & handle recursive definitions. {{)n ... }} creates a noun, similar to 0 : 0, and I don't think it scans the lines. Henry Rich On 8/31/2021 11:12 AM, John Baker wrote: I'd see how abusing {{ .. }} holds up to abuse. Enclose a few hundr

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Raul Miller
Is anyone loading a J script which is a few hundred megabytes in size? That would be ... interesting. (I am trying to imagine the purpose of such a script.) Thanks, -- Raul On Tue, Aug 31, 2021 at 11:13 AM John Baker wrote: > > I'd see how abusing {{ .. }} holds up to abuse. Enclose a few hun

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread John Baker
I'd see how abusing {{ .. }} holds up to abuse. Enclose a few hundred megabytes of text in curlies and see if J can absorb it without crashing. To paraphrase, "spare the rod, spoil the software." On Tue, Aug 31, 2021 at 9:09 AM Devon McCormick wrote: > I thought of "0 : 0" too as a solution for

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Devon McCormick
I thought of "0 : 0" too as a solution for this but it gets terminated by any embedded single closing paren which you would have as part of a function definition. I like Raul's idea of abusing the double-curlies notation. On Tue, Aug 31, 2021 at 11:01 AM Hauke Rehr wrote: > I usually abuse 0:0 f

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Hauke Rehr
I usually abuse 0:0 for block comments. Am 31.08.21 um 16:21 schrieb Raul Miller: In recent J implementations (j902, j903), you can wrap the unwanted section of the script in {{ }}. This will defer execution of those lines and then discard them (which is somewhat fortuitous, since execution of

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread Raul Miller
In recent J implementations (j902, j903), you can wrap the unwanted section of the script in {{ }}. This will defer execution of those lines and then discard them (which is somewhat fortuitous, since execution of that kind of definition would probably be bad). I hope this helps, -- Raul On Tue

Re: [Jprogramming] break from loading a script with 'load'

2021-08-31 Thread 'Michael Day' via Programming
I sometimes need this too.  If so,  and if you're JQt,  it's easy to select all the unwanted lines and switch on comments with ctrl-/ .  You can later uncomment all those lines with another ctrl-/ on the same selection. However,  that can be a bit awkward,  and thanks to your message I've just

[Jprogramming] break from loading a script with 'load'

2021-08-31 Thread 'Rudolf Sykora' via Programming
Dear list, if I load a (longer) script, I sometimes want to ignore a part of it beyond a certain line. Is there a way to achieve that gracefully? (I sometimes just add something syntactically wrong to stop there, on an error). Thank you. Ruda