Readit News logoReadit News
Pompidou commented on Zoo of array languages   ktye.github.io/... · Posted by u/mpweiher
Pompidou · 5 months ago
R is also an array language, but a non-iversonian one. Another good ressource for array languages is https://aplwiki.com/.

r/apljk on reddit is also active.

Pompidou commented on Why did not numpy copy the J rank concept?    · Posted by u/jrank
Pompidou · 8 months ago
Maybe the internal broadcasting mecanism in numpy don't allow this nativelly ?
Pompidou commented on That XOR Trick (2020)   florian.github.io//xor-tr... · Posted by u/hundredwatt
iotasilly · 8 months ago
Since J allow you to write short code, here are three example in J. The first use iota1000, the second a random permutation, and the third use matrix notation to create a little guessing game.

Example 1: Find the missing number

  xor =: (16 + 2b0110) b.
  iota1000 =: (i. 1000) 
  missingNumber =: (xor/ iota1000) xor (xor/ iota1000 -. 129) 
  echo 'The missing number is ' , ": missingNumber
This print 'The missing number is 129'

Example 2: Using a random permutation, find the missing number.

   permuted =: (1000 ? 1000)
   missingNumber = (xor/ permuted) xor (xor/ permuted -. ? 1000)

 
Example 3: find the missing number in this matrix.

  _ (< 2 2) } 5 5 $ (25 ? 25) 

   12  9  1 20 19
    6 18  3  4  8
   24  7  _ 15 23
   11 21 10  2  5
    0 16 17 22 14
Final test: repeat 10 times the example 3 (random matrices) and collect the time it takes you to solve it in a list of times, then compute the linear regression best fit by

  times %. (1 ,. i. 10)
Did you get better at solving it by playing more times?

I am not affiliated with J, but in case you want to try some J code there is a playground: https://jsoftware.github.io/j-playground/bin/html2/

Edited: It seems I am procrastinating a lot about something I have to do but don't want to.

Pompidou · 8 months ago
the top comment trick [ n, 1, n + 1, 0 ][n % 4] can be implemented in J as following :

   f =: ]`1:`>:`0:@.(4&|)"0
Then:

   (,. ; #: ; [: #: f) i.16

 0    0 0 0 0    0 0 0 0    
 1    0 0 0 1    0 0 0 1    
 2    0 0 1 0    0 0 1 1    
 3    0 0 1 1    0 0 0 0    
 4    0 1 0 0    0 1 0 0    
 5    0 1 0 1    0 0 0 1    
 6    0 1 1 0    0 1 1 1    
 7    0 1 1 1    0 0 0 0    
 8    1 0 0 0    1 0 0 0    
 9    1 0 0 1    0 0 0 1    
....

Pompidou commented on I don't like NumPy   dynomight.net/numpy/... · Posted by u/MinimalAction
Pompidou · 10 months ago
Array programming requires true array languages like apl and j.
Pompidou commented on Notation as a Tool of Thought (1979)   jsoftware.com/papers/tot.... · Posted by u/susam
-__---____-ZXyw · a year ago
a. How did you get into it?

b. Why J, as opposed to another APL implementation? In particular, the different syntax, I suppose I mean.

Thanks!

Pompidou · 10 months ago
It's free and allow use of standard ASCII characters
Pompidou commented on Notation as a Tool of Thought (1979)   jsoftware.com/papers/tot.... · Posted by u/susam
dayvigo · a year ago
The other commenter asked about why J, but I want to more specifically ask, why did you choose J over K? I can't decide which to learn.
Pompidou · 10 months ago
J is free. k is closed Source,and cost a life.
Pompidou commented on Notation as a Tool of Thought (1979)   jsoftware.com/papers/tot.... · Posted by u/susam
Pompidou · a year ago
J has revolutionized the way I think. I can confirm it: ever since I learned to program with it, I’ve been able to solve so many problems that previously felt far beyond my (limited) intellectual reach. For me, J (and by extension, the APL family more broadly) has contributed as much to my thinking as the methodologies I learned during my university studies in philosophy. Suffice it to say, it has profoundly and positively shaken me.
Pompidou commented on DOGE worker’s code supports NLRB whistleblower   krebsonsecurity.com/2025/... · Posted by u/todsacerdoti
bequanna · a year ago
This just seems odd.

Why would they attempt a login from Russia (if it was indeed Russians)?

It is incredibly cheap to use a VPN with a US residential IP.

Pompidou · a year ago
Maybe not everyone involved is quite the genius you might've been expecting.
Pompidou commented on What about K?   xpqz.github.io/kbook/Intr... · Posted by u/tosh
pjmlp · a year ago
What seems to be a pity about most array languages is that in theory, they would be ideal DSL languages for SIMD and MIMD code exploration, but as far as I understand from ArrayCast guests, most are still interpreters at heart focusing on plain CPU execution.
Pompidou · a year ago
Maybe codfns for apl will solve this ? That's what I understood.. but maybe I'm wrong.

u/Pompidou

KarmaCake day135July 13, 2020View Original