Re: [Jprogramming] J-like on CUDA / WebAssembly

2017-12-13 Thread 'Pascal Jasmin' via Programming
I made arrayfire bindings a while back https://github.com/Pascal-J/Jfire its a gpu library that probably has the simper routines youwant. From: bill lam To: Programming forum Sent: Wednesday, December 13, 2017 7:02 PM Subject: Re: [Jprogramming] J-like on CU

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Raul Miller
Every programming language which I have mastered, I have read a reference manual for at least once. In languages which I dabble, I have not bothered - but I do not use those much, either. (Generally speaking, if a language reference manual is not something I can obtain cheaply, I have ignored the

Re: [Jprogramming] J-like on CUDA / WebAssembly

2017-12-13 Thread Raul Miller
I would imagine that for most sentences, once data was in GPU, it would stay there (until some operation, such as foreigns, required moving it back out). That said, this would not be a small project and GPU limitations may require imposing some seemingly arbitrary limitations - especially in early

Re: [Jprogramming] AoC Day 11 - something is wrong

2017-12-13 Thread Raul Miller
Well.. keep in mind that numbers are symbols - symbols with an elegant recursive definition, for that matter. Anyways, if you want a symbolic result, you could do something like this (closely related to the other implementation, if you look closely): dss=:-:<:3 #.inv 15 21 19 11 5 7 nms=: ;:'n ne

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Jimmy Gauvin
Hi, I think reading the dictionary is an essential part of learning .J. Why? Firstly, it is short compared to most dictionaries. Secondly, its very terseness begets questions thus keeping your mind awake and inducing experimentation at the console. An historical note : J was conceived by langua

Re: [Jprogramming] J-like on CUDA / WebAssembly

2017-12-13 Thread bill lam
I had tried making use of opencl inside j engine. From my experience 1. Double precision can be slower than single precision by an order of magnitude because gpu has very few number of alu for double precision operations. More expensive ones that designed for scientific computing instead of gaming

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Jose Mario Quintana
> I am surprised how many people have not read the reference manual - > not just in the J community but among technical people in general. > > I really don't know what to make of this. This, to me, is akin to wondering why many people, particularly young children, can communicate orally fairly wel

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Jose Mario Quintana
That seems to be the case. On Wed, Dec 13, 2017 at 5:11 PM, Erling Hellenäs wrote: > Stated differently, the i. in the manual page for i. is different from the > i. you use in your programs and write at the terminal. The relation between > them is > i.(terminal) <=> i.(manual page)"1 /Erling > >

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Jose Mario Quintana
Which presumably implies that the specifications and claims regarding all verbs in the vocabulary are, unless otherwise stated, only in terms of their corresponding intrinsic ranks (because the extension to arguments of higher rank occurs systematically). In other words, my guess was right and, in

Re: [Jprogramming] AoC Day 11 - something is wrong

2017-12-13 Thread Jimmy Gauvin
Comments inline On Wed, Dec 13, 2017 at 4:55 PM, Raul Miller wrote: > This? > ​Well, kind of ... if all you want are the answers, which makes good business sense.​ On the other hand, doing it symbolically would take some variant of a parser. PS Really like your 3D coordinates (and their gener

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Erling Hellenäs
Stated differently, the i. in the manual page for i. is different from the i. you use in your programs and write at the terminal. The relation between them is i.(terminal) <=> i.(manual page)"1 /Erling On 2017-12-13 20:53, Erling Hellenäs wrote: Yes, as far as I understand when you execute a mo

Re: [Jprogramming] AoC Day 11 - something is wrong

2017-12-13 Thread Raul Miller
This? dss=:-:<:3 #.inv 15 21 19 11 5 7 nms=: ;:'n ne se s sw nw' a11=:3 :0 ({:,>./)+/||:+/\dss{~nms i.y ) a11 10 6 1 1 #;:'se ne s sw' 15 16 Thanks, -- Raul On Wed, Dec 13, 2017 at 4:22 PM, Jimmy Gauvin wrote: > HI, > > I have been thinking about Brian's "cancellation" approach and ma

Re: [Jprogramming] J-like on CUDA / WebAssembly

2017-12-13 Thread Jimmy Gauvin
You might try looking at what is happening with J's older brother APL: http://www.dyalog.com/uploads/conference/dyalog16/presentations/U08_SIMD_Boolean_Array_Algorithms_handouts.pdf http://www.elsman.com/pdf/Dyalog16.pdf https://futhark-lang.org/publications/fhpc16.pdf On Wed, Dec 13, 2017 at 3:

Re: [Jprogramming] AoC Day 11 - something is wrong

2017-12-13 Thread Jimmy Gauvin
HI, I have been thinking about Brian's "cancellation" approach and maybe we can sort of formalize it. Associative relations for cancelling paths: 0 = N + S = S + N 0 = NE + SW = SW + NE 0 = NW + SE = SE + NW Associative relations for simplifying paths: N = NE + NW = NW + NE S = SE + SW = SE +

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Raul Miller
Definitely worth reading http://www.jsoftware.com/help/dictionary/dictb.htm Especially this part: "Finally, each verb has three intrinsic ranks: monadic, left, and right. The definition of any verb need specify only its behaviour on cells of the intrinsic ranks, and the extension to arguments of h

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Brian Schott
Nevermind, I see that my suggestion does not help. On Wed, Dec 13, 2017 at 3:57 PM, Brian Schott wrote: > Wouldn't the "issue" be documented better if instead of saying > > The shape of i.y is |y > > it said > > The shape of i.y is |"i. y > > >|"i.]2 2 $ 1 2 3 4 > 1 2 > 3 4 > > > > -

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Brian Schott
Wouldn't the "issue" be documented better if instead of saying The shape of i.y is |y it said The shape of i.y is |"i. y |"i.]2 2 $ 1 2 3 4 1 2 3 4 On Wed, Dec 13, 2017 at 3:41 PM, Raul Miller wrote: > This issue is documented at http://www.jsoftware.com/help/ > dictionary/dictb.htm > >

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Raul Miller
This issue is documented at http://www.jsoftware.com/help/dictionary/dictb.htm Thanks, -- Raul On Wed, Dec 13, 2017 at 1:18 PM, Jose Mario Quintana wrote: > Apparently, TongKe Xue got an answer to his question (and even more); but, > I have at least one of my own. > > The Dictionary is the of

Re: [Jprogramming] J-like on CUDA / WebAssembly

2017-12-13 Thread Raul Miller
Not that I know of. There should be a J-like especially for the GPU implementations, but no one has put the energy into building (let alone maintaining) such a thing. P.S. probably more a gene...@jsoftware.com topic than a programm...@jsoftware.com topic. Thanks, -- Raul On Wed, Dec 13, 2017

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Erling Hellenäs
I will look closer at the documents you and Henry have pointed to tomorrow. /Erling On 2017-12-13 18:15, Raul Miller wrote: That's not it - it's your claim that the dictionary did not document this functionality that I was referring to. Thanks, --

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Erling Hellenäs
Yes, as far as I understand when you execute a monadic rank 1 verb you also execute an implicit rank adverb. At least that is how JWithATwist works. i. y <=> i."1 y Same with all other J functions with a rank less than _ or _ _. However, I think the scalar functions have different helper progra

Re: [Jprogramming] AOC Day 12 and sparse arrays

2017-12-13 Thread 'Mike Day' via Programming
Raul's code works fine until you try applying it to a "sparse" array. This is the result of his transitive closure applied to the adjacency matrix for the example provided, the one with 7 nodes and 2 connected groups: tc adjex12 1 0 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 0

[Jprogramming] J-like on CUDA / WebAssembly

2017-12-13 Thread TongKe Xue
Hi, 1. There are two questions in this email, but they're closely related. Feel free to reply to either or both. 2. "J-like" here means NumPy/MatLab, but with J syntax. It only needs support tensors of Floats -- no need for Complex, Chars, Boxes, file IO, GUI, ... 3. I know about https://

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Erling Hellenäs
I made it to learn FParsec, a parser, and more F#. I also used it in discussions about some features in J. It is fully useful as lambda expressions in F# and as an n-dimensional array class in F# with some pretty cool features. However, I do not intend to support it or develop it further. /Erli

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Jose Mario Quintana
Apparently, TongKe Xue got an answer to his question (and even more); but, I have at least one of my own. The Dictionary is the official reference and the (vocabulary) entry for i. ( http://www.jsoftware.com/help/dictionary/didot.htm ). reads in part: " Integers i. 1 The shape of i.y is |y , an

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Henry Rich
More details at http://code.jsoftware.com/wiki/Vocabulary/EmptyArguments I consider the treatment of empties to be as fixed as anything in J.  Its omission from the Dictionary is just an omission. Henry Rich On 12/13/2017 12:22 PM, Raul Miller wrote: The issue you discovered here is also di

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Raul Miller
The issue you discovered here is also discussed at http://www.jsoftware.com/help/jforc/empty_operands.htm Properly speaking, it's an implementation issue rather than a dictionary issue (and, thus, subject to change, given sufficient motivation - but need a really good reason before making these ki

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Raul Miller
That's not it - it's your claim that the dictionary did not document this functionality that I was referring to. Thanks, -- Raul On Wed, Dec 13, 2017 at 9:46 AM, Erling Hellenäs wrote: > It seems you didn't read the parts of my manual I referenced. /Erling > > > Den 2017-12-13 kl. 14:39, skre

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread 'Bo Jacoby' via Programming
The file:///C:/Users/Admin/Downloads/JWithATwistReferenceManual.pdf describes a new language, JWithATwist, but what problem is this language supposed so solve? Thanks. Bo. Den 17:12 onsdag den 13. december 2017 skrev Erling Hellenäs : Hi all ! It seems some related info did not make it

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Erling Hellenäs
Hi all ! It seems some related info did not make it into my blog and it is not needed in my manual. My tweets about this are advertently cryptic: -I found some interesting features of the real #J dyadic rank operator. -Let's say the rank is zero and the argument is empty, how do you find the

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Erling Hellenäs
This blogpost also contains related information. https://erlhelinfotech.wordpress.com/2016/08/17/jwithatwist-scalar-operations/ /Erling Den 2017-12-13 kl. 15:46, skrev Erling Hellenäs: It seems you didn't read the parts of my manual I referenced. /Erling Den 2017-12-13 kl. 14:39, skrev Ra

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Erling Hellenäs
It seems you didn't read the parts of my manual I referenced. /Erling Den 2017-12-13 kl. 14:39, skrev Raul Miller: On Wed, Dec 13, 2017 at 3:46 AM, Erling Hellenäs wrote: I doubt you can find reasonably accurate descriptions of this functionality (these four helper programs) anywhere else. T

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Raul Miller
On Wed, Dec 13, 2017 at 3:46 AM, Erling Hellenäs wrote: > I doubt you can find reasonably accurate descriptions of this functionality > (these four helper programs) anywhere else. This suggests to me that you have not read http://www.jsoftware.com/help/dictionary/dictb.htm nor http://www.jsoftwa

Re: [Jprogramming] i. (2 2 $ 1 2 3 4)

2017-12-13 Thread Erling Hellenäs
Yes.    (2 2 $ 1 2 3 4) 1 2 3 4    i.1 2 0 1    i.3 4 0 1  2  3 4 5  6  7 8 9 10 11    (i.1 2),: i.3 4 0 1  0  0 0 0  0  0 0 0  0  0 0 1  2  3 4 5  6  7 8 9 10 11     i. (2 2 $ 1 2 3 4) 0 1  0  0 0 0  0  0 0 0  0  0 0 1  2  3 4 5  6  7 8 9 10 11 I tried to describe this behavior in section "Th