« first day (1304 days earlier)      last day (1355 days later) » 

2:41 AM
@Bubbler Belated cangratu lotions!
 
 
1 hour later…
4:00 AM
0
Q: Using the each operator with the without function in APL

icicleI have a nested array with the following data: ┌→────────────────┐ │ ┌→────┐ ┌→────┐ │ │ │ABC12│ │DEF34│ │ │ └─────┘ └─────┘ │ └∊────────────────┘ I would like to remove the numbers from each, so that it looks like this: ┌→────────────┐ │ ┌→──┐ ┌→──┐ │ │ │ABC│ │DEF│ │ │ └───┘ └───┘ │ └∊─────────...

 
4:26 AM
@TessellatingHeckler I would assume the data in ↑ isn't actually enclosed, it's just how ('ABC12')('DEF34') is printed with ]box on -style=max
rather, the problem probably is wanting an each-left but doing ('ABC12')('DEF34') ~¨ ⎕D which won't work
 
Oh
What are the → and ∊ in the -style=max indicating?
 
@TessellatingHeckler is indicating it's a vector (compared to 1 5⍴'ABC12'), and (i'm guessing) means the array is of mixed type or something (compare to 1 2 and '1 2')
see ]box -???
 
Interesting; but too late in the morning for another 9 sets of symbols and array terms
yourData ~ (⊂'DEF34') removes an entire string, as I'd expect
yourData ~¨ (⊂'DEF34') (⊂'ABC12') does not change anything. Not what I'd expect
yourData∘~¨ (⊂'DEF34') (⊂'ABC12') boxes the data another level. Totally not expecting that.
 
5:03 AM
The data is simply 'ABC12' 'DEF34', so yourData has two strings (enclosed once each) as its items.
⊂'DEF34' is a string enclosed once, so yourData ~ ⊂'DEF34' removes the matching cell.
For yourData ~¨ (⊂'DEF34') (⊂'ABC12'), each side has two items, and ¨ discloses each cell on both sides and applies ~ to the matching pairs.
So that is ('ABC12' ~ ⊂'DEF34') ('DEF34' ~ ⊂'ABC12').
See 'ABC12' ~ ⊂'DEF34'. Left side has five simple chars, and right side has one nested string. Obviously they can't match, so nothing is removed.
Finally, yourData∘~¨ (⊂'DEF34') (⊂'ABC12') computes (yourData∘~ ⊂'DEF34') (yourData∘~ ⊂'ABC12').
Since (yourData~⊂'DEF34') gives ,⊂'ABC12', you get (,⊂'ABC12') (,⊂'DEF34') which is each string nested one more time.
@TessellatingHeckler ^
 
5:22 AM
@Bubbler (⊂'abc') (⊂'def') is different 'abc' 'def'; I'm confusing nested arrays with boxed/enclosed references to arrays. I see why the charvec to enclosed array can't match.
@Bubbler oof; so is there a way to do what they ask anything like that without doing what I suggested in my answer?
 
@TessellatingHeckler Yeah, yourData~¨⊂⎕D
 
@TessellatingHeckler A more direct translation of your answer is ~∘⎕D¨yourData
 
@Bubbler darnit! I tried ⎕D∘~⍨¨yourData
 
That should be ⎕D∘(~⍨)¨yourData instead.
 
I would have needed ⎕D∘(~⍨)¨yourData
@Adám the neatest version yet
 
5:32 AM
Yeah, my first pick is also the same as Adám's
 
@TessellatingHeckler While this user is probably still using Dyalog APL (since they accepted your answer), be careful about suggesting the use of dfns or until you know so.
@TessellatingHeckler Will you update your answer, or should I post mine?
 
@Adám I will add that as a stated assumption in my answer; you can still post yours too
 
 
5 hours later…
10:35 AM
How do i use large numbers with APL functions
Sometimes I get WS FULL or something of the like when testing a program with large numbers
 
10:46 AM
@Razetime Numbers with large magnitude, like 10¹⁰⁰⁰ or large arrays, i.e. with lots of numbers in them?
 
RGS
11:10 AM
Hello @Adám , is there an estimated time for the publishing of the competition results?
 
> Publication will be around lunch time
@Razetime You can use number up to magnitude 10⁶¹⁴⁵ if you set ⎕FR←1287. YOu can use more memory if you increase Options→Configure→Workspace→Maximum workspace size.
 
RGS
@Adám thanks; did I miss that info somehow?
 
no, pm to me today
 
RGS
@Adám ah ok, the quote made me think you had already shared that info. Alright, I will check back in again in a couple of hours
 
11:42 AM
@Adám yep exactly that
 
2020 APL Problem Solving Competition Winners. Congratulations to everyone, several of which frequent this room.
@RGS ^
 
I hope the poeple here don't mind having their names mentioned
 
@Razetime I think people can (and occasionally have) asked to remain anonymous.
 
interesting
congrats to everyone
 
<kritixil1> congrats all!
 
11:57 AM
Here's an interesting problem: If that one of the names in the announcement is one of the people here with a totally different username, should I congratulate them directly?
 
