« first day (972 days earlier)      last day (1693 days later) » 

8:58 AM
The more I golf with APL and, on occasion, read about APL, the more I think I should stop golfing so much and start reading more heavily
All of this is fascinating and all my work with golfy dfns and trains seems like I'm barely scratching the surface
 
@Sherlock9 I just tried the Ferrers diagram thing. I just made a function to automatically generate Table of Contents from my folder structure on github.com/rikedyp/APLCourse. For both of these problems I found Scholes' tview helpful dfns.dyalog.com/c_tview.htm
 
 
3 hours later…
12:28 PM
Did dyadic change at some point? The old tutorial has an example 1 1 2 2 3 3 4 4 4⊂⍳9 that throws a domain error when I run it myself
 
@JoKing Yes and no. The old tutorial refers to the definition of dyadic used by APL2. It is accessible in Dyalog as
 
@Adám Right, I see. What does the new function do?
 
@JoKing It starts a new partition on every 1 and continues the current (if any) partition on every 0
⎕←1 1 1 2 2⊆'Hello' ⋄ ⎕←1 0 0 1 0⊂'Hello'
 
@Adám
┌───┬──┐
│Hel│lo│
└───┴──┘
┌───┬──┐
│Hel│lo│
└───┴──┘
 
@Adám Right, that's what I was thinking through experimentation. Leading zeroes discard those elements, and numbers other than 1 or 0 are out of the domain, yes?
 
12:35 PM
@JoKing Correct. There is a presentation about them here and a chat lesson including them here
 
⎕←0 0 1 0⊆'test'
 
@JoKing
┌─┐
│s│
└─┘
 
@Adám Right, I hadn't got to that one yet. I'm enjoying learning this so far. I don't think I've ever actually gone through a tutorial for a programming language before, just learnt it by experimentation and personal projects
 
24 hours ago, by Adám
@JoKing You should give it a try though. You might just enjoy it.
 
I look forward to understanding APL answers more, like this one
 
12:47 PM
@RichardPark Ooh. My trouble is that I'm still having trouble with conceptually understanding how to recursively generate partitions
There's an insight I'm still missing
 
@JoKing That one is actually very simple. Do you understand by now?
 
@Adám Yeah, Ctrl-R, Rho, reshapes right into left, wrapping elements if needs be, row then column (then I assume plane, volume etc.)
 
@JoKing Not "then"; "first", but that doesn't matter here. Do you know about ?
 
I haven't got to yet though, but I can get what it means from the question
 
@JoKing Right, it is super simple. f⍨A is simply A f A. So ⍴⍨3 is 3⍴3 which is 3 3 3
@JoKing And ?
 
12:58 PM
@Adám Ctrl-I, index, generates a matrix with that shape where each... element? row? is the 1-indexed coordinate. For a single scalar n, this is the range 1 to n (or zero indexed if ⎕IO is set to 0)
 
@JoKing It generates an array where each element is the index of that element.
 
@Adám Is there a way to do partial application, e.g. something like (5+)?
 
@JoKing 5∘+
 
@Adám ah okay, I probably haven't got far enough yet to see stuff like that. I'm just learning about / as a meta-function
So, function modifiers go on the right side?
 
You curry one of the arguments to a dyadic function with ∘
So you can do f←5∘+
or g←+∘5
If course that's the same for commutative function
But try it with minus and you'll see what's up
(also you can curry an operand to an operator the same way)
 
2:08 PM
@JoKing Yeah, they are called operators, and those that only take a single operand go on the right of that operand. There are also operators that take two operands and go in between them.
 
@Adám right, like the function composition operator above
 

« first day (972 days earlier)      last day (1693 days later) »