« first day (1687 days earlier)      last day (950 days later) » 

6:37 AM
CMC: generate a star pattern at point ⍵, given matrix size ⍺.
      10{x y←⍵⋄((x+y)=+/¨a)∨((x-y)=-/¨a)∨(y=⊃∘⌽¨a)∨x=⊃¨a←⍳2/⍺}3 5
0 0 1 0 1 0 1 0 0 0
0 0 0 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 0 0 0 0
0 0 1 0 1 0 1 0 0 0
0 1 0 0 1 0 0 1 0 0
1 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1
0 0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
 
@Razetime is so omega must be length of 2?
 
yes, it must be a length 2 vector
 
does 3 5 means the coordinate (3,5) in your example?
 
3rd row 5th column
so more like (5,3)
 
oh ok I see
the 10 in front means 10x10 matrix right?
 
6:48 AM
yes
 
7:02 AM
@Razetime 21
 
wow
 
@Razetime dzaima/APL, 18; apparently that works
 
7:22 AM
@dzaima so ~ works on ints?
eitherway both of these are epic
reduction from 104-72
 
@Razetime apparently. Not really intentional, at least anymore
 
i see
 
7:43 AM
{{(=/|⍵)∨0=∧/⍵}¨(⍳⍺ ⍺)-⊂⍵}
oh it's essentially the same
 
8:06 AM
⎕←10{m←(∘.{(⍺=1)∨(⍵=1)∨(⍺=⍵)}⍨⍳⍺) ⋄ y x←⍵ ⋄ m←(⊖m),[1]1↓m ⋄ m←(⌽m),1↓[2]m ⋄ o←(⍺÷2)+⍳⍺ ⋄ m[o-y-⍺÷2;o-x-⍺÷2]}3 5
 
@WongJiaHau
0 0 1 0 1 0 1 0 0 0
0 0 0 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 0 0 0 0
0 0 1 0 1 0 1 0 0 0
0 1 0 0 1 0 0 1 0 0
1 0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1
0 0 0 0 1 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
 
my solution doesn't handle out-of-bound origin yet ⍨
 
ok a more exotic one {(∘.(0∊,)∨∘.=)⍥(|(⍳⍺)∘-)⌿⍵}
you can write it as (∘.(0∊,)∨∘.=)⍥(|(⍳10)∘-)⌿3 5
I believe without ¨ mine has better performance ;)
well monadic with vector argument is another source of "consing"
 
8:22 AM
∘.f is as bad for performance as is (i.e. okay for primitive functions, bad for composite ones)
@Razetime Dyalog, 19
 
hmm, that's unexpected. it is true that ∘.f cons a lot for non-primitives
 
∘.f has to execute f separately for each pair of items if it isn't special-cased in the interpreter
 
and the function promotion gets interesting when nested arrays are involved.
 
@dzaima this is a golfing question but thanks
@WongJiaHau nice.
@WongJiaHau that isn't specified, but it's cool if you can do that
 
@Razetime thanks man but I think it's horrible though haha
 
8:33 AM
@Razetime (that was a reply to "mine has better performance" from LdBeth)
 
i see
 
the trick is use primitive outer product only {((0=∘.×⌿)⊃⍤∨∘.=⌿)|(⊂⍳⍺)-⍵}
folding does have some performance loss
I think good APLers are all good at equational rewriting
 
`10{(0=∧/∧-/)¨(⍳⍺ ⍺)-⊂⍵}3 `
22 chars
 
^ well it is 21 APL chars, 36 bytes.
 
