« first day (1250 days earlier)      last day (1403 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
So I think we were up to looking at what the exact nature of / is (remember +/ being sum?)
 
@dzaima I just get 'Serving HTTP on 0.0.0.0 port (insert number here)' regardless...
 
@Adám yep
 
I suppose I'm capable of trouble-shooting it, I'd just expected MiServer should work...
 
@AviF.S. you should be getting things like 127.0.0.1 - - [28/Jun/2020 20:59:13] "GET / HTTP/1.1" 200 -
 
And I was hesitant to change gears
 
6:01 PM
oh @Adám what was the link to the apl symbol bar thing?
 
Is: '/Users/avi/Downloads/aplcart-AviFS-tsv' the right format? I know last time the issues were with weird file formats demanded by APL, but I don't remember the alternatives...
 
One was without quotes, but we know it should have quotes. But there was one other variation that sometimes did the trick...
 
@AviF.S. That's the name of the directory?
 
@Adám Do you remember? You said you were adding it somewhere ^
@Adám Correct
 
6:03 PM
@AviF.S. Right, then MiServer's Start '/Users/avi/Downloads/aplcart-AviFS-tsv' should "just work"
 
@AviF.S. (only time you would ever not need quotes is with one of those )abc/]abc commands)
 
@dzaima Ah, thanks!
 
@matt So / is not just notation, but actually a higher-order function. APLers call such higher-order functions operators. This one (as you know) takes a function on its left and reduces the array on the right with that function.
 
@Adám That's what I have, no?
 
ok so here is one I couldn't find on APL Cart (only the old form of slicing comes up) : what is the slicing form of ⌷ , eg equivalent to x[;5] ?
 
6:04 PM
@AviF.S. does that give any errors?
 
@Adám ok
makes sense
 
@ab5tract There are a couple of solutions, but you might want click the (?) for the full docs.
 
@dzaima Just takes ages to load and eventually says 'Failed to Open Page'
 
@matt Now there are more such operators. \ is just like / but returns all the intermediate values:
      +/3 1 4 1 5
14
      +\3 1 4 1 5
3 4 8 9 14
 
@Adám I usually do when the explanation has one. the explanation for slicing does not have a '?' link
 
6:05 PM
@AviF.S. does Dyalog APL give any errors?
 
@Adám what do you mean by "intermediate"?
 
@ab5tract Ah, but you already decided to use so no you should look at its docs.
 
I think I understand but not sure
 
And it seems non-intuitive to have details about slicing with ⌷ inside of help details for slicing with brackets?
@Adám OK :)
 
@dzaima No, it's perfectly happy!
 
6:07 PM
@matt +\ the cumulative sum. We start with the leftmost, then the first two, then the first three, etc.
 
@AviF.S. so that, plus SimpleHTTPServer acting the same way, i guess either the browser or macos is preventing the access to local servers in some way
 
@Adám just what I thought.
 
There are a bunch of operators, some of which can take two functions (one on each side), and of course you can define your own.
 
alright
 
In fact, operators can also take arrays as operands, not just functions.
 
6:09 PM
hm ok
 
E.g. the "power operator" takes a function on the left and a number on the right, and applies the function that many times:
      1(+⍣3)10
13
 
wait I thought * was the power operator?
 
That's the power function.
 
OHH right
 
APL distinguishes between the two confused TMN usages f²(x) and x².
 
6:11 PM
nods
 
@Adám May I suggest adding slice to the search tags for "Index Y using indices Iv along axes ax"
 
@ab5tract Yes. I forgot there was such an entry. (Hard to remember all two and a half thousand by heart.)
 
one of my biggest stumbling blocks with APLCart is a personal problem, I have trouble recognizing that the solution description describes what I am searching for
 
@matt Note also the parenthesis. This is because, as you've seen, APL lists (we like to call them vectors) are formed by simple juxtaposition (1 2 3) so here we have to separate 3 and 10 so that the operator can "grab" 3 and leave 10 as the proper argument.
 
just need to try more/all the things :)
 
6:13 PM
@Adám right
 
@ab5tract It is hard to describe things in a general enough manner and still have it be recognised. Sometimes I duplicate entries because of that, so I can have two descriptions.
@matt A really useful operator (but one that should be used with care) is ¨ which takes a function on its left only (we call that a monadic operator) and applies the function to each element of the argument or pairs up the elements of the arguments.
E.g. , is the concatenation function:
 
