« first day (998 days earlier)      last day (52 days later) » 

10:58 AM
@Sherlock9 ⎕pw←123 but i think there is a ride option to auto set it. In What Way doesnt it work? Did you turn on Boxing?
 
      ]boxing
Is ON
      ]boxing -trains=tree
Was -trains=tree
      +++++++
++ ++ +++
I have but it still does this
 
11:14 AM
That's really odd. Can you log an issue against RIDE on GitHub? Or send an email to support@?
@Sherlock9 Does boxing otherwise work? Does both -t=box and -t=parens work?
 
      ]boxing -trains=parens
Was -trains=tree
      +++++++
++ ++ +++
      ]boxing -trains=def
Was -trains=parens
      +++++++
++ ++ +++
 
@Sherlock9
* Command Execution Failed: too many arguments
 
Ah whoops
I'm fairly sure this interpreter is RIDE because that's what the starting screen says, but it says it nowhere else and the Git commit in "About Dyalog" doesn't match anything on the RIDE GitHub. I'll email support@ first
 
@Sherlock9 RIDE is just a dumb frontend. The interpreter is always the same. If you're on macOS you are likely to use RIDE (unless you took special action to run dyalog from a terminal emulator).
@Sherlock9 That tells me that the whole output handling system is not working.
@Sherlock9 Can you try ]output.find on -i followed by ⍎⎕FX'f1' ?
 
]output.find on -i
Was off
⍎⎕FX'f1'
>> Output from #.f[1]
1
 
11:29 AM
@Sherlock9 Hm, ok, then the output handling system is there, only boxing isn't working. Very odd.
 
Perhaps someone stuck it shut while testing? I've goofed up like that before
 
@Sherlock9 Can you try ]rows on -fo=3 -s=cut followed by ⍳99 99 ?
Don't paste the output, just tell me if it prints dots …
 
It does
On the right and between rows
 
Does boxing work on arrays, like ⍳2 3?
 
Yep. Boxing works as usual in that regard
 
11:34 AM
@Sherlock9 Hm, that's really odd.
 
Ah hell
I turned it off and on again
And it worked
I did have the interpreter apparently lose connection a few times
Could that be it?
(And only because I leave the computer on for days at a time, and the interpreter with it)
 
It really shouldn't matter, as the boxing state is by the interpreter, so turning it on for the currently connected interpreter should "just work".
 
That is bizarre
Ah I turned it off and on again before doing output.find and rows so maybe those didn't work either but I can't check now
Maybe if the bug turns up again
 
All those user commands make sure ⎕SE.Dyalog.Out.Filter exists and handles output.
 
11:58 AM
Well, hopefully it won't reappear. Thanks a bunch, Adám
 
ngn
12:18 PM
@Adám do you have any idea what the answer to this could be? it must have predated dyalog, i found the same formula mentioned in "a dictionary of apl"
 
@ngn No, but maybe Roger or Marshall will have a good answer. J has it like that too.
 
 
4 hours later…
4:29 PM
hi
Is there a way to do an "each left" in Dyalog APL?
i have a mask (array of arrays) which i want to pass to ⌿ while using the same right argument.
or should i just do {⍵⌿data}¨mask?
 
ngn
@rcabaco is a bit special as it can be either a function or an operator, but in this case this works: mask⌿¨⊂data
 
@ngn yes it does. thank you
but why does it work?
enclosing data makes ⌿ replicate it?
makes sense, it replicates to match the size of the left argument
 
ngn
@rcabaco ⊂data is a scalar so ¨ calls the function as many times as the elements of the array on the other side
it's a bit like 0 1 2 f¨ 3 ←→ (0 f 3)(1 f 3)(2 f 3)
 
exactly. my thinking was all going to find a better structure for the mask instead of touching the data.
is there a better way to do this: {ids←(⊃⍤1)⍵ ⋄ (ids∘∊¨∪ids)⌿¨⊂⍵}data ?
grouping data by it's first column
 
