« first day (2235 days earlier)      last day (409 days later) » 

5:22 AM
instead of what they were trying to hint at with the less than thing
probably not the cleanest solution but eh
it worked
 
@AidenChow Please don't reveal how to solve competition problems before the deadline.
 
@Adám oh, that didnt reveal too much right
 
It sure did.
 
errr the msg cant be deleted now rip
still stuck on 1:3 lol, i might skip using rotate cuz im struggling to find a solution with rotate
 
5:36 AM
Do you need anything else nuked @Adám?
 
No, that's enough.
 
No worries, feel free to ping me in the future if you need it again :)
 
welp thats my first msg get nuked lol
how i repeat a list a certain amount of times?
 
@AidenChow You mean like 4 times 1 2 3 is 1 2 3 1 2 3 1 2 3 1 2 3?
 
@Adám yes
though in my case the "list" is a string
 
5:47 AM
@cairdcoinheringaahing should Adams request get nuked? if i click on that chat.stackexchange.com link i can see the message that he requested to be nuked.
 
Huh, it should say "(removed)", if it even links you to a message
 
@gwa000 well the link didnt one box so its fine
 
looks like it went away.
 
If you click on the link now, can you see the message?
 
@cairdcoinheringaahing no
 
5:51 AM
maybe it was still in some sort of cache?
 
@gwa000 probably
when i click the link it doesnt link to any msg
huh i can still see the history of the msg, is that available to everyone or just me?
 
@AidenChow I believe only you and ROs. (I can see it.)
But all ROs are disqualified from competing, so it doesn't matter.
 
@Adám oh nice, thats an interesting rule
ro's of this room right? not any room?
idek who the ro's of this room are here other than u lol
 
Only this room, yes.
 
ok ig other ro's cant see it
cool
@Adám ah cool, ive never seen the other three before
@Adám oh wait i wasnt paying attention... i mean a matrix of that list repeated
or a string
strings are just char arrays right
 
6:01 AM
yes
@AidenChow did you aplcart it?
 
@Adám it doesnt seem to pop up anything useful, i might be wrong tho
maybe im using the wrong search terms...
 
@AidenChow What did you search for?
 
@Adám "repeat list"
gives 3 results
wait i think i just find it by scrolling through the entire list
lemme see
oh yep it looks like its just ⍴
not even too sure what that is lol
 
Hm, I don't see ↑⍴∘⊂ or ⌿∘⍉∘⍪ there.
 
@Adám wat do those even do...
like how do they even work
 
6:12 AM
n⍴∘⊂v creates a list of n vectors v, which mixes into a matrix.
⍪v makes a column matrix out of the vector, transposes it to a 1-row matrix, and n⌿ repeats the rows n times.
gtg, back in around 45 mins
 
@Adám oh bye!
might not be here 45 mins later but cya
 
@Adám And mods, but I guess that's something we'd disclose if competing
 
@Adám how do i know if smth is a matrix or a list of vectors, like why do we need to mix into a matrix
is there a huge difference between them or r they interchangeable?
also if im understanding rotate correctly if i give a matrix and a vector of nums to rotate, then it will rotate each column of the matrix by the corresponding value in the vector? or is it each row?
 