@Adám example?
 
      'abc','XYZ'
abcXYZ
      'abc',¨'XYZ'
┌──┬──┬──┐
│aX│bY│cZ│
└──┴──┴──┘
      'a',¨'XYZ'
┌──┬──┬──┐
│aX│aY│aZ│
└──┴──┴──┘
 
intereting. why should it "be used with care"?
 
      'abc',¨'X'
┌──┬──┬──┐
│aX│bX│cX│
└──┴──┴──┘
 
6:16 PM
ah can't type today
 
@matt Because if you want APL code with good performance, you need to use APL's array comprehension, rather than explicitly looping over arrays.
 
because everyone knows loping over arrays is really bad
ah LOOPING
what's wrong with me lol
 
Notice that ¨ adds one "level" of the auto-mapping behaviour you saw with the arithmetic functions.
 
??
 
      1 2 3+10 20 30
11 22 33
      1+10 20 30
11 21 31
      1 2 3+10
11 12 13
Compare this to the letter-concatenation above.
 
6:19 PM
ah ok
 
The simple arithmetic functions (we call them "scalar functions" because they act on individual scalars, elements) don't usually need ¨.
 
ok
 
There's one special operator that is very useful. We call it outer product, and it is spelled ∘.f where f is any function. It simply applies f between all combinations of arguments (rather than pairing them up), and places the results in an appropriate table. For example, a multiplication table:
      (⍳4)∘.×⍳5
1 2  3  4  5
2 4  6  8 10
3 6  9 12 15
4 8 12 16 20
@matt You understand why we need the parenthesis on the left, but not on the right here?
 
yep
but wow that's cool
 
Challenge: Create a table of the Excel cell names in the first 3 rows and 4 columns of a spreadsheet.
 
6:26 PM
... what
 
You know how the cells in Excel are named?
┌──┬──┬──┬──┐
│A1│B1│C1│D1│
├──┼──┼──┼──┤
│A2│B2│C2│D2│
├──┼──┼──┼──┤
│A3│B3│C3│D3│
└──┴──┴──┴──┘
The challenge here is to generate this exact table.
 
yes just how do you increment letters?
 
No need to increment, you can hardcode '123' and 'ABCD'.
 
oh duh
'123'∘.×'ABCD' ?
 
No, you can't multiply letters. You will need the concatenation function ,
 
6:29 PM
how did I not think of that
note to self: you can't multiply letters
 
You'll also need also a user-defined function. (Remember? Braces plus and for the left and right arguments.)
 
so I assume '123'∘.,'ABCD' doesn't work?
 
@matt Did you try it?
 
surprised oh! it worked
 
@matt No, look carefully.
 
6:33 PM
oh uh
 
This is why you need that "dfn" (pronounced "dee-fun"; curly-brace function)
 
hmmm
 
Do you see what the problem is?
 
yep they're backwards
 
Good. So if you are to write a function X{…}Y that concatenates X and Y, but swapped, how might that look?
 
6:36 PM
umm
 
How about if it had to just concatenate them in their current positions, i.e. a user-defined function equivalent to ,? (Hint: you are allowed to use ,)
 
slow Picard facepalm
 
Solved it?
 
nnnnope
 
OK, so let's recap. Remember how the dfns (functions using braces) work ?
 
6:44 PM
kind of, {⍺...⍵}
 
OK, so if the ... is supposed to concatenate and ?
 
{⍺,⍵}
 
Very good. An how might we write that function to concatenate them "in reverse"?
 
another Picard facepalm {⍵,⍺}
 
Right, now use that to generate the cell names!
 
6:48 PM
uh let's see how do I call this?
used to doing stuff in JS
 
Look back in the chat log.
 
... jeopardy music
don't even remember when that was
 
28 mins ago, by Adám
      (⍳4)∘.×⍳5
1 2  3  4  5
2 4  6  8 10
3 6  9 12 15
4 8 12 16 20
Remember that you can always use your own function instead of a built-in one. All functions are created equal.
 
no I meant how do I call a dfn?
 
Exactly like you do a built-in one. Put it between (or in front of) arguments.
 
6:55 PM
well uh I got this
      '123'{⍵∘.,⍺}'ABCD'

┌──┬──┬──┐
│A1│A2│A3│
├──┼──┼──┤
│B1│B2│B3│
├──┼──┼──┤
│C1│C2│C3│
├──┼──┼──┤
│D1│D2│D3│
└──┴──┴──┘
if that means anything
 
