Re: [Jprogramming] J Conference 2014 - early registration deadline

2014-04-30 Thread Björn Helgason
I can not come because this time of year is when I make most money and it also costs quite a lot. I see J and APL as very close and in the past the APL conferences were moving around. I wonder if it would be possible to connect with others like Dyalog and IBM to create events in Europe? Many wou

Re: [Jprogramming] Unicode boxed display

2014-04-30 Thread 김창준
This approach won't work with different width characters(such as in Korean) in unicode. (Some characters are wide -- taking two-character space, others narrow -- taking one-character space) On Wed, Apr 30, 2014 at 6:24 AM, Don Guinn wrote: > This has bugged me for quite a while too. I tried mak

[Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread alexgian
Suppose I have an Nx2 data matrix, say x1 y1 x2 y2 x3 y3 and a dyadic verb called, say, df1 Is there an elegant way to get the result matrix x1 df1 y1 x2 df1 y2 x3 df1 y3 . without resorting to "from - {" and "take - {." jiggery-pokery Or perhaps just a means to convert an expresiion fr

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread Ben Gorte - CITG
Like this? df1 = :^ ]Nx2 =: i.6 2x 0 1 2 3 4 5 6 7 8 9 10 11 df1/ |: Nx2 0 8 1024 279936 134217728 1000 Greetings, Ben From: [email protected] [[email protected]] on behalf of alexgi

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread Ben Gorte - CITG
sorry, df1 =: ^ From: [email protected] [[email protected]] on behalf of Ben Gorte - CITG [[email protected]] Sent: Wednesday, April 30, 2014 11:56 To: [email protected] Subject: Re: [Jprogramming]

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread Jan-Pieter Jacobs
The thing that I'd think of first would be using ranks. Using the same example: Nx2 =: i.6 2x df1 =: ^ df1/"1 Nx2 0 8 1024 279936 134217728 1000 -- For information about J forums see http://www.jsoftware.com/fo

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread David Lambert
Time to learn about rank! In my experience u"1 N_BY_2_MATRIX runs faster than u@:|: N_BY_2_MATRIX Date: Wed, 30 Apr 2014 10:49:40 +0100 From: alexgian To: J Programming forum Subject: [Jprogramming] Applying a dyad to exusting matrix data Message-ID: Content-Type: text/plain; charset=

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread alexgian
Yes, thanks Ben, that's exactly what I had in mind. Clever. It never occurred to me to use / to insert the verb between the "dyadic" data elements. It might have if I had been using an N x 3 or more array, as I am used to using / for series as an "accumulator", but in the trivial dyadic case, I

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread Ben Gorte - CITG
Sorry, but not on my computer: Nx2 =: i.60 2x df1=:+ 6!:2 'z=:df1/ |:Nx2' 0.46775 6!:2 'z=:df1/"1 Nx2' 1.18481 I was thinking in the first case it does df1 only once (on a lot of data), and in the second case many times, element by element. Greetings, Ben __

Re: [Jprogramming] J Conference 2014 - early registration deadline

2014-04-30 Thread Anssi Seppälä
I registered and look forward to see as many as possible. I do not see the cost too much while I remember that everything else in J is free. Anssi -Original Message- From: [email protected] [mailto:[email protected]] On Behalf Of Björn Helga

Re: [Jprogramming] J Conference 2014 - early registration deadline

2014-04-30 Thread Björn Helgason
Cost of flight and loss of earnings is the cost I am faced with. It is actually quite considerable. - Björn Helgason gsm:6985532 skype:gosiminn On 30.4.2014 11:25, "Anssi Seppälä" wrote: > I registered and look forward to see as many as possible. I do not see the > cost too much while I remembe

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread alexgian
Yeah, personally (from my minimal understanding of J), I'd have guessed that feeding the data at rank 1 would be slower, but what do I know? On 30 April 2014 12:12, Ben Gorte - CITG wrote: > Sorry, but not on my computer: > >Nx2 =: i.60 2x >df1=:+ >6!:2 'z=:df1/ |:Nx2' > 0.4677

Re: [Jprogramming] Unicode boxed display

2014-04-30 Thread Ian Clark
June is right. I will go further and say that if your chosen font is not consistently fixed-width, your efforts to get tidy boxes are doomed to failure. None of the "fixed width" fonts that I've tried (on the Macintosh) are consistently fixed width -- certainly not over the C-J-K codespaces. The ma

Re: [Jprogramming] Unicode boxed display

