« first day (1306 days earlier)      last day (1343 days later) » 

2:39 AM
@Marshall This looks great
Happy to help with the logo
@Marshall might wanna balance the two sides a bit
 
 
4 hours later…
6:57 AM
Makes me think of a motor or the machine from the film Contact; jsfiddle.net/roedzkmw
needs electric sparks and rotating circles, but babby's first svg animation so it has to be basic. Maybe if the back of the B was a matrix...
@Adám what would you think of AplCart entries having links to a page which explains them? e.g. they could have pages on AplWiki or similar.
I see the basic ones have gained links to Dyalog documentation, which is really neat
 
@TessellatingHeckler That's a great idea. No changes (other than the addition of the actual links) necessary to APLcart; we just need to write those pages and add the links.
 
@Adám What could we use for the page names on the Wiki? I had a quick look at the .tsv file on your GitHub, and it looks like there is no id or primary key for each row to use; the code itself might break as a URL part or as a wiki name, I think.
 
@TessellatingHeckler The wiki pages should have proper descriptive names. E.g. An expression giving itself should link to Quine.
@TessellatingHeckler Depth of parentheses should link to Simple examples#Parenthesis nesting level after some editing of the section to include the tacit version.
 
7:21 AM
Yes, those all look like good places to link to
 
7:36 AM
Btw, I need to get on with adding TIO examples. Lots more to do there. Only 528 of 2480 entries have examples, though some can't have examples, due to TIO limitations, most certainly can.
 
RGS
@Adám will need TIO to update to 18.0 to finish those
 
@RGS OK, "can't currently have". If Dennis neither reappears, nor gives over the reins to someone else, we might want to set up our own server.
 
RGS
@TessellatingHeckler all entries?
@Adám is there work being done in that direction?
 
@RGS Yeah.
 
RGS
@Adám by Dyalog or independently?
Ah, TryAPL 3?
 
7:43 AM
We are working (and have almost finished) on TryAPL 3.0, but for now, it isn't running a sandbox, but just takes over the safe execution engine from TryAPL 2.0. We're mainly changing the front end, and getting rid of server state. However, we are in talks with a 3rd party which has developed a sandbox that's simpler to set up than TIO's.
 
RGS
Ah that's cool
 
@RGS I wouldn't expect all of them to get entries, but I wouldn't put an arbitrary limit on it; it can potentially fill in over time.
@RGS Something which frustrated me looking at APL from the outside is that there's basic tutorials which spend three pages explaining that 5 + 1 2 3 implicitly maps and how amazing that is, and there's endless places where people will dump a show-off line of codegolf with no comments, and there's a bit of a scarcity of anything in between - bits of code with walkthroughs of how and why they work
for example I've just gone scrolling through AplCart to find the next things to have TIO links, and +⍨N is there. The description says "Double: 2×N" and the help text links to Dyalog's documentation for add. How and why it doubles anything is nowhere to be found.
Nor is the name of the only other symbol there so you can go look it up, and if you do copypaste ⍨ and go to the Dyalog documentation and search for it, the top result is "Power Operator", then "Binding Strength" then "Tilde diaeresis" - without a picture of the symbol you're looking for
and if you open Dyalog, look at the tooltip for ⍨ you'll have to find it as the third example under "Commute (switch)" "demonstrated" with reshape.
 
8:02 AM
@TessellatingHeckler Good point. It'd be better if +⍨ linked to Commute#Examples. I didn't think of linking to APL Wiki, so I though some doc link was better than none.
@TessellatingHeckler Yeah, Dyalog's help system search is rather useless for a language that uses symbols. (You mean "Tilde diaeresis", not "Nor", right?)
 
@Adám I meant a continuation of my previous sentrence really, "X is nowhere to be found, nor is Y".
 
AH, haha. ⍨
 
Is it helpful to submit TIO links for +⍨5 and similar small code samples as a Github issue? It will surely take you more work to check it works and make the changes and close the issue than it would to make the TIO link yourself?
 
