Re: [Jprogramming] Understandable J

2014-05-19 Thread greg heil
The hook 'see?' ]# 1 2 3 4 4 works fine... greg ~krsnadas.org -- from: 'Pascal Jasmin' via Programming to: "programm...@jsoftware.com" date: 19 May 2014 22:01 subject: Re: [Jprogramming] Understandable J is that special code? because its not supposed to work ie: 'see?' # 1 2 3 4 |domain

Re: [Jprogramming] Understandable J

2014-05-19 Thread Raul Miller
This is standard J. Here's how it works: 'see?' (] +/ % #) 2 3 5 7 The verb here is a hook. The above is equivalent to: X=: 'see?' U=: ] V=: +/%# Y=: 2 3 5 7 X (U V) Y And this gets evaluated as: X U (V Y) Here, V Y evaluates as 4.25 So we can simplify to X U 4.25 Substituting

Re: [Jprogramming] Understandable J

2014-05-19 Thread 'Pascal Jasmin' via Programming
is that special code? because its not supposed to work ie: 'see?' # 1 2 3 4 |domain error The above (] +/ % #) is even a special parsing rule? At any rate, the conventions I use help the one who will read my code the most, but I'd still recommend to anyone to avoid long hooks. - Origin

Re: [Jprogramming] Understandable J

2014-05-19 Thread Raul Miller
That's an interesting line of thought. Note that we can take a fork and ensure that we always use its monadic definition by prefixing it with the verb ] Here's a mean example: mean=: ] +/ % # mean 2 3 5 7 4.25 'see?' mean 2 3 5 7 4.25 Now obviously there isn't a lot of need for this kind

Re: [Jprogramming] Understandable J

