« first day (1339 days earlier)      last day (1322 days later) » 

12:31 AM
 
 
1 hour later…
1:44 AM
<moon-child> is there any thematic difference between the )-prefixed metacommands and the ]-prefixed ones?
 
moon-child: I think ) commands are supposed to be built into the system while ] commands are configurable by the user. I don't get what you mean by "thematic".
 
<moon-child> @Bubbler ah, ok, that makes sense (and explains why using nonexisting ]-commands spits an error about ⎕se.ucmd)
 
For Dyalog APL, ] commands are indeed the wrapper for functions pre-loaded in ⎕SE.UCMD.
Other APL implementations might have their own way of handling them or have no support at all.
 
 
3 hours later…
4:52 AM
0
A: Two palindromes are not enough

user58988APL(NARS), 486 bytes r←f w;p;i;c;P;m;j p←{k≡⌽k←⍕⍵}⋄i←c←0⋄P←r←⍬ :while c<w i+←1 :if p i⋄P←P,i⋄:continue⋄:endif m←≢P⋄j←1 :while j≤m :if 1=p i-j⊃P⋄:leave⋄:endif j+←1 :endwhile :if j=m+1⋄c+←1⋄r←i⋄:endif :endwhile What is the word for break the loop? It see...

this answer is interesting
 
Which part is interesting to you?
 
it uses a while loop
is indentation required in apl?
 
I don't think so
And almost any kind of while loop can be golfed by using dfns with recursion or instead.
 
yeah that's the point
it uses a "traditional" apporach
pretty rare to find stuff like this
 
Yeah, mainly because it's way too ungolfy
and the site is Code Golf
I guess it could as well be deleted for not being a serious contender.
Also there's this
Meanwhile, as this is still on hold for the bounty claims...
CMC: Explain the 14-byte answer in this link.
 
5:16 AM
@TessellatingHeckler APL#?
 
5:33 AM
@Adám that's what was in my mind thinking of it; the wiki page says that was a bit of a departure and compatibility break from traditional APL so that probably does count for what I was thinking of
 
Switching to pass-by-reference as default is definitely a huge departure.
 
@Bubbler wait thats my answer smh
¯_¯
 
 
1 hour later…
6:48 AM
@Adám curious, did regular (as opposed to modified or indexing) assignment modify the reference, or rebind in the local scope?
 
@Moonchild Modify the reference, I think. Have a look in the linked docs there.
 
7:15 AM
⋄⍎¨8 5⍴'6547232640161280812803824015960052700003'
 
@Razetime RANK ERROR
 
⋄{⍎¨8 5⍴⍵}'6547232640161280812803824015960052700003'
 
@Razetime RANK ERROR
 
fine then
How do I make it execute each row instead of each character?
 
@Razetime split the matrix into its rows, and execute each of those
(or execute for each cell, but above is probably shorter)
 
7:23 AM
@Razetime Rows have rank 1 (they are vectors), so ⍎⍤1 ― or ⍎¨↓
 
7:34 AM
nice
 
7:45 AM
found a better way to make the matrix
how do I include unprintables in an APL answer?
 
@Razetime You can use it as-is if they're part of ⎕AV, otherwise you simply can't
 
@Bubbler What do you mean?
@Razetime Inside a string you can use pretty much any character.
 