@TessellatingHeckler True, but if you submit a collection of TIO links to consecutive entries, I'd see that the first few are perfect, and trusting the rest. That said, I'd appreciate PRs instead…
 
8:19 AM
@Adám I see, ok
 
@TessellatingHeckler I guess one could search APLcart for "the only other symbol there"…
 
 
2 hours later…
10:35 AM
@brgal Phase I: 100% (rounded to closest 5%) for a 1st place shared with 45 others. Phase II: 76.4% for an 18th place.
@rak1507 I don't know your identity. Give me a hint, or email me!
 
 
3 hours later…
1:27 PM
How do I return an array from a function?
⋄2{⍵,⍺}4 4 4 4
 
@Razetime 4 4 4 4 2
 
⋄2 {⍺<+/⍵,(4+.=∘,⍵)} 4 4 4 4 4
 
@Razetime 1
 
why does this only give one value
 
<kritixilithos> ⋄2 {⍺<+/⍵,(4+.=∘,⍵)} 4 4 4 4 4
1
<kritixilithos> ⋄2 {⍵,(4+.=∘,⍵)} 4 4 4 4 4
4 4 4 4 4 5
<kritixilithos> ⋄2 {+/⍵,(4+.=∘,⍵)} 4 4 4 4 4
25
<kritixilithos> @Razetime, what did you intend to do?
 
1:35 PM
I wanted 1 5
 
<kritixilithos> ⋄2 {(⍺<+/⍵),(4+.=∘,⍵)} 4 4 4 4 4
1 5
 
2 < (sum of ⍺) , count of 4's in ⍺
 
<kritixilithos> parens
 
oh lol
 
<kritixilithos> because apl is right-to-left
 
1:36 PM
Second time I've heard that here XD
yesterday, by ngn
@Razetime apl is right-to-left (:
 
ngn
1:55 PM
cmc[0]: multiply two polynomials given as vectors of coefficients
 
<kritixilithos> i vaguely remember (me?) giving that cmc in tnb
 
ngn
@DyalogAPL quite possible
 
<kritixilithos> nope i did composition not multiplication
 
2:10 PM
<kritixilithos> 19b
 
ngn
i have 13
 
<kritixilithos> 16b
 
ngn
btw, you can choose little or big endian for the order of coefficients
 
oh wow, APLcart has 20
 
2:27 PM
There's a pretty famous 10-character J version, since it can apply on diagonals.
 
<kritixilithos> i have 16b for both endiannesses, hm
 
Isn't the result the same regardless of endianness? It's only different for base-n multiplication because of carrying.
 
ngn
right, endianness doesn't matter much for cmc[0]
 
15 in BQN with no golfing effort yet, using group.
 
2:51 PM
Down to 14 with an obvious trick, but I don't see any way to go further. Group could extend the (depth-1 components of the) left argument to any rank instead of just 1, which would make the ○⥊ unnecessary and bring it down to 12.
 
3:18 PM
@Adám would a TIO link like this tio.run/##SyzI0U2pTMzJT////1Hf1EdtExS0H/… be OK? Would you prefer them without any commentary, purely examples?
 
@TessellatingHeckler I think pure examples (unless something very "mysterious" is going on) is best for the example links, and easiest to keep consistent. Check out the existing ones' style. Any embellishment should go on the wiki page for the primitive or the example. A short explanation like your comment there, is really what the description entry is for.
Maybe "Double: 2×N" should be expanded to "Double (plus self): 2×N".
 
3:33 PM
@Adám Gotcha, pure examples. If that description section is describing what the code achieves - doubling N - then the Wiki link instead of going to a general commute examples page, could go to a specific page for this saying how doubling works using add-commute, why add is used (performance advantages over using multiplication?) and why that code style is desirable (reduces the need to store and mention variable names, draws more attention to the operation instead of the variables).
Not to let the perfect be the enemy of the good, a link to the commute examples page would be helpful, only to say that what I was picturing was more "APLCart suggests this line of code, what is this line of code, how does it work, why do it this way?" rather than "APLCart suggests this code, here's some expansion on the APL functions and operators it uses"
 
@TessellatingHeckler Oh, that's even better. APL Wiki is free to embellish as much as possible.
 
3:52 PM
@Marshall That extension is pretty nice; it means that if 𝕨 consists of natural numbers then each element of 𝕨⊏𝕨⊔𝕩 contains the corresponding cell of 𝕩 among its major cells. For Select () a rank-k component of 𝕨 sends one argument axis to k result axes; for Group it sends k argument axes to one result axis.
Drawbacks are that the extended Group would rely on ravel ordering of left argument components and that it doesn't completely extend to the 1-argument form, because a depth-1 argument is supposed to use single-number indices. That's only possible if such an argument is assumed to have rank 1. Maintaining that requirement means that depth-1 non-lists would be valid left arguments to but not valid arguments in the 1-argument case.
 
Is there a good way to answer graphical-output questions with APL?
 
4:11 PM
@Razetime You can use SharpPlot or WinForms or HTML or plain SVG or create bitmaps.
 
SharpPlot.. NEver heard of it.
should check it out
 
@Razetime See lessons 44 and 45.
 
How does ⎕WC work?
just found this from APLcart
 
@Razetime Try:
'g'⎕WC'Form'
'g.arc' ⎕WC 'Circle' (50 50) 20 ('Start' (○0.75))('End' (○1.25))
 
DOMAIN ERROR: There was an error processing the property at position 0 of the right argument
 
4:17 PM
@Razetime Wait, are you on Windows?
 
Mac OS X
 
@Razetime WinForms hasn't been ported there yet. Try this instead:
t←'<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"><path d="M10 10"/><circle cx="30" cy="40" r="20" fill="red"/></svg>'
]html t
 