2014-04-30 Thread 'Pascal Jasmin' via Programming
It is cool, and example looks good: one shortcomming: (uses J display rather than data)   sbox 3}._32<\ u: a. this almost lines up: (i think char 173/174 double prints?)   sbox <"1 u: (95 166 188 +"0 1 i.30) { a. - Original Message - From: Ian Clark To: Programming forum Cc: Sent:

Re: [Jprogramming] Unicode boxed display

2014-04-30 Thread Ian Clark
> one shortcomming: (uses J display rather than data) Don't understand you. sbox returns a result (of precision: unicode) which can be assigned. z=: cutopen '€1.23 €45.67 €890.12' zz=: sbox z zz +-+--+---+ |€1.23|€45.67|€890.12| +-+--+---+ As for boxes not quite

[Jprogramming] stitching two matrices

2014-04-30 Thread Joe Bogner
I'm trying to combine/stitch two matrices into a boxed representation. I tried various ideas for about 45 minutes and this is the best I came up with. I need the data to be boxed for another algorithm I'm supplying it to The output should be a 5 item list of boxed 3x2 arrays with each column side

Re: [Jprogramming] stitching two matrices

2014-04-30 Thread 'Pascal Jasmin' via Programming
this? <"1 (i. 5 3) ,&<"0 i. 5 3 - Original Message - From: Joe Bogner To: [email protected] Cc: Sent: Wednesday, April 30, 2014 11:00:55 AM Subject: [Jprogramming] stitching two matrices I'm trying to combine/stitch two matrices into a boxed representation. I tried various ide

Re: [Jprogramming] stitching two matrices

2014-04-30 Thread Roger Hui
arr -: P1 <@(,."1) P2 1 On Wed, Apr 30, 2014 at 8:00 AM, Joe Bogner wrote: > I'm trying to combine/stitch two matrices into a boxed representation. I > tried various ideas for about 45 minutes and this is the best I came up > with. > > I need the data to be boxed for another algorithm I'm s

Re: [Jprogramming] stitching two matrices

2014-04-30 Thread Roger Hui
Dyadic ". is more efficient for converting strings to numbers. e.g. p2 =: _999 ". ];._2 (0 : 0) 32130.00 0.01369 1.00568 32130.00 0.51354 1.0 32130.00 0.31124 1.0 32130.00 0.00591 1.0 32130.00 0.15562 1.0 ) On Wed, Apr 30, 2014 at 8:00 AM, Joe Bogner wrote: > I'm trying to c

Re: [Jprogramming] stitching two matrices

2014-04-30 Thread Joe Bogner
Roger, thank you. That is perfect. Also, I appreciate the tip on Dyadic ". Your clue gave me another idea, which isn't as simple as yours arr-: <"2 (P1 ,."1 P2) 1 I typically forget about atop and just move the verb outside and use parentheses. This will help it stick. On Wed, Apr 30, 201

Re: [Jprogramming] stitching two matrices

2014-04-30 Thread Roger Hui
Simpler: P1 <@,."1 P2 On Wed, Apr 30, 2014 at 8:22 AM, Joe Bogner wrote: > Roger, thank you. That is perfect. Also, I appreciate the tip on Dyadic ". > > Your clue gave me another idea, which isn't as simple as yours > > arr-: <"2 (P1 ,."1 P2) > > 1 > > > I typically forget about atop and jus

[Jprogramming] Simple tacit verbs problem

2014-04-30 Thread Jon Hough
I can't understand why func1 =. 3&+ @: (2&-) func2 =. (3&+) (2&-) give different results as mondaic verbs. func1 5 gives 0, which is what I would expect. func2 5 gives 12, which I can't understand. I would like to know what the difference is between func1 and func2. It is my understanding that fo

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread Tracy Harms
func2 is a hook. The semantics of a hook are more complex than simple composition. On Apr 30, 2014 11:42 AM, "Jon Hough" wrote: > I can't understand why > func1 =. 3&+ @: (2&-) > func2 =. (3&+) (2&-) > > give different results as mondaic verbs. > func1 5 gives 0, which is what I would expect. > f

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread Ian Clark
Sorry @Jon, your understanding is faulty. You can't just omit the (@:) in (u@:v). J should come with a prominent health warning that u(v y) is not the same as (u v)y. Yet when I do a low pass over the documentation as a newcomer might see it, I don't think that fact is made sufficiently clear. IM

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread robert therriault
Hi Jon, Like so many things in J, an added character usually does make a difference. That is the cost of using less to say more. :) In this case, I think that you have a pretty good handle on func1, so I will focus on what func2 is doing. func2 is a hook which means that func2 5 is acting like

[Jprogramming] plot in 602

