« first day (1161 days earlier)      last day (1476 days later) » 

9:15 AM
I'm seeing a message in RIDE "Interpreter exited with code 134" and then it becomes unresponsive with the window changing colour -- what does that mean?
 
@xpqz Somehow, the interpreter crashed. Any idea what you did just prior to this?
 
It was idle for a good while before (since yesterday, in fact). Computer had lid shut overnight.
 
@xpqz Was RIDE running on the same machine as the interpreter?
 
Yes.
I had two active sessions. The other one is still active and seems fine.
 
Same RIDE version, same interpreter version?
 
9:23 AM
Yes.
Dyalog 17.1
 
Did the crashed interpreter run some kind of network connection (Conga, HttpCommand, MiServer, etc.)?
 
You overestimate my skills :) -- no, only trivial stuff I've been juggling with you guys here on the apl orchard.
The last expression I evaluated was that suggested by Richard above items@intervals⊢queue\⍨0@intervals⊢1⍴⍨≢queue⍪items
Are the meanings of exit/error codes documented somewhere?
 
134 - 127 -> "Reserved"
Ah well, not a problem for me -- just curious.
 
Hang tight. I'm asking around.
@xpqz Which OS and version?
 
9:33 AM
MacOS Catalina 10.15.3
 
@xpqz OK, we've already logged that as issue 17790, as others have hit it before. However, we need core dump files to analyse what went wrong.
 
Ok, should I be able to find a core dump somewhere?
 
I'm just waiting to hear that.
@xpqz I think core dumps have to be enabled before the crash:
sudo sysctl -w kern.coredump=1
sudo launchctl limit core unlimited
sudo ulimit -c unlimited
sudo chmod 1777 /cores
 
9:49 AM
Ok, I can do that -- I've had this crash three or four times or so.
Thank you for checking.
 
You're welcome. Just doing my job :-)
 
 
1 hour later…
10:54 AM
I have some VB code that I want to convert into APL. Doing it as a tradfn is not going to be difficult, but what are some of the things I should watch for in converting to "play for efficiency"?
 
11:13 AM
@JeffZeitlin Loops.
 
@JeffZeitlin If you're able / willing to share I'd be very interested to take a look at your before / after (and maybe have a go at translating myself). You'll get a surprising amount of milage by considering what you're trying to do and coming up with the APL solution independent of your VBA code. Replacing conditional statements (if/else) with boolean logic is a pretty standard APLey thing.
 
@RichardPark - I can give you a description of what I'm trying to accomplish; the actual code is on another box and not yet transferable (email, not file, yet).
Consider a grid of close-packed hexagons, stacked in columns rather than rows, with alternating columns offset by half-a-hex.
 
@JeffZeitlin I think I'm with you - flat faces touch horizontally
 
Do you mean that the sides that touch are horizontal? If so, correct. If you mean that the hexes line up horizontally, no; they line up vertically.
Now, number them using rectangular coordinates - CCRR, left to right for cols, top to bottom for rows.
Given the coordinates of two hexes, how many 1-hex steps does it take to get from the starting hex to the ending hex?
 
@JeffZeitlin That sounds like a good code golf challenge tbh
@JeffZeitlin And yes the first one I am imagining
@Adám not quite as the hexes must be close-packed
 
11:22 AM
@RichardPark Right, and markdown was messing me up anyway.,
 
Right right.
 
@JeffZeitlin If the rows are offset by 1/2 steps how are they labelled? I think I get it
 
@RichardPark - I'm doing this for a column in my magazine, so I don't need the code to be golfed into incomprehensibility :), but after I have a good, clear, working function, I'll certainly give some thought to offering it as a CGCC puzzle.
@RichardPark - On that grid, the topmost hex of each column is CC01, and it increases going down the grid.
The leftmost column is 01RR
 
@JeffZeitlin And adjacent hexes are 1 step apart e.g. 1 ≡ 0101(your_soln)0102
 
11:33 AM
@RichardPark - Correct.
 