@matt Uh, no that's not right. We're looking for
┌──┬──┬──┬──┐
│A1│B1│C1│D1│
├──┼──┼──┼──┤
│A2│B2│C2│D2│
├──┼──┼──┼──┤
│A3│B3│C3│D3│
└──┴──┴──┴──┘
 
oh great it's sideways
 
What happened here was that you "swapped" the argument to ∘., instead of just swapping the arguments to ,
You only want to replace the , in ∘., not the whole thing.
 
if Picard had three hands
[confusion]
 
Hint: Parentheses
 
7:01 PM
@AviF.S. Nope.
 
@Adám Oh?
It also works with parentheses, then. Unless I misunderstood...
 
uh who's right?
 
@AviF.S. Of course, you can (almost) always add parentheses in APL without changing meaning.
@matt Let's see what your solution looks like.
 
@Adám I'm terribly confused...
 
don't have one (yet)
@AviF.S. as am I
 
7:03 PM
@matt Do you want some hints.
 
YES PLEASE ANYTHING
 
@matt +←1
@matt Whoops! No, sorry to confuse!
 
@AviF.S. +←9999
 
That's a '+1'! AKA, I wholeheartedly agree with you
@matt :D
 
@matt Well, you've got '123'∘.,'ABCD' but , isn't quite right. You want a related function that is exactly like , but uses its arguments in reverse.
 
7:05 PM
@Adám so...?
 
You've also got {⍵,⍺} which is exactly like {⍺,⍵} but in reverse, and {⍺,⍵} is equivalent to ,
 
if Picard had a clone - oh wait he did until Data destroyed the warbird with a disruptor beam
hmm
this apple is a bit too crisp
 
Don't be afraid to experiment on TryAPL.
 
@Adám Can I try and give another hint?
 
Sure.
 
7:12 PM
be right back
 
@matt Hint: Remember you can use your own functions anywhere that a regular function would be
 
21 mins ago, by Adám
Remember that you can always use your own function instead of a built-in one. All functions are created equal.
 
ok I'm back
without a solution
 
You have all the (two) pieces you need. Let's try to look that them separately.
 
@matt Was my hint not helpful?
By own functions, I mean any function you define yourself
 
7:19 PM
@matt How do you get a normal concatenation table for '123' and 'ABCD'?
 
@AviF.S. see Adám's quote
 
So wherever you use a primitive, you can stick in a {...} instead
@matt That's why I said 'Remember' :)
But maybe you already did
 
@AviF.S. :)
 
@matt That's right. (No need for screenshots, you can copy the transcript from TryAPL as plain-text.)
 
did I really want to indent everything by 4 spaces? :)
 
7:24 PM
@matt Press Ctrl+K or click the button to do so automatically.
@matt Step 2: a function that is like , but in reverse?
 
so my dfn {⍵,⍺} ?
 
Correct.
Step 3: Same as your normal concatenation table, but using this dfn instead of ,
 
      '123'∘.{⍵,⍺}'ABCD'

┌──┬──┬──┬──┐
│A1│B1│C1│D1│
├──┼──┼──┼──┤
│A2│B2│C2│D2│
├──┼──┼──┼──┤
│A3│B3│C3│D3│
└──┴──┴──┴──┘
 
Bravo!
 
@Adám If it's ever longer, than you want to put here. @dzaima made a great APL (and BQN) paste bin with syntax highlighting and some basic customization!
@matt Wahoo!!
 
7:27 PM
I take it you're not awarding me a lollipop?
 
+←999999999
 
@AviF.S. Thanks. I'm aware of that.
@AviF.S. Heh, how about +⍣=←1 ?
 
@matt Just an APLle
 
@matt Half an APL pi: ○÷2
 
uh @AviF.S. "apple" is not the same as "aplle"
 
7:29 PM
@matt Can your brain handle one more little thing?
 
i guess so
 
@Adám Of course you are. I'm so sorry; what kind of narcissistic prick are you taking me for? 😂 That was for @matt, but responding to your message re: alternatives
@Adám True, even better! Although I did the stream of 9s because @matt did that to me, so insider-ish-thing-ish, haha
 