2014-05-19 Thread 'Pascal Jasmin' via Programming
Here are some ways to improve readability for me: lets take, quicksort=: (($:@(<#[),(=#[),$:@(>#[))({~ ?@#))^:(1<#) the first step is spacing out the train: quicksort=: (($:@(<#[) , (=#[) , $:@(>#[)) ({~ ?@#)) ^: (1<#) the next step is avoiding the hook that takes a while to find due to all th

Re: [Jprogramming] Understandable J

2014-05-19 Thread Don Kelly
Agreed but both need attention- often the most refined program may be the hardest to read. Don On 17/05/2014 9:31 PM, 'Bo Jacoby' via Programming wrote: Improve the program rather than the documentation. Den 4:49 søndag den 18. maj 2014 skrev Don Kelly : I find that putting code with lo

Re: [Jprogramming] Understandable J

2014-05-19 Thread Devon McCormick
Those of us fortunate enough to be using emacs for J have a "code-folding mode" available to us - http://www.emacswiki.org/emacs/FoldingMode - though I have not used it (and it requires tagging the source with indicators to show the start and end of folding regions). Also, the J-mode in emacs has

Re: [Jprogramming] Understandable J

2014-05-19 Thread greg heil
>More terseness is always great for our weary eyes;-) >For me the single biggest piece of help when looking at a large .ijs file >would be code-folding. Are there any patches that would avail this in Kate? >There is a nice color coding addon for it, but i have been unable to find a >code folder

Re: [Jprogramming] Understandable J

2014-05-19 Thread greg heil
For me the single biggest piece of help when looking at a large .ijs file would be code-folding. Are there any patches that would avail this in Kate? There is a nice color coding addon for it, but i have been unable to find a code folder. greg ~krsnadas.org -- from: Eldon Eller to: programm...@

Re: [Jprogramming] Understandable J

2014-05-19 Thread Eldon Eller
Doesn't a paragraph of explanation vitiate the terseness of J? On 05/19/2014 11:21 AM, Brian Schott wrote: Below is an example of monadic Note. I have no sense of how dyadic Note would help. Note 'How Note works' Note works likes this. Enter any text for a comment and when you are done, jus

Re: [Jprogramming] Understandable J

2014-05-19 Thread Brian Schott
Don, I just don't understand. Could you give an example, please? On Mon, May 19, 2014 at 2:25 PM, Don Guinn wrote: > The left argument could be a definition name or controls for adding to > help. > > -- (B=) -- For information

Re: [Jprogramming] Understandable J

2014-05-19 Thread Don Guinn
The left argument could be a definition name or controls for adding to help. On May 19, 2014 12:21 PM, "Brian Schott" wrote: > Below is an example of monadic Note. > I have no sense of how dyadic Note would help. > >Note 'How Note works' > Note works likes this. > Enter any text for a comment

Re: [Jprogramming] Understandable J

2014-05-19 Thread Brian Schott
Below is an example of monadic Note. I have no sense of how dyadic Note would help. Note 'How Note works' Note works likes this. Enter any text for a comment and when you are done, just type a right paren on a line by itself. ) On Mon, May 19, 2014 at 11:33 AM, Don Guinn wrote: > Don't forg

Re: [Jprogramming] box character toggle

2014-05-19 Thread Dan Bron
Also, depending on which frontend you're using, there's also a menu item to "Toggle ASCII Box Drawing" in the QT frontend for J8, it's under the "View" menu. Not sure about JHS or any of the other frontends. -Dan - Original Message --- Subject: Re: [Jprogramming] box character to

Re: [Jprogramming] Programming puzzle: shortest valid pangrammicprogram

2014-05-19 Thread Dan Bron
The problem is that I can't possibly think of all the fun-ruining "cheats" in advance. Use your best judgement, and I'll do the same when it comes to evaluating submissions. I don't want to rule out string literals or undefined names or even based constants entirely, because judicious use of th

Re: [Jprogramming] Programming puzzle: shortest valid pangrammic program

2014-05-19 Thread Dan Bron
I wrote: > Solutions which are overreliant on character literals (e.g. > #'abcdef..!@$...') or undefined names (e.g. abc`def`ghi etc) will be > considered cop-outs and be disqualified. If there is more than one > shortest program, the first to be posted (based on Forum timestamp) will > be dec

Re: [Jprogramming] Programming puzzle: shortest valid pangrammic program

2014-05-19 Thread Raul Miller
Note that there are multiple concepts of "use". You might want to be more specific about that. For example, here's an expression which uses every ascii character: 128{a. You might have meant where every printable ascii character appears in the script of the program. But that raises another qu

[Jprogramming] Programming puzzle: shortest valid pangrammic program

2014-05-19 Thread Dan Bron
Write the shortest valid J program that uses all printable ASCII characters. More specifically, write a J program which: - Doesn't raise an error - Returns something other than itself (e.g. 'abcde...!@$%' doesn't count; a ;: c / @ e. i: .. doesn't count, etc). - Uses each of the following char

Re: [Jprogramming] Understandable J

2014-05-19 Thread Don Guinn
Don't forget about "Note". I like to use the right argument as a title or a one line description. Then put the detailed description below. This gives the possibility to provide self-documenting by redefining "Note" to extract information for help. And we still have the left argument to play with.

Re: [Jprogramming] box character toggle

2014-05-19 Thread bill lam
FYI there is a verb boxdraw_j_ in stdlib. Пн, 19 май 2014, David Lambert писал(а): > My email system peppers j forum mail with question marks. 40% of the j > session characters in a recent post came to me as question marks. As has > been previously mentioned, changing the box drawing characters mi

[Jprogramming] box character toggle

2014-05-19 Thread David Lambert
My email system peppers j forum mail with question marks. 40% of the j session characters in a recent post came to me as question marks. As has been previously mentioned, changing the box drawing characters might help to alleviate the problem. Hence I offer this box character toggling verb, whi

Re: [Jprogramming] Understandable J

2014-05-19 Thread Devon McCormick
Time and again I find an example of correct usage to be the most helpful starting point for figuring out how something works. All too often we see people post requests for help with J code in these forums without providing any working example of what they have so far or an example of what they exp

[Jprogramming] name completion

2014-05-19 Thread Andrew Nikitin
Joe Bogner wrote: > Here's a hack for enabling tab name completion in jhs: Thanks, this is interesting hack. I had to use     var current = rows[rows.length-1].innerHTML.replace(/ | /g,'').trim(); in my browser, and i still want it to complete partial names in the middle of J sentence, but this

Re: [Jprogramming] Boxed matrix from a list of substantiv

2014-05-19 Thread Brian Schott
Bo, I don't quite understand ordinal fractions, but my intuition suggest that 22 would be correct for Inställningar. Would you explain why you say 21? But more importantly, why are you suggesting ordinal fractions for the representation here, anyway? How does that representation facilitate the sc