6:28 AM
@Adám using the power of magic you should no longer be able to see it either :)
(I can't either)
 
yo damn i cant either
wow
11'ed
 
6:53 AM
@AidenChow You can see how it prints, ask for its shape, and/or depth.
@AidenChow They are rarely completly interchangable. If you need to treat each row as a unit, use a vector of vectors. If the elements all need to be addressed equally, or if you need performance, use a matrix.
@AidenChow v⌽m rotates the rows while v⊖m rotates the columns.
 
7:18 AM
@Adám what would be the shape of a matrix vs list of vectors
anyways i gave up on using rotate and solved 1:3 without it lol
 
@AidenChow A matrix's shape has two elements; a vector's shape has one element.
 
@Adám oh yep thats obvious in hindsight lol
wait is both phase being judged by actual ppl or just phase 2
the problem is that i have no idea whether what im doing is "apl-like" (so more likely to score better) or just pure garbage
 
@AidenChow without rotate? That sounds painful
 
7:33 AM
@AidenChow Phase 1 has extensive set of test cases that are immediately checked against, and the best participants are then judged by actual people. Phase 2 only does a syntax sanity check upon submission, and the test case set is run at judgement time, after which the judges look over the code and score clarity and use of APL.
@AidenChow @lyxal Let's be careful, alright?
 
@lyxal i have given up trying to understand how it works lol
 
@Adám I am, I'm just saying if it's a recommended hint, and it isn't included, the answer must use some weird workaround to replace it :p
 
yea well idk how rotate works apparently cuz i couldnt get it to work
 
@AidenChow Does this help?
 
@Adám how are the "best participants" determined in phase 1 before going to judges?
 
7:38 AM
Correctness. IIRC, 1 point for passing basic cases and −0.2 for failing edge cases.
 
Is there a way to see how well a submission scores without submitting it?
 
@Adám if u get a gold trophy does that mean u pass every test case even edge ones, or is that not guaranteed?
 
@lyxal No, but what's the problem with submitting?
@AidenChow yes, that's what gold means.
 
@Adám ok just making sure
 
it is all described under the sample problem.
 
7:42 AM
@Adám I was just curious how well an answer of mine would perform.
 
on the off chance i make it to judging (which is probably not gonna happen tbh), will not using the hints affect my score in any way
 
@lyxal Oh, wait, no, you can test without submitting. Sorry.
@AidenChow No, not at all.
 
@Adám but does it show the score?
 
Yes.
 
Oh cool
Where do I see the score without submitting?
 
7:45 AM
i dont remember seeing a score when test, but i may be remembering wrong
actually i dont even remember seeing a score at all, even after submitting
i swear im probably writing some of the most horrendous apl code ever lmfao
 
Can't be any worse than some of the stuff I've written
 
@lyxal how many u solve so far
 
I mean apl I've written in the past
 
@lyxal You get a message below the input box.
 
It just says "passed all basic tests"
@AidenChow I'm not competing :p
 
7:51 AM
@lyxal yes, that's the full score.
 
yea for me its saying "Passed all basic and edge cases"
 
Oh
Okay good to know
 
@AidenChow Oh, trust me, I've seen stuff…
 
just curious, r u one of the judges adam?
 
yes.
 
7:52 AM
@lyxal oh so u didnt make an acct?
 
No
I don't have one
 
which ones u solve so far??
@Adám lol true, uve probably seen all the nasty stuff that beginners write lmfao
 
@AidenChow just 1:3
Only for fun
 
Every year, some people ask that we blanket publish all solutions after the competition. One of the reasons we don't do it, is to avoid the risk of embarrasing people.
 
@Adám maybe release the solutions but make it anon?
 
7:56 AM
We've of course considered that, but it might still come back at someone, and especially phase 2 can be easy to identify based on style. Safer to let people self-publish (and add an entry on the APL Wiki for discoverability) if they feel like it.
 
@lyxal lol nice, u probably have some elegant answer in less than 10 bytes lmfao, meanwhile i have some monstrosity of a 30 bytes answer...
 
I, uh, wouldn't call it elegant
 
@Adám how many submissions yall get on average each year anyways?
@lyxal if u used rotate anywhere in ur code its most likely better than mines...
i wont say what, but i did some wacky stuff for 1:3 lol
 
Mine does sound comparatively sane then :p
 
exactly lol
mines is insanity
like if a judge saw it they would actually just mark it down so much...
 
8:01 AM
@AidenChow Hm, I'm actually not sure, as I only see the top scoring entries that need judging.
 
ah i see... how many u judge usually (totally not tryna see my chances of making it to judging lmfao)
 
About 45 or so. At least it was around that in the random year's set that I just dug up.
 
damn only 45, there goes my chances
are all the other submissions just hidden from u or can u access anyones submission?
 
I think I can access everything, at least with some effort, but not "anyones" in particular, as I don't know the identity of the submitter until chosen as a winner.
We want to avoid bias on people we know, so competitors are only identified to the judges using ID numbers.
 
ah yep that makes sense
 
8:16 AM
@Adám was there any beta testing for this year's problems? I didn't see any mention of it in TNB like there usually is this year.
 
bruh my 1:5 is 51 bytes
this is so sad
at least i got gold trophy but damn this is horrendous
is there a builtin to get the last element of a list
O_O what is this in 1:6... string parsing... how to do that lol
f*** how am i going to fix this
┌─────────────┬────────────┬───────────┐
│┌────┬──────┐│┌────┬─────┐│┌────┬────┐│
││name│Morten│││name│Brian│││name│Adám││
│└────┴──────┘│└────┴─────┘│└────┴────┘│
└─────────────┴────────────┴───────────┘
thats what my code return....
how am i going to turn that into whats expected
:(((((
 
Obviously, we can't really help you there.
 
wait.... i just fixed it
cool
didnt expect that to work but nice
1:6 done yay!
 
@AidenChow No, but I'm suggesting that monadic be that. Meanwhile, "last element of list" on APLcart gives the alternative.
 
8:32 AM
@Adám ah ok, is there anything for tail (everything except first element)?
 
@AidenChow I have a perfectly sensible solution that doesn't use rotate :-)
@AidenChow 1∘↓
 
@Adám yea obviously, u r adam. im just some random beginner who doesnt know anything about apl lol
@Adám oh yea duh
u probably have some crazy 5 byte answer for 1:3 too
 
@AidenChow no need to be so harsh on yourself - I've been doing apl on and off for 4 years now and I'm still really horrible at it and get headaches after a while :p
 
@lyxal lol ive been doing it on and off for about 3 months, mostly off tho :P
 
I've been doing it on and off for about 3 decades…
 
8:36 AM
or maybe it was a little more than 3 months idk lol
@Adám lmaooo
bruh what is this 1:7
 
@AidenChow No, not at all.
 
@Adám ok well its probably like 5 times better than my 30 byte answer lol
mines is actually not pleasant to look at
 
By "byte", I assume you mean "character". Mine isn't much shorter, but let's compare once the competition closes.
 
@Adám which is months from now lol
how do i convert a number to a string
 
What did you APLcart?
 
8:47 AM
decimal to string
ok wait num to string seems to give a promising result
 
@AidenChow That does give a usable result, no?
 
errr im not sure
 
Is there a way in the session to test if CEF is enabled?
 
@xpqz {0::0 ⋄ ≢⎕NEW⊂'HTMLRenderer'} ?
We have a "Verify .NET Interface" I-beam. Maybe we should have one for CEF too?
 
are the only submissions that have a chance of being judged are the ones that solve all the problems
 
8:58 AM
I've not needed it until today, but it struck me that it would be nice to be able to see/query the session's view of its config state -- if you write an application, it might be good to be able to tell if a feature you rely on has been disabled by the user. I suspect it's already possible; I've not checked.
@Adám Does the job nicely; thanks!
Is it possible to pin the Dyalog version the Jupiter kernel should use? It seems to always pick the one with the largest version number if there are several.
 
@xpqz There aren't many disableable features, are there?
 
@Adám I've not checked; I'll take your word for it. But there are quite a few aspects that are configurable, at least.
 
Configuration can be read with ⎕SE.Dyalog.Utils.Config
 
Nice! Perfect.
Wow, I can hack the language bar? .../Dyalog/languagebar.json
 
9:14 AM
Hi! I was interesting to learn about multithreading in APL. I've tried to run this:
{⍎'(⍎&''solver ''''',⍵,''''''')'}¨'02-swarming-ant' '02-swarming-ant'
solver '02-swarming-ant', is executed in about 30s and the line above is executed in 1min, so apparently it starts two threading but they aren't executed at the same time.
 
& launches so called green threads, i.e. threads that APL manage and divides its processor time between them, but there's still only one OS thread. You need isolates if you want multiple OS threads.
 
@Adám So it's possible to execute them at the same time and obtain a result in 30s?
 
Yes. see Parallel Language Features for details.
Also, there's no need to (double) wrap in executes.
⎕CY'isolate' ⋄ solver IÏ '02-swarming-ant' '02-swarming-ant' should do the trick.
fyi, is a model for a proposed ∥¨
 
This gives an error
FUTURE ERROR: 2: SYNTAX ERROR: {⍺←⊢ ⋄ ⍺ solver ⍵}: iEvaluate[13] (,⍕(⍕rc),': ',(0⊃res),{(⍵∨.≠' ')/': ',⍵}1⊃res,'' '')iSpace.qsignal rc

But I'll read about it, thanks
 
Does solver¨ '02-swarming-ant' '02-swarming-ant' work?
 
9:29 AM
@Adám Yes
 
Does it try to access globals?
 
@Adám Yes
 
Well, read the doc :-)
 
It's a tradfn that creates some local variables that are accessed by an inner function
@Adám Yes, I'll do it later
 
 
2 hours later…
1:00 PM
Welcome to APL Quest 2018-7! Today's quest is Unconditionally Shifty:
> Write an APL function that given a right argument Y of any array and a numeric scalar or vector left argument X returns a Boolean indicating if the left argument is a valid argument for X⍉Y, like the result of {0::0 ⋄ 1⊣⍺⍉⍵} but does not use (to test the arguments).
Note: From next week, March 17, these sessions will begin two hours later, at 15:00 UTC — also beware of daylight savings time changes.
 
{(⌽⍣(⍺<0))(-|⍺)↓(⍺/0),(⌽⍣(⍺<0))⍵}
 
@Richard Wrong paste?
 
{⍺≡⍬:1 ⋄ (r=⍨≢⍺)∧(∧/⍺∊⍨⍳⌈/⍺)∧∧/⍺∊⍳r←⍴⍴⍵}
 
:63151738 Oops, this is ofc 2018-8: Making a Good Argument
 
Not very exciting this one. Just did the tests as asked
Maybe something smarter is possible
 
1:03 PM
Why do you need the special case for the empty vector?
 
the ⍬ gives an error on ⌈
 
Ah, not so much ⌈/ but on negative infinity…
 
yes
couldn't think of another way to avoid it
 
ovs
⍳0⌈⌈⌈/⍺ should do it
 
ah yes :)
 
1:08 PM
I have an elegant one in the works.
 
@ovs ⍳0⌈⌈/⍺
 
∧/=⍥≢∘⍴,{⍺(∊⍨,∊)⍳≢∪⍺} but I have a feeling that the inner fork can be simplified.
⍳≢ can be
 
Still looking at the first part with ⍥. The rest is clear to me.
 
=⍥≢∘⍴ just says that the left argument length must match the right argument rank.
 
but ≢∘⍴ on ⍺ also gives rank, does it? And not the length of ⍺
 
1:16 PM
Operators have long left scope: (=⍥≢)∘⍴
=⍥≢∘⍴∧{(⊢≡∪∘⍺)⍋∪⍺}
 
ok, still confusing for me. But that explains it
 
ovs
=⍥≢∘⍴∧{∧/∊∘⍋⍨∪⍺} seems to work. Or =⍥≢∘⍴∧{r≡⍋⍋r←∪⍺}
 
Ah, nice.
 
ovs
Ah the second one makes a lot of sense, it's asking if ∪⍺ is a permutation
 
@ovs why ⍋⍋ and not just ⍋?
 
1:23 PM
inverts a permutation, so ⍋⍋ will be identity — but only for permutations.
=⍥≢∘⍴∧{≡∘⍋∘⍋⍨∪⍺} if you want to avoid the variable, and =⍥≢∘⍴∧≡∘⍋∘⍋⍨⍤∪⍤⊣ if ou want to go all-tacit.
 
I do not understand
⍋⍋ 2 3 2 gives the same as ⍋ 2 3 2
 
Bad test case.
Slightly shorter but repeats (trivial amounts of) work: =⍥≢∘⍴∧⊣≡∘⍋∘⍋⍥∪⊣
 
Could you give another test case in which this is indeed different to make it clear for me
 
3 1 4 1 5
 
ok!
 
1:29 PM
20.0 will be able to match the length without duplicate work: =⍥≢∘⍴∧⍋⍤⍋⍛≡⍤∪⍤⊣
But =⍥≢∘⍴∧{r≡⍋⍋r←∪⍺} is probably easier to read.
So we can read this as "length of left argument and shape of right argument must match, and the left argument must be a permutation vector but where duplicates are allowed".
So there are really only two rules, and the first one is actually artificial. Dyadic could limit itself to transpose the ≢⍺ leading axes.
 
So you could provide a longer ⍺ and the ⍉ would still work?
 
No, a shorter.
E.g. 2 1⍉rank3array would be equivalent to current 2 1 3⍉rank3array
1 1⍉rank4array would be equivalent to current 1 1 2 3⍉rank4array
 
ok, so a shorter ⍺ would leave non-specified axes and only modify the ones given?
 
Yes, and the non-specified ones would be the trailing ones.
If you want to transpose only trailing axes, you just use Rank.
Have we exhausted the topic?
 
yes, for me we did
 
1:42 PM
OK, see you next week for 2018-9: Earlier, Later, or the Same?
 
 
3 hours later…
4:43 PM
0
Q: Two APL functions give different results, but their boxing is identical

kamilok04I am trying to create an APL function which returns differences (non-identical items with identical index) between two vectors. I have come up with the following and it works fine, subtracting two vectors and discarding zeroes from the result: func ← {((⍺-⍵)≠0)/(⍺-⍵)} However, I was not satisfie...

 
 
3 hours later…
7:32 PM
Was wondering if there were any APL Quests related to Pi Day or calculating pi using Monte Carlo
 
 
2 hours later…
9:34 PM
I start feel the needy to generalize the ((⍺ f ⍵) g ⍺) h ((⍺ f ⍵) g ⍵) pattern
 

« first day (2235 days earlier)      last day (409 days later) »