Re: [Jprogramming] Interweave

2016-03-10 Thread Martin Kreuzer
Sorry for the scrambled mess below (produced by my e-mail client) ... As a newbie, and looking at the 'adbecf' example, I've found the term 'Interweave' quite appropriate. (This has sounded to me like a one-to-one relationship; but as a non-native speaker I might be thorougly mistaken.) I th

Re: [Jprogramming] Unbox request for requests

2016-03-10 Thread Joe Bogner
Thanks Thomas, my comments are below: On Thu, Mar 10, 2016 at 10:35 AM, Thomas Costigliola wrote: > > > Great list Joe, I'll respond to each below... > On Mar 9, 2016 7:26 AM, Joe Bogner wrote: >> >> Some wishlist ideas (some are likely controversial): >> >> 1. Optimized CSV/TSV loading and writ

Re: [Jprogramming] Interweave

2016-03-10 Thread Henry Rich
Yes, "the order in which they appear" is circular. Like I said, I'm still looking for the right words... I can't beat Ken's phrasing for accurate brevity, but it's longer than you want for the first-line description for a newcomer; and it requires that you know what 'item' means. "Row-major

Re: [Jprogramming] Interweave

2016-03-10 Thread Marshall Lochbaum
Maybe "reading order"? Left-to-right, top-to-bottom as displayed by J. It's probably worth noting for those looking for more specificity that (,) is equivalent to (,/^:_), at least if the rank is greater than zero. Marshall On Thu, Mar 10, 2016 at 06:58:09PM -0500, Henry Rich wrote: > You're righ

Re: [Jprogramming] Interweave

2016-03-10 Thread Roger Hui
> "in the order in which they appear in y"? Isn't that kind of circular? What is the order in which they appear? Row-major order, index order, "normal order", etc. The way Ken has it seems pretty good: "ordered by items, by items within items, etc." On Thu, Mar 10, 2016 at 3:58 PM, Henry Ri

Re: [Jprogramming] Is variable defined

2016-03-10 Thread Ric Sherlock
The foreign conjunction you're after is 4!:0 blah=: 403 4!:0 <'blah' 0 4!:0 <'notblah' _1 The verb type is defined in the stdlib that is loaded at startup so: type 'blah' ++ |noun| ++ type 'blahnot' +---+ |not defined| +---+ On Fri, Mar 11, 2016

Re: [Jprogramming] Is variable defined

