« first day (899 days earlier)      last day (1762 days later) » 

3:54 PM
@ngn Was this a throwaway line, or do you really think APL should have nulls? I know k has them, but I think Arthur put them in because of customer demand. I know the k folks initially frowned upon nulls. I've always felt they create many more problems than they solve.
 
ngn
@PaulMansour one advantage is that the interpreter doesn't need to stop the computation for the whole array when one result item happens to be undefined
the floating point null is NaN. i don't like NaN generally, because it breaks basic mathematical identities, but k makes it tolerable by making it equal to itself (in most languages it isn't)
the int null is the smallest representable int. it's not well-behaved anyway: x=-x (the only int other than 0 that's equal to its own negative), so why not use it for something useful
@PaulMansour what is it you and those k folks don't like about them?
 
4:16 PM
In k I assume 2 + null is null, is that right? What is +/ 2 null 3 ? I know in q (and SQL) the sum function treats nulls as zeros, which means that 2+null+3 is not the same as +/2 null 3
 
ngn
@PaulMansour 2+0N (int) depends on which version of k. 2+0n (fp) should be 0n. i agree, +/ and sum not being the same sucks
 
Also, if null equals null, logic seems to go out the window. If I want to know where or how many values are equal in two corresponding vectors, the answer is simply wrong.
As null is not a value, or it is value, or its a value that is not a value.
 
ngn
i perceive nulls as values used when there's no other meaningful result. if you want to do any further operations on an array that can potentially contain nulls, you should first deal with them - fill or remove them
one of my major complaints against apl is the way it treats 0÷0 as either 0 or 1, depending on a system variable. i think it's wrong to pretend it's any specific number.
 
4:32 PM
That's an interesting view. I view nulls more a missing value, or an unknown value, which seems somewhat different than the lack of a meaningful result. This is one of the problems of null, it has too many meanings.
 
ngn
sometimes nulls are useful as input to primitives: 0N 2#x (reshape to a 2-column matrix) vs apl's overly verbose ⍵⍴⍨2,⍨2÷⍨≢⍵
 
:51013966
That's nice. I wonder would neg 1 work for that too.
¯1 2⍴⍳25
 
ngn
4:47 PM
@PaulMansour there was an idea to make negatives in the shape mean reverse along that axis. i'm not sure where it comes from (it's not j)
@PaulMansour Adam's "dyalog extended" uses ¯1 like you described
 
 
3 hours later…
7:30 PM
@PaulMansour Hi Paul. One detail: SQL's sum doesn't treat null as zero. null is ignored/skipped by almost all aggregate functions except count(*).
select sum(t.x) from (values (null::int),(null),(null)) AS t(x);null (not 0).
 
 
3 hours later…
10:08 PM
@J.Sallé As ngn has already answered using \` (him being Mister Scan), I'll just counter that you should always be able to determine how many 2↓s are needed so you can do {(2×0,⍳1+⌈0.5×≢⍵)↓¨⊂⍵}, but yes, that is a bit cumbersome. I agree that it is annoying that we can't easily have ⍣` give intermediary results.
 
10:18 PM
@ngn The main value of APLcart is the table. I don't even use all the meta info fully. Anyone who wishes to do so can take the table and build a better way to access its data. I'm open for suggestions…
 
@J.Sallé my APL
 
Does anyone know if ⎕NA is able to reference a class exported in a DLL?
 
@Nathan Did you ask John?
 
10:55 PM
0
Q: Is there a way to ⎕NA import a dll exported C++ class in dyalog APL?

NathanI have a .dll which exports a C++ class. Is there some way to use ⎕NA to import this class into Dyalog APL? I am looking at the DLL Export Viewer, and my class is exporting the way I expect. I have also written a C++ test application which imports the .dll and uses the class, and it functions t...

 

« first day (899 days earlier)      last day (1762 days later) »