Re: [Jprogramming] Numerator and Denominator

2016-03-08 Thread Linda A Alvord
With help from Roger, nd=: 13 :'(y*%1+.y),%1+.y' nd (] * [: % 1 +. ]) , [: % 1 +. ] Linda -Original Message- From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Roger Hui Sent: Tuesday, March 8, 2016 11:33 PM To: Programming forum Subject: Re: [Jp

[Jprogramming] ipad j: html

2016-03-08 Thread Brian Schott
The ipad version of J has some nice examples using the verb jh, which embeds the verb jy, of producing html output in its html window. Does anyone know how to put a simple in that window (with buttons and menus, for example), that will send info to the J session? Thanks, -- (B=) ---

Re: [Jprogramming] Numerator and Denominator

2016-03-08 Thread Roger Hui
x=: %/?2$10^8x x 69904549r40669028 den=: [: % 1 +. ] num=: * den den x 40669028 num x 69904549 On Tue, Mar 8, 2016 at 7:28 PM, Kip Murray wrote: > That's great! It's still a nice puzzle to write your own. --Kip > > On Tuesday, March 8, 2016, Raul Miller wrote: > > >

Re: [Jprogramming] Numerator and Denominator

2016-03-08 Thread Raul Miller
Oh... well... if it's a puzzle and you don't want the built in, I suppose you could do this: s p o i l e r s p a c e . . . nd=: (%, %@])1&+. -- Raul On Tue, Mar 8, 2016 at 10:28 PM, Kip Murray wrote: > That's great! It's still a nice puzzle to write your own. --Kip > > O

Re: [Jprogramming] Unbox request for requests

2016-03-08 Thread Marshall Lochbaum
I finally got unicode identifiers working with full test compliance. Every unicode character is treated as an alphabetic, and invalid UTF-8 gives a spelling error. ]π2 =. 1p2 9.8696 %: π2 3.14159 Do you want this in unbox's master branch? If so I'll send a pull request. The code is at https

Re: [Jprogramming] Numerator and Denominator

2016-03-08 Thread Kip Murray
That's great! It's still a nice puzzle to write your own. --Kip On Tuesday, March 8, 2016, Raul Miller wrote: >2 x: 6r4 > 3 2 > > -- > Raul > > > On Tue, Mar 8, 2016 at 10:04 PM, Kip Murray > wrote: > > How do you find the numerator and denominator in lowest terms of a > rational > > frac

Re: [Jprogramming] Numerator and Denominator

2016-03-08 Thread Raul Miller
2 x: 6r4 3 2 -- Raul On Tue, Mar 8, 2016 at 10:04 PM, Kip Murray wrote: > How do you find the numerator and denominator in lowest terms of a rational > fraction? For example, > > nd 6r4 > 3 2 > > --Kip Murray > > > > -- > Sent from Gmail Mobile > --

[Jprogramming] Numerator and Denominator

2016-03-08 Thread Kip Murray
How do you find the numerator and denominator in lowest terms of a rational fraction? For example, nd 6r4 3 2 --Kip Murray -- Sent from Gmail Mobile -- For information about J forums see http://www.jsoftware.com/forums.

Re: [Jprogramming] Unbox request for requests

2016-03-08 Thread Marshall Lochbaum
Over here: https://github.com/iocane/unbox It's a fork of J which (as the name suggests) is open to more adventurous experiments than the version distributed by Jsoftware. Marshall On Tue, Mar 08, 2016 at 03:55:18PM -0500, Devon McCormick wrote: > I guess I missed it but "Unbox" is...? > > On

Re: [Jprogramming] Unbox request for requests

2016-03-08 Thread Devon McCormick
I guess I missed it but "Unbox" is...? On Tue, Mar 8, 2016 at 7:32 AM, Thomas Costigliola wrote: > > > So far Unbox has a couple of bug fixes and build system changes not in the > standard source release. I have begun working on a re-implementation of > gerunds that should fix some bugs and allo

Re: [Jprogramming] Please explain

2016-03-08 Thread Raul Miller
Looking over the other responses here, I do not think I have anything new to add. But perhaps another pass over the issues will help? Here's your original sentence with its result: (]j.1:)^:<10 10 10j1 10j2 10j3 10j4 10j5 10j6 10j7 10j8 10j9 Here is how you might get those same numbers using

Re: [Jprogramming] Please explain

2016-03-08 Thread David Lambert
(j. 1:) is a hook. In this case (] j. 1:) is a monad, and the same as use of (j. 1:) On 03/08/2016 03:47 AM, programming-requ...@forums.jsoftware.com wrote: Date: Tue, 8 Mar 2016 02:24:27 -0500 From: "Linda Alvord" To: Subject: Re: [Jprogramming] Please explain Message-ID:<01d1790b$8c845920$

Re: [Jprogramming] Please explain

2016-03-08 Thread David Lambert
From the dictionary of j: u ^: v y <===> u^:( v y) y u is (] j. 1:) v is < and the right noun is 10 (]j.1:)^:<10 10 10j1 10j2 10j3 10j4 10j5 10j6 10j7 10j8 10j9 Date: Mon, 7 Mar 2016 21:09:56 -0500 From: "Linda A Alvord" To: Subject: [Jprogramming] Please explain Message-ID: <01d178

[Jprogramming] Unbox request for requests

2016-03-08 Thread Thomas Costigliola
So far Unbox has a couple of bug fixes and build system changes not in the standard source release. I have begun working on a re-implementation of gerunds that should fix some bugs and allow some new features. This is working out to be a somewhat long term project and I'd like to keep thin

Re: [Jprogramming] Add vertical line to plot

2016-03-08 Thread EelVex
For each stick you only need a pair/triplet (x;[miny], maxy) pd x; miny, maxy places a vertical stick at x spanning from miny to maxy. miny defaults to zero. If you omit miny the plot will be cropped to min(maxy) - max(maxy) On Tue, Mar 8, 2016 at 1:25 PM, Ryan Eckbo wrote: > I also found th

Re: [Jprogramming] Add vertical line to plot

2016-03-08 Thread Ryan Eckbo
I also found there's a 'stick' plot: pd 'reset' pd 'type line' pd (i.10); 5+*:i.10 pd 'type stick' pd 'color red' pd 90 (7}) 10$0 pd'show' On 8 Mar 2016, at 21:12, Ben Gorte - CITG wrote: Perhaps a bit clumsy ... pd 'reset' pd (i.10); 5+*:i.10 pd 5 5;0 100 pd 'show' ... but if you wrap it i

Re: [Jprogramming] Add vertical line to plot

2016-03-08 Thread Ben Gorte - CITG
Perhaps a bit clumsy ... pd 'reset' pd (i.10); 5+*:i.10 pd 5 5;0 100 pd 'show' ... but if you wrap it in a verb, nobody will notice Ben From: Programming [programming-boun...@forums.jsoftware.com] on behalf of Ryan Eckbo [ec...@cim.mcgill.ca] Sent: Tues

Re: [Jprogramming] Please explain

2016-03-08 Thread Linda Alvord
You can get the same result without ^: (10(j."0)i.10)-:(]j.1:)^:<10 1 Linda -Original Message- From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda Alvord Sent: Tuesday, March 8, 2016 2:24 AM To: programm...@jsoftware.com Subject: Re: [Jprogra