« first day (1284 days earlier)      last day (1360 days later) » 

12:31 AM
would anyone object to a bot bridging this chat with the IRC channel #apl on freenode?
my main concern is that replying to specific messages wouldn't work as such; bot could shuttle message IDs, but they would have to be pasted manually, and wouldn't link to their associated messages. But that doesn't seem like a huge issue
 
 
7 hours later…
RGS
7:57 AM
@Bubbler @ngn I would be very interested in seeing your solutions to the APL competition. Do you have any plans to make them completely public? Or would you mind emailing me the solutions? Or would you be open to sharing the idea behind each solution even though you don't want to share the code? I am all ears
In case you don't mind emailing it to me, you can send them to 'rodrigo girao serrao (at) gmail (dot) com', except obviously there should be no spaces :P if you do email them, I'll assume I am not supposed to show them around, don't worry. And thanks in advance!
 
8:50 AM
@RGS I was already planning to upload my solution to Github.
 
 
1 hour later…
ngn
9:58 AM
@RGS i was going to share them on condition that dyalog publish the winning solutions, which definitely won't be mine this year because of no input validation & comments. but given there isn't much to win or lose anyway, playing such games now is probably silly.
:namespace Contest2020
:namespace Problems
⎕io←0
DiveScore←{⍺+.×⍵[(1↓⌽)⍣(≢3↓⍵)⍋⍵]}
Steps←{⍺←1⋄a d←-\⍵⋄0>⍺:a+(d÷⌊⍺)×⍳1-⌊⍺⋄×⍺:⍵∪⍨a-⍺×(×d)×⍳⌈|d÷⍺⋄a}
PastTasks←{' href="([^"]+\.png)"'⎕s'\1'⎕sh'curl ',⍵}
revp←≢{1 0+⍤1⊢a⌿⍨((⌽≡3-⊢)⊢↑⍵↓⍨⊣)/a←↑⊃,/l,¨¨⍨⍳¨1+⍺-l←4+⍳9}'ACGT'⍳⊢
sset←(1e6|×)/⍴∘2
rr←{⊥⍨/¨⌽¨0,¨,\⊂¨⍺,¨⍨1+⍵}
pv←{+/⍺÷×\1+⍵}
Merge←{j←⎕json g⍵⋄'@.*?@'⎕r{(⊂s←⍵.Match~'@')∊j.⎕nl¯2:⍕j⍎s⋄×≢s:'???'⋄'@'}g⍺}
g←⊃⎕nget
d←↓⍉(7⍴2)⊤11+2×⎕a⍳'BHEZMTSYWA'
m←4<47|2+⍳95
c←CheckDigit←10|-+.×11⍴3 1⍨
WriteUPC←{0::¯1⋄≠\∘~@{~m}m\∊~@1⊢2 6⍴d[⍵,c⍵]}
 
 
2 hours later…
12:01 PM
@dzaima (specifically here is a case where my dzaima/APL solution feels better than my dyalog ones (i don't doubt that there are better solutions; all vars are equal shape matrices, m is of bools, a and d are of ints))
 
12:35 PM
(in other news, i'm finding many parts (including that containing ↑) in my problem 9 solution that are very simplifiable (10lns/134 non-whitespace chars → 4lns/75))
(the reduction is for a part of the solution; whole solution was 24lns, now is 18)
 
1:31 PM
@ngn As PastTasks is about the only one of Phase II which I did, yours doesn't look like it would work to find relative .pdf (not .png) links and merge them with the <base href address ?
 
ngn
@TessellatingHeckler right, it doesn't do that
 
@ngn ... fair enough. Touch of Gell-Mann Amnesia effect, where the only one I can understand is a skeleton proof of concept, but I have to assume all the rest I can't understand are great :thinking:
better get studying them and find out for myself
 
ngn
@TessellatingHeckler how did you learn about gell-man amnesia? from chomsky? :)
 
1:47 PM
@ngn Nooo, most likely from a comment on Hacker News
 
ngn
@TessellatingHeckler this is the only problem for which i have no tests, not even crappy ones. i must have stopped solving it half way and forgotten about it.
(of course there could be other wrong ones)
 
Meanwhile, I'm thinking of writing step-by-step explanation of some of my solutions, possibly in Jupyter notebooks
The mobile one will be a super long article...
 
2:19 PM
@Bubbler That's a really nice idea.
I've got a couple of Jupyter notebooks from this first stretch of learning APL that I should get around to publishing.
 
3:02 PM
@RGS also interesting to see everyone's phase1 solutions
 
ngn
3:12 PM
p1←{(0>⍺)⌽(⍺↑⍵)(⍺↓⍵)}⋄p2←{⍵⊂⍨0≠128 192⍸⍵}⋄p3←{(+/26*⍳≢⍵)+26⊥⎕a⍳⍵}⋄p4←{~≠⌿×4 100 400∘.|⍵}⋄p5←{(⊃⍵)+(¯1*>/⍵)×⍳1+|-/⍵}
p6←{⍵(∩,~)⍺}⋄p7←{×/≤/2⊥⍣¯1⊢⍺⍵}⋄p8←{×/0>2×/2-/10⊥⍣¯1⊢⍵}⋄p9←{⍵≡(⌈\⍵)⌊⌽⌈\⌽⍵}⋄p10←{↑⊃,/{↓⍉⍪⍉⍕⍵}¨⍵}
@user41805 ^ i had to insert ⎕io←0⋄ everywhere
 
@ngn is that why your p3 is longer? or did i miss a part of the spec
 
ngn
in p2 i had to insert a ¯1+
@user41805 longer than what?
 
mine is p3←(26⊥⎕A∘⍳)
 
Ada
The way I solved Balance is ... to summarize I cannot believe it worked.
 
@user41805 my Phase I solutions are gist.github.com/HumanEquivalentUnit/…
2
 
ngn
3:21 PM
@user41805 nice. i didn't think about it. 1+ would have worked for me (my policy is to use ⎕io←0 everywhere)
 
@ngn no trains o_O i assume you assumed only dfns are allowed
@TessellatingHeckler that is a nice p6
 
ngn
@user41805 probably. i don't remember. it was a couple of months ago that i solved everything.
@user41805 ah.. if i use a train, setting ⎕io←0 is much more difficult
 
Ada
Were your solutions golfed, ngn?
 
ngn
@Ada not fully
 
Ada
I made sure to not golf mine, because ... well "this isn't a code-golf competition"
 
ngn
3:29 PM
@Ada where's the fun in that? :)
 
Ada
I did, however, get a shorter p10
 
@user41805 :) I don't know how I'd do it with the suggested grade-up
 
Ada
Am I allowed to post my Phase1 solutions? Or should I wait?
 
ngn
@Ada well, the site says "The 2020 round has closed!", so it wouldn't do any harm
 
Ada
{↑⊃,/↓¨⍕¨⍵}
 
ngn
3:35 PM
idea: collect all published solutions in a single place (with the authors' permissions), if there are any volunteers to set up a repo, merge pull requests, etc
 
Wonder if APL code would be amenable to colourised explanations in this style blog.revolutionanalytics.com/2014/01/…
@ngn Would you group them by user, or by problem? Might be interesting (if a lot more work) to have a comparison/comment on approaches to each problem.
 
ngn
@TessellatingHeckler if i weren't too lazy to do it, "by user" would probably be easier
@ everyone: do you also write automated tests while writing the solutions?
 
ngn
3:52 PM
@TessellatingHeckler that would probably work in any language, except colorforth :)
 
4:41 PM
@ngn i wrote some tests for some tasks of phase 2 this time
 
4:58 PM
There is {>⌿80 50∘.∨⍵} for leap years
@TessellatingHeckler I had {⍵[⍋⍺≠⍵]}
 
ngn
5:23 PM
@dzaima what did you use to import the solutions? ⎕fix'file://Contest2020.dyalog'?
 
Ada
The size of an array Dyalog can handle is astounding
 
ngn
@H.PWiz very cool. i'm still trying to understand how it works.
 
5:48 PM
@dzaima Starting to wonder if I shouldn't reinstall. I seem to get a lot of inconsistent behavior. I restarted a few times yesterday, and was able to replicate it even in new sessions. Now I can't. Here was the simplest case I was able to get it with (again, not anymore):
 f←{
     _←⎕SE.UCMD 'box on'        ⍝ Turn on some library
     ⎕←(1 2 3)(4 5 6)(7 8 9)    ⍝ Access said library
     f ⍬                        ⍝ Recursively call yourself ad infinitum
 }
 
ngn
@dzaima did you customize $TRACE_ON_ERROR?
 
First two lines could probably be even simpler if you just directly called a function in another namespace, eg. _←#.NS.foo ⍬
@ngn But it's probably my fault, rather than his. Since now it doesn't work anymore
But perhaps a long-time veteran like one of you has seen something similar, or perhaps an implementor like @Adám could make sense of this. Or maybe it'll by chance work for someone else. Regardless of how, if anyone can verify my sanity, that'd be highly appreciated :)
 
