The APL Orchard

apl.chat ― Learn, teach, ask, code, golf, & discuss usage. See ...
Feb 15, 2023 07:47
@Adám Thank you for the quick answer.
Feb 15, 2023 07:45
@Adám Who wrote the code of the dfn turtle ?
Feb 14, 2023 12:30
@Adám Thanks for your answer !
Feb 14, 2023 10:32
I would like to try the code of Tomas Gustafsson // APL Seeds '21. On YT, a comment indicates that the code only works with Dyalog v17.1 Classic 32-bit
Feb 14, 2023 10:30
Is it still possible to download Dyalog APL v17.1 ? The Dyalog website seems to allow only the downloading of v18.2.
Feb 14, 2023 07:57
@Adám It is not Ziggy, but the discussant below him, who said he could contact Rosebush.
Feb 14, 2023 07:54
@Adám Thank you very much.
Feb 14, 2023 07:25
@Adám Yes
Feb 14, 2023 07:25
@Adám In this Campfire video around 58:00 the discussant at the center of the screen said he could contact him by email.
Feb 14, 2023 05:19
@Adám I have been listening partly to APL Campfire ft Zbigniew "Ziggy" Stachniak. During the discussion, they mentioned Judson Rosebush and his pioneering work on computer graphics with APL for the movie and tv industry. Would it be possible to try to have an APL Campire with Rosebush ? Thanks for the Campfire series.
Oct 19, 2021 10:15
@Adám Q1 : Was APL2 used for prototyping in some cool projects such as the chess program Deep Thought ? Q2: his favorite application of APL2 at IBM
Oct 19, 2021 10:11
@Adám RIP, Master HUI, a master of our favorite programming language.
Sep 30, 2021 07:45
@Adám Great ! Thanks a lot ! This is perfect for what I have to do !
Sep 30, 2021 05:44
@Bubbler Thanks for your suggestion !
Sep 30, 2021 03:45
Or could we have access through TryAPL to such small "datasets" ? or through downloadable .tryapl workspaces ?
Sep 30, 2021 03:43
I would like students to experiment with tryAPL while manipulating word lists such as gist.githubusercontent.com/paulcc/3799331/raw/…
Sep 30, 2021 03:40
@Adám Could it be possible on TryAPL to do ?
list←{(⎕SE.SALT.New'HttpCommand'('GET'⍵)).Run.Data} url
Sep 26, 2021 10:41
@Adám Thanks Adám !
Sep 26, 2021 03:41
I would like to load this script on Dyalog APL on windows github.com/ashinkarov/cnn-in-apl/blob/master/cnn.apl
Sep 26, 2021 03:40
On Windows, how to use an .apl file ?
Aug 21, 2021 02:00
@Razetime Yes, for chess players the other Magician of Riga was the wonderful Mikhail Tal.
Aug 20, 2021 13:16
@rak1507 No problem ! And again congrats to the magician of Riga !
Aug 20, 2021 13:14
@rak1507 Ah sorry I did not know.
Aug 20, 2021 13:14
@Adám, when you have time, I would be curious to know my score / rank for phase II.
Aug 20, 2021 13:12
Congratulations to all the winners ! Very happy for the Grand Prize Winner, the APL magician of Riga, one of my favorite APLers !
Aug 15, 2021 01:35
@dzaima Thanks @dzaima !
Aug 14, 2021 11:03
=○(+´∘ט)
Aug 14, 2021 11:02
In BQN
Aug 14, 2021 10:34
@PyGamer0 This video by @Adám is very nice. Adám introduces ⍥.
Aug 14, 2021 10:29
inner product of a one-element ⍵ is its square. inner product of vector ⍺: +.×⍨⍺ equals +/⍺*2
Aug 14, 2021 10:25
@PyGamer0 inner product of left and right arguments followed by = test
Aug 14, 2021 09:52
@PyGamer0 Maybe this =⍥(+.×⍨)
Aug 14, 2021 09:51
⋄  3 4 =⍥(+.×⍨) 5
Aug 9, 2021 14:41
Tested on V 18.0
Aug 9, 2021 14:41
  x∘.× x                    → 2.5E¯4 |    0% ⎕⎕⎕⎕⎕⎕⎕⎕
  ↑x(×⍤1 1)({(⍵⍨¨(≢⍵)⍴0)}x) → 9.0E¯4 | +263% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  x (×⍤0 1) x               → 1.2E¯3 | +393% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
Aug 9, 2021 14:41
@xpqz ]runtime -c 'x∘.× x' '↑x(×⍤1 1)({(⍵⍨¨(≢⍵)⍴0)}x)' 'x (×⍤0 1) x'
Aug 7, 2021 15:16
@dzaima Good idea ! Thanks !
Here is what I got :
  {⍵*4}⊢1e7⍴⍳100       → 6.2E¯2 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {z←⍵*2⋄z*2}⊢1e7⍴⍳100 → 1.0E¯2 | -84% ⎕⎕⎕⎕⎕⎕⎕
  {⍵*2}⍣2⊢1e7⍴⍳100     → 1.0E¯2 | -84% ⎕⎕⎕⎕⎕⎕⎕
  {⍵×⍵×⍵×⍵}⊢1e7⍴⍳100   → 1.9E¯2 | -71% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  ×⍨⍣2⊢1e7⍴⍳100        → 1.0E¯2 | -84% ⎕⎕⎕⎕⎕⎕⎕
  ×⍨⍤×⍨ 1e7⍴⍳100       → 1.1E¯2 | -84% ⎕⎕⎕⎕⎕⎕⎕
  ×⍥(*∘2)⍨1e7⍴⍳100     → 1.5E¯2 | -77% ⎕⎕⎕⎕⎕⎕⎕⎕⎕