Well, more precisely, you can't use 1-byte-per-char scoring
(and also you can't have newlines inside a string)
 
8:01 AM
@Bubbler Yes you can, if you can figure out a way to put them there.
 
Wat.
 
⋄⎕AV[128 192 224 240 248 252 254 240 216 152 12 12 6 6 3 3]
 
@Razetime Illegal code
 
last two chars are unprintables
How do I include them in a string
Should I get an xxd?
 
8:12 AM
No, that's fine. The last two are CRs.
 
oh
my bad
 
@Razetime Try it online! (Don't do this in production code…)
 
is there no correct way to just include the carriage returns as single chars?
 
@Razetime They are just single characters, and this is valid code. Your problem is the editor, not the interpreter.
I'm just using a roundabout way to coerce the characters into the string in the function. After that, it is a normal function with a normal string that contains literal CRs.
 
I don't think the interpreter will accept the code when given as a plain source code file, which is a requirement for code golf scoring
 
8:19 AM
@Bubbler I don't think that's correct. When we use Dyalog Classic, we go by how the interpreter represents the code, not how it is in a text file (which isn't its native format anyway).
 
@suffianfarooq Welcome. Interested in APL?
@Razetime That's good. Note (⊥⍣¯1)⊥⍣¯1⊢ or use Extended's monadic and remove the 2 too.
@Razetime You can "unswap" ,⍨ since the left arg needs parens anyway.
 
Should remember extended exists lol
what i was thinking is: since the last 4 chars are in ⎕AV, they should be countable as 2 bytes instead of the workaround shown.
I'll count it as 36 bytes for now.
 
You can't use ɫ with SBCS
 
not in the codepage?
 
8:29 AM
I guess I've got something smaller though it exclusively works in Extended
 
tthat's what I tried
but encoding in binary was easier to figure out compared to that
@Bubbler very close to 05AB1E
 
But then we need to map 0s and 1s to blank and some char
 
the question says a matrix is fine right
oh it says characters
now it should be fine
 
Yeah, that works at least
 
8:53 AM
<loke> What on earth is APLBot? It seems to be piping some other channel into this Freenode channel, and it's utterly unreadable.
 
@Adám
seems to be a problem here?
 
loke: It connects to a Stack Exchange chat room (chat.stackexchange.com/rooms/52405/the-apl-orchard) ― besides for evaluating APL.
In what way is it unreadable?
 
<moon-child> loke: it connects to the apl orchard, on stack exchange chat.stackexchange.com/rooms/52405/the-apl-orchard. There's a bug where links aren't properly detected, but aside from that it should work fine
 
Let me try: Try it online!
Oh, so the link part is truncated (and only plain text is visible)
 
<loke> It's unreadable because all messages seems to come from APLBot. A proper link is what Matrix does where matrix users are real users on IRC.
<moon-child> ok, but neither SE chat nor IRC are matrix
 
8:59 AM
@Bubbler oh, 0-indexed.
 
And chat message edits are not reflected either
 
It'd be a neat enhancement if the bot would detect edits and update APL evaluations too.
 
 
6 hours later…
2:43 PM
@JoshD Hey, nice to see you here.
 
3:11 PM
Is that a dyalog person?
 
@rak1507 Yes.
 
Anyone have an APL TIO template?
For code golf
 
@rak1507 https://tio.run/##SyzI0U2pTMzJT////3/ao7YJj3r7HnU1P@pd86h3y6H1xo/aJj7qmxoc5AwkQzw8g/8DAA
 
0
A: Triangular Square Numbers

rak1507APL (Dyalog Extended), 23 bytes {⍵<2:⍵⋄2+-/34 1×∇¨⍵-⍳2} Recursive dfn Try it online!

does this work properly? the tio link
 
3:28 PM
yes it's alright
 
Looks good.
@rak1507 I like your mathematical and array-oriented approach there.
 
Thanks! I originally had a ton of parentheses around recursive calls
 
Hey, I like lurking here occasionally :)
 
@rak1507 I think you can remove () and replace with ⊢ like {⊃(1↓⊢,+/)⍣⍺⊢⍵} to save 1 byte
 
3:38 PM
ah nice
 
It behaves the same in your TIO examples
 
3:49 PM
@rak1507 You can save 2 by converting to full program: replace and by and remove braces.
 
feels like it should be possible to make it into an atop like ⊃⍤((1↓⊢,+/)⍣⊣) but I can't
 
@TessellatingHeckler yeah, the right operand of is an unfortunate case of impossible-to-tranify
 
@Adám ah nice, not sure how to go about TIO-ifying that, can you?
 
@dzaima ohhh, oh well
 
3:55 PM
Thanks!
 
@rak1507 for a full program, you put ∇f in header and ∇ in footer
 
@dzaima (it's because it handles a function and array operand very differently; BQNs f⍟n is "repeat n times" always (evaluating once if its a function) so …⍟⊣ would work)
 
then type the function name (f) and input separated by newline
 
my BQN interpreter port is awash with scope issues; there's a lot of pushing lambdas onto stacks and evaluating them later, and PowerShell is dynamically scoped and all the surrounding runtime context is different. Adding some variable shadowing and closures and a couple of global variables has nerfed the most direct failures, but now i think there's things quietly being $null and changing the behaviour without erroring
 
@TessellatingHeckler Ouch. Guess you'll have to switch from using $null for Nothing (if you haven't already) and check for it in call?
 
4:15 PM
@Marshall I haven't been explicitly using $null; it's things like let c = sv => vm(st,[sv.concat(v),e]); is defined in JS inside a block where it has access to vm the virtual machine executor function and B the bytecode array. When it comes to runtime delayed execution this c function, the vm variable is null because it doesn't exist in the runtime scope.
trying to run it throws an error. With a closure to capture vm so it can get to it, there is a function to execute, but in that vm function the bytecode array $B is blank at runtime.
It is interesting to work through; the fact that there's lots of stacks was a surprise
PS is such a mishmash language, its bolted-on class system switched to lexical scoping, at least a bit. might investigate that if I can't get much further this way
 
 
5 hours later…
9:31 PM
'02210313074020029000033739' not sure how good apl is with kolmogorov complexity type things but can this string be golfed at all?
 
 
2 hours later…
11:41 PM
Figured you guys would be able to provide the most insight on this: the explanations in this answer seem to broken with the new syntax highlighter, any thoughts as to why this is? The single line code sections seem to be fine, and it has a syntax highlighter at the top of the answer, it's just the explanations that are borked.
 

« first day (1339 days earlier)      last day (1322 days later) »