6:15 PM
@ngn yeah, plus ⎕cs # before and ⎕cs Contest2020.Problems after (included that in the tester, and called the tester with the same thing)
@ngn haven't bothered (not at home currently either)
 
ngn
@dzaima oh, so it's not the reason
@AviFS "implementor" - afaik adam doesn't touch c code at all, but he is very familiar with the product from a user's perspective
 
@ngn 'Course! I don't know exactly what he does, so I neither knew nor didn't know. However I didn't mean it literally. Just that knows many of the ins and outs. "Implementor"-wise though, now that I think about it, you, @dzaima & @Adám all count since you all have APL dialects!
 
@ngn i did for the previous years, this year my testing was more primitive
@H.PWiz this beats the other apl solution
 
ngn
6:32 PM
cmc: golf phase1 :)
 
v17 or v18?
 
ngn
@user41805 any
 
ngn
6:51 PM
i got to a total of 122, not counting func names and s
 
Using trains?
 
ngn
even fewer bytes if is allowed for input and/or ⎕io can be different for different problems
@H.PWiz yes
119 - this is the first time i've ever used
 
7:33 PM
@H.PWiz "primo" is ridiculously, unbelievably good at codegolf; check out how many 1st place positions they have in all the different languages on code.golf/golfers/primo-ppcg/holes
 