ngn
4:46 PM
@rcabaco are you familiar with ⌹ (the key operator)?
in this case: (⊣/data){⊂⍺,⍪⍵}⌸2⊢/data
 
@ngn i have up to read the documentation to understand this. thank you
 
5:02 PM
how does ⊂ get the boolean vector there?
 
ngn
@rcabaco there's no boolean vector in my last example
⊣/⊢∘⊂⌸⊢ is a train equivalent to {(⊣/⍵) ⊢∘⊂⌸ ⍵}
 
so ⊂ is not partition enclose?
 
ngn
and if i also expand the composition ⊢∘⊂ it becomes {(⊣/⍵) {⊂⍵}⌸ ⍵}
@rcabaco no, it's just enclose in this case
 
ah
i see
 
ngn
i composed it with in order to ignore the left argument
 
5:06 PM
so you use ∘ to bind to ⌸ not to ⊂
 
ngn
@rcabaco ⊢∘⊂ ←→ {⍺⊢⊂⍵} ←→ {⊂⍵}
and this is the operand of
@rcabaco do you know how operators work?
 
ah, now i see what happened there
poorly
 
ngn
there are two kinds of operators - monadic and dyadic (this is very different from the way monadic/dyadic functions work)
a monadic operator has two arguments and one operand (in dyalog's terminology)
the syntax is: leftarg operand OPERATOR rightarg
 
yes, i understand that
 
ngn
an example of a monadic operator is the each (¨) you used earlier
leftarg is optional
so we could have A f¨ B or f¨ B
dyadic operators, like for instance, have two operands: optionalleftarg leftoperand OPERATOR rightoperand rightarg
if we write just leftoperand OPERATOR rightoperand, it's called a "derived function"
or operand OPERATOR in the case of monadic operators - that's also a derived function
now, if i'm lucky, the bot should print a graphical representation of how that train is parsed...
⎕← ⊣/⊢∘⊂⌸⊢
 
5:15 PM
@ngn
┌──┼─┐
⊣/ ⌸ ⊢
 ┌─┘
 ∘
┌┴┐
⊢ ⊂
 
ngn
@rcabaco can you guess what ⊣/ does?
 
the first column
 
ngn
correct
in the train, the result from ⊣/ will become the left argument to , and (the matrix itself) will be the right argument
the operand is ⊢∘⊂
uses its left arg as keys for grouping the elements major cells of its right arg
("major cells" = "rows" in this case)
 
so compose uses as operands ⊢ and ⊂, instead of using the whole left expression (⊣/⊢)
 
ngn
then calls the oprand function multiple times with the current key as ⍺ and the current vector of major cells as ⍵
@rcabaco yes
 
5:22 PM
is this always the case? if there is some train, compose will use only the rightmost operand to its left?
i should read up on the parsing rules
 
ngn
@rcabaco this may be a bit confusing at first. parsing functions+operators is like parsing arrays+functions but in reverse
so you could have for example things like +.×∘⍉ ←→ (+.×)∘⍉. here +.× (matrix multiplication) is the left operand to
 
does this mean that operator parsing is left to right and function parsing is right to left?
 
ngn
in the previous example (⊣/⊢∘⊂⌸⊢) this doesn't happen as ⊣/ is already "complete", / being only a monadic operator
 
i mean, the only way for ∘ to know that +.× is its left operand is for that to be bound first
 
ngn
@rcabaco in a sense, yes. i guess one could say it that way
 
5:28 PM
but this reasoning does not take me far, as you just showed. knowing if an operator is monadic or dyadic is more important.
 
ngn
in reality it's all implemented with stacks and all sorts of clever parsing stuff, so there's no actual dancing left and right on the source code, but conceptually yes
@rcabaco for each operator it is known in advance whether it's monadic or dyadic, unlike functions which are often ambivalent ("nomadic")
 
i meant, for me to know :)
because now i can understand that / is a monadic operator therefore it will get ⊣, while ⊢ is going to compose
 