2014-04-30 Thread Andrew Nikitin
Raul Miller wrote: > I was able to run plot i.21 on both jqt and jhs from j64-801 I tried it with jhs, j32-802. It does not have plot package preinstalled and that machine does not go to the internet, so I cannot use JAL also. How do I install plot for jhs manually?

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread Raul Miller
The information from http://jsoftware.com/help/dictionary/special.htm should probably be incorporated into http://www.jsoftware.com/jwiki/NuVoc? Here's a list of the entries which are relevant in the context of ("1): $, dyad also ($,)"r ; also {, {., }., e., ; avoids ravel; see the J 4.06 release

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread Raul Miller
Also worth keeping in mind might be: http://www.jsoftware.com/pipermail/general/2006-January/026271.html "With the hindsight from 17 years of usage, I would define 2-verb trains differently ... " but note also http://www.jsoftware.com/pipermail/general/2006-January/026274.html "There is no int

Re: [Jprogramming] plot in 602

2014-04-30 Thread Raul Miller
The basic idea should be to get the graphics_plot_* archive for your system from http://www.jsoftware.com/jal/j802/ and unpack it in your j addons directory (try jpath '~addons' to see what this directory is). Then go to the manifest.ijs which it contained and repeat the process for the addons men

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread Tracy Harms
If only the rough spots of the other programming languages I use were so beautiful as Hook. -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread 'Pascal Jasmin' via Programming
With the hindsight from 17 years of usage, I would define 2-verb trains differently, viz. (f g) y <-> f g y x (f g) y <-> f (x g y) a bit surprising to me: I agree with monad, but existing dyad hook is useful, as per yesterday's discussion.  That proposal would make dyad equivalent

Re: [Jprogramming] plot in 602

2014-04-30 Thread Joe Bogner
On Wed, Apr 30, 2014 at 1:15 PM, Andrew Nikitin wrote: > Raul Miller wrote: > > I was able to run plot i.21 on both jqt and jhs from j64-801 > I tried it with jhs, j32-802. It does not have plot package preinstalled > and that machine does not go to the internet, so I cannot use JAL also. > H

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread Ben Gorte - CITG
Perhaps we could emphasize that df1/"1 Nx2 works for any dyadic df1 that can handle two scalars, whereas df1/ |:Nx2' only makes sense if df1 is able to deal with entire arrays at once (and then it may be faster). Is this right? greetings, Ben Fro

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread Raul Miller
([: f g) and f@:g are already equivalent in functionality, at least in contexts which are independent of how they are phrased. It might have been nice to have a third way of expressing the same concept. This would make teaching people about J easier for those not interested in the language and wou

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread 'Pascal Jasmin' via Programming
the slight difference between ([: f g) and f@:g is that it is arguably cleaner to apply an adverb to just g in the first version: ([: f g"1) vs. f@:(g"1) Overall, the point that hooks are distracting from forks is a major hurdle, that I do not help with my proposals other than to recommend igno

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread Linda Alvord
Maybe not elegant, but interesting. ]A=:i.4 2 ]A=:i.4 2 0 1 2 3 4 5 6 7 f=: 13 :'(}."1 y)g }:"1 y' f }."1 g }:"1 g=:% g f A 0 0.67 0.8 0.857143 g=: o. g f A 0 _6.86451 85.7338 3.14155 Linda -Original Message- From:

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread Raul Miller
([: f g"1) is equivalent to f@:(g"1) ([: f g)"1 is equivalent to f@:g"1 which could be expressed as (f@:g)"1 Conjunctions and adverbs stack while checking for a leftmost instance (to determine where to start), this effectively reverses the right-to-left parsing order of verbs, in the context of co

Re: [Jprogramming] Applying a dyad to exusting matrix data

2014-04-30 Thread Henry Rich
On 4/30/2014 2:21 PM, Raul Miller wrote: The information from http://jsoftware.com/help/dictionary/special.htm should probably be incorporated into http://www.jsoftware.com/jwiki/NuVoc? Coming soon. Stay tuned. Henry Rich --

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread robert therriault
Good ideas Raul, I like the purpose driven approach of using J in a practical environment. I also think that the current labs provide a much more powerful and interactive way to allow learners to explore new concepts. As I think of areas to explore in the process of communicating J, I am leanin

Re: [Jprogramming] Simple tacit verbs problem

2014-04-30 Thread Raul Miller
I have been noticing your efforts with jhs and highlighting and coloring. I think it would be good if you could write up a page on the primitives, tools, references, whatever else you find most useful here. It will also be interesting to see how your work evolves. Thanks, -- Raul On Thu, May