@AviF.S. (You didn't reply, though.)
 
@matt Facepalm
 
@matt There's actually an operator which takes a function on its left (like /) and "swaps" the arguments:
      'X',⍨'Y'
YX
      1-⍨10
9
 
7:31 PM
@AviF.S. I'm up to 4 already (facepalms, that is, using some fancy Trek references)
@Adám and you didn't tell me?!
 
@Adám What an idiot! I sent the message but then I lost wifi and it didn't go through. So before refreshing the page, I copied the message so I wouldn't lose it
Then I pasted it without looking at it. That's quite amusing!
 
@matt I wanted you to exercise writing your own function. Now try using . You'll see that it isn't even that simple using
 
yeah I still got it sideways hm
 
Note to self: I'm noticing more and more each second how terrible texting is for conveying humor, and the dangers of self-deprecating humor over text. For instance, there's no reason 'What an idiot!' shouldn't be read as being targeted to you. Especially since it immediately succeeds an '@Adam' tag. This just gets worse and worse...
I'm going to end up seriously offending someone one of these days ⍨
 
@AviF.S. +←999999999999999999999999
[error: too many 9s]
 
7:34 PM
@matt Hahahaha, you've beat me yet again
No matter what I try, you get bigger
@matt +←{1 + whatever-@matt-just-wrote}
Screw it!
+←∞
 
+←{1 + whatever-@AviF.S.-just-wrote}
 
@matt This is just amazing, lmao!!
 
also infinity isnt a number so MWAHAHA
 
@matt Darn it!
 
@matt Yes. I assume you wrote ∘.,⍨ but being that these operators in general take what's on their left as operand. sees ∘., as it's operand, while you just want it to swap the arguments of ,
 
7:37 PM
@AviF.S. couldn't've you just bleeped it from the beginning?
I mean...
 
@matt Haha, well I always forget that it's a bad word... Same with 'hell'-- is it even a bad word?
 
says the first google result:
> “Hell” isn't a “swear word” but it was considered not something you should speak of, like the old saying “speak of the devil and he will appear”, which is sort of a weird thing to say, for if it were true, you just invoked the devil. Hell is a sort of swear word to some of us.
 
@matt So what you need is to limit the reach of by parenthesising: ∘.(,⍨)
Let's stop here for today. Please try to stay on topic.
 
Grew up in a Jewish household and probably related to that is the fact that they weren't really considered bad words, somehow
 
@Adám hm ok
@AviF.S. however, "dxxx" is:
 
7:39 PM
Meanwhile, we couldn't say 'sucks,' we had to say 'stinks,' so...
 
ok that's just weird (no offen[c|s]e)
 
@Adám ⍥ Sorry...
 
:(
sigh anyway
 
@matt (As in no 'this sucks!' Supposedly it has anti-gay origins, if you can imagine where those might come from...)
 
mhm that's just a "uh why?" moment
but uh
> Let's stop here for today.
jeopardy music
well @Adám think that worked a little too well
looks like the APL orchard is closed
 
7:58 PM
@matt It never is :-) But it isn't a general-purpose chat room.
 
ngn
8:46 PM
what do i have to do to go to hell? there it must be less hot compared to here
 
→hell
 
apparently
> The exact temperature of hell cannot be computed but it must be less than 444.6°C
for reference that's equal to 832.28 degrees Fahrenheit
 
RGS
9:50 PM
@Adám I like the way how the main page links to /quiz and how the /quiz page links back to the first and I can see you fixed the issue I pointed to earlier.
I also see you have underlined some letters to hint at keyboard shortcuts to reveal the solution/get the next task; how do I trigger those? I'm pretty sure the /quiz page is in focus; I tried S, CTRL-S, SHIFT-S, ALT-S.
Would also like to point out that changing theme and then navigating to the page I am not at resets the theme; in a perfect world it wouldn't. Is this difficult to "fix"?
 
CMP: if 4…7 is 4 5 6 7, should 4…3 be or 4 3?
 
RGS
@dzaima I could live with both and can imagine situations in which I would hope for both
 
10:16 PM
@RGS it does seem the access keys are mixed up (they're r and n for both; @Adám)
 
RGS
11:01 PM
@dzaima how do you trigger them, though? CAn't seem to use R/N for anything
 
@RGS depends on browser/OS what the "access key" is. For me (linux, chromium), alt+r/alt+n activate the explaining buttons
 
00:00 - 18:0018:00 - 00:00

« first day (1250 days earlier)      last day (1403 days later) »