« first day (2098 days earlier)      last day (853 days later) » 

03:56
@DialFrost How may I serve you?
@Adám wait ya I'm tryna solve something gimme a while
 
8 hours later…
12:26
Is it me, or are the two last examples identical on aplwiki.com/wiki/Prototype ?
@xpqz it appears the only difference is the "works in" information with stuff about migration level. Feels superfluous to me though.
13:28
@xpqz @RikedyP Yeah, first should have instead of
 
2 hours later…
15:22
i love how you can reset the index origin in apl
Interesting. Most people hate that. But you're not entirely alone in liking it.
16:06
oh wow the fact that you can assign stuff to expressions is awesome
im liking this language
16:28
wait so rank is the number of depths, correct?
No, rank is the number of dimensions, or axes, that the elements are arranged along.
But elements themselves don't need to be atomic. They can contain any arrays themselves. The number of such nestings is called the depth.
ah mhm
 
1 hour later…
17:47
-1
Q: Where are the IBM APL2 Workspaces (functions and variables) stored in Window 11?

Dr. Edward LinIn Window 10, saved IBM APL2 Workspaces (functions and variables) are stored in C/Program File/ibmapl2w/bin. But I could not find ibmapl2w/bin in C drive of Window 11. Where are they stored in Window 11?

@Sʨɠɠan '!'∘(∊,¨,⊣) consists of a constant left argument '!' bound to a tacit function ()
thats a bit over my head rn :P
feel free to post as your own answer
The tacit function is the flattened concatenation , map ¨ (of '!' and the right argument — the string) concatenated , to the left argument ('!').
@Sʨɠɠan No no, it is a direct golf of yours. Will you allow me to explain how?
sure. doesnt seem like it tho
OK, so you had {'!'⍪∊⍉↑⍵('!'⍴⍨≢⍵)}
17:57
mhm
You're reshaping '!' to match , but that's really the same as having one '!' for each character. There's the each ¨
You end up with a 2-row matrix which you then transpose into a 2-column matrix. I directly create a vector of 2-element vectors, which close to the same.
Indeed, when we flatten with they end up being the same.
I guess I should have written (∊⊢,,¨)∘'!' to match your solution better.
how does it end up prepending !?
I was appending, but this last one prepends.
18:01
ah
Now we both prepend. I used , and you used but they are synonyms in this case.
Let's write my solution as (∊⊢⍪⍪¨)∘'!' for even more similarity.
is there a difference between and ?
is basically the tacit equivalent of .
Note the round parens vs curly braces. Tacit vs explicit.
18:03
i still havent gotten to tacit
is it like jelly
I know. Don't worry. Briefly, the tacit functions (called trains) work like this: every other function, beginning with the rightmost, is applied between arguments, and intervening functions are applied between the results of those. A lone leftmost function is just applied monadically.
So (∊⊢⍪⍪¨) is exactly the same as {∊(⍺⊢⍵)⍪(⍺⍪¨⍵)}
hmm seems like Pip syntaxish
interesting
Now, is simply the right-identity function. I.e. it returns its right argument unaltered, exactly like {⍵}, so ⍺⊢⍵ is just — hence my above statement about vs .
ok i get it better now, thanks
And, as before, ∘'!' binds a constant right argument. Any argument that derived function is applied to, becomes the inner function's left argument.
18:06
partial application?
Yes, or currying.
makes sense
But any monadic function (which is what we get from a dyadic function with a single bound argument) takes its argument on the right, so things are a little more involved when binding on the right. That's why I initially wrote using binding on the left.
@pmf Hi there. Interested in APL?
X∘f Y and (f∘Y)X are both X f Y.
We need a parenthesis (or something else) in the f∘Y to separate the Y and the X so they don't form a single array.
so ive been trying to edit this in, but it doesnt seem to be playing well with vars? tio.run/##SyzI0U2pTMzJT///…
You moved the execution expression from Input to Footer. If you do so, then you must add ⎕← on the left for explicit output.
18:13
woops :P
didnt notice that
one more question? why do i need the parens after the in {'!'⍪∊⍉↑⍵('!'⍴⍨≢⍵)}? it seems to parse fine (in my head) without them
You're creating a 2-element vector by juxtaposition. Without it, the leftmost and the rightmost '!' would form a vector: (⍵ '!')⍴⍨≢⍵
Here's a full derivation of my golf from your initial solution:
{'!'⍪∊⍉↑⍵('!'⍴⍨≢⍵)}  ⍝ original
{'!'⍪∊⍵⍪¨('!'⍴⍨≢⍵)}  ⍝ concatenate each instead of transpose mix
{'!'⍪∊⍵⍪¨ '!'}       ⍝ each already handles many-to-one
{ ⍵ ⍪∊⍺⍪¨  ⍵ }∘'!'   ⍝ break out "!"
{∊⍵ ⍪ ⍺⍪¨  ⍵ }∘'!'   ⍝ defer flattening to later
(∊⊢ ⍪  ⍪¨    )∘'!'   ⍝ go tacit
(∊⊢⍪⍪¨)∘'!'          ⍝ remove spacing
@Adám ah my brain parser is broken then :P
or just needs more training
I don't think so. You just missed the fact that stranding (juxtaposition forms a single array) is stronger than (precedes) (almost) everything else.
@Adám ah thanks, ill edit that in. makes it easier to understand too
found a 1 char golf to mine too
18:34
@Sʨɠɠan Adds a trailing space, but maybe that's allowed.
oops
i dont think thats allowed
19:10
@Sʨɠɠan Another formulation is {'!',⍨∊'!',⍪⍵} which takes advantage of , auto-mapping.
 
3 hours later…
22:25
is ⍸a⍷b the only way to get indexes of all a in b?
It is the obvious/right way, but you can obviously get to the result using other primitives. That said, what are a and b like?
a is a number, b is a flat vector
Then you can use = instead of
However, often it is advantageous to operate on Boolean vectors (the result of =) rather than go via indices.
E.g. 1 0 1/'ABC' instead of 'ABC'[⍸1 0 1]
@Adám ah forgot about that :P
im trying to find all the indexes that have a 0 after them in the vector
rn im using 1-⍨⍸0⍷
That'll fail if there's a leading 0.
What are the non-0 elements? Integers? Natural numbers?
Another solution: ⍸2⊢/0=

« first day (2098 days earlier)      last day (853 days later) »