I know, we've spent some time discussing solutions for the mathematical constants problems on that site. Very clever
 
 
2 hours later…
9:32 PM
@Moonchild I don't think so, but can you elaborate on what the consequences are? Also, I'd be very interested in hearing about that IRC channel. Is there a way to see its transcript?
@AviFS I can see how this would fail if you amend 'box on' to 'box on -f=on'
 
10:38 PM
@Adám basically, there's a bot in this room and another bot in that irc channel, and the two are connected; whenever someone says something here, it's reported there, and vice versa. People do this sometimes for discord<->irc, although I don't think anyone's done it for an se chat
 
@Moonchild So in a sense, this will merge the two? Is the connection fast enough for people to carry a conversation across?
 
@Adám yes, and yes
@Adám It doesn't see much activity (part of my goal here is to revive it somewhat...). I do have logs going back ~9 months, but posting personal logs publicly isn't really acceptable in IRC culture; but again, there's not much to see. ~500 messages over the past 9 months
 
Then I'm for it. Part of the APL community's problem is the difficulty in finding and accessing it.
Oh, yeah, we see 500 messages every three days.
@Moonchild I assume the IRC channel doesn't have SE's high bar for entry? That's both good and bad. Does the channel see any spam?
 
@Adám I haven't seen any spam, no. Very occasionally some of the larger channels will get spammed, but #apl isn't anywhere near that size
 
Great.
 
10:46 PM
will probably take a few days to set up the bot; SE chat api isn't very well documented
another idea: bot can evaluate code in-line. So you can post a code snippet in-channel and the bot evaluates it and responds with its output
 
@Moonchild We'd love to have that again. We used to, but somehow the bot died.
@Moonchild I have an account for that purpose. I'd be happy for that to be re-used.
 
@Adám ah, cool! Will contact you about that once the bot is done
 
@Moonchild You may be able to glean API info from the old bot's code.
 
Ada
If there IS spam, it had better be appropriately-themed spam
Like war over ⎕IO /s
 
11:02 PM
That's not spam. Spam would be asking how to do something in Java ;-)
 
ngn
@Ada war? it's just a tactical operation of the ⎕io←0 alliance to liberate users from the ⎕io←1 regime
 
Ada
Having both ⎕IO's available is better.
:D
 
personally, I hold that we should compromise and set ⎕io←→0.5
 
Ada
Ah the old base 11 compromise haha
 
ngn
i can't live with the thought that ⎕io←1 is taught to innocent women and children
 
11:12 PM
@Ada If you actually try to deal with any mixed-⎕IO code base, you'll soon revise that view.
@Moonchild That's actually less bad than one might think. I'm still not convinced, though.
 
Ada
A[0.5] A[1.5] NOPE
 
How about A[0.5] is the first element and A[¯0.5] is the last?
 
Ada
11:30 PM
What would be the second?
 
11:44 PM
@Ada A[1.5]
 
Ada
Ah, that'd be too awkward :>
 
@Ada Read the messages following this one:
Jul 1 at 15:37, by RGS
Also, I find it amusing that my solution (with the [] and the built ins you were hinting at) always needs a minor tweak, regardless of the ⎕IO setting
 
Ada
Ah, thank you, Adám
 
I.e. if ⎕IO←0.5 you could reverse a vector with {⍵[(⊢-⍳)≢⍵]}
 

« first day (1284 days earlier)      last day (1360 days later) »