« first day (1823 days earlier)      last day (123 days later) » 

10:55 AM
What is . again? Inner product?
 
⋄ 1 2 3+.×4 5 6 ⋄ +/1 2 3×4 5 6 ⋄ +.×⍨3 3⍴⍳9 ⋄ +/×⍨3 3⍴⍳9
 
@PyGamer0
32
32
 30  36  42
 66  81  96
102 126 150
14 77 194
 
i am trying to implement it in python
 
to see how inner product generalises on higher dimensions, look up matrix multiplication
+.× for rank 1 arguments is inner product, +.× for rank 2 arguments is matrix product.
 
11:02 AM
ok
 
⋄⎕←v1←2 3⍴⍳6⋄⎕←v2←3 2⍴6+⍳6⋄⎕←v1+.×v2
 
@KamilaSzewczyk
1 2 3
4 5 6
 7  8
 9 10
11 12
 58  64
139 154
 
@KamilaSzewczyk what about higher ranks?
 
12:05 PM
@PyGamer0 you can ascertain it from how +.× behaves on rank 3 arrays.
it's all just inner product over and over again.
that's how matrix multiplication works too, anyway.
 
ok, thanks
 
 
1 hour later…
1:16 PM
⋄ ?20
 
@FawnLocke 1
 
Seems like rng is broken on TryAPL?
⋄ ?20
 
@FawnLocke 1
 
@FawnLocke it's a bit weird but it works kinda?
 
⋄ ?50⍴20
 
1:27 PM
@FawnLocke 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 13 1 5 8 17 17 6 11 17 4 14 2 14 9
 
I think ⎕RL has just become fixed somehow
 
whoa what
 
⋄⎕RL
 
@FawnLocke
┌┬─┐
││1│
└┴─┘
 
/shrug
That looks normal
Maybe it's safe exec getting in the way of Dyalog's optimizations that it does with a ⍬ seed
Don't think so, perhaps just an issue server side
Anyway
 
1:55 PM
@TryAPL very random indeed
sad its not 4
 
2:33 PM
@Adám Is it normal that (with the Italian Keyboard), pressing ù doesn't actually display the letter, but highligth the language bar?
@MasterQuiz No, it doesn't do this. It is used like the prefix glyph, as `. But in Italian it is used quite commonly
@FawnLocke You should modify ⎕RL on TryAPL to make it really random
⋄ ?20⍴10
 
@MasterQuiz 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 
⋄ ?20⍴10
 
@MasterQuiz 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
 
⋄ ⎕RL ← ⍬2
⋄ ?20⍴10
 
@MasterQuiz 6 6 8 5 7 6 10 7 3 9 1 10 10 9 4 7 10 4 6 6
 
 
4 hours later…
6:57 PM
How to use rank here to have f 2 5 5⍴∊25∘↑¨(1 0 1 0 0)(1 0 1 0 1)? {∧/2≥(+/,+⌿)⍵>0}¨5 5∘⍴¨25∘↑¨(1 0 1 0 0)(1 0 1 0 1)
Actually, I'd need to understand how to convert a function that iterates through a vector of matrices to a function that uses rank over rank 2 vectors (Thing with three dimension, hope I got it right)
I think I got it. I just have to use ⍤2 here
 
7:13 PM
it kind of depends on how you look at the function. Is it the mathematical factorial? (probably not) or the Dyalog APL factorial? (probably yes)
I suppose it would be very difficult for the interpreter — probably impossible in the general case — to return a DOMAIN ERROR for domain violations of the mathematical function and a LIMIT ERROR for violations of the *implemented* function. The interpreter would have to do (a lot of) symbolic function calculations before performing the numeric calculation, or perhaps *after* the numeric calculation fails. Either way, very costly and error prone. Is
@KamilaSzewczyk Probably the parser detect the error...?
 
7:30 PM
@AlexB i think garbage errors are a flagship of array languages, so probably there isn't much demand for this feature
but detecting under/overflows is what dyalog already does.
speaking of the domain vs limit problem, it's a bit obvious that a function first checks if the preconditions are satisfied (it's not called on a pole, for division omega != 0, etc...), and then if the error happens inside of the function it could be reported as a limit error instead.
i'm not too sure where did you pull the symbolic computation from, since there's none needed.
also, the Dyalog APL factorial is no different to the mathematical factorial. The factorial function in Dyalog is simply defined in terms of the gamma function which is further approximated mainly using the Stirling formula, unless we're speaking of the complex plane.
 
 
2 hours later…
10:00 PM
I agree that the Dyalog error messages are a bit cryptic. I often struggle trying to understand where the problem is. It would be helpful if more information were printed out. To make a trivial example, even printing RANK ERROR: EXPECTED: 2, ACTUAL: 3, rather than just RANK ERROR.
Perhaps there could be a verbose mode to print errors, or more information could be stored in a system variable that can be queried on demand. To expand on the RANK ERROR message, I would want to know which function or operator caused the error and print the array that had a rank mismatch. I speculate that probably it would not be too complicated to add this functionality to the interpreter.
@KamilaSzewczyk TBH, I didn't put much thought into this. I was thinking that, if the factorial function of your example were downstream several other functions, the domains and ranges of the chain of functions would be all interrelated. However, upon further consideration, the domain could be checked for each function as a standalone, once it is about to be executed, rather than upfront before the whole expression is executed.
 
10:27 PM
@FawnLocke It is not.
@pmikkelsen f⌿ always applies f between scalars. So for f⌿3 4⍴⎕A f gets called 8 times. because there are 4 columns. The reduction over each column is then enclosed.
@pmikkelsen Anything Bracket Axis can do, can be done with Rank when helped by (Dyadic) Transpose.
@MasterQuiz The in-browser language bar? Yes.
 
@Adám My mistake
 
The idea is that ù is close to the shifting keys, and isn't really needed for writing APL.
@AlexB I'm not sure the interpreter can always know what's expected, but we are always adding more verbose errors, so if you have any particular in mind, please email support@dyalog.com
@AlexB This kind of already exists. An increasing number of errors have the form MAIN MESSAGE: details about it and info can be found in the system variable ⎕DMX (Diagnostic Message eXtended). However, we can't just keep a copy of the bad arguments, as there might be refs that would keep objects alive.
 
11:43 PM
@Adám Good to know. Thanks, @Adám!
 

« first day (1823 days earlier)      last day (123 days later) »