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

00:31
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
RGS
07:57
@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!
08:50
@RGS I was already planning to upload my solution to Github.
 
1 hour later…
ngn
ngn
09:58
@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
@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
(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)
13:31
@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
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
ngn
@TessellatingHeckler how did you learn about gell-man amnesia? from chomsky? :)
13:47
@ngn Nooo, most likely from a comment on Hacker News
ngn
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...
14:19
@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.
15:02
@RGS also interesting to see everyone's phase1 solutions
ngn
ngn
15:12
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
ngn
in p2 i had to insert a ¯1+
@user41805 longer than what?
mine is p3←(26⊥⎕A∘⍳)
Ada
Ada
The way I solved Balance is ... to summarize I cannot believe it worked.
ngn
ngn
15:21
@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
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
Ada
Were your solutions golfed, ngn?
ngn
ngn
@Ada not fully
Ada
Ada
I made sure to not golf mine, because ... well "this isn't a code-golf competition"
ngn
ngn
15:29
@Ada where's the fun in that? :)
Ada
Ada
I did, however, get a shorter p10
@user41805 :) I don't know how I'd do it with the suggested grade-up
Ada
Ada
Am I allowed to post my Phase1 solutions? Or should I wait?
ngn
ngn
@Ada well, the site says "The 2020 round has closed!", so it wouldn't do any harm
Ada
Ada
{↑⊃,/↓¨⍕¨⍵}
ngn
ngn
15:35
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
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
ngn
15:52
@TessellatingHeckler that would probably work in any language, except colorforth :)
16:41
@ngn i wrote some tests for some tasks of phase 2 this time
16:58
There is {>⌿80 50∘.∨⍵} for leap years
@TessellatingHeckler I had {⍵[⍋⍺≠⍵]}
ngn
ngn
17:23
@dzaima what did you use to import the solutions? ⎕fix'file://Contest2020.dyalog'?
Ada
Ada
The size of an array Dyalog can handle is astounding
ngn
ngn
@H.PWiz very cool. i'm still trying to understand how it works.
17:48
@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
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 :)
18:15
@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
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
ngn
18:32
cmc: golf phase1 :)
v17 or v18?
ngn
ngn
@user41805 any
ngn
ngn
18:51
i got to a total of 122, not counting func names and s
Using trains?
ngn
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
19:33
@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…
21:32
@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'
22:38
@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.
22:46
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
Ada
If there IS spam, it had better be appropriately-themed spam
Like war over ⎕IO /s
23:02
That's not spam. Spam would be asking how to do something in Java ;-)
ngn
ngn
@Ada war? it's just a tactical operation of the ⎕io←0 alliance to liberate users from the ⎕io←1 regime
Ada
Ada
Having both ⎕IO's available is better.
:D
personally, I hold that we should compromise and set ⎕io←→0.5
Ada
Ada
Ah the old base 11 compromise haha
ngn
ngn
i can't live with the thought that ⎕io←1 is taught to innocent women and children
23:12
@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
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
Ada
23:30
What would be the second?
23:44
@Ada A[1.5]
Ada
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
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 (1667 days later) »