@JeffZeitlin I was thinking if you could map to Euclidean space and do straight lines, but there are degenerate cases like 0102{}0302 - two paths of minimum length
 
@RichardPark - Well, that's not inherently a problem; I don't need to know every intermediate step - just the number of steps in that minimum length.
And there will almost always be multiple minimum-length paths; I think this becomes a hexagonal variant of taxicab geometry.
 
@JeffZeitlin Oh cool hadn't heard of taxicab geometry but makes sense
 
If the grid was a standard rectangular grid, the answer would be trivial - |∆y| + |∆x|. The half-hex offset complicates things, though.
 
@JeffZeitlin And the valid moves from one hex to an adjacent one depends if the hex is in an odd or even numbered column or row i think?
 
11:45 AM
@RichardPark - I'm not quite getting what you're asking. If the hexes are touching sides, you can move between them as one step. There are six possible moves from every hex.
(except the ones on the edges)
 
Yes but I'm trying to represent the moves in terms of the coordinates
e.g. (,∘.,⍨¯1 0 1)/⍨,(3 3⍴⍳9)∊1 2 4 6 7 8 are valid moved from 0302
but not all valid from 0202
 
Ah. Yes, odd/even does make a difference.
 
Luckily the difference is just odd and even columns I think
 
@RichardPark Separate messages for code.
 
@Adám Is the bot working?
 
11:51 AM
No; COVID-19.
 
⊢oddcol←(,∘.,⍨¯1 0 1)/⍨,(3 3⍴⍳9)∊1 2 4 6 7 8
⊢evencol←(,∘.,⍨1 0 ¯1)/⍨,(3 3⍴⍳9)∊1 2 4 6 7 8
@Adám separate per line?
 
@RichardPark Either Ctrl+K to monospace (no backticks then) or one per line
 
@Adám Hooray
 
12:02 PM
OK, time to split my attention; I'm now working from home like the rest of the world. What a pain!
 
12:17 PM
Given a vector k and an int v, if I want to turn this into a matrix where the first row is k and the second row is v, repeated, how can I achieve that? If I do ↑k v it fills the row with zeros -- is there a way of specifying the "fill element"?
 
@xpqz Any of the dyadic functions ,[0.5] or ⍉,⍤0 or ⍉,∘⍪
 
What does ,[0.5] mean?
Certainly does what I wanted.
 
> Concatenate along a new axis inserted just before axis 1
@xpqz Btw, did you try to APLcart it?
 
That's a handy resource.
Is that a dyalog thing?
 
@xpqz No, my personal pet project.
 
12:56 PM
@Adám - and a very useful one. The only thing I could wish it had was decompositions/explanations for the idioms.
 
@JeffZeitlin That problem actually has a very simple answer. I can imagine a solution in under 30 chars of APL, even with a rigid input format.
 
@JeffZeitlin Can you elaborate?
 
Explanation coming in 12 hours :)
 
@Adám - The kind of decomposition/analysis/explanation that I post on my APL answers to CGCC questions.
More than once, I've encountered answers there that work, but I can't figure out why they work.
 
@JeffZeitlin OK, that'd definitely not fit in the table, so it'd need some kind of pop-up or link out. Maybe add a feature request issue?
 
1:03 PM
@Adám - I'll do that when I manage to dig up my GitHub credentials...
 
 
4 hours later…
RGS
4:58 PM
@Adám Are you talking about APL Cart?? really cool!
 
@RGS Yes. Thank you.
 
RGS
also, what will the next cultivation be about and what should I study beforehand?
 
Funny you should ask. I was just thinking about how to best announce a schedule change. I have a holiday clashing. Oh, and we've not decided on a subject yet. Where are you holding with your self-studies. Need help?
 
RGS
@Adám my APL studies are going slowly, I have too much on my plate right now (and always!) so having the APLC deadline helps me push forward : )
I plan on trying to implement a couple of random functions in APL just to explore
 
@RGS APLC(ultivation)? There's also the APLC(ompetition) coming up.
 