8:49 AM
Hi @Adám, I want to use your keyboard layout on Windows in order to use the ` prefix. How do I uninstall the IME layout which comes with Dyalog? Didn't see them in the Settings. Maybe need to edit the registry?
 
huh, he's not been seen for 2 days, that's quite a bit
 
lol~
Anyone else know how to uninstall the Dyalog IME Layout?
 
have you tried running the original installer
 
launch the dyalog install
 
it should just be on the keyboard layout selection thing. Maybe as a sub-layout of some other layout
 
9:04 AM
windows doesn't show it on my side
i think it can only be removed from the dyalog installer
 
9:15 AM
@Razetime That works. Thanks!
 
yay the wild guess worked
thanks windows
 
@Razetime I'm fairly sure I've successfully manually removed it back when i was on windows, but that's been a while ago
 
 
2 hours later…
11:08 AM
In the Windows Dyalog IDE when I type )continue or )save some_name, the editor says "Can't save - file could not be created.". Is this because of access permission? Do I need to run Dyalog as adminstrator?
 
`10{(0=∧/∧-/)¨(⍳⍺ ⍺)-⊂⍵}3 5` this is wrong, because I should absolute every value first, the following is correct:
`10{(0=∧/∧-/)¨|(⍳⍺ ⍺)-⊂⍵}3 5`
 
 
1 hour later…
12:14 PM
BAA meeting at 16:00 BST today at zoom.us/j/858532665
password is ×/16 40 612
 
12:38 PM
@Adám The third description should be "Hook: apply f between Y and (g Y), that is Y f g Y", not "Hook: apply g between [...]"
 
Also, even though the input buffer size is set to 40k (default), when I close and re-open Dyalog and enter Ctrl + Shift + Backspace, it says "There's no previous line"
 
what operator can I apply to f g such that I get {(f a) g (f w)}?
 
g⍥f
 
1:05 PM
@dzaima thanks
 
@Razetime *tomorrow
 
 
1 hour later…
2:18 PM
Is monadic A⍥B in Dyalog the same as (AB)?
 
Yes. And monadic A⍤B, too, I think.
 
2:54 PM
OK, thanks.
 
 
5 hours later…
7:53 PM
I think you can NOT run something like that on command> APL myscript.apl where myscript.apl contains apl code
on command line
 
Not yet, 18.1 will be able to though
 
IDE:
Version: 4.3.3463
Platform: MacIntel
Date: 2020-07-07 10:44:21 +0100
Git commit: 0cd6e9faf39a5d6a5f5caa94d1ff51743d5cdd75
Preferences:{
"colourScheme":"Francisco Goya",
"kbdLocale":"en_US"
}

Interpreter:
Version: 18.0.40684
Platform: Mac-64
Edition: Unicode/64
Date: Jun 19 2021 at 00:08:08
 
8:23 PM
@EliasMårtenson ⊣≡⌽⌽≡⊢ is not a palindrome, character-wise.
@JunyuZhan Just run the Dyalog uninstaller, and make sure the checkboxes are set to only uninstall the IME, not the interpreter.
 
@Adám Ah yeah I did see something about the new year, should have put 2 and 2 together
 
@JunyuZhan I bet your current directory is System32 which requires admin permission to save to. Change your Dyalog shortcut to start in a user folder.
@MasterQuiz Fixed. Thanks!
@JunyuZhan It doesn't remember input between sessions. However, you can scroll up to see the log. Remembering the input buffer could be nice though. I'll log a request for enhancement.
@WongJiaHau For next time… APLcart it.
@user106914 Hi awagga, I've arranged access for you here, since you claim to be obsessed with array-oriented languages such as APL, J, K & BQN. Looking forward to chatting with you!
 
Haha, thanks! Nice to finally be in the orchard, should've done it sooner.
 
I'm just looking through your GitHub repos to get an idea who I'm talking with…
 
8:39 PM
Isn't much to look at...yet. Recently stopped using a self-hosted git platform (gitea)
 
Well, CoderDvorakAPL would be a nice addition to apl.wiki/Typing_glyphs#Windows
 
Ah, I need to fix up a problem with the Ctrl keys first. It's a custom layout so wouldn't really be friendly to dvorak users. I do intend to add other layouts eventually :)
 
OK, let me know (or simply edit the wiki) when you feel it is ready.
 
Will do!
 
Btw, is it "custom" because it is for French users?
 
8:45 PM
Oh, no. It's inspired by Programmer Dvorak (which has a few issues) the top row of the first layer is ascii symbols.
Although, that wouldn't be a bad idea!
 
(3,1)⍴⍳10 vs 3 1 ⍴⍳10 what is the different between two expression?
 
@user106914 Btw, I love your font choice for those pics.
 
they both have the same output
 
@1234 The results are the same.
 
Sars2 modified to support BQN symbols :)
 
8:46 PM
what is (3,1)?
 
The concatenation of two scalars to the vector 3 1
 
8:58 PM
thx
g(x) = x +1, f(x) = x + 2, v = [1, 2, 3, 4], how can I apply both funcions g and f on the vector v ? .. I know I can do it in one function f¨ v
 
something like (f,⍥⊆g) v?
 
@1234 What structure do you want for the result? A list of two-element lists? a two-element list of four-element lists? A matrix? Of what shape? Or do you maybe want a flat list result?
 
well, n by 2 matrix maybe..
 
@rak1507 That'd be (f,⍥⊂g)
@1234 (f,g)⍤0
⋄ f←+∘1 ⋄ g←+∘2 ⋄ v←1 2 3 4 ⋄ (f,g)⍤0⊢v
 
@Adám
2 3
3 4
4 5
5 6
 
9:03 PM
f⍉⍤,⍤⍪g
@Adám true ,⍥⊆ is just my instinct
oops, they want n by 2 not 2 by n, in which case I'd probably do (f,⍥⍪g)
 
@rak1507 What is that trying to do?
 
@Adám it makes a 2 by n matrix of the results
 
@rak1507 Not on my computer.
f⍉⍤,⍤⍪g ←→ ⍉⍤,f⍪g ←→ ⍉,f⍪g
 
({⍵+1}⍉⍤,⍥⍪{⍵×2}) 1 2 3 4
 
@rak1507 Did you forget to add backticks around your code (`⋄ code`)? You can edit your message and I will edit my reply.
 
9:08 PM
⋄ ({⍵+1}⍉⍤,⍥⍪{⍵×2}) 1 2 3 4
 
@rak1507
2 3 4 5
2 4 6 8
 
Oh, you meant f⍉⍤,⍥⍪g, not f⍉⍤,⍤⍪g
 
oh! yep, oops
 
No wonder, I was confused there.
 
yeah, sorry about that
 
9:09 PM
Btw, not criticism, just curiosity: Since it is clearly a train, why did you go for f⍉⍤,⍥⍪g and not ⍉f,⍥⍪g ?
 
⍉⍤,⍥⍪ is something I've used a few times and is more instantly recognisable, also then it allows extending the train more easily
 
Monadic is such a useless function. What we actually need is "prepend 1 to the shape" and its "inverse", "merge the leading two axes".
 
yeah
 
Actually, "prepend 1 to the shape" is a proper inverse of "merge the leading two axes", so if ⍪Y was the latter (indeed, that would be closer to its current silly meaning) then adding a leading axis could be ⍪⍣¯1
 
nice
 
9:28 PM
(f,g)⍤0⊢v, what is 0⊢v ?
could not figure out from RIDE example code.
 
@1234 Nothing. is a dyadic operator, so it binds the 0 while is monadic.
The is necessary because stranding is stronger than almost all other binding strengths, so 0 v would combine to a 2-element vector.
 
10:20 PM
tjx
 
 
1 hour later…
11:44 PM
Hey, @Adám is there a non-tedious way to configure deadkeys when creating a layout from scratch?
 
@awagga You mean using MSKLC?
 
Yeah :)
 
The .klc format is quite simple. You can easily generate the entries programmatically.
See e.g. this which parses such a file to create a layout diagram.
 
Oh, awesome. Thank you! I'll try and steal the deadkeys from your kdb repository then :)
kbd*, damn kx.
 
Btw, since you're new to Stack Exchange chat, you may want to have a look at apl.wiki/APL_Orchard#Features e.g. to learn that you can edit your messages.
 
11:52 PM
Cheers
 

« first day (1687 days earlier)      last day (950 days later) »