Re: [Jprogramming] NaN, p., and control structures

2017-12-29 Thread bill lam
IMO the current behavior is acceptable for if. 0 > _. do. etc… The user who wrote this sentence must have some special task to accomplish and can just skip the condition depending on what he/she think the condition should be true or false or signaling error. If the _. is a result of operation on

Re: [Jprogramming] in practice, for numerical computing, how often are > 5 dim tensors used?

2017-12-29 Thread Roger Hui
I don't know how often, but there is an application of higher-ranked arrays: FFT. http://code.jsoftware.com/wiki/Essays/FFT . For argument vectors of length 2^n, the algorithm creates rank n binary hypercubes, shape n$2. (Subfunction "cube".) On Fri, Dec 29, 2017 at 8:10 PM, TongKe Xue wrote

Re: [Jprogramming] NaN, p., and control structures

2017-12-29 Thread Louis de Forcrand
I now remember why I hadn’t used j806; my Mac is too old for AVX. Anyhow, I tried j806 without AVX: 2 7 p.1e308j_ _j_ So, apparently the problem has already been solved. Sorry for the bother! Louis PS: I still would make something throw an error when doing things like if. 0 > _. do. etc… for

[Jprogramming] in practice, for numerical computing, how often are > 5 dim tensors used?

2017-12-29 Thread TongKe Xue
Hi, 1. I agree that the concept of rank + cell + frames + implicit parallel8ism is very cool. 2. 5 dimension is commonly defined as N, C, D, H, W: N = number of images C = channels D = depth H = height W = width In practice, how often do we use algorithms with > 5 dim tensors?

Re: [Jprogramming] NaN, p., and control structures

2017-12-29 Thread Henry Rich
J's position on _. is that it is an abomination and we make no claims for what happens when _. appears in an argument and spend no time worrying about it. Henry Rich On 12/29/2017 10:50 PM, Louis de Forcrand wrote: Sorry for not trying this in j806, I should install it on my Mac. Will update.

Re: [Jprogramming] NaN, p., and control structures

2017-12-29 Thread Louis de Forcrand
Sorry for not trying this in j806, I should install it on my Mac. Will update. As for control structures treating _. as false, I was mistaken. I was actually comparing a float with _., and that returned 0. Nevertheless, I think control structures should signal _. instead of silently accepting it,

Re: [Jprogramming] NaN, p., and control structures

2017-12-29 Thread bill lam
This is what I got from J806 foo 3 : 0 if. _ - _ do. echo 1 else. echo 0 end. EMPTY ) foo'' |NaN error: foo | _-_ bar 3 : 0 if. _. do. echo 1 else. echo 0 end. EMPTY ) bar'' 1 foo is reasonable. bar is also reasonable to me, because _. is not equal 0 so that the condition is

Re: [Jprogramming] NaN, p., and control structures

2017-12-29 Thread Louis de Forcrand
What about control structures treating _. as false? I personally would make that an error, and I would also say that code that makes use of this should be considered bad style. Louis > On 29 Dec 2017, at 18:29, Henry Rich wrote: > > Surely not intended. Put it on the bug list. > > Henry Rich

Re: [Jprogramming] NaN, p., and control structures

2017-12-29 Thread Henry Rich
Surely not intended.  Put it on the bug list. Henry Rich On 12/29/2017 6:06 PM, Louis de Forcrand wrote: On the Indeterminate vocabulary page of the dictionary it is written The only ways to create _. are as follows: direct entry of _. ". 3!:n DLL call (database

[Jprogramming] NaN, p., and control structures

2017-12-29 Thread Louis de Forcrand
On the Indeterminate vocabulary page of the dictionary it is written The only ways to create _. are as follows: direct entry of _. ". 3!:n DLL call (database, LAPACK, etc.) and Primitives on arguments not containing _. signal NaN error instead of producing _. .

Re: [Jprogramming] Boxing words

2017-12-29 Thread Björn Helgason
$T 49 5 10$ a. i. T 84 104 101 32 99 97 116 39 115 32 99 111 108 108 97 114 32 105 115 32 108 97 121 105 110 103 32 111 117 116 115 105 100 101 32 66 105 108 108 39 115 32 112 111 114 99 104 46 10 84 5 10$ a. i. U 84 104 101 32 99 97 116 39 115 32 99 111 108 108

Re: [Jprogramming] Boxing words

2017-12-29 Thread Don Guinn
T has a line feed at the end. T-:U,LF 1 On Fri, Dec 29, 2017 at 8:47 AM, Linda Alvord wrote: > What is in T, that isn't in U? > > T=: 0 :0 > The cat's collar is laying outside Bill's porch. > ) > > >U=:'The cat''s collar is laying outside Bill''s porch.' >T-:U > 0 >,. T;U > ┌───

Re: [Jprogramming] Boxing words

2017-12-29 Thread Linda Alvord
What is in T, that isn't in U? T=: 0 :0 The cat's collar is laying outside Bill's porch. ) U=:'The cat''s collar is laying outside Bill''s porch.' T-:U 0 ,. T;U ┌─┐ │The cat's collar is laying outside Bill's porch. │ ├───