« first day (512 days earlier)      last day (2143 days later) » 

7:41 AM
⍞←∧/⍳7
 
@Sherlock9 420
 
⍞←{∧/⍳}¨⍳20
 
@Sherlock9 SYNTAX ERROR
 
⍞←{∧/⍳}¨⍳ 20
⍞←∧\⍳7
 
@Sherlock9 1 2 6 12 60 60 420
 
7:45 AM
⍞←∧\⍳ 20
 
@Sherlock9 1 2 6 12 60 60 420 840 2520 2520 27720 27720 360360 360360 360360 720720 12252240 12252240 232792560 232792560
 
⍞←∧⍀⍳ 7
 
@Sherlock9 1 2 6 12 60 60 420
 
Huh, not much difference
 
8:07 AM
@Sherlock9 The difference between / and and between \ and and between ⍺,⍵ and ⍺⍪⍵ is that the ones without a - work along the last axis (for a matrix, that's horizontally ) while the ones with a - work along the first axis (for a matrix, that's vertically.
⋄ A←3 4⍴⍳12 ⋄ ⎕←A (+/A) (+⌿A)
 
@Adám
┌──────────┬────────┬───────────┐
│1  2  3  4│10 26 42│15 18 21 24│
│5  6  7  8│        │           │
│9 10 11 12│        │           │
└──────────┴────────┴───────────┘
 
⋄ A←3 4⍴⍳12 ⋄ ⎕←A (+\A) (+⍀A)
 
@Adám
┌──────────┬──────────┬───────────┐
│1  2  3  4│1  3  6 10│ 1  2  3  4│
│5  6  7  8│5 11 18 26│ 6  8 10 12│
│9 10 11 12│9 19 30 42│15 18 21 24│
└──────────┴──────────┴───────────┘
 
⋄ A←3 4⍴⍳12 ⋄ ⎕←A (A,A) (A⍪A)
 
@Adám
┌──────────┬─────────────────────┬──────────┐
│1  2  3  4│1  2  3  4 1  2  3  4│1  2  3  4│
│5  6  7  8│5  6  7  8 5  6  7  8│5  6  7  8│
│9 10 11 12│9 10 11 12 9 10 11 12│9 10 11 12│
│          │                     │1  2  3  4│
│          │                     │5  6  7  8│
│          │                     │9 10 11 12│
└──────────┴─────────────────────┴──────────┘
 
8:28 AM
⋄ A←3 4⍴⍳12 ⋄ ⎕←A (A\A) (A⍀A)
 
@Sherlock9
RANK ERROR
 
Ah forgot editing doesn't work for the bot
Like most bots
⋄ A←3 4⍴⍳12 ⋄ ⎕←A (A+\A) (A+⍀A)
 
@Sherlock9
SYNTAX ERROR
 
⋄ A←3 4⍴⍳12 ⋄ ⎕←A (+\A) (+⍀A)
 
@Sherlock9
┌──────────┬──────────┬───────────┐
│1  2  3  4│1  3  6 10│ 1  2  3  4│
│5  6  7  8│5 11 18 26│ 6  8 10 12│
│9 10 11 12│9 19 30 42│15 18 21 24│
└──────────┴──────────┴───────────┘
 
8:30 AM
Oh heck you already did that
 
@Sherlock9 There is no dyadic f\ or f⍀.
 
Yeah, I copied from the wrong place
 
⋄ A←3 3⍴⍳9 ⋄ ⎕←A (1 0 1/A) (1 0 1⌿A)
 
@Adám
┌─────┬───┬─────┐
│1 2 3│1 3│1 2 3│
│4 5 6│4 6│7 8 9│
│7 8 9│7 9│     │
└─────┴───┴─────┘
 
⋄ A←3 3⍴⍳9 ⋄ ⎕←A (1 0 1 1\A) (1 0 1 1⍀A)
 
8:32 AM
@Adám
┌─────┬───────┬─────┐
│1 2 3│1 0 2 3│1 2 3│
│4 5 6│4 0 5 6│0 0 0│
│7 8 9│7 0 8 9│4 5 6│
│     │       │7 8 9│
└─────┴───────┴─────┘
 
⋄ A←2 2 2⍴⍳8 ⋄ ⎕←A
 
@Sherlock9
1 2
3 4

5 6
7 8
 
⋄ A←2 2 2⍴⍳8 ⋄ ⎕←A (+\A) (+⍀A)
 
@Sherlock9
┌───┬────┬─────┐
│1 2│1  3│ 1  2│
│3 4│3  7│ 3  4│
│   │    │     │
│5 6│5 11│ 6  8│
│7 8│7 15│10 12│
└───┴────┴─────┘
 
Huh
 
8:34 AM
@Sherlock9 Maybe easier to understand:
⋄ A←2 2 2⍴⍳8 ⋄ ⎕←A (+/A) (+⌿A)
 
@Adám
┌───┬─────┬─────┐
│1 2│ 3  7│ 6  8│
│3 4│11 15│10 12│
│   │     │     │
│5 6│     │     │
│7 8│     │     │
└───┴─────┴─────┘
 
How would I reduce along one of the middle axes?
 
@Sherlock9 +/[desired axis]
 
For an n≥3-rank array
⋄ A←2 2 2⍴⍳8 ⋄ ⎕←A (+/A) (+/[2]A) (+⌿A)
 
@Sherlock9
┌───┬─────┬─────┬─────┐
│1 2│ 3  7│ 4  6│ 6  8│
│3 4│11 15│12 14│10 12│
│   │     │     │     │
│5 6│     │     │     │
│7 8│     │     │     │
└───┴─────┴─────┴─────┘
 
8:35 AM
Ooh
 
So +⌿ is the same as +/[1] and +/A is the same as +/[≢⍴A]A
 
@Adám does Dyalog let you define your own functions which take an axis argument?
 
@Probie No, but you can just write it as an operator instead.
⋄ ReduceN←{⍺⍺/[⍵⍵]⍵} ⋄ A←2 2 2⍴⍳8 ⋄ ((+ReduceN 1)A)((+ReduceN 2)A)((+ReduceN 3)A)
 
@Adám

Rebuilding user command cache... done

Real time: 0.976 s
User time: 0.911 s
Sys. time: 0.055 s
CPU share: 98.91 %
Exit code: 0
 
⋄ ReduceN←{⍺⍺/[⍵⍵]⍵} ⋄ A←2 2 2⍴⍳8 ⋄ ⎕←((+ReduceN 1)A)((+ReduceN 2)A)((+ReduceN 3)A)
 
8:38 AM
@Adám
┌─────┬─────┬─────┐
│ 6  8│ 4  6│ 3  7│
│10 12│12 14│11 15│
└─────┴─────┴─────┘
 
@Probie ^
 
Did we ever cover operators?
 
@Sherlock9 Not really. Want to?
 
I want to but I'm not sure I'm awake enough. As well as being at work
Maybe in about an hour? I'll ping you when ready?
 
@Sherlock9 Sure thing. I have to fix our builds right now anyway.
 
8:42 AM
⋄ ReduceN←{⍺⍺/[⍵⍵]⍵} ⋄ A←2 2 2⍴⍳8 ⋄ ⎕←(+ReduceN 1⊢A)(+ReduceN 2⊢A)(+ReduceN 3⊢A)
 
@Probie
┌─────┬─────┬─────┐
│ 6  8│ 4  6│ 3  7│
│10 12│12 14│11 15│
└─────┴─────┴─────┘
 
@Probie Good enough?
@Probie You can replace a function with an operator for the same effect too:
⋄ CatenateN←{⍺,[⍺⍺]⍵} ⋄ A←2 2 2⍴⍳8 ⋄ ⎕←(1 CatenateN⍨A)(2 CatenateN⍨A)(3 CatenateN⍨A)
 
@Adám
┌───┬───┬───────┐
│1 2│1 2│1 2 1 2│
│3 4│3 4│3 4 3 4│
│   │1 2│       │
│5 6│3 4│5 6 5 6│
│7 8│   │7 8 7 8│
│   │5 6│       │
│1 2│7 8│       │
│3 4│5 6│       │
│   │7 8│       │
│5 6│   │       │
│7 8│   │       │
└───┴───┴───────┘
 
⎕← 1 2 3 {⍺⍺ + ⍵⍵} 4 5 6
 
@Probie
   {⍺⍺+⍵⍵}
┌──┴──┐
1·2·3 4·5·6
 
8:49 AM
⎕← (1 2 3 {⍺⍺ + ⍵⍵} 4 5 6) 'some arg'
 
@Probie
5 7 9
 
I feel like that shouldn't be allowable
 
@Probie What, for an operator to ignore an argument?
 
Ok. I love #regex. I love it partly because of the puzzle it presents to my brain wham I use them (but never in code). Well, if you like puzzles and funny symbols, you might like #APL. I’ve been learning @dyalogapl with http://www.dyalogaplcompetition.com and I love it. Very fun and nerdy!
 
@Adám No, just having an operator which takes no functions
 
9:04 AM
@Probie Why not? How about:
⍞←('Hello' ⎕R 'Greetings') 'Hello World!'
 
@Adám Greetings World!
 
@Adám That makes sense. I guess I'd just never really thought of a use case
 
@Probie Occasionally when you need a "function" with 3 or four "arguments" it is easier to just make it an operator than to decompose an argument.
 
@Adám I'd have expected ⎕R to be a regular function which just takes a single array with 3 boxed strings, but that seems like a much nicer way of doing it so I can see why it's a good idea to have
 
9:20 AM
@Probie Wouldn't do enough:
⍞←'Hello' ⎕R {⌽⍵.Match} 'Hello World!'
 
@Adám olleH World!
 
9:39 AM
And once again this looks like wizardry
 
@Sherlock9 See Lesson 24.
 
 
2 hours later…
12:02 PM
I just remembered a question I had, @Adám
Before we get back to operators (which I plan to do after dinner)
Say I have a vector of 1s and 0s, say 1 0 1 1 0 0 and I wanted the indices at which the values were truthy, which in this case is 1 3 4
 
⍞←⍸1 0 1 1 0 0
 
@Adám 1 3 4
 
@Sherlock9 Monadic is called "where".
 
And the reference says that it gets the positions of all 1s in a Boolean array
Neat
I wonder if that would make yesterday's solution shorter?
 
@Sherlock9 Which one?
@Sherlock9 Yeah, it works on higher ranks too:
 
12:07 PM
The squarish root one from yesterday: ⌈/{⍳⌊⍵*÷2}∨⊢
 
⋄ A←1=?3 4⍴2 ⋄ A (⍸A)
 
@Adám

Rebuilding user command cache... done

Real time: 1.070 s
User time: 0.932 s
Sys. time: 0.094 s
CPU share: 95.93 %
Exit code: 0
 
⋄ A←1=?3 4⍴2 ⋄ ⎕←A (⍸A)
 
@Adám
┌───────┬─────────────────────────┐
│1 0 0 0│┌───┬───┬───┬───┬───┬───┐│
│0 1 0 1││1 1│2 2│2 4│3 1│3 2│3 4││
│1 1 0 1│└───┴───┴───┴───┴───┴───┘│
└───────┴─────────────────────────┘
 
Ooh
Welp. It made it longer:
⋄ f←⌈/{⍳⌊⍵*÷2}(⍸0=|)⊢ ⋄ ⎕←f 20
 
12:14 PM
@Sherlock9
4
 
@Sherlock9 what's the problem you're trying to solve?
 
@Sherlock9 you can golf a byte from that
 
@Probie Well, I've already solved it before for 12 bytes here
I'm just trying to see if I can use instead
@Cowsquack How so?
 
by rearranging it
(or even converting into a dfn)
 
I'm not sure how to go about doing either of those things
 
12:27 PM
write it purely as a dfn, no need for train stuff
 
Oh
Well I get a RANK ERROR with ⌈/⍸0={⍳⌊⍵*÷2}|⊢
 
⎕←(⌈/(⍸0={⍳⌊⍵*÷2}|⊢)) 20
 
@Cowsquack
4
 
oh you meant without the parens
 
Yes
I copy-pasted the wrong one
 
12:32 PM
⎕←⌈/⍸0={⍳⌊⍵*÷2}|⊢
 
@Cowsquack
  ┌─┼───┐
  / ⍸ ┌─┼──────────┐
┌─┘   0 = ┌────────┼─┐
⌈         {⍳⌊⍵*÷2} | ⊢
 
And with the parens, it's still 17 bytes
⎕←⌈/⍸0={⍳⌊⍵*÷2}|⊢20
 
@Sherlock9
¯1.797693135E308
 
it thinks that the ⌈/ is the left tine
 
Alright. What the heck
 
12:33 PM
and applies as a dyad
 
Oh
 
@Sherlock9 That isn't a train.
 
@Sherlock9 surround with parens
 
⎕←⌈/(⍸0={⍳⌊⍵*÷2}|⊢)
 
@Sherlock9
  ┌─┴─┐
  / ┌─┴─┐
┌─┘ ⍸ ┌─┼──────────┐
⌈     0 = ┌────────┼─┐
          {⍳⌊⍵*÷2} | ⊢
 
12:34 PM
⎕←{⌈/⍸0=⍵|⍨⍳⌊⍵*÷2}20
 
@Adám
4
 
Ohh
⎕←{⌈/⍸0={⍳⌊⍵*÷2}|⊢}
 
@Sherlock9
{⌈/⍸0={⍳⌊⍵*÷2}|⊢}
 
Ah it doesn't deconstruct a dfn
 
@Sherlock9 There is nothing to deconstruct. The functions are just evaluated in order.
 
12:35 PM
Huh
 
so to get rid of the parens on the train, you would need a way to force monadic and ⌈/ on 0={⍳⌊⍵*÷2}|⊢
 
Am I supposed to be getting a syntax error here
 
⎕←(⌈/∘⍸0=⊢|⍨∘⍳∘⌊*∘.5)20
 
@Adám
4
 
@Sherlock9 Yes, ⊢} can never be right.
 
12:38 PM
Okay, I don't get it
 
⎕←(⌈/∘⍸0={⍳⌊⍵*÷2}|⊢) 20
 
Why all of this?
 
@Cowsquack
4
 
I think I lost track of what was going on about five minutes ago
 
@Sherlock9 A dfn (indicated by curly braces) must return an array. But if the rightmost token is a function (e.g. ) then the result of the expression is a function (e.g. a train). That can never be right.
 
12:39 PM
Okay
And what about forcing monadic
 
@Sherlock9 Where, in ⌈/∘⍸0=⊢|⍨∘⍳∘⌊*∘.5?
 
Yeah
 
⎕←⌈/∘⍸0=⊢|⍨∘⍳∘⌊*∘.5
 
@Adám
   ┌─┴──┐
   ∘  ┌─┼───┐
  ┌┴┐ 0 = ┌─┼───┐
  / ⍸     ⊢ ∘   ∘
┌─┘        ┌┴┐ ┌┴┐
⌈          ∘ ⌊ * 0.5
          ┌┴┐
          ⍨ ⍳
        ┌─┘
        |
 
Huh
 
12:41 PM
@Sherlock9 I'm using to combine multiple monadic functions into a single monadic function, such that the train ends up right.
 
Okay
Is there a way to do it without multiple compose ?
⎕←⌈/∘⍸0={⍳⌊⍵*÷2}|⊢
 
@Sherlock9
   ┌─┴──┐
   ∘  ┌─┼──────────┐
  ┌┴┐ 0 = ┌────────┼─┐
  / ⍸     {⍳⌊⍵*÷2} | ⊢
┌─┘
⌈
 
@Sherlock9 ⌈/∘⍸0=⊢|⍨∘⍳∘⌊*∘.5(⌈/∘⍸) 0 = ⊢ (|⍨∘⍳∘⌊) (*∘.5)
 
This one only has one compose, but it's 18 bytes and longer than my first -using version
Ahh
 
@Sherlock9 You can use parens: ⌈/∘⍸0=⊢|⍨∘⍳∘⌊*∘.5⌈/ (⍸ 0 = ⊢ |⍨ (⍳ (⌊ *∘.5)))
⎕←⌈/ (⍸ 0 = ⊢ |⍨ (⍳ (⌊ *∘.5)))
 
12:45 PM
@Adám
  ┌─┴─┐
  / ┌─┴─┐
┌─┘ ⍸ ┌─┼───┐
⌈     0 = ┌─┼──┐
          ⊢ ⍨ ┌┴─┐
          ┌─┘ ⍳ ┌┴┐
          |     ⌊ ∘
                 ┌┴┐
                 * 0.5
 
Sorry, I miscounted: ⌈/∘⍸0={⍳⌊⍵*÷2}|⊢ is 16 bytes
Interesting use of parens
 
@Sherlock9 Well, remember from yesterday that (f g)⍵ is f (g ⍵) and f∘g ⍵ is also f (g ⍵).
 
Yep
 
So for monadic (only!) application, f∘g(f g).
 
And I guess you can use if you need to make sure a monad stays a monad
Ah, ninja'd
 
12:52 PM
@Sherlock9 Often, but not always. E.g. -∘⌈/(- ⌈/) because -∘⌈/(-∘⌈) / while (- ⌈/)- (⌈/).
 
Do you have a lesson on and , because I got really confused when you were using them earlier along with , as I only knew them from their dyadic forms
Hmm
 
rho rho rho of x
always equals one
 
@Sherlock9 You can find all the lessons here. You're looking for Lesson 6.
 
Ah, I missed when I was looking earlier. Thanks
 
rho is shape
rho rho is rank
APL is fun
 
12:54 PM
Merrily, merrily, merrily, merrily
Life is but a dream
 
⎕←⍴⍴ 3 4⍴2
 
@Sherlock9
2
 
@H.PWiz What?
@Sherlock9 However, watch out. Almost everyone eventually makes the mistake to use ⍺ f∘g ⍵ when they meant ⍺ (f g) ⍵ because f∘g ⍵ is (f g) ⍵.
 
To the tune of Row, Row, Row Your Boat:
rho rho rho of x
always equals one
merrily, merrily, merrily
life is but a dream
 
That
 
12:57 PM
r.o.f.l.
 
Alternate last line: APL is fun
Which still scans, I think
 
They have it here
 
@Sherlock9 No no, it goes:
rho rho rho of x
always equals one
rho is shape
rho rho is rank
APL is fun
8
 
I think we have a winner XD
Back soon; getting dinner
 
1:08 PM
@Sherlock9 best I can get is 14 bytes {⌈/x⌊⊖x←∪⍵∨⍳⍵}
 
{⌈/⌊∘⊖⍨∪⍵∨⍳⍵} Saves a byte
 
@H.PWiz still too long though :p
 
@Probie 12 byte train: ⌈.⌊∘⌽⍨∘∪∨∘⍳⍨
 
@Adám I remember that, except I remember "rho is dimension, rho is rank"
 
nvm, 11 bytes! ⌈.⌊∘⌽⍨∘∪⊢∨⍳
@Sherlock9 ^
 
1:19 PM
7 of those bytes are just getting the middle element of an ordered list...
 
Yeah, still shorter than what I was trying yesterday with
 
Dyalog needs a bisect primitive
 
⎕←(⊃∘⊖2∘,⍴∘∪⊢∨⍳)20
 
@Adám
4
 
⎕←(⊃∘⊖2∘,⍴∘∪⊢∨⍳)25
 
1:28 PM
@Probie
5
 
Which challenge is this for?
 
@Zacharý Squarish root.
 
 
3 hours later…
4:33 PM
@ngn as the creator of vim-apl, what is your workflow for working with apl using vim?
 
ngn
I write a .dyalog file with this on top:
#!/bin/bash
(echo ∇M;tail -n+3 $0;echo -e '∇\nM\n⎕off')|dyalog -script;exit $?
⎕io←0⋄⎕pw←32767⋄'display'⎕cy'dfns'⋄d←display
I've configured vim to fill it in automatically
then, I write some APL code and I press enter, which is mapped to executing the current file with the dyalog interpreter
 
ah, that's why you don't like tradfns
but the output does not overwrite the file, does it?
 
ngn
@Cowsquack not only, there are more important reasons to hate tradfns :)
@Cowsquack for instance see this discussion about dynamic scoping: chat.stackexchange.com/transcript/message/43958817#43958817
@Cowsquack no, the output goes to the console
and there's a "Press ENTER or type command to continue" to return to vim
the same as with any command executed through :!
oh, I should have made this clear - I've mapped enter in normal mode
so typing newlines in the .dyalog file itself is not an issue
I use the same workflow for k, python, nodejs, bash, etc...
even LaTeX - I've mapped enter there to run pdflatex and then evince
 
4:58 PM
@ngn so that means that all of your run expressions are in the same file?
 
ngn
@Cowsquack yes, enter executes the whole file
it's not an interactive long-lived session, it always starts executing from scratch
 
okay, how do you nnoremap for a specific filetype?
 
ngn
@Cowsquack create ~/.vim/ftplugin/myfiletype.vim and use nn <buffer> ... there
 
til nn=nnoremap
 
ngn
what d'ya expect from a sworn golfer :)
 
5:13 PM
:D
 
ngn
vimscript is a serious contender for the crappiest language I've ever used, yet vim is so practical I can't get away from it
 
from the little I've seen on vimscript, I must agree with you
@ngn do you create a temp file to fill that in (and then execute it)?
 
ngn
@Cowsquack the template?
 
temporary
like in /tmp
or do you add it in file and then remove it after execution?
 
ngn
when I said "fill it in", I meant fill in the new buffer with the template for a .dyalog file
when <enter> is pressed, I don't create any tmp files
 
5:24 PM
ah, because after adding those three lines, vim thinks the filetype is sh because of the shebang
 
ngn
I just execute the current file, as if ./currentfile.dyalog was typed in bash
@Cowsquack reasonable assumption :) the world doesn't know about apl
I have a file ~/.vim/filetype.vim with this in it: au bufread,bufnewfile *.{apl,dyalog,cd} setf apl
 
oh there's no problem with the execution now, it's just that the ftplugin for the apl filetype does not run for currentfile.dyalog
 
ngn
@Cowsquack do you have a bitbucket account? I can share my vim configuration, if that would be of any help
 
actually yes I do have one, and thanks that might be helpful
my name is kritixilithos
 
ngn
@Cowsquack I almost granted access to a "cowscantquack" account there :)
 
5:41 PM
thanks it works now :)
I copied the relevant bits from your filetype.vim
 
ngn
great :)
 
how does line 11 of that file work?
oh wait it's vimscript being weird
 
ngn
@Cowsquack that's left over from the time I had a wrapper script for running .dyalog files
 
all those special equality operators
 
ngn
I no longer use it, so I should remove it...
 
5:45 PM
@ngn I just realised I didn't need that function to work
 
ngn
==# is case-sensitive equality, regardles of the 'ic' option
@Cowsquack hm, I too should remove it
it was there to detect the filetype of files without extensions
 
6:10 PM
I just did my first cmc in apl completely from vim :D
 
 
2 hours later…
8:11 PM
@H.PWiz Whoa, how does that work?
 
@Sherlock9 Remember that for vectors V1 f.g V2 is f/V1 g V2.
V1 ⌈.⌊∘⌽ V2 is ⌈/ V1 ⌊ ⌽V2
⌈.⌊∘⌽⍨V is ⌈/ V ⌊ ⌽V
 
@Sherlock9 Looks like Adâm will take care of the explanation ;)
 
⌈.⌊∘⌽⍨∘∪ V is ⌈/ (∪V) ⌊ ⌽∪V
@Sherlock9 And ⊢∨⍳ you know already.
 
⌈.⌊∘⌽⍨∘∪⊢∨⍳ is the same as reduce_by_max(minimum(unique(V), reverse(unique(V)))) where V is gcd(n, 1..n)
Very well done, @H.PWiz
@Adám Thank you for the explanation
 
@Sherlock9 My pleasure.
 
8:28 PM
Oh and it's pairwise minimum too!
So it only gets all the factors ≤ sqrt(n)!
 
@Sherlock9 Everything (scalar) is "pairwise" in APL.
 
Right, lots to get used to
A very very large amount to get used to
 
@Sherlock9 But I hope it all feels natural and makes sense once you hear about it.
 
I didn't even know ⍨ worked with only one array
I think so
But it's hard to get into the groove
 
@Sherlock9 Well, kinda looks like a selfie…
⍞←+⍨5
 
8:31 PM
Not least because I'm still working on my thesis and my work and haven't devoted time to the Lessons and the reference card
 
@Adám 10
 
And the language lookup
@Adám Unfortunately, I don't have time to talk operators tonight. It's 3:30 am where I am. Sorry for the delay
⍞←÷.5{10⍟}⍨.9999
 
@Sherlock9 SYNTAX ERROR
 
Nuts
⍞←.5{10⍟}⍨.9999
 
@H.PWiz Brian (Tools Group manager) got an amazing idea for this summer's project: A really useful part of the lessons was the ability for students to use the chat bot for experiments and variations on what I (and others) wrote. We should publish as Jypiter Notebooks for the same kind of effect.
@Sherlock9 ⍟} can never be right.
 
8:38 PM
⍞←.5{10⍟⍵}⍨.9999
 
@Sherlock9 ¯0.3010299957
 
⍞←{10⍟⍵}.5 .9999
 
@Sherlock9 ¯0.3010299957 ¯0.00004343161981
 
⍞←÷{10⍟⍵}.5 .9999
 
@Sherlock9 ¯3.321928095 ¯23024.69962
 
8:39 PM
@Sherlock9 on a dyadic function swaps its arguments.
 
⍞←÷/{10⍟⍵}.5 .9999
 
@Sherlock9 6931.125226
 
I forgot that somehow
 
@Sherlock9 Why not just ÷/10⍟.5 .9999?
 
Because I'm still trying to re-parse everything in light of what I'm learning
⍞←÷/10⍟.5 .9999
 
8:41 PM
@Sherlock9 6931.125226
 
I thought commute would help, and had yet to consider taking the brackets off once I removed commute
⍞←2 -/ 1 4 6 9 12
 
@Sherlock9 ¯3 ¯2 ¯3 ¯3
 
⍞←- 2 -/ 1 4 6 9 12
 
@Sherlock9 3 2 3 3
 
Oh now I remember
⍞←¯2 -/ 1 4 5 9 10
 
8:45 PM
@Sherlock9 3 1 4 1
 
@Sherlock9 increases the utility of : ⍺ f∘g ⍵ is ⍺ f (g ⍵) and ⍺ f∘g⍨ ⍵ is ⍵ f (g ⍺) and ⍺ f⍨∘g ⍵ is (g ⍵) f ⍺ and ⍺ f⍨∘g⍨ ⍵ is (g ⍺) f ⍵.
 
Ooh
 
There are four possibilities: g ⍺/ vs /g ⍵ and on left/ on right vs on right/ on left.
 
What about g ⍺ (f ⍵)?
Or is that the same as the fourth one?
 
@Sherlock9 That doesn't make sense. What is ⍺ (f ⍵)?
 
8:48 PM
Huh
I had not considered that
 
@Sherlock9 However, you could have f (⍺ g ⍵) but that's achieved by ⍺ (f g) ⍵.
And f (⍵ g ⍺) is achieved by ⍺ (f g⍨) ⍵ or ⍺ (f g)⍨ ⍵.
 
It's like Actually's stack swap, @
But more succinct
 
@Sherlock9 And more cute.
 
Oh very much so
 
20
Q: Take that frown and turn it around

AdámA celebration of the many faces of APL Given a string among those in column 1 or column 2 of the below table, return the string's neighbor to its right. In other words, if given a string in column 1 then return column 2's string on that row, and if given a string in column 2 then return column 3...

 
8:54 PM
I think I remember when this challenge came out
And today is it's one-year anniversary (give or take some timezones)
Okay I must needs get some sleep now
Thanks again and goodnight
 
@Sherlock9 G'nite.
 

« first day (512 days earlier)      last day (2143 days later) »