Skip to content

Instantly share code, notes, and snippets.

@abrudz
Created March 9, 2023 17:06
Show Gist options
  • Select an option

  • Save abrudz/ccaa17e785da9a8431eb0b43e7480525 to your computer and use it in GitHub Desktop.

Select an option

Save abrudz/ccaa17e785da9a8431eb0b43e7480525 to your computer and use it in GitHub Desktop.
Session transcript from Adám's presentation at BAA Vector Webinar 2023-03-09
{1,2=/}'rooobert'
1 0 1 1 0 0 0 0
{1,2/}'rooobert'
1 1 0 0 1 1 1 1
{/1,2/}'rooobert'
robert
'⎕←{⍵/⍨1,2≠/⍵}⍞'
14
'UTF-8'⎕UCS'⎕←{⍵/⍨1,2≠/⍵}⍞'
226 142 149 226 134 144 123 226 141 181 47 226 141 168 49 44 50 226 137 160
47 226 141 181 125 226 141 158
'UTF-8'⎕UCS'⎕←{⍵/⍨1,2≠/⍵}⍞'
28
10{}10 20 30
10 10 20 30
]box on
Was OFF
10{}10 20 30
┌──┬────────┐
1010 20 30
└──┴────────┘
{}10 20 30
VALUE ERROR
{ }10 20 30
10{ }10 20 30
┌──┬────────┐
1010 20 30
└──┴────────┘
{ }10 20 30
10 20 30
F { }
a3 4⎕A
b2 3 4⎕C⎕A
a
ABCD
EFGH
IJKL
b
abcd
efgh
ijkl
mnop
qrst
uvwx
F{ 'F'}
F 10
F 10
30 F 10
30 F 10
b
abcd
efgh
ijkl
mnop
qrst
uvwx
(F2)b
┌─┬────┐
Fabcd
│ │efgh
│ │ijkl
├─┼────┤
Fmnop
│ │qrst
│ │uvwx
└─┴────┘
a(F2)b
┌────┬─┬────┐
ABCDFabcd
EFGH│ │efgh
IJKL│ │ijkl
├────┼─┼────┤
ABCDFmnop
EFGH│ │qrst
IJKL│ │uvwx
└────┴─┴────┘
a
ABCD
EFGH
IJKL
b
abcd
efgh
ijkl
mnop
qrst
uvwx
c2 5⎕D
c
01234
56789
b
abcd
efgh
ijkl
mnop
qrst
uvwx
c(F1 2)b
┌─────┬─┬────┐
01234Fabcd
│ │ │efgh
│ │ │ijkl
├─────┼─┼────┤
56789Fmnop
│ │ │qrst
│ │ │uvwx
└─────┴─┴────┘
(F1 2)b
┌─┬────┐
Fabcd
│ │efgh
│ │ijkl
├─┼────┤
Fmnop
│ │qrst
│ │uvwx
└─┴────┘
(F3 1 2)b
┌─┬────┐
Fabcd
│ │efgh
│ │ijkl
│ │ │
│ │mnop
│ │qrst
│ │uvwx
└─┴────┘
c(F3 1 2)b
┌─────┬─┬────┐
01234Fabcd
│ │ │efgh
│ │ │ijkl
├─────┼─┼────┤
56789Fmnop
│ │ │qrst
│ │ │uvwx
└─────┴─┴────┘
G{'xyz' }
(G2)b
┌───┬────┐
xyzabcd
│ │efgh
│ │ijkl
├───┼────┤
xyzmnop
│ │qrst
│ │uvwx
└───┴────┘
c(G2)b
┌─────┬────┐
01234abcd
56789efgh
│ │ijkl
├─────┼────┤
01234mnop
56789qrst
│ │uvwx
└─────┴────┘
c(G1 2)b
┌─────┬────┐
01234abcd
│ │efgh
│ │ijkl
├─────┼────┤
56789mnop
│ │qrst
│ │uvwx
└─────┴────┘
(G1 2)b
┌───┬────┐
xyzabcd
│ │efgh
│ │ijkl
├───┼────┤
xyzmnop
│ │qrst
│ │uvwx
└───┴────┘
(G3 1 2)b
┌───┬────┐
xyzabcd
│ │efgh
│ │ijkl
│ │ │
│ │mnop
│ │qrst
│ │uvwx
└───┴────┘
c(G3 1 2)b
┌─────┬────┐
01234abcd
│ │efgh
│ │ijkl
├─────┼────┤
56789mnop
│ │qrst
│ │uvwx
└─────┴────┘
c(G2 1 2)b
┌─────┬────┐
01234abcd
│ │efgh
│ │ijkl
├─────┼────┤
56789mnop
│ │qrst
│ │uvwx
└─────┴────┘
(G2 1 2)b
┌───┬────┐
xyzabcd
│ │efgh
│ │ijkl
├───┼────┤
xyzmnop
│ │qrst
│ │uvwx
└───┴────┘
(G3 1 2)b
┌───┬────┐
xyzabcd
│ │efgh
│ │ijkl
│ │ │
│ │mnop
│ │qrst
│ │uvwx
└───┴────┘
(G1 1 2)b
┌───┬────┐
xyzabcd
├───┼────┤
xyzefgh
├───┼────┤
xyzijkl
└───┴────┘
┌───┬────┐
xyzmnop
├───┼────┤
xyzqrst
├───┼────┤
xyzuvwx
└───┴────┘
(G0 1 2)b
┌───┬─┐
xyza
├───┼─┤
xyzb
├───┼─┤
xyzc
├───┼─┤
xyzd
└───┴─┘
┌───┬─┐
xyze
├───┼─┤
xyzf
├───┼─┤
xyzg
├───┼─┤
xyzh
└───┴─┘
┌───┬─┐
xyzi
├───┼─┤
xyzj
├───┼─┤
xyzk
├───┼─┤
xyzl
└───┴─┘
┌───┬─┐
xyzm
├───┼─┤
xyzn
├───┼─┤
xyzo
├───┼─┤
xyzp
└───┴─┘
┌───┬─┐
xyzq
├───┼─┤
xyzr
├───┼─┤
xyzs
├───┼─┤
xyzt
└───┴─┘
┌───┬─┐
xyzu
├───┼─┤
xyzv
├───┼─┤
xyzw
├───┼─┤
xyzx
└───┴─┘
(G5 1 2)b
┌───┬────┐
xyzabcd
│ │efgh
│ │ijkl
│ │ │
│ │mnop
│ │qrst
│ │uvwx
└───┴────┘
(G99 1 2)b
┌───┬────┐
xyzabcd
│ │efgh
│ │ijkl
│ │ │
│ │mnop
│ │qrst
│ │uvwx
└───┴────┘
(G(/) 1 2)b
┌───┬────┐
xyzabcd
│ │efgh
│ │ijkl
│ │ │
│ │mnop
│ │qrst
│ │uvwx
└───┴────┘
(G0)c
┌───┬─┐
xyz0
├───┼─┤
xyz1
├───┼─┤
xyz2
├───┼─┤
xyz3
├───┼─┤
xyz4
└───┴─┘
┌───┬─┐
xyz5
├───┼─┤
xyz6
├───┼─┤
xyz7
├───┼─┤
xyz8
├───┼─┤
xyz9
└───┴─┘
c
01234
56789
G¨c
┌───────┬───────┬───────┬───────┬───────┐
│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│
││xyz0│││xyz1│││xyz2│││xyz3│││xyz4││
│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│
├───────┼───────┼───────┼───────┼───────┤
│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│
││xyz5│││xyz6│││xyz7│││xyz8│││xyz9││
│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│
└───────┴───────┴───────┴───────┴───────┘
(G0)c
┌───┬─┐
xyz0
├───┼─┤
xyz1
├───┼─┤
xyz2
├───┼─┤
xyz3
├───┼─┤
xyz4
└───┴─┘
┌───┬─┐
xyz5
├───┼─┤
xyz6
├───┼─┤
xyz7
├───┼─┤
xyz8
├───┼─┤
xyz9
└───┴─┘
G
{'xyz' }
G¨c
┌───────┬───────┬───────┬───────┬───────┐
│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│
││xyz0│││xyz1│││xyz2│││xyz3│││xyz4││
│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│
├───────┼───────┼───────┼───────┼───────┤
│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│
││xyz5│││xyz6│││xyz7│││xyz8│││xyz9││
│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│
└───────┴───────┴───────┴───────┴───────┘
G 10 20 30
┌───┬────────┐
xyz10 20 30
└───┴────────┘
G 10 20 30
┌──────────────┐
│┌───┬────────┐│
││xyz10 20 30││
│└───┴────────┘│
└──────────────┘
G¨c
┌───────┬───────┬───────┬───────┬───────┐
│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│
││xyz0│││xyz1│││xyz2│││xyz3│││xyz4││
│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│
├───────┼───────┼───────┼───────┼───────┤
│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│
││xyz5│││xyz6│││xyz7│││xyz8│││xyz9││
│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│
└───────┴───────┴───────┴───────┴───────┘
(G0)c
┌───────┬───────┬───────┬───────┬───────┐
│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│
││xyz0│││xyz1│││xyz2│││xyz3│││xyz4││
│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│
├───────┼───────┼───────┼───────┼───────┤
│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│┌───┬─┐│
││xyz5│││xyz6│││xyz7│││xyz8│││xyz9││
│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│└───┴─┘│
└───────┴───────┴───────┴───────┴───────┘
Each{ ⍺⍺0}
'abc','XYZ'
abcXYZ
'abc','XYZ'
cbaZYX
'abc','XYZ'
cbaZYX
]aplcart holler
X,Y,Z:any M,N:num I,J:int A,B:Bool C,D:char f,g,h:fn ax:axis s:scal v:vec m:mat
───────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────────
Showing 0 of 0 matches (suggestions? mailto://ideas@aplcart.info )
]aplcart pout
X,Y,Z:any M,N:num I,J:int A,B:Bool C,D:char f,g,h:fn ax:axis s:scal v:vec m:mat
──────────────────────────────────────────────────────────────────────────────────────────────────────
X fg Y Atop (B₁-combinator): f on the result of X g Y, that is, f X g Y
fg Y Atop (B-combinator): f on the result of g on Y, that is, f g Y
X(fIs Js)Y Rank: f between every trailing rank-Is subarray of X and every trailing rank-Js
subarray of Y
(fJs)Y Rank: f on every trailing rank-Js subarray of Y
──────────────────────────────────────────────────────────────────────────────────────────────────────
Showing 4 of 4 matches
]aplcart splat
X,Y,Z:any M,N:num I,J:int A,B:Bool C,D:char f,g,h:fn ax:axis s:scal v:vec m:mat
───────────────────────────────────────────────────────────────────────────────
N Natural logarithm of N
MN Base-M logarithm of N
───────────────────────────────────────────────────────────────────────────────
Showing 2 of 2 matches
]aplcart r2d2
X,Y,Z:any M,N:num I,J:int A,B:Bool C,D:char f,g,h:fn ax:axis s:scal v:vec m:mat
───────────────────────────────────────────────────────────────────────────────
⍝ Comment symbol (disables rest of line)
───────────────────────────────────────────────────────────────────────────────
Showing 1 of 1 matches
]aplcart -?
───────────────────────────────────────────────────────────────────────────────
]TOOLS.APLCart
Access a searchable collection of over 3000 short APL phrases
]APLCart [<terms>] [-list[=n]] [-url] [-browser] [-popup] [-theme=b|w] [-refresh]
]APLCart -?? for details and examples
]APLCart is a frontend for the ⎕SE.Dyalog.Utils.APLcart function.
]
───────────────────────────────────────────────────────────────────────────────
General Help for User Commands
]cmd Execute Cmd command
]⎕←cmd Display Cmd's result line-by-line
]var←cmd Capture Cmd's result in var
]grp -? Brief information on commands in group "GRP"
]grp.cmd -? Brief information on command "Cmd" of the "GRP" group
]grp.cmd -?? Detailed information on command
]grp.cmd -??? add question marks for more info
] This help message
] -? List all commands
] -?? List all commands with summaries
]X*YZ* -? List commands or groups that match a pattern
]/path/dir -? List commands in /path/dir
]ucmd -? List commands for working with user commands
10 20 × 1 2 3
LENGTH ERROR: Mismatched left and right argument shapes
10 20×1 2 3
10 20(×0 1)1 2 3
10 20 30
20 40 60
10 20(×1 0)1 2 3
10 20
20 40
30 60
'abc'×'def'
DOMAIN ERROR
'abc'×'def'
⎕DMX.InternalLocation
┌─────┬───┐
acc.c132
└─────┴───┘
Diagonstic Message eXtended
⎕DM
┌────────────┬─────────────────┬────────────┐
DOMAIN ERROR'abc'×'def'
└────────────┴─────────────────┴────────────┘
⎕DMX.Vendor
Dyalog
⎕DMX.HelpURL
⎕JSON⎕DMX
{"Category":"","DM":["DOMAIN ERROR"," 'abc'×'def'",""],"EM":"DOMAIN ERROR","EN":11,"E
NX":0,"HelpURL":"","InternalLocation":["acc.c",132],"Message":"","OSError":[0,0,""],"Vendor":"Dy
alog"}
⎕DMX
EM DOMAIN ERROR
Message
→→
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment