Re: [Jprogramming] z458095869_dissectnopath_

2013-06-05 Thread Linda Alvord
Henry, Earlier I thought I couldn't use a function inside another function, but it seems now that I can. require '~addons/debug/dissect/dissect.ijs' pas=: 13 :'(i.>:y)!y' NB. BINOMIAL PROBABILITIES bp=: 13 :' (pas x)*(y^ i.>:x)*(1-y)^ |. i.>:x' ds 'pas 3' ds '3(([: pas [) * (] ^ [: i. [: >: [)

Re: [Jprogramming] plot for parametric surfaces?

2013-06-05 Thread Linda Alvord
Devon, Load 'plot' Move this line: loopSurfacePlot (1 2 12);0 2p1 99 to the end after loopsurface is defined. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Devon McCormick Sent: Wednesday, June 0

Re: [Jprogramming] z458095869_dissectnopath_

2013-06-05 Thread Linda Alvord
I just realized what I did. By mistake I wrote ds=: and realized it and knew I had to restart jqt. When I did all was fine. Sorry to bother you. Linda -Original Message-d Froam: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of H

Re: [Jprogramming] plot for parametric surfaces?

2013-06-05 Thread Devon McCormick
I combined lines too enthusiastically: v1=: 0{] v2=: 1{] ga=: (v1 * cos@v2)"1 gb=: (v1 * sin@v2)"1 On Wed, Jun 5, 2013 at 7:02 PM, Devon McCormick wrote: > Here's something I gleaned from the J wiki - it's idiosyncratic code but > it works. Try > > loopSurfacePlot (1 2 12);0 2p1 99 > > steps=:

Re: [Jprogramming] z458095869_dissectnopath_

2013-06-05 Thread Henry Rich
Are you sure? When I run ds '2([: |: ([ = [: +/ [: |: #~ #: [: i. ^) #"1 [: |: #~ #: [: i. ^)4' I get a valid display. There seems to be a weird () following the 2 in your version. Henry Rich On 6/5/2013 9:19 PM, Linda Alvord wrote: Henry, I used your ds version of cr and used it to re

Re: [Jprogramming] z458095869_dissectnopath_

2013-06-05 Thread Linda Alvord
Henry, I used your ds version of cr and used it to rewrite a shorter version of cr. require '~addons/debug/dissect/dissect.ijs' cr=: 13 :'|:(x= +/ |:(y#x)#:i.x^y) #"1 |:(y#x)#:i.x^y' cr [: |: ([ = [: +/ [: |: #~ #: [: i. ^) #"1 [: |: #~ #: [: i. ^ 2 cr 4 0 0 1 1 0 1 0 1 0 1 1

Re: [Jprogramming] z458095869_dissectnopath_

2013-06-05 Thread Linda Alvord
Henry, After an upgrade a click on an array in a red box will appear in a grid. Now hist 8 appears in the grid with a scroll bar. Impressive. Also, 2 cr 5 Thanks. I'm already finding ds useful. Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mailto:progr

Re: [Jprogramming] plot for parametric surfaces?

2013-06-05 Thread Devon McCormick
Here's something I gleaned from the J wiki - it's idiosyncratic code but it works. Try loopSurfacePlot (1 2 12);0 2p1 99 steps=: (0 { ]) + ([: -/ 1 0 { ]) * ([: i. 2 { ]) % [: <: 2 { ] sin=: 1&o. [ cos=: 2&o. v1=: 0{] [ v2=: 1{] p=: 1.5"_ [ q=: 1.6499"_ ga=: (v1 * cos@v2)"1 [ gb=: (

Re: [Jprogramming] plot for parametric surfaces?

2013-06-05 Thread Henry Rich
According to the 'Data' page, you supply the data as x;y;z where z is a table and x and y have the same shape as z. (x and y could also be lists). Henry Rich On 6/5/2013 5:31 PM, Raul Miller wrote: Here's a function plot require 'plot' plot 1 _2 1&p. i:2j200 Here's a parametric

Re: [Jprogramming] plot for parametric surfaces?

2013-06-05 Thread bob therriault
Hi Raul, It looks to me as if the wiki version is providing an array of shape 100 100 and it is plotting the z values for each position (x,y) within the array. You would just need to pick your parameter so that it corresponds to integer positions that would map on to the array and then insert t

[Jprogramming] plot for parametric surfaces?

2013-06-05 Thread Raul Miller
Here's a function plot require 'plot' plot 1 _2 1&p. i:2j200 Here's a parametric plot (in this case, my x function is linear, so all I'm doing is adjusting the x axis labels): plot (;1 _2 1&p.) i:2j200 Here's a surface function plot (copied straight from the wiki): 'type surface' pl

Re: [Jprogramming] Request for a tool: noun explorer

2013-06-05 Thread Henry Rich
I think this idea is implementable. I am spending all my free time on dissect, or I would work on it now. The hard decisions are in the UI. Henry Rich On 6/5/2013 10:46 AM, bob therriault wrote: Thanks Linda, I agree that a big part of understanding a boxed structure is the way you use the

Re: [Jprogramming] z458095869_dissectnopath_

2013-06-05 Thread Henry Rich
I have fixed the errors you found, in cr and in launching a grid. Henry Rich On 6/5/2013 3:04 AM, Linda Alvord wrote: I'm working on simplifying cr but here is what happens now. cr=:[: |: ([ = [: +/ [: ([: |: ] #: [: i. */) 2 $~ ]) #"1 [: ([: |: ] #: [: i. */) 2 $~ ] 2 cr 4 0 0 1 1 0

Re: [Jprogramming] Request for a tool: noun explorer

2013-06-05 Thread bob therriault
Thanks Linda, I agree that a big part of understanding a boxed structure is the way you use the tools that you have to deconstruct it. I think Henry touches on this as well in his original post when he talks about the tools that might be available to probe the noun. So it seems to be a combinat

Re: [Jprogramming] Finding repeated substrings

2013-06-05 Thread r.e.boss
Finding a square seems an old problem to me, search the archive for substring(s). After some time I even seemed to remember yesterday a (my?) solution, but since I am in Italy with no J available, I'll check it when I'm home. R.E. Boss -Ursprüngliche Nachricht- Von: programming-boun..

Re: [Jprogramming] About J701 patches

2013-06-05 Thread Aai
On 05-06-13 15:06, Thomas Costigliola wrote: Hi Aai, That is very peculiar. There is nothing in the patches that would speed up either of those two factorials. Can you tell us more information. What was the original and patched OS and cpu architecture? What was the compiler and flags used for

Re: [Jprogramming] About J701 patches

2013-06-05 Thread Thomas Costigliola
Hi Aai, That is very peculiar. There is nothing in the patches that would speed up either of those two factorials. Can you tell us more information. What was the original and patched OS and cpu architecture? What was the compiler and flags used for the patched version? If you compile yourself wi

Re: [Jprogramming] Finding repeated substrings

2013-06-05 Thread Aai
Just another try. sqrs =: [: ; ((1+i.@<.@-:@#) <@([((-@[}.])(<@,"1 ~.@#~-:"1)}.)]\)"0 1]) sqrs s ┌──┬──┬┬┐ │aa│bb│abab│baba│ └──┴──┴┴┘ sqrs&.> 'square';'square-free';'bonbon' ┌┬┬┐ ││┌──┐│┌──┐│ │││ee│││bonbon││ ││└──┘│└──┘│ └┴┴┘ sqrs ,2$,:s ┌──┬──┬─

Re: [Jprogramming] Request for a tool: noun explorer

2013-06-05 Thread Linda Alvord
This script helped save my sanity... 2 2$8;9 (<4;(<7;8)); 2 2$ 8;9 (< 5;6);(<4;<7;8); 2 2$ 8;9 4 ; (< 5;6);(<4;(<7;8)); 2 2$ 8;9 3; 4 ; (< 5;6);(<4;(<7;8)); 2 2$ 8;9 2 3 2 $ 3; 4 ; (< 5;6);(<4;(<7;8)); 2 2$ 8;9 Linda -Original Message- From: programming-boun...@forums.jsoftware.com [mai

Re: [Jprogramming] z458095869_dissectnopath_

2013-06-05 Thread Linda Alvord
I'm working on simplifying cr but here is what happens now. cr=:[: |: ([ = [: +/ [: ([: |: ] #: [: i. */) 2 $~ ]) #"1 [: ([: |: ] #: [: i. */) 2 $~ ] 2 cr 4 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 ds '2 ([: |: ([ = [: +/ [: ([: |: ] #: [: i. */) 2 $~ ]) #"1 [: ([: |: ] #: [: