« first day (2018 days earlier)      last day (643 days later) » 

8:09 AM
I just discovered that quite happily does its thing with higher ranks (>1) to the right (makes sense after a minute's thought), but also to the left, which my brain cannot attach meaning to right now. What does a rank>1 radix really mean?
 
Separate radix for each "number" (list of digits).
 
Ah ok. I guess it precedes the rank operator, which otherwise could have been used for that behaviour?
 
Yes.
Actually, I'm not so sure you could easily do that. You'd probably need some transposes too.
 
So if I wanted to (as you do) encode one number to hours mins secs, and another to binary at the same time, that's how you'd do it?
 
Yes, but it'd look strange :-)
 
8:22 AM
Hmm, can't seem to get my shapes right. Are there some examples somewhere of using a higher-ranked left?
 
Wait, I was wrong. It does an "outer product".
Each radix is combined with each number.
⎕←(3 2⍴10 16)⊤128 256
 
@Adám
1 2
0 1

2 5
8 0

8 6
0 0
 
128=(1,2,8)₁₀
256=(2,5,6)₁₀
128=(0,8,0)₁₆
256=(1,0,0)₁₆
Compare: ⎕←⍉↑⍉(10 10 10)(16 16 16)∘.⊤128 256
 
@Adám
1 2
0 1

2 5
8 0

8 6
0 0
 
Ok, I need to spend some time playing with this I think. Might try to write this up in learn apl.
Thanks for your help
 
8:31 AM
Sure.
 
 
4 hours later…
12:23 PM
@Adám I was preparing something about jot for the APL wiki, but I see you already beat me to it. I like how you reorganized the section into an unoredered list, the previous version was much less readable. One little thing: "The BSD operating systems and its derivatives systems..." could be a mistake, right? Did you mean "and its derivatives" or "and the derivative systems", or something similar?
 
Yeah, fixed.
 
 
3 hours later…
2:54 PM
@miguelraz Welcome to the APL Orchard!
 
is dyadic transpose not mentioned on aplcart?
 
Welcome to APL Quest 2015-7! Today's quest is Just in (Upper) Case:
> Write a function to perform case-insensitive membership between two arrays.
 
(∊⍥⎕C) Not very original I'm affraid... But I finaly used ⍥
 
And now we can use both and ⎕C on the site!
 
ovs
∊⍥(⊂⍤¯1)⍥⎕C if you want to pass all cases
 
3:01 PM
However, we are asked to handle high-rank cases better than
 
(≢⍤⊢≥⍳⍨)⍥⎕C also seems to work.
 
@ovs Yes, that works, but it is very inefficient.
@rabbitgrowth That's good!
 
∨⌿≡⍥⎕C⍤¯1 9⍤9 ¯1
 
Fun.
 
yeah
 
3:02 PM
Should be 99s though.
 
if only ∊⍠'IC' 1
 
oops, true
 
@rak1507 ??? :)
 
∊⍠'working properly with high rank'
 
Yeah. Roger Hui on multiple occasions suggested adding to work properly on higher rank arguments, and also puts the "haystack" on the left, as with
 
3:04 PM
@rak1507 can you explain your solution?
 
@Razetime How is that not worse than ∊⍥⎕C?
 
@Adám as usual this is just funnier
 
 
@Richard outer product on major cells
 
Can't see an outer product. Maybe because I didn't learn the 'rank' operator yet
 
3:09 PM
@Richard Pair up the entire collection of needles with each major cell in the haystack. In each such pairing, pair up each needle with haystack cell. See if they match case-insensitively. For each needle, see if any is true.
 
that ^
 
I don't understand it, but will puzzle it out later, np.
 
@Richard Does this help?
ForEach←{⍺(⍺⍺⍤⍵⍵)⍵}
majorCell←¯1
entireArray←99
∨⌿≡⍥⎕C ForEach majorCell entireArray ForEach entireArray majorCell
We end up having a collection of collections, conceptually a matrix, which is exactly what you'd have with an outer product of two (conceptual) vectors.
 
      X←2 2⍴'abcd'
      Y←3 2⍴'ABCDEF'
      X(,⍥⊂⍤99 ¯1)Y
┌──┬──┐
│ab│AB│
│cd│  │
├──┼──┤
│ab│CD│
│cd│  │
├──┼──┤
│ab│EF│
│cd│  │
└──┴──┘
      X(,⍥⊂⍤¯1 99⍤99 ¯1)Y
┌──┬──┐
│ab│AB│
├──┼──┤
│cd│AB│
└──┴──┘
┌──┬──┐
│ab│CD│
├──┼──┤
│cd│CD│
└──┴──┘
┌──┬──┐
│ab│EF│
├──┼──┤
│cd│EF│
└──┴──┘
I found this helpful
 
Yes, or even:
      X({⍺'≡⍥⎕C⍤¯1 99'⍵}⍤99 ¯1)Y
┌──┬──────────┬──┐
│ab│≡⍥⎕C⍤¯1 99│AB│
│cd│          │  │
├──┼──────────┼──┤
│ab│≡⍥⎕C⍤¯1 99│CD│
│cd│          │  │
├──┼──────────┼──┤
│ab│≡⍥⎕C⍤¯1 99│EF│
│cd│          │  │
└──┴──────────┴──┘
      X({⍺'≡⍥⎕C'⍵}⍤¯1 99⍤99 ¯1)Y
┌──┬────┬──┐
│ab│≡⍥⎕C│AB│
├──┼────┼──┤
│cd│≡⍥⎕C│AB│
└──┴────┴──┘
┌──┬────┬──┐
│ab│≡⍥⎕C│CD│
├──┼────┼──┤
│cd│≡⍥⎕C│CD│
└──┴────┴──┘
┌──┬────┬──┐
│ab│≡⍥⎕C│EF│
├──┼────┼──┤
│cd│≡⍥⎕C│EF│
└──┴────┴──┘
 
3:16 PM
Nice :)
 
@Adám yes thanks, little bit. I have to see what rank does however. Don't let me slow you down.
 
sad that :For doesn't loop over major cells
 
Yes, I've raised the possibility of adding :For a :InCells b implying major cells.
 
It's always felt a little strange that and take arguments in the "opposite" order. Same for ÷ and |
 
and ÷ are to fit with TMN.
Since APL added and |, it was free to make the order right.
 
3:24 PM
regex time
 
You mean ⎕S time? No regex here.
 
4=5÷20 doesn't seem that crazy :)
 
9=1-10?
Better to use ÷⍨ and -⍨ and ∊⍨ so people don't get too bewildered.
 
Yeah, that makes sense. I was just half joking.
 
OK, I think we're done, no?
See you next week for 2015-8: Unlucky 13!
 

« first day (2018 days earlier)      last day (643 days later) »