RGS
5:04 PM
but then again, the APLC would direct me a bit better, no?
@Adám woops I meant Cultivation
did not know about the competition!
OMG
oh wow, the competition looks really nice!
 
@RGS You're Portuguese?
 
RGS
yes
and living here
Can I compete online? I don't understand if I have to go somewhere to compete in either of the phases
 
@RGS Where about? N/S/E/W I don't know much of Portuguese geography. My family left over 400 years ago…
@RGS It is all online. Once the competition opens, there's a dedicated website for it.
 
RGS
I live in the heart of Lisbon, Pt's capital prnt.sc/rqb1kc
Is anyone from this chatroom/community going to participate?
(I just realized it would make more sense to share a GMaps link; though it doesn't point to my house exactly, for privacy reasons :upsidedownface: )
 
@RGS If COVID-19 doesn't prevent it, RichardPark and I will certainly go (ass will most Dyalog employees), and with a high probability, PaulMansour too.
@RGS Look at the previous Phase I problems. They are meant to be simple and well geared for APL solutions.
 
RGS
5:14 PM
@Adám go = participate? Or go = show up at Dyalog'20?
@Adám will do, do you have a rough idea of when the Phase I will start? Maybe I'll train for this!
 
@RGS Show up (and present) at Dyalog '20.
@RGS My best guess is that the competition will start within a month, but things are a bit up in the air right now.
 
RGS
@Adám of course, that is understandable. But I have 11 years worth of APL Competitions to train with. I browsed through some of the recent winners and I found a 3rd place that was definitely Portuguese (ok, maybe Brazilian) and a 2nd place by a 12yo!
The point with "but I have ... to train with" is that I have a lot to play around with. Do I have your permission to ping you?
 
@RGS Absolutely, as much as you need. You'll note a few of the winners learned APL here.
 
RGS
"We encourage students at all levels of education [...]" so college students are also accepted, right?
 
Yes, even those studying to become doctors at a University.
 
RGS
5:22 PM
@Adám really? Like who? I don't know many people here so I can't really map the nicknames here to the RL winners. In fact, I only (sort of) know you and Bubbler
 
@RGS If Dyalog '20 happens, I'll stay over in Lisbon for the weekend before it begins :-)
 
RGS
@Adám That is one really good decision! Have you ever been here?
I hear it is a really nice place for tourists to visit. When there is no virus going around.
 
@RGS Oh, it looks like past Phase I winners are not listed. Torsten Grust and Zachary Taylor were here, and Torsten still comes around. If I recall correctly, at least dzaima, Uriel, and Erik the Outgolfer have won Phase I prizes.
@RGS No. As far as I know, nobody from my family ever returned, even for a visit. My father's mother's mother was born Henriques.
 
RGS
Hm, typing ]box gives that "box is off" and I wanted to turn it on. There must be a command to works for similar settings like this, no?
Just nailed it! ]Box 'ON' did the trick
@Adám did your family leave when we started pursuing jewish people..? I'm fairly certain that at some point in our history we had that unfortunate moment...
 
@RGS Btw, there's a toolbar button you can click to toggle it on/off:
@RGS Yes, they had fled from Spain in 1492, then fled onwards to Holland in 1609 and arrived to the (then) Danish city of Altona around 1650. They were safe in Denmark until 1943…
 
RGS
5:44 PM
:/
I do not know if you know this, but there is an interesting traditional dish that was created during those times. If I recall correctly, and if my quick google search is correct, Jewish people cannot eat pork, right? At least during some periods of time every year?
 
@RGS Pork is forbidden for Jews all year round. What dish?
 
RGS
Ok, so I got it right
Some Jews would do this ingenious thing: they would take a pig's intestine, clean it, and fill it with meat from birds. Then they would hang those things to let them dry
To make a type of meal that we call enchido in European Portuguese
Then, people who were looking for Jews would arrive at those homes, find the "enchido" (which is typically pork meat) and then leave... when in fact it was the said intestine filled with other meats.
And nowadays we eat that a lot, here in Portugal.
 