aren't pure svg submissions allowed anyway?
 
Sure they are.
 
VALUE ERROR: Undefined name: html
well then, APL may not be the optimum answering tool for the task
 
4:21 PM
@Razetime That doesn't make sense. Does ] -? work?
 
```
```
VALUE ERROR: Undefined name: html
t←'<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"><path
d="M10 10"/><circle cx="30" cy="40" r="20" fill="red"/></svg>']html t

```
the caret symbol is at the right ']'
yup ] -? works
 
(Btw, click the "fixed font" button for code blocks)
 
there's a fixed font button?
 
@Razetime The ]html t goes on a separate line.
 
where?
 
4:24 PM
@Razetime To the right of the chat input field, after you enter multiple lines.
 
* Command Execution Failed: DOMAIN ERROR
 
Ugh. OK, try 3500⌶t instead.
 
yep that works as planned
 
@Adám (fwiw happens for me too. 3500⌶t works)
 
I wrote that ]html command, but clearly, I didn't test it enough on macOS.
 
4:26 PM
APL CIRCLE
 
@dzaima … or Linux. (I'm pretty sure I tried it there, though.)
 
Hmm well then, hope it gets fixed
so 3500⌶t is similar to the workaround @dzaima
gave me earlier
 
> > well then, APL may not be the optimum answering tool for the task
> Razetime, That doesn't make sense.

I can't be sure the reply wasn't intended for this, instead of for the error message :)
 
loll
I wanted to see if this was possible
 
@Razetime Yeah, that'll be difficult (though not impossible). You'd have to make calls to external graphics rendering libraries.
 
4:31 PM
would be amazing to see pong in APL
ohh
like ImageMagick or something
 
@Razetime i did at one point write a Processing integration for dzaima/APL, but it sucks and probably is at least somewhat broken
 
@dzaima in what capacity is it bad
like, lack of functions?
combining this with APL will take a bi of learning
 
@Razetime most of the functions & state are a jumbled inconsistent mess. i did at one point start rewriting it all, but stopped because that too was awful
 
how do i use your compiler?
 
@dzaima yup it doesn't even compile. ¯\_(ツ)_/¯
 
4:36 PM
uhh interpreter
oh lol
Should I use the jar file?
)load sharpplot works well
lets see if there's some plotting questions I can solve
 
@Razetime assuming a bash-y enough shell and java 11, ./build and then ./REPL runs the basic dzaima/APL repl. to get graphics, you'd need processing; example programs are here and which is run is hardcoded because i'm lazy and it's very much incomplete
 
I answer all graphical output questions in processing no problem
I hope terminal.app is bashy enough
The jar file runs fine on terminal
I'd love to use this
We'll talk more about this tomorrow
 
(pushed a fix to make the Java 8 jar compile, but it seems things are still very broken)
 
lol
A bit late here, sorry
cya tomorrow
I have Java 11 no worries
 
@Razetime but processing requires java 8 (processing 4 probably doesn't, but i still use 8)
 
4:48 PM
I use processing 3
which should be the latest version afaik
 
@Razetime right, it should work fine (processing 4 is downloadable as an alpha)
 
oh ok
g'night
 
ngn
5:12 PM
@ngn 13 bytes: +⌿↑{0,⍵}\⎕×⊂⎕
 
5:30 PM
<kritixilithos> nice, i had (+/{-⍳≢⍵}⊖⍴⍤,↑∘.×)
<kritixilithos> @ngn I assume by indicating "[0]" in your cmc there are more to come?
 
ngn
@DyalogAPL i'm glad you asked :)
cmc[1]: given two polynomials over {0,1} as length-8 boolean vectors, multiply them modulo the polynomial p(x) = x^8 + x^4 + x^3 + x + 1, i.e. implement multiplication in GF(2^8) with p as the reducing polynomial
(i don't have a solution to this one yet)
{0,1} - to be understood as Z/Z_2 or GF(2)
 
<kritixilithos> @ngn (btw i only get pinged if you mention my nick) should the x^3 be x^2?
<kritixilithos> (as in, i saw "@DyalogAPL i'm glad you asked :)")
 
ngn
i mean, we could use another primitive polynomial as the modulus and still generate GF(2^8) properly. i chose this one because it's been standardized in aes.
s/primitive/irreducible/
 
6:05 PM
<kritixilithos> that might make a good challenge for main
 
 
3 hours later…
9:26 PM
@Adám my username is my initials
 
@rak1507 04?
 
yep
 
@rak1507 Phase I: 97.5% for a 5th place. You only did one problem on phase II, but you did it quite well; 88%, which funnily matches exactly the score of the other two who also only answered that one, though the reason for your scores differed a bit.
 
What place was the last person in the top 10, if that makes any sense?
All joint first?
 
@rak1507 The top ten all scored 99.5% or 99%.
 
9:35 PM
Wow impressive
So do you get docked 0.5% for dodgy answers per question or something?
 
I gave +0.5 percentage points for exceptional answers and -1 percentage points for suboptimal ones.
Which means that theoretically, someone could get more than 100%, but nobody did.
 
Ah makes sense, so no one got 105%? Shameful!
Would it be possible to publish (anonymised) examples of real suboptimal and exceptional answers for each question to learn from? Maybe not suboptimal as you wouldn't want your solution to be publically shamed, even if anonymous, but potentially just the really good ones?
 
@rak1507 Yes, we will publish a cream-of-the-crop set for both phase I and II, but not until the winner has had a chance to present their work themselves. Interestingly, the cream of phase II comes from 9 different participants, one per problem.
Not intentional, it just turned out that way.
 
Interesting! I can't wait, I definitely have learnt a lot from doing this already, it's just a shame I discovered APL so late this year. I hope next year I can give it a better shot!
 
Well, really, one participant (the phase II winner) would have contributed two problems' solutions, if going strictly by the average scores, but I chose an alternative for problem 8 due to the other contribution having exceptional performance, even if the code what slightly less clear.
Problem 8 was very interesting regarding performance. (More or less) correct solutions varied greatly in performance, with a factor of almost 20000 between the fastest and slowest correct (enough) solutions (with the fastest one having full correctness, and the slowest one only reasonable correctness).
 
9:48 PM
Those stats at the end are surprising, I would assume there would be more of a balance, but it's impressive that the best solution was both the fastest and fully correct
 
 
1 hour later…
10:56 PM
@Adám How about non-students?
And I'm curious which part of my solution appealed to you (and other judges) the most
 
@Bubbler What do you want to know about them?
@Bubbler Solutions? Or one in particular?
 
Top ten scores, maybe
 
RGS
@Adám btw the fastest solution for prob 8 implements what type of algorithm?
 
@Adám Out of all solutions of mine.
 
@Bubbler Ranged from yours at 89%, down to 72%, quite evenly spread out.
 
11:03 PM
Ooh.
 
@RGS Chooses between two different methods depending on the size of the input: If less than 14 then simple exhaustive search, else Horowitz-Sahni method.
 
RGS
@Adám wow alright, never heard of that name ⍥
Did one of my solutions made the cut to the cream-of-the-crop? 🙃
 
@Bubbler The mail merge. All judges gave you full marks on all aspects.
@RGS Yes, UPC.
 
RGS
@Adám cool ⋄ +← 1
 
@RGS Also phase I problem 3, but lots of people had that or an equivalent solution.
 
RGS
11:11 PM
@Adám yup, the clean train was fairly "easy" to get
 
The solution is so simple at first glance, but if you actually think about what's going on, then it isn't simple at all.
 
RGS
@Adám what do you mean..?
To me it just looks simple; what am I overlooking?
 
@RGS What does 26⊥ do?
 
@RGS It requires some knowledge about bijective base, and the fact that simply converting the 1-26 digit values in "base 26" is indeed equivalent to converting from bijective base-26 to integer.
 
RGS
@Adám converts from base 26 to base 10
 
11:16 PM
@RGS Right, and what is the largest "digit" in base 26?
 
RGS
@Adám ⋄ 26⊥1 0
@Adám if you extrapolate from hexadecimal, "p"
but it is just a symbol that represents the 26th digit
 
@RGS OK, and if instead you name the digits A, B, C, …?
 
RGS
and that is what ⊥ takes on the right, the value of those digits and not their symbols
@Adám Z
 
@RGS Try again.
 
RGS
@Adám My alphabet has 26 letters...
 
11:18 PM
@RGS Sure, but which column is column A?
 
RGS
ABCDEFGHIJKLMNOPQRSTUVWXYZ
01234567890123456789012345
 
@RGS And what is the correct result for 'A' in that problem?
 
RGS
@Adám I'm assuming 1, right?
 
@RGS Sure, but your table there says 0!
 
RGS
@Adám yeah but ⎕IO←1 fixes it
which is what the system was running
 
11:21 PM
@RGS OK, so if A is 1, which letter is the last in base-26?
 
RGS
what do you mean with "which letter is the last in base-26"? A is the first letter but its value is zero, right?
@Adám do you want me to say "Z+1"?
 
@RGS No, its value is clearly 1.
@RGS Nope. Try writing it out: A=1, B=2, …
 
RGS
@Adám "clearly"? how so?
 
@RGS Because the correct result of your function applied to 'A' is 1.
 
RGS
@Adám ok so Y=25
 
11:24 PM
@RGS Right, so what exactly is Z then?
 
RGS
I don't understand the question because I don't understand the difficulty... I just read n ⊥ v as the numerical value you get by evaluating a polynomial with coefficients given by v at n
 
@RGS Sure, but who says that's the solution to the problem?
 
(I feel many people got that problem right by trial and error, not knowing the maths under the hood. If it were a Phase 2 problem, most of them would lose points on that, by failing to explain the required knowledge.)
 
@Bubbler Right, cause they'd have to explain what's going on.
 
RGS
@Adám you can just think of the column names like an odometer, one of those old ones
 
11:28 PM
@RGS No you can't. A decimal odometer never has a 10 in any of its positions.
 
RGS
the rightmost disk turns successively and whenever it wraps around, the disk to the left ticks once, propagating
@Adám this odometer has different disks
the rightmost disk has the alphabet but the other disks have an extra "empty" symbol
for e.g.
so that the odometer starts as ... <empty> <A>
 
@RGS Nope, then it'd be a simple mixed-base. But there's no A A (with a space).
 
RGS
@Adám true
 
So the disks change while being used?
 
RGS
@Adám nah that doesn't sound reasonable :P
 
11:32 PM
So what exactly is going on when passing from Y to Z instead of going to A0?
 
RGS
you are just enumerating all strings composed of letters in ABC...YZ, ordering them by length and then by alphabetical order
and then you count them
 
Correct, but that's not what is supposed to do, is it?
 
RGS
@Adám not at first glance, no
 
22 mins ago, by Adám
The solution is so simple at first glance, but if you actually think about what's going on, then it isn't simple at all.
 
RGS
@Adám I mean from the name of the primitive ⊥
2 ⊥ 30 0 works and 30 is not a digit in base 2
but it is a perfectly valid coefficient in the polynomial p(x) = 30x
 
11:36 PM
Sure, but then we're back to why that works for the given problem.
 
RGS
Do you want me to write down why it works? From my perspective
It is surely equivalent to bijective base but I never read about it
 
Sure. Maybe I can use that when we publish the cream with commentary :-) But I must go to bed now. Getting up in a bit over 4 hours…
 
RGS
And I did not write down the proof that this polynomial I want to evaluate at 26 works, but I am used to modular arithmetics enough that going over it in my head convinced me enough
I don't want to be cocky but maybe the point of this "wow factor" is that many participants don't have a maths background?
Because I really can't grasp (yet?) what is so amazing about this working
BUT I'll write it down decently and then it either strikes me or not
@Adám ○/
 
fwiw, I don't have a CS background.
 
RGS
@Adám (reworded sentence; what is your background?)
 
11:43 PM
After high school, I studied half a year of applied philosophy, and then I have a BA in rabbinical studies.
 
RGS
@Adám yeah sure; so it doesn't contradict my hypothesis
but that is a funky background :P
 
@RGS tbf, I did take the first university level linear algebra course, while in high school. Hated it about as much as I did the philosophy course.
 
RGS
@Adám Linear Algebra is nice! but I would say it has little to do with why this problem works. At least when I think about the stuff I learned when I took LinAlg
 
ngn
what's the obvious solution for that problem? {(+/26*⍳≢⍵)+26⊥⎕a⍳⍵}, right?
 
@ngn Yeah, in ⎕IO←0 of course.
 
ngn
11:50 PM
i think the equivalence with {26⊥1+⎕a⍳⍵} is simple once you understand how "base" works
to me it looks more like a golfing trick (i wish i had thought of it!) than something deeply mathematical
 
@ngn Ah, very good point. That's the cleanest explanation I've seen so far.
Anyway, fellas, I'm off to the dark side. G'nite.
⎕DL 14850
 
ngn
o/
 
RGS
bye ○/
 
{(+/26*⍳≢⍵)+26⊥⎕A⍳⍵} → {(26⊥(≢⍵)⍴1)+26⊥⎕A⍳⍵} → {26⊥1+⎕A⍳⍵}
 
ngn
@Bubbler yeah, that
 
11:57 PM
Cool, that works out
Didn't really have a chance to think about it seriously, since I learned what a bijective base is
 

« first day (1306 days earlier)      last day (1343 days later) »