ngn
yeah, i guess there's no way around memorizing that :)
 
thank you for the explanation.
 
ngn
/ \ are all special cases, by the way
 
5:31 PM
i have to read this again.
why?
 
ngn
@rcabaco they can be either functions or monadic operators, depending on context
for instance, the / in +/1 2 3 is a monadic operator
but the / in 0 1 1/'abc' is a function
 
yes, that is true. i still don't think in terms of operators and functions. i think of +/ as a function too, not as one function and an operator.
as a unit, i mean
 
ngn
@rcabaco well, that's correct thinking, it is a function - a "derived" one
 
yes, but then i need to parse it in a train :)
and i need to think of / as a monadic operator
 
ngn
even if it's not in a train, you should know what kinds of stuff the squiggles represent (functions, monadic operators, dyadic operators)
 
5:42 PM
i will.
 
ngn
for example +/⍣≡ is completely different from +/¨≡
is a dyadic operator, so the whole first expression is a single function
¨ is a monadic operator, so the second expression is a sequence of +/¨ and , therefore a 2-train, a.k.a. an "atop"
iirc dyalog's ide-s make this clear through syntax highlighting
 
+ binds to /, +/ binds to ⍣ with ≡
 
ngn
⎕←+/⍣≡
 
@ngn
   ⍣
  ┌┴┐
  / ≡
┌─┘
+
 
ngn
@rcabaco ^ yes
 
5:48 PM
+ binds to /, +/ binds to ¨ of the argument and is compared with the result of ≡ of the argument
 
ngn
feel free to use the bot for experimentation (just type ⎕←...). i believe the room owner wouldn't mind.
 
⎕←+/¨≡
 
@rcabaco
    ┌┴┐
    ¨ ≡
  ┌─┘
  /
┌─┘
+
 
6:33 PM
i have difficulty reasoning without ¨. For example, in the grouped data we got from above, i need to order each group by its 3rd column. i do this: (⍋¨2⌽¨⊣/⊢∘⊂⌸⊢)data
or maybe i am thinking in very small steps
 
@rcabaco (⍋¨ 2⌽¨ ⊣/ ⊢∘⊂⌸ ⊢)(⍋¨ (2⌽¨ (⊣/⊢∘⊂⌸⊢) )) - you rotate the result of , not the result of ⊣/
actually, you should be rotating before ⊣/, not after (and using ⊣/ then becomes pointless)
 
but i still want to group by the first column
that is, group by the first column and after order each group by the third column
 
@rcabaco ah ok, i misunderstood what you wanted
i'd probably just use ¨ for each group, i don't think there's a way around it, and hopefully the groups will be large anyways
 
6:49 PM
yes, that was my concern. that i was abusing ¨
 
@rcabaco my thinking is ¨ is only bad when its operand is quick. when it does a lot of computation, its overhead becomes negligible
 
ok, i'll use that as reference.
 
thank you. so index is the function to use for this kind of thing
 
3⌷[2]A and A[;3] seem to be pretty much equal after more individual testing
unrelatedly, i find it interesting that this uses ○÷¯180÷5 instead of ○5÷¯180. i guess it makes more sense to think of ○÷¯180÷ as a single thing, but then again the same file uses ○⍵÷180 before
 
8:12 PM
⎕←⊢⌷⍨∘⊂∘⍋⌷⍤1
 
@rcabaco
  ┌─┼───┐
  ⊢ ∘   ⍤
   ┌┴┐ ┌┴┐
   ∘ ⍋ ⌷ 1
  ┌┴┐
  ⍨ ⊂
┌─┘
⌷
 
9:10 PM
⎕←3(⊢⌷⍨∘⊂∘⍋⌷⍤1)
 
@rcabaco
SYNTAX ERROR
 

« first day (998 days earlier)      last day (52 days later) »