That's interesting. I didn't know that. Thank you for sharing.
 
RGS
I hope this doesn't offend you, I just remember learning this in History class and I found it fascinating at the time. And I still do, that is why I remember it after all this time!
 
No, not at all. I don't get offended when it comes to religion. And this tidbit of history is interesting too. In Denmark, the Jews left their mark on food culture in the form of poppy seeds being called by a Yiddish name.
 
RGS
5:58 PM
That is funny! I am assuming the "birkes" were the small seeds on top of what looked like some sort of bread or pastry in the danish link you sent me : )
Are you Danish?
 
I'm a Danish citizen, born in Denmark. But by now, I'm pretty much an international person, having lived a total of about 13 years in Denmark, 6 years in each of USA and Sweden, 5 in Canada, and now 4 in the UK. :-)
@RGS You can see what the site looks like (and get instant feedback for your solutions to the Phase I problems) at dyalogaplcompetition.com
 
RGS
Very international indeed!
For the duration of this conversation I have been tackling the chunky monkey problem :)
 
@RGS Let me know if you need any hints.
 
RGS
Thanks :D I think I just came up with a really nice solution
(the problem is very easy so I am not surprised)
I am just looking for the correct glyphs
 
For this year's competition I've sorted the problems by difficulty based on actual feedback from beta testers.
 
RGS
6:12 PM
oh ok
So what does that translate into?
 
What do you mean?
 
RGS
Well, you made a statement... What was your intention when typing such a statement?
Did solvers in previous years disagree with the difficulty ratings you defined?
 
It was just to confirm that it made sense that you found Chunky Monkey, which was the first problem last year, very easy, as I think we roughly sorted the problems by ascending difficulty. However, it wasn't "scientifically" done, only estimated.
 
RGS
ahhh, when you wrote "this" I thought 2020
and Chunky Monkey is from last year.
My solution is as follows:
 
@RGS Right, I just finished polishing the problems for 2020…
 
RGS
6:19 PM
 chunky_monkey←{
     len←⍴⍵
     mask←0=⍺|(⍳len)-1
     mask⊂⍵
 }
If I understood correctly, the enclose ⊂ makes "groups" starting when there is a 1 on the left argument?
 
@RGS Right. (Although it is usually called "partitioned enclose" in that case.)
 
@RGS - Why not just fold it all together? (0=⍺|(⍳⍴⍵)-1)⊂⍵
 
RGS
@JeffZeitlin because I was going for a different approach and was using ⍴ ⍵ a lot and it looked cleaner with a name
 
@JeffZeitlin Also, RGS's code is much easier to understand. The variable names document the code, obviating the need for comments.
 
@Adám - There is that.
 
RGS
6:24 PM
Passed all basic tests – for extra points, consider cases like (4) as left argument and (5) as right argument which should give (,⊂,5)
I do not understand that statement
 
@RGS Try running 4 chunky_monkey 5
 
RGS
but my function does fail to run as 4 chunky_monkey 5
 
@RGS Right, that's an edge case it doesn't pass.
 
RGS
yup, ⍴ 5 doesn't give 1
well, I can enclose everything once in the beginning and then "flatten"
 
@RGS That's because looks for the shape, which for a scalar is the empty vector. You could "ravel" the argument first to normalise it, or simply use instead of .
 
RGS
6:28 PM
≢ looks cleaner
I like that better than doing the "ravel" and then ⍴
Alright, I have to go for now! This is going to be fun hehe
Thanks for your help @Adám and @JeffZeitlin now at the end.
 
You're very welcome. Take care!
 
RGS
o/
 
Is it a sign that I'
 
@JeffZeitlin what?
 
ve been spending too much time in CGCC that I saw that one-liner almost instantly when RGS posted the dfn?
 
6:33 PM
@JeffZeitlin No, you've not spent enough time here, or you would have said ⍵⊂⍨0=⍺|1-⍨⍳⍴⍵
 
