« first day (748 days earlier)      last day (2203 days later) » 

07:08
@J.Sallé Which pco do you need?
07:24
@lirtosiast Problem is in the extension (which isn't mine) of @ which treats scalars and 1-element vectors differently. (⍉1⊖⌽`@1⍢⌽)/⌽ works fine. Compare these three.
 
4 hours later…
10:57
@Adám I needed 2pco to solve a challenge yesterday but didn't have time to finish it
@J.Sallé 2pco is monadic .
@Adám I hadn't noticed that. I just read all the dyadic cases and ignored the one I needed :p
@J.Sallé I "streamlined" pco so that all dyadic calls are scalar, while the monadic one is mixed. Compare to ? where the monadic one is scalar and the dyadic one is mixed.
Well, since you're on the subject, that's what I had yesterday: {^/(≢∪f),p=pco⍳≢p⊣p f←↓2pco⍵}. Turns out it's wrong because of an oversight, I'm gonna try to fix it then port to extended to shave some bytes off
This checks whether is in the form $(p_x)^n, (p_{x+1})^n, (p_{x+2})^n, ...$ where every p is a consecutive prime
@user8935023 Hi. If you want to participate here, just send me an email to adam@ with the domain of www.dyalog.com
11:12
Okay so, I need to fix this bit: p=pco⍳≢p to instead tell me whether p[x+1]=(4pco p[x])
@Adám any clues on how to that ^? I thought of combining the 4pco fn with `=\` but I can't seem to get it working
@J.Sallé I'm in a meeting, but I'll have a look after.
No problem, thanks :D
 
7 hours later…
18:39
@J.Sallé I don't have mathjax in chat, but if I understand you right, you want to check if ∊(⌿⍨⌿⍭) (the prime factors) can be expressed as x/y↑z↓⍸1⍭⍳⍵ Is this right?
18:49
@Adám maybe? I don't think I understand that last piece of code. The challenge is to check whether the prime factors are consecutive and their exponents are the same
so truthy to something like 2^2×3^2×5^2
@J.Sallé Yeah, that's what it means.
Then that's it hahahah
@J.Sallé So 30 is true and 120 is false.
Correct
@J.Sallé So something like:
{
  factors←1⌷⍭⍵
  powers←2⌷⍭⍵
  (1=≢∪powers)∧ ∨/factors⍷⍸1⍭⍳⍵
}
19:15
@Adám okay I'll work with that, thanks :D
19:41
Is the price of a dedicated APL keyboard worth it?
(Or keycaps, either one)
@moonheart08 Do you know about my mnemonics' sheet?
Nope
APL's only on my TODO list :P
@moonheart08 Which language layout do you normally use?
EN-US.
(with RALT as compose)
(might get a extra numpad soon as well, for even moar keys that i can reprogram whenever)
19:50
i'll look later (currently at school, imgur is blocked)
Do we have a codepage for Dyalog Unicode? If so, can we petition to get TIO's bytecount correct?
@voidhawk No, by definition, it uses Unicode. But I always replace "bytes" with [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319 "When can APL characters be counted as 1 byte each?")<sup>[SBCS](https://github.com/abrudz/SBCS ".dyalog files using a single byte character set")</sup> and adjust the count.
Gotcha, thanks!
@voidhawk Unfortunately, some use the deprecated Classic because they are too lazy to adjust the byte count (TIO still shows the character count, even for Unicode). An alternative is to use Extended which does use SBCS on TIO.
Ha, I used Classic just the other day for that exact reason :)
19:54
@Adám slight nitpick - the ¯ should be on the side of 2, not by @ :p
@moonheart08 (I can also send it by email if you email me.) My father used a similar scheme to teach me all the locations in an our or two.
@dzaima Gosh, you're right. I'll fix that right away.
The brexit references are by far the best part of that layout.
@Adám still gonna nitpick that the description should be on the bottom not the top
20:00
@Adám ok so I transformed that into {f p←1 2⌷¨⊂(2pco⍵)⋄(1=≢∪p)∧∨/f⍷⍸(1pco⍳⍵)} (not using extended yet, gonna swap the pco calls later)
Now gotta golf'em
CPQ: I should really "open source" these, but how would I do that? The current source is an Excel workbook.
@J.Sallé Go for it!
Do you think I can get that out of there?
@J.Sallé Remember the possibility of constructs like a b←… ⋄ …a…⊃a b←…
ah yes!
20:05
@J.Sallé Another possibility is putting the rest of the code into a dyadic fn and inserting it between the two arguments with /
@J.Sallé have no idea what the code does, but couldn't 1 2⌷¨⊂ be just ?
@dzaima yeah that's what I was using in the first place, I just ported Adám's suggestion above and didn't put that back in
@Adám where's a good place to learn APL?
@moonheart08 Here :-)
@moonheart08 in this here room, where else?
20:10
@moonheart08 Also, check out tryapl.org
@moonheart08 The chat bot's profile has a few useful links as well.
@Adám I assume there's no (easy) way of using commute with more than one op/fn right? I could use something like ⍺(fg)⍨⍵ → ⍵fg⍺ >.>
@J.Sallé f∘g⍨ ?
Oh that works?
ah it does
{(1=≢∪p)∧∨/(1pco⍳⍵)⍷∘⍸⍨⊃f p←↓(2pco⍵)} before going extended
@J.Sallé Remember this trick?
⎕←'⍺'{⍺,'f(',⍵,')'}∘{'g(',⍵,')'}⍨'⍵'
@Adám
⍵f(g(⍺))
20:16
@Adám I did not, but I'll bookmark it now so I won't forget it again
@J.Sallé that has redundant parenthesis, but still the simple {f p←↓2pco⍵⋄(1=≢∪p)∧∨/f⍷⍸1pco⍳⍵} is still shorter
@dzaima yeah I hadn't noticed that
I assume I'm messing up somehow but why doesn't this work?
is broken?
@J.Sallé Clearly, my is broken :-(
Ah I assumed that was it
Yeah, using 1 2⌷¨⊂ works fine
kind-of
20:27
@J.Sallé You're missing parens around (1⍭⍳⍵)
@Adám ah now it works
@J.Sallé Using `↓?
@Adám nope, using 1 2⌷¨⊂
@Adám oh but that actually worked
I just tried it
@J.Sallé In extended, you can always backtick-prefix characters to un-extend them.
Ah, I see
That's a nice fallback
So it's a 28-byter as it is: {f p←`↓⍭⍵⋄(1=≢∪p)∧∨/f⍷⍸1⍭⍳⍵}
21:02
woo finally decided to try to fix apl layout so deleted references to apl from aplkeys.sh and now i have a reliable way to switch the APL layout back to latvian \o/
finally an actual use for my second keyboard (s 2 keys) too lol
@dzaima I'm not sure I understand the setup. Do you use two physical keyboards?
@Adám yep. one is the one i type text on, other has random useless macro-type things
@dzaima Ah, and then you now use the second one for APL?
@Adám no, 2nd one uses 2 keys (A & L) to switch between the layouts, switching keyboards still is too awkward
@dzaima Ah, I see. So you have 100 extra shortcut keys.
21:08
yep
probably could make it have a mode to input chars for Canvas in which ASCII is always strings, but that's a lot of work and I'm fine with spamming tab after every keypress
 
1 hour later…
22:33
@Adám I just did an APL answer! Not sure how well golfed it is though.
@TRITICIMAGVS Your first? Congratulations. And you even qualify for a bounty.
it is my first answer.
@TRITICIMAGVS It is actually a pretty cool one. Though I think you can make it shorter by using Dyalog APL which has implicit output, so you don't have to include ⎕←.
@Adám *Dyalog APLs REPL
@dzaima No, I actually meant a tradfn body.
22:46
@Adám ah right, always forget it does that. Why is it allowed to not include the tradfn header though?
@dzaima Because the only thing it does is give the function a name, I think. It was common practice before I joined PPCG. If the head is used for anything, it has to be counted.
@Adám in JS ()=> is always counted, even though it declares a lambda taking no args
23:00
@Adám Hm, I'm not actually sure that would even help. I'm currently limited by the t←'righ' line.
@TRITICIMAGVS Yeah, I noticed.
23:12
@TRITICIMAGVS Bounty set. Welcome to the world of APL. Prepare to become addicted.
23:31
Oh thanks!
yeah I've wanted to get into APL for a while.

« first day (748 days earlier)      last day (2203 days later) »