Aug 7, 2021 15:09
×⍨ is the second example you introduced in your 2019 Dyalog talk on tacit programming with Dyalog V.18.
Then I went writing variations for the fourth power for practice and cmpx them a little. I was quite surprised by the results concerning {⍵*4}⊢Vector
https://www.youtube.com/watch?v=czWC4tjwzOQ
Will continue to watch your video !
Thanks for your input !
Aug 7, 2021 14:51
@dzaima Thanks for the feedback. I tested for fun on different vector lengths from 1E2 to 1E7.
Aug 7, 2021 14:42
@rak1507 Performs very similarly to ×⍥(*∘2)⍨⍳1E4
Aug 7, 2021 14:36
  {⍵*4}⊢⍳1E4       → 3.9E¯5 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {z←⍵*2⋄z*2}⊢⍳1E4 → 1.0E¯5 | -74% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {⍵*2}⍣2⊢⍳1E4     → 7.3E¯6 | -82% ⎕⎕⎕⎕⎕⎕⎕
  {⍵×⍵×⍵×⍵}⊢⍳1E4   → 7.6E¯6 | -81% ⎕⎕⎕⎕⎕⎕⎕⎕
  ×⍨⍣2⊢⍳1E4        → 6.6E¯6 | -84% ⎕⎕⎕⎕⎕⎕⎕
  ×⍨⍤×⍨ ⍳1E4       → 6.7E¯6 | -83% ⎕⎕⎕⎕⎕⎕⎕
  ×⍥(*∘2)⍨⍳1E4     → 9.5E¯6 | -76% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
Aug 7, 2021 14:36
Variations on the fourth power on 1E4 long vector.
cmpx  '{⍵*4}⊢⍳1E4' '{z←⍵*2⋄z*2}⊢⍳1E4' '{⍵*2}⍣2⊢⍳1E4' '{⍵×⍵×⍵×⍵}⊢⍳1E4' '×⍨⍣2⊢⍳1E4' '×⍨⍤×⍨ ⍳1E4' '×⍥(*∘2)⍨⍳1E4'
Aug 5, 2021 11:59
@Adám Have you ever heard of any computer GO program in APL from the 70s or 80s ?
Aug 5, 2021 11:57
Just for information, a French APLer in the early 80s wrote a Computer Go program in APL. That French APLer was also a French Go champion ! That Code-golf problem by Bubbler reminds me of that bit of APL history concerning computer GO that is not mentioned anywhere.
Aug 5, 2021 11:55
20
Q: Is this Game of Go configuration fully alive?

BubblerBackground This challenge is about the Game of Go. Here are some rules and terminology relevant to this challenge: Game of Go is a two-player game, played over a square board of size 19x19. One of the players plays Black, and the other plays White. The game is turn-based, and each player makes ...

Aug 5, 2021 11:30
 ⋄  ⎕IO←1 ⋄ 'th' 'abab' 'dog'(≢⍤∪⍸⍤⍷⌊⍤÷≢⍤⊣) ¨'the three truths' 'ababababab' 'cat'
 

Sandbox

Where you can play with chat features (except flagging) and ch...
Aug 7, 2021 14:36
  {⍵*4}⊢⍳1E4       → 3.9E¯5 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {z←⍵*2⋄z*2}⊢⍳1E4 → 1.0E¯5 | -74% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {⍵*2}⍣2⊢⍳1E4     → 7.3E¯6 | -82% ⎕⎕⎕⎕⎕⎕⎕
  {⍵×⍵×⍵×⍵}⊢⍳1E4   → 7.6E¯6 | -81% ⎕⎕⎕⎕⎕⎕⎕⎕
  ×⍨⍣2⊢⍳1E4        → 6.6E¯6 | -84% ⎕⎕⎕⎕⎕⎕⎕
  ×⍨⍤×⍨ ⍳1E4       → 6.7E¯6 | -83% ⎕⎕⎕⎕⎕⎕⎕
  ×⍥(*∘2)⍨⍳1E4     → 9.5E¯6 | -76% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
Aug 7, 2021 14:35
Variations on the fourth power on 1E4 long vector.
cmpx  '{⍵*4}⊢⍳1E4' '{z←⍵*2⋄z*2}⊢⍳1E4' '{⍵*2}⍣2⊢⍳1E4' '{⍵×⍵×⍵×⍵}⊢⍳1E4' '×⍨⍣2⊢⍳1E4' '×⍨⍤×⍨ ⍳1E4' '×⍥(*∘2)⍨⍳1E4'
Aug 7, 2021 14:34
  {⍵*4}⊢⍳1E4       → 3.9E¯5 |   0% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {z←⍵*2⋄z*2}⊢⍳1E4 → 1.0E¯5 | -74% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
  {⍵*2}⍣2⊢⍳1E4     → 7.3E¯6 | -82% ⎕⎕⎕⎕⎕⎕⎕
  {⍵×⍵×⍵×⍵}⊢⍳1E4   → 7.6E¯6 | -81% ⎕⎕⎕⎕⎕⎕⎕⎕
  ×⍨⍣2⊢⍳1E4        → 6.6E¯6 | -84% ⎕⎕⎕⎕⎕⎕⎕
  ×⍨⍤×⍨ ⍳1E4       → 6.7E¯6 | -83% ⎕⎕⎕⎕⎕⎕⎕
  ×⍥(*∘2)⍨⍳1E4     → 9.5E¯6 | -76% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕
Aug 7, 2021 13:17
 {⍵*4} ⊢ ⍳1E4      → 4.1E¯5 |   0%
 {z←⍵*2⋄z*2} ⊢ ⍳1E4 → 1.1E¯5 | -75% ⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