… and then advised switching to ⎕IO←0 for ⍵⊂⍨0=⍺|⍳⍴⍵
… and then gone tacit with ⊢⊂⍨0=|∘⍳∘⍴
 
Yeah, I still don't think in tacits.
 
RGS
7:13 PM
@Adám Is it standard to switch between ⎕IO←0 and ⎕IO←1 according to your situation?
 
7:25 PM
@RGS in code-golf, yeah. In practice, you really should stick to one and use it throughout
 
RGS
8:16 PM
@dzaima thanks for your answer
do you mean "throughout my APL life"? Or within one project?
I meant to ask if there is one standard that most APLers use
 
In any one project. But most APLers prefer one and stick with it, maybe only occasionally switching to the other (usually ⎕IO←1ers switching to ⎕IO←0) if very called for in a particular function.
Most dialects have ⎕IO←1 by default, while a few are ⎕IO←0 only.
 
 
1 hour later…
RGS
9:21 PM
Hey @Adám I was trying to go tacit
In a short part
 
@RGS In what?
 
RGS
basically I have a vector of indices that I want to use to pull values from a second vector
and it feels like I want to use ⊃
 
@RGS You can either use indices⊃¨⊂data or (⊂indices)⌷data
 
RGS
this works: {⍵⊃target}¨indices
hm ok
I'll have to digest that
 
It is actually one of the things I dislike Dyalog APL. I think there should be a function that dos exactly that, take indices and pick those values. I call it "Select" or "Sane indexing".
 
RGS
9:25 PM
Both names are good :p I like sane indexing
But following my mapping approach, isn't there a way to write the function that I map in a tacit way?
 
@RGS Yours is basically the same as my "chipmunk" ⊃¨⊂. An alternative ways to write it (but which requires the target array explicitly) is ⊃∘target¨indices.
@RGS Critics of my proposal say that you can "simply" use ⌷⍤0 99 but I think that's too obscure for such a fundamental operation.
 
RGS
10:07 PM
@Adám I don't understand what that ⌷⍤0 99
is that supposed to be for the sane indexing?
 
@RGS My point exactly :-)
 
RGS
Oh, it started some sort of interactive thing?
Because I typed it into my dyalog interpreter
 
@RGS Yes. Try indices(⌷⍤0 99)target
 
RGS
and it did nothing
ugh
I don't like it
 
@RGS Did you maybe use (Quad) instead of (Squad) ?
 
RGS
10:09 PM
@Adám yes I did
 
@RGS Me neither. RichardPark came up with an even better one: ⌷⍨∘⊃⍨⍤0 99 which I'd love to see given a glyph, e.g.
 
RGS
and that one is still for sane indexing?
Why are 0 and 99 showing up there?
 
@RGS 99≈∞ for sufficiently small values of ∞ ;-)
@RGS Yes, but a more versatile one.
 
RGS
oh I see, so if I wanted bigger values of ∞ I have to increase that 99?
Is the 99 the max number of indices I could get? or the max length of the data? Something like that?
 
Sort of. The thing is that 99 is already far beyond its domain (in Dyalog APL at least), so there's no difference.
 
RGS
10:12 PM
hm ok
 
@RGS It is the max number of dimensions in the data, which for Dyalog APL currently is 15.
 
RGS
oh ok, so I am not limited in the size of the data
 
No no. That's only limited by how much RAM you allow APL to use.
 
RGS
@Adám in that case I am far more comfortable with "99≈∞ for sufficiently small values of ∞ ;-)"
 
@RGS The problem is that in its pure form, can only handle a single index left argument and the data array on the right. So ⍤0 99 pairs each index on the left (subarrays of rank 0, i.e. scalars) up with the entire array on the right (subarrays of 99 or less).
 
RGS
10:16 PM
ohhhhhhh I see!
I think I kind of understand
But there is something that doesn't make much sense in the chipmunk.
 
@RGS If you want more about , check out lessons 32 and 33.
 