2016-03-10 Thread Henry Rich
ifdefined =: 0 <: [: 4!:0 < ifdefined 'xxx' 0 ifdefined 'ifdefined' 1 Henry Rich On 3/10/2016 7:19 PM, Ryan Eckbo wrote: I seem to remember that there's a way to check whether a variable has been defined or not, but I can't find the method. Does anyone know? Thanks, Ryan -

[Jprogramming] Is variable defined

2016-03-10 Thread Ryan Eckbo
I seem to remember that there's a way to check whether a variable has been defined or not, but I can't find the method. Does anyone know? Thanks, Ryan -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Interweave

2016-03-10 Thread Henry Rich
You're right... Now, how would you describe the order? Would 'index order" be enough? The Dictionary says "normal order" and then goes on to define it. I have looked for years for the right words. It has to be short and intuitive - not a mathematical definition. How about "in the order i

Re: [Jprogramming] Interweave

2016-03-10 Thread Nicholas Spies
This is perhaps a quibble, but... Looking at the NuVoc definition of , y Ravel The following statement and the example directly below it... Produces a list containing all the atoms i

Re: [Jprogramming] Interweave

2016-03-10 Thread Roger Hui
,'ace',.'bdf' abcdef 'ace',@,.'bdf' abcdef On Thu, Mar 10, 2016 at 2:47 PM, Roger Hui wrote: >,|:'ace',:'bdf' > abcdef >'ace'([: , |:@,:)'bdf' > abcdef > > > On Thu, Mar 10, 2016 at 2:42 PM, Kip Murray > wrote: > >> A quickie -- how do you interweave two equal-length lists, so th

Re: [Jprogramming] Interweave

2016-03-10 Thread Roger Hui
,|:'ace',:'bdf' abcdef 'ace'([: , |:@,:)'bdf' abcdef On Thu, Mar 10, 2016 at 2:42 PM, Kip Murray wrote: > A quickie -- how do you interweave two equal-length lists, so that > >'ace' itw 'bdf' > abcdef > > --Kip Murray > > > > -- > Sent from Gmail Mobile > -

[Jprogramming] Interweave

2016-03-10 Thread Kip Murray
A quickie -- how do you interweave two equal-length lists, so that 'ace' itw 'bdf' abcdef --Kip Murray -- Sent from Gmail Mobile -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Unbox request for requests

2016-03-10 Thread Pascal Jasmin
This idea has a lot of promise. Converting to and from C structures would be big, though C doesn't have (AFAIK) a heterogeneous array format, and some standard representation for a dictionary would be needed. C JSON libraries all seem to do something different. The missing structure in C is

Re: [Jprogramming] New Video Lab viewer for jqt

2016-03-10 Thread robert therriault
Thanks Murray, I will look into that, but at the size of the video files downloaded I won't guarantee that bigger would be more viewable. Also, I would be more inclined to have the form resizable because covering the whole form with a larger video would reduce the functionality. If you are on

Re: [Jprogramming] Numerator and Denominator

2016-03-10 Thread Mike Day
[ a0 ; a1 a2 a3 ... ] ? Usage seems to vary - the ";" appears to be optional, but if used, it can be thought of as the integer part: a0 + 1 % (a1 + 1 % ( a2 + 1 % (a3 +... ) ) ) The notation may be extended to use a comma (",") to indicate repeated groups, so, dropping the ";" rt2 = [1 2 2 2

Re: [Jprogramming] New Video Lab viewer for jqt

2016-03-10 Thread Murray Eisenberg
Is there some way to enlarge the video viewing window? On my 27” screen, the video is much too small for comfortable viewing. Most every video viewer I know allows such magnification. But I don’t see any control here to do that, and the entire surrounding window will not resize by dragging any

Re: [Jprogramming] Numerator and Denominator

2016-03-10 Thread Kip Murray
Your question is too hard for me. If I wanted to look into it, I would start with paragraph 3.10 Theorems on Continued Fractions on page 10 of the Handbook of Mathematical Functions edited by Abramowitz and Stegun. The matrix theorem shown there may help. What does your notation [ a0 ; a1 a2 a3

Re: [Jprogramming] Numerator and Denominator

2016-03-10 Thread Mike Day
So how do you add [a0; a1 a2 a3 ...] and [b0; b1 b2 b3 b4] to yield [c0;c1 c2 c3 c4...] using just their encodings as cfs? For example, 3r11 + 1r2 = 17r22 ; or, as c.f. [1;5 2] + [0;2] = [1;1 2 7] How would you do the latter directly? Mike On 10/03/2016 17:18, Kip Murray wrote: J Continued

Re: [Jprogramming] Numerator and Denominator

2016-03-10 Thread Kip Murray
J Continued Fractions Let us consider the continued fraction 1 + 2 % 3 + 4 % 5 + 6 % 7 + … This represents the infinite list 1 , (1+2%3), (1 + 2%3 + 4 % 5), … I follow the convention that each term after the first ends with a denominator. We can calculate 1 + 2 % 3 + 4 % 5 using. +`% / 1 2 3

Re: [Jprogramming] Unbox request for requests

2016-03-10 Thread Marshall Lochbaum
For CSV/JSON loading and storing, I think the best approach would be to write C functions that convert these formats to and from J nouns. A J noun is the type A from jtype.h (line 41), and you can use that header or pieces of it directly. Then just call the shared library from J. This could be adde

Re: [Jprogramming] Unbox request for requests

2016-03-10 Thread John Baker
Two remarks: 1) If you opt for optimized CSV loading consider supporting two load modes. One the standard table representation and the other the inverted column representation. If the code can scale to many millions of rows quickly it would be very handy and better than anything you are likely to

Re: [Jprogramming] Unbox request for requests

2016-03-10 Thread Thomas Costigliola
Great list Joe, I'll respond to each below... On Mar 9, 2016 7:26 AM, Joe Bogner wrote: > > Some wishlist ideas (some are likely controversial): > > 1. Optimized CSV/TSV loading and writing I think some people like to keep the core language small and use the standard library and addons for

Re: [Jprogramming] Replace Items

2016-03-10 Thread Raul Miller
Well... heading in the tacit direction there's this: NB. explicit verb ritemE=: 1 :0 : x (I.m-:"_1 _ y)} m ) NB. tacit verb ritemT=: 1 :0 [`([:I. m -:"_1 _ ])`(m"_)} ) NB. some sample data and tests C=:3 4$i.8 A=:i.3 2 4 assert 9 8 7 6 (C ritemE -: C ritemT) 0 1 2 3 assert (100%i.2 4) (A rite

Re: [Jprogramming] Numerator and Denominator

2016-03-10 Thread Mike Day
Thanks, Bo. I was going to reply saying "yes, but what about doing arithmetic with cf?" But I see there are methods for addition etc with such representations. They're fairly formidable, and I don't quite see yet how to control the precision of such operations. Unlike p-adics, they're not

Re: [Jprogramming] Unbox request for requests

2016-03-10 Thread Thomas Costigliola
Looks great Marshall.  I wanted the master branch to contain only the tagged releases so I think all pull requests should go into the develop branch. That's what I'm used to but I haven't used github before so I'm not sure of the best way to reflect this. Suggestions are welcome. -

Re: [Jprogramming] Numerator and Denominator

2016-03-10 Thread Bo Jacoby
The standard approach to get rational approximations to irrational numbers is that of continued fractions.  Den 0:23 torsdag den 10. marts 2016 skrev Mike Day : I'm not at all sure that you'll find this relevant,  but here goes,  anyway: I recently solved Euler problem 541 which conc