oh no the bot is talking
be are doomed
 
@Razetime The bot also relays messages between SE chat and IRC.
 
well, usernames are pseudonyms anyway. It's pretty close to anonymous(If they do care about anonymity)
oh there's an IRC room
 
@Razetime Right, but the announcement uses real names, so if I congratulate a user name, I've effectively revealed the identity of a previously anonymous user.
 
well thats 1/20 probability of guessng who's name corresponds to whcihc username
unless you reveal the prize they won
 
 
1 hour later…
RGS
1:07 PM
@Adám thanks; is there any chance to know the place in which one placed, if not in the top 3?
(btw I think the first place winner commented on my blog post about the competition. At least the names match, up to a i/y)
And congratulations to everyone!
 
1:47 PM
@Razetime Well, there's only one prize for non-students... ⍨
 
@RGS You scored 98% on phase I, earning you a shared 4th place with 6 others. In phase I, you got 90.2%, earning you a 5th place by yourself (no shared places in phase II).
 
ngn
2:16 PM
@Adám can i learn mine too?
 
2:34 PM
btw apl.codegolf.co.uk would be cool to have again, my golfing has improved a lot since then
@Adám for phase 2, if a participant attempts more than one challenge, on which attempt would the ranking be calculated?
 
@user41805 @JamesHeslip ^^
 
:)
 
@ngn You didn't receive a fine-grained 0.5% score for phase I, due to not being a student, so your score is counted in intervals of 5%. With that in mind, you got 100% shared with 45 others. In phase II, you got 76.8%, earning you a 17th place.
 
RGS
@Adám thanks for letting me know. The 100% in phase II is the perfect score or was it rescaled so that 100% is the score the best participant got?
 
ngn
@Adám thanks
 
2:47 PM
@RGS 100% was "perfect"; top marks in all areas of consideration, by all judges.
 
RGS
@Adám alright, thanks for answering all my questions :p congrats to the team who put together this competition
 
 
1 hour later…
4:14 PM
@Adám how did I do on my Phase1 submissions?
 
@TessellatingHeckler I don't know who you are in real life. Give me a hint, or email me your real name or email address.
 
4:48 PM
<kritixil1> @Adám, also for me, could you please tell me how well i did (i'd prefer it if you'd tell it privately, say by email, if you still remember my address)
 
@Bubbler ah well
so I've been trying to find a mathematical function for the alarm sound question recently
 
@Adám Ah ok; not quite willing to put my email in the chat; I am Simon from RFE 17757 about "Dyalog APL OOP feature request", assuming my email made it in there
 
my idea so far is
⋄5/⍳3
 
@Razetime 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3
 
5:03 PM
and then theres ,⍨'beep'
 
ngn
@Razetime link?
 
⋄,⍨'beep'
 
@Razetime beepbeep
 
13
Q: Print my clock's alarm sound

Redwolf ProgramsWrite the shortest program that prints the sound my alarm clock makes, and stops after an inputted number of beeps. For reference, here is the sound my alarm makes: beep beep beep beep beep beepbeep beepbeep beepbeep beepbeep beepbeep beepbeepbeep beepbeepbeep beepbeepbeep beepbeepbeep beepbeepbe...

so the idea is pretty much this
i impose the beep pattern on 5/⍳3
but I haven't a clue how to go about it
 
@TessellatingHeckler Yup. Go it. Do you want your stats here or privately?
 
5:07 PM
@Adám Cool; I'm fine with here, I linked my answers before, they're not secret
 
hey there @Adám
 
ngn
⋄1↓∊' ',¨∊¨(5/⍳3)⍴¨⊂⊂'beep'
 
@ngn
beep beep beep beep beep beepbeep beepbeep beepbeep beepbeep beepbeep beepbeepb
      eep beepbeepbeep beepbeepbeep beepbeepbeep beepbeepbeep
 
wow
 
ngn
@Razetime you can start golfing from here^^^
 
5:10 PM
and then use the right argument to select n values
probably ⍵↑ the whole thing
 
ngn
yeah
you'll also need "beepb...p" repeated 25 times without spaces
 
@Razetime Yeah?
 
also the current state isn't a list
just saying hi, nothing else
⋄3↑(1↓∊' ',¨∊¨(5/⍳3)⍴¨⊂⊂'beep')
 
 
ngn
@Razetime actually ⍵↑ must be applied before the last ∊
 
5:13 PM
@Razetime bee
 
ohhhh
⋄1↓⎕↑(∊' ',¨∊¨(5/⍳3)⍴¨⊂⊂'beep')
 
@Razetime Illegal code
 
like this?
 
ngn
@DyalogAPL "illegal" :D
 
lol yep
has the beautiful box
⋄1↓3↑(∊' ',¨∊¨(5/⍳3)⍴¨⊂⊂'beep')
⋄1↓⎕↑(∊' ',¨∊¨(5/⍳3)⍴¨⊂⊂'beep')
 
5:18 PM
@Razetime Illegal code
 
⋄1↓3↑(∊' ',¨∊¨(5/⍳3)⍴¨⊂⊂'beep')
 