RGS
indices ⊃¨⊂ data is how you typed it
@Adám (will do!)
 
@RGS Same problem as with ; it can only handle one index at a time as left argument.
We could also use ⊃⍤0 99 or indeed ⌷¨⊂ but the difference is that these, like the chipmunk don't work for higher-rank arrays.
 
RGS
sure, but my problem is: I read the pop-ups on each glyph separately
and then I don't understand how they interact together
because ⊂ data encloses my data
 
Very good point. Those are mainly as hints and to get you to look for more info. They are not so great as a general intro course.
 
RGS
10:22 PM
but then the ¨ will have me mapping over that, right? so it feels like I am just undoing what I just did with ⊂
 
In a sense, you are. The deal here is that ¨ applies APL's scalar extension rules also seen in things like 3 4 5+1. But this requires one argument to be a scalar. makes that argument into a scalar.
 
RGS
I don't follow.
 
You know how 3 4 5+1 works, right?
 
RGS
I know the result
and I interpret it as mapping (+1) over the left argument
 
Right, but why and how did APL do that mapping?
 
RGS
10:28 PM
@Adám maybe + expects two scalars and seeing that the LHS is a vector, it concludes that a vector contains a bunch of scalars
 
@RGS It is actually (conceptually) the other way around. + expects a right hand vector to match the left hand vector, but it only finds a scalar, so it extends the scalar to match the shape of the vector.
 
RGS
@Adám (I don't know if you are asking that because maybe you suspect I read something about APL..? I barely read anything!)
AH
I get it!
 
:-D
 
RGS
correct me if I'm wrong:
indices ⊃¨⊂ data, first we get (length of indices) copies of data and then we get the indices in there
 
@RGS … and then, for each index and its corresponding copy of the data, we pick out an element from that data at that index.
Obviously, this would be an extremely wasteful algorithm, but Dyalog recognises this snippet and skips the intermediary steps.
 
RGS
10:33 PM
But now I'm confused again. The part about "extending" the data made sense
So in a way, there is a point in time when we have something like (data data data ... data)
 
Yes.
You can even try it: 18 7 19⊃¨⎕A ⎕A ⎕A and then 18 7 19⊃¨⊂⎕A
 
RGS
a vector of vectors, or a matrix, right? But then the LHS is a vector, so isn't the ¨ taking the LHS vector and still trying to perform indices ⊃ data for each data on the RHS?
or does the ¨ go over both LHS and RHS vectors at the same time?
 
@RGS ¨ is symmetric on the arguments. It maps 1:1 so to say.
 
RGS
Alright, so that was the missing piece
 
Sorry, I should have clarified that.
 
RGS
10:37 PM
Don't worry, certainly not your fault
I like the chipmunk
This means I am almost done with prob 2
 
@RGS It is cute, until you try using it to select rows from a matrix, like with 1 3 2⊃¨⊂4 3⍴⎕A (hint: it will fail)
 
RGS
I have to use one of the more robust options with the 0 99?
 
@RGS Either that or (⊂indices)⌷data or equivalently data⌷⍨⊂indices or similar.
 
RGS
Alright, I don't think I'll be able to memorize it now.
But hopefully when I need to index a matrix to get rows I'll be able to come up with one of those
 
@RGS You can always APLcart it.
 
RGS
10:42 PM
@Adám that works because now I know how you call it
 
@RGS note: vector of vectors ≠ matrix
 
RGS
At this early stage of my APL journey I struggle to type the right things
@dzaima :'( Don't make me sad, I don't want to go to bed and cry
 
Oh since you're here, @dzaima — did you not add as Depth?
 
@Adám i did
 
RGS
@Adám I'm just telling you what happened to me; the other day I was code-golfing with APL and needed to know how to convert letters into unicode codepoints. Clearly I didn't type in the correct things because I took an awful long time to find ⎕UCS
 
10:43 PM
@dzaima Just not updated on TIO?
 
@Adám afaik Dennis is still not around much, and the feature is pretty recent
 
@RGS I'm very interested in what you typed, so I can add those things. Care to share?
 
RGS
@Adám I can't reproduce exactly what I typed in, but now I was trying it again and I noticed ⎕UCS was there for everything I typed... I just didn't type enough OR I mistyped, because I thought the name was "codepoint" and not "code point"
 
@Adám i haven't requested a TIO pull request since August :p
 
@RGS Thanks, added.
 
RGS
10:50 PM
@Adám wow thanks! How did you come up with APL Cart?
 
@RGS Explained right at the beginning here.
 
RGS
"What is that icon"
Well, that icon is clearly a shopping cart
That I understood
Your rationale makes a lot of sense
I just wonder why there aren't more "APL Carts" in/for other languages
 
@RGS You're not alone. Maybe because the format isn't so suitable for verbose (read: all currently popular) languages. I've made it MIT so others can use it freely. In fact, I know of one company that wanted to use it internally for their internal APIs. (Maybe they use it — I wouldn't know…)
 
