The APL Orchard

apl.chat ― Learn, teach, ask, code, golf, & discuss usage. See ...
Jan 27, 2021 13:12
Hahahaha
I didn't mean to ask for tech support for this particular issue because it looks like it was already well documented in the wiki and such, but thanks thanks a lot for your time and kindness :)
Jan 27, 2021 13:07
@dzaima @dzaima Awesome! I tried setxkbmap -layout pt,apl -variant ,dyalog -option 'grp:caps_switch' and for now I'm happy with it!
Jan 27, 2021 13:00
But then I'm unable to type @ € { [ ] } the usual way
Jan 27, 2021 12:58
In my case, with PT layout enabled I can use AltGr+Shift+J and Shift+AltGR+J to type ⍤
Jan 27, 2021 12:57
@dzaima You're right!
Jan 27, 2021 12:55
@dzaima thanks for pointing me that
Jan 27, 2021 12:53
setxkbmap -layout gb,apl -variant ,dyalog -option 'grp:switch' allows my to type ⍤ with Shift+J when the "apl" layout is enabled.
Jan 27, 2021 12:43
@Adám It's the first thing in the wiki page. I hadn't read it until now :'D
Jan 27, 2021 12:39
@dzaima That works like a charm! I'll incorporate that in my configuration
Jan 27, 2021 12:33
Right now I have
{ 2160 1620÷⍵ }¨ ⍳5
Jan 27, 2021 12:33
Oh, APL distinguishes between the two?
Jan 27, 2021 12:32
@Adám So, as I as saying,
I have a tablet with dimensions `2160 1620`
I want to write a nice APL expression to have
2160 1620 ÷ 1
2160 1620 ÷ 2
2160 1620 ÷ 3
and so forth
Jan 27, 2021 12:31
@dzaima which I happen to use as a prefix for my window manager, but it's ok for now
Jan 27, 2021 12:30
I used Super+Return to spawn a terminal but that sent Enter to the chat
Jan 27, 2021 12:29
It doesn't, sorry for the confusion
Jan 27, 2021 12:25
Oh, didn't notice that troubleshooting guide, thanks :D
Jan 27, 2021 12:24
No problem, I have a rather unusual setup and I'm still fiddling with stuff xD
Jan 27, 2021 12:23
oops, sorry, the apl Xorg key layout hijacked my Shift+Return XD
Jan 27, 2021 12:23
BTW I tought up a tiny problem that I'm wondering how to do in APL:
I have a tablet with
Jan 27, 2021 12:22
Ok, thanks for the correction
Jan 27, 2021 12:21
⋄⍳⌊0.5×⍨7
Jan 27, 2021 12:17
⋄⍳⌊0.5*⍨7
Jan 27, 2021 12:16
@Adám Thanks for the clarification. Do APLers also call user-defined functions functions?
Jan 27, 2021 12:03
Thanks @MartinJaniczek, I'll try out the modulo operator now!
Jan 27, 2021 11:45
Hello! I've been thinking about expressing an `IsPrime` function with simple operations for a while.
I managed to cut it down to
`⋄{2=+/⍵(÷=(⌊÷))⍳⍵}¨⍳30`
Jan 19, 2021 01:21
Oh, so ⌊ and ⌈ live a double life as floor/ min and ceiling/max
Jan 19, 2021 01:00
Oh I see. Thanks!
Jan 19, 2021 00:58
Ok, got it!
Jan 19, 2021 00:58
⋄ ⌽≡⊢ 1 2 3 2 1
Jan 19, 2021 00:58
⋄ ⌽≡⊢ (1 2 3 2 1)
Jan 19, 2021 00:57
@Adám Exactly! I'm still getting overwhelmed by the notation
Jan 19, 2021 00:56
Pretty cool!
Jan 19, 2021 00:56
@rak1507 Oooh! I get it now! +/÷≢is Sum divided by Length!
Jan 19, 2021 00:51
oh, they can be either unary or binary
Jan 19, 2021 00:50
In your example, f and h are unary functions and g is binary, right?
Jan 19, 2021 00:47
Let that sink into my head xD
Jan 19, 2021 00:45
f <*> g reuses the operand I guess
Jan 19, 2021 00:44
It was funny
Jan 19, 2021 00:44
oh
Jan 19, 2021 00:44
ap, If I recall correctly
Jan 19, 2021 00:44
Yes, I read some chapters from Learn You a Haskell
Jan 19, 2021 00:43
Quite!
Jan 19, 2021 00:41
@Adám Thank you for your time!!
Jan 19, 2021 00:40
⍳(1 2 3 4 5)
Jan 19, 2021 00:40
⋄ id ← {≢⍳⍵} ⋄ id 1 2 3 4 5
Jan 19, 2021 00:39
⋄ id ← {≢⍳⍵} ⋄ id ⍳10
Jan 19, 2021 00:39
⋄ {≢⍳⍵} ⍳10
Jan 19, 2021 00:38
⋄ ≢⍳420
Jan 19, 2021 00:38
⋄ ≢1 2 3 4 5
Jan 19, 2021 00:38
≢ 1 2 3 4 5