@Razetime be
 
ngn
⋄1↓∊3↑' ',¨∊¨(5/⍳3)⍴¨⊂⊂'beep'
 
@ngn beep beep beep
 
@TessellatingHeckler Since you're not a student, your phase I solutions where only scored to the closest 5%, namely 90%. Phase II: 13% for a 35th place (due to not having solved very many problems, while a lot of people solved all of them).
 
5:19 PM
ok, after the ∊
 
ngn
@Razetime apl is right-to-left (:
 
still need to get around the apl thinking method
 
@Adám Thank you. Is the phase I score simply "code gave the correct answers", or could there have been points docked for bad solutions?
 
@ngn the smiley is a nice touch
 
<kritixil1> @Adám, thank you!
 
5:24 PM
@ngn apl is right-to-left, through some other dimensions along the way
 
@TessellatingHeckler If you had been student with 100%, there would have been +0.5 for each remarkable solution and -1 for each sub-par solution.
 
Grand, thanks.
 
@Razetime I've got a 50-byte solution.
 
5:55 PM
47
 
@Adám are these more detailed results public somewhere?
@Adám I would be interested in both mine and my son's results.
 
6:12 PM
@FredrikNiemelä No they are not, but I give them out per request.
@FredrikNiemelä By email or here?
 
Here is fine.
 
@FredrikNiemelä You: Phase I is 95% (rounded to closest 5% due to you being a non-student). Phase II: 11.7 for a 37th place (due to only having solved few problems.)
 
Respectable for a newb :)
 
@FredrikNiemelä Your son: Phase I is 99% for a 2nd place shared with 5 others. Phase II: 79% for a 16th place.
 
6:26 PM
@Razetime 25 in BQN. Which should translate to Dyalog 18.0 except for .
Yeah, the dyalog version is 26 (⎕IO←0).
 
Oh, I missed the last long run. And you guys are not chopping per the actual problem.
 
6:57 PM
@Adám In that case a different encoding gives 30 (3-10s runtime).
 
7:37 PM
@Adám can I find out about my score?
 
7:52 PM
{∊'beep' ' '⌷⍨⊂∊2,⍨¨(⍵⍴1)⊂⍨⍵↑0≠∊↑⍨¨25,⍨5/⍳4} 44 I think
 
ngn
8:08 PM
@TessellatingHeckler you could use [ ] indexing instead of
@TessellatingHeckler also: (⍵⍴1)⊂⍨... -> (...)⊂⍵⍴1
0≠ -> ×
 
@ngn Ooh I've seen you use direction for this kind of thing before. Neat, they make it 41
⋄ {∊'beep' ' '[∊2,⍨¨(⍵↑×∊↑⍨¨25,⍨5/⍳4)⊂⍵⍴1]} 12
 
@TessellatingHeckler beep beep beep beep beep beepbeep beepbeep beepbeep beep
 
ngn
@TessellatingHeckler if instead of 1 2 and indexing you use 'beep' and ' ' directly, it'll be even shorter
 
@ngn ⍥
⋄ {∊' ',⍨¨(⍵↑×∊↑⍨¨25,⍨5/⍳4)⊂⍵⍴⊂'beep'} 12
 
@TessellatingHeckler beep beep beep beep beep beepbeep beepbeep beepbeep beep
 
8:23 PM
for 36
what a great idea
remove pointless indirection; who would have thought
 
ngn
8:35 PM
@TessellatingHeckler rm ⍵⍴
 
@ngn you can post this as your answer now :D
cool that works
 
ngn
@TessellatingHeckler nah, i like the thrill of golfing but i don't like writing explanations :)
 
I like writing explanations once[1], then the code completely changes and the explanation is inaccurate. [1] I would love if there was more feedback on the internet of whether explanations helped anyone, or whether anyone even read them.
 
ngn
@TessellatingHeckler btw, is used only once there, which means you can replace it with a , remove the { }, and claim it's a "complete program"
 
@ngn hax. Does that mean I can't "Try it online" if it needs an input prompt?
 
ngn
8:51 PM
@TessellatingHeckler you can still use tio. for instance, see what this answer does in the tio link
 
9:15 PM
added credit to you as ngn
say if you want a different name/link
 
9:39 PM
Spend 20 minutes explaining then another 20 minutes editing.
someone "needs" to make an explainshell.com for APL
 
9:58 PM
Trying out the stencil, how come {⊂⍵} works but (⊂) doesn't?
 
@rak1507 probably because that function is called with a left argument too
 
Ah
 
⋄ (⊂⍤⊢⌺3 3) (2 2⍴⍳16)
 
@TessellatingHeckler
 0 0 0  0 0 0
 0 1 2  1 2 0
 0 3 4  3 4 0
 0 1 2  1 2 0
 0 3 4  3 4 0
 0 0 0  0 0 0
 
10:15 PM
⋄ (+/⌺3 3) (2 2⍴⍳16)
 
@TessellatingHeckler LENGTH ERROR
 
aw, go on, show the friendly Dyalog full error message
 

« first day (1304 days earlier)      last day (1355 days later) »