RGS
"the format isn't so suitable for verbose [...] languages", this is it probably.
But for code-golf languages it would be doable, if someone had plenty of free time
 
11:05 PM
True, but many of the tasks are not common in code golf, but are more real-world'y. Not many people use golfing langs for real world problems. Certainly not for code that others will ever see.
 
@Adám Other languages just aren't nearly as idiom-oriented - there either just isn't a "best" version of any code or the best an acceptable version is immediately obvious to any competent user
whereas in APL using an ¨ where you could get away with not can slow a program down many times
 
@RGS Because for other languages, we always have StackOverflow for How-To questions. And we don't even search on SO, we just google it, and google gives us a ton of SO answers.
 
RGS
@Bubbler True
 
@Bubbler And since that doesn't work for APL, I convinced DuckDuckGo to add the !aplcart bang.
 
RGS
@Adám I wrote this function to get a letter grade from a vector of numeric grades:
making_the_grade←{
     grades←⌽'ABCDF'
     marks←65 70 80 90 101
     (1+marks⍸⍵)⊃¨⊂grades
 }
 
11:14 PM
@RGS Paste the code, Ctrl-K, and hit Enter.
 
RGS
@Bubbler Yes, thanks.
 
I think it should work with 101 simply deleted.
 
RGS
Yes it did
I don't know why I don't think first...
 
@RGS In this case, I'd write grades[1+marks⍸⍵]
 
RGS
@Adám why?
 
11:16 PM
@RGS Because I find it more readable, and I dislike parentheses.
 
RGS
Alright; I didn't even know the [] notation would do indexing
 
If I had as sane indexing, I'd write grades⊇⍨1+marks⍸⍵ though.
 
I tend to use bracket indexing too whenever sensible.
 
RGS
And using the ⍨, how can I use the chipmunk?
 
@RGS Also, instead of 1+, you can just put a 0 at the beginning of grades
 
RGS
11:18 PM
I tried something like grades (⊃¨⊂)⍨ bla bla but it bit me
 
I guess there are things you can learn by golfing, but there are also things you can learn by not golfing.
 
@RGS It won't help you with the chipmunk. Technically, you could write grades⊃¨∘⊂⍨1+marks⍸⍵ but that's pretty ugly, and will run slow too.
 
RGS
@Adám Alright, thanks.
It doesn't look clean, I agree.
Even though to me, most APL doesn't look clean yet! I hope this feeling goes away as I learn more.
I have to go now, though. So I'll keep practising tomorrow.
Thanks for your help!
 
So far, I like your APL coding style. Good variable names and short statements. Keep it up.
 
RGS
Thanks o/ I like your teaching style :D
 
11:23 PM
@Adám I'm also looking forward to the competition, though I'm not a student anymore (I gave up being a student 3 years ago...)
 
11:55 PM
@JeffZeitlin APL two liner (turned out slightly longer, but short enough I guess):
 

« first day (1161 days earlier)      last day (1476 days later) »