« first day (900 days earlier)      last day (128 days later) » 

10:02 AM
 
10:35 AM
⍬2⍴...? Useful!
 
11:10 AM
it's my implementation of the ¯1 talked about a bit above here. isn't the best thing to use for that, but imo it's better than using up the whole negative domain (even if negatives aren't used currently)
it also can be used without spaces, but for how useful ⍬2⍴ is, i think even 3 chars is a bit much
 
11:55 AM
Ah, I see now.
I fully agree regarding the utility of the construct. Have found myself counting the length of the input, instead. Not nice.
 
 
1 hour later…
1:22 PM
@dzaima I think it should be so that the negatives can reverse fill of axes. Btw, why doesn't ⊖[1 2]mat or ⊖⍤(⊂1 2)⊢mat work? It should clearly be ⌽⊖mat
 
1:39 PM
@Adám infinity could also cause issues - it's there for edge-cases after all
also has the property ∧/∊⍬2=4 2
 
1:53 PM
@dzaima I'm not sure I understand why that is useful.
 
@Adám it easily allows testing whether a shape with empty dimensions matches an actual shape. I don't know when that'd be helpful, but it exists
 
@dzaima Ah, I see. However using uses up the entire nested domain. E.g. 2(2 4)⍴⍳6 could mean [1 2 0 0 ⋄ 3 4 5 6]. Not sure how useful that is, but…
 
@Adám yeah, everything except some null type is gonna have consequences
 
@dzaima Well, there are also various variations, like combining "fill" with reverse, and strict/round-up-and-pad/round-down/round-up-and-recycle.
 
@Adám imo everything except strict there is useless (maybe also not reverse, but it doesn't feel too useful either), but that's just my opinion
 
 
2 hours later…
4:34 PM
Error value must have one value out the range of possible right results, each operation that has the error value has to return the error value, each function that has one argument the error value, or in its argument there is one error value, has to return the error value...
 
5:33 PM
@RosLuP Except if an error causes an actual error instead of an error value. E.g. 2÷0 can either return NaN or actually error.
 
 
2 hours later…
7:20 PM
NaN is perfect as error value, at last I think that...possible codified in a character... So the program can continue, and if some output is request one know it is incorrect when see that the program print Nan as result...
 
@RosLuP Then what happens if the vector Vec containing has 1 NaN 3 and Res←+/1 0 1/Vec? What should Res become? 4 or NaN?
 
@Adám when + meet Nan it return Nan so the result for me will be Nan...so +/ 1 0 1 1 Nan 3 for me it has to return Nan...
 
@RosLuP Yes, but how about +/1 0 1/1 NaN 3 ?
 
@Adám yes that not use NaN...if not use they value it would be 4... 1 0 1/1 Nan 3 return 1 3 so +/1 3 would return 4 because not use one error value...
 
@RosLuP So you're saying that +/1 0 1/1 2 6÷1 0 2 should give 4?
 
7:32 PM
In few words all variable are not build on Nan should be ok even if in the program there is some Nan
 
@RosLuP Isn't that a bit dangerous? You might not notice that something is terribly wrong in your program.
 
The result build without error are ok...if some collateral calculation give Nan but it is not used for the result should be ok too
Yes I say +/1 0 1/1 2 6 div 1 0 2 (if 1 0 1/ means choose only first and last) should return 4
 
@RosLuP in my opinion code should always error at the earliest time possible always, because relying erroring operations pretty much always means bad code - e.g. that code should replicate before dividing
 
@dzaima That's just that particular example, but the compress (/) may not be possible until after the potential error-inducing operation.
 
For me one has to be sure only the chain or the path from initial values thru all operation that effectively give the result
 
7:44 PM
@Adám I understand that that example was exaggerating, yes, but in general, if you're dividing by zero there are two options - either you wanted that or didn't. If you didn't, an error would most definitely be appropriate. If you did, well you could've just not divided by zero if you knew the outcome..
 
@dzaima Of course, but this was to make the point that inserting a NaN and continuing with code that may then later discard the NaN can be dangerous.
 
if there is one zero division and the program drive one machine or one aviation it can not stop...it has return one wrong value and the machine has to run in the error path...
For me if Nan is not used: It is ok
 
@RosLuP I think that it would be safer for the control system to signal that it has hit an error than to command that the servo motor rotate NaN (or a complex number of) degrees…
 
@RosLuP for me NaN shouldn't exist, as using it at any point in time is gonna be only a waste of CPU
 
In a perfect word Nan or the error value should not exist...but in programming are the input can be out of consented value, div 0, overflow numbers, memory exhaust...so it return Nan...
are==area ^ above
 
7:58 PM
@RosLuP (you can edit your messages)
 
@RosLuP in my opinion, if you want to have explicit error values, make explicit error values. They can be useful, but being everywhere I feel they do way way more harm than help
 
@RosLuP Or throw an error. As far as I know, no APL which uses the name "APL" has NaNs.
 
@Adám does my APL count as using the name APL, because it definitely has NaNs (only because I haven't bothered removing them though)
 
@dzaima As far as I knew, then. But they are unintentional, right? Now I think of it, Dyalog also has NaNs, but only because we don't sweep for NaNs.
 
@Adám yeah, they are unintentional, and it'd probably harm performance a lot in Java to detect NaNs
 
ngn
8:17 PM
devil's advocate: all floating point, including NaN, is wrong and evil, but given it already exists in hardware, why not make the most of it performancewise?
 
@ngn I agree, floating point sucks, but as the alternative is doing a lot of unnecessary work, it's used
i really don't know the details, but doesn't x86 allow deciding what happens with erroring actions without harming performance otherwise?
 
ngn
@dzaima for sse the mxcsr register controls that
 
ngn
8:44 PM
see also man feenableexcept
 

« first day (900 days earlier)      last day (128 days later) »