« first day (1824 days earlier)      last day (114 days later) » 

5:29 AM
has anyone worked with binary search trees in APL?
my current best representation is based on a 2 col matrix
 
 
4 hours later…
9:14 AM
@Adám so how about my domain idea?
 
10:03 AM
@Adám what does it mean in dyalog linux when there's a pink outline around the edit window
 
10:23 AM
@KamilaSzewczyk Making too large numbers give a LIMIT ERROR? You can always suggest it, although we're a little reluctant to change base error types (since there could be traps out there for that specific error). Maybe DOMAIN ERROR: Result exceeds maximum representable value? Feel free to suggest that.
 
@Adám the main problem i'm having here is that my code wants to distinguish between real domain errors and overflow "domain" errors.
maybe it's possible with the state-of-art APL, but i doubt it.
 
Real domain errors means division by 0?
 
@KamilaSzewczyk Like this?
      _Op←{11::{1=⍵:'div by 0'⋄'gen. dom. err.'}⎕DMX.ENX⋄⍺ ⍺⍺ ⍵}
      1E300×_Op 1E300
gen. dom. err.
      1÷_Op 0
div by 0
 
hang on, how does it work
i can't find the documentation for ENX
 
10:37 AM
 
yeah, that much i figured
but it doesn't say anywhere what the numbers mean
 
Because they depend on the main number (EN). Cause the error you're interested in, then check ⎕DMX.ENX.
Maybe I should find them all and add them to APLcart?
 
that'd be cool.
 
Hm, setting ENX doesn't auto-set Message, the way setting EN auto-sets EM. I wonder if this is a bug/oversight. I'll look into it.
 
 
1 hour later…
12:07 PM
@Adám I've accidentally killed my APL session
I interrupted the function, but it seems like nothing is working now. When i type expressions to the REPL they simply disappear, and the interpreter is stuck in a loop
might it be related to this error handler maybe?
 
?
 
oh edit: even though I interrupted it, the computation has "finished" and everything i typed into the REPL reappared...
I managed to reproduce the problem
 lim←{
     (⎕FR ⎕PP)←1287 34
     f←⍺⍺⋄ct←⍵
     {
         11::∇ (⍵-2×(¯1*~)1=⎕DMX.ENX)
         v←f¨0 1+⍵
         ct>|-/v:⊃v
         ∇ (⍵+2)
     } 2
 }
  f←{(÷⍵)×(!⍵)*÷⍵}
  f lim 0.0000001
If you call it like this and then issue a strong interrupt, nothing happens except the line being printed.
then if you bring back the last expression and reduce omega to say, 0.001, and press enter, the expression disappears
then after a few seconds it reappears and you can see the result of the computation, yet the Dyalog process keeps eating a full core
 
Can you email that to support@?
 
can you reproduce it?
 
Didn't try. Trying now.
 
12:12 PM
i don't want to go the administrative route and end up wasting someone's precious time without a confirmation.
my version is 18.0.40684
 
Doesn't repro in my 18.2 on Windows.
Trying 18.0 on Linux now.
 
it was weird this time
 
It seems to work okish by me, except everything is very slow when I have 13601 levels of stack.
 
i've recorded a video but you can't see me doing the interrupt (or the window decorations for some reasons)
@Adám could the unresponsiveness be caused by this then?
does it show itself in the same way as it does for me
 
@KamilaSzewczyk Yeah. Try a )sic or )reset
@KamilaSzewczyk Yes.
 
12:21 PM
hm
i wonder why doesn't TCO fire here
 
I think it is because of the error guard. It has to keep track of where it needs to backtrack to, in case of error.
@KamilaSzewczyk Btw, (⍵-2×(¯1*~)1=⎕DMX.ENX) is just ⍵-2ׯ1*1≠⎕DMX.ENX
 
hmm, i see
 
 
1 hour later…
1:26 PM
@Adám if the result is not representable, it should be a RANGE ERROR, rather than a DOMAIN ERROR... shouldn't it?
 
1:44 PM
@AlexB Well, there's no such thing as a RANGE ERROR. Maybe a LIMIT ERROR, but I'm not sure what the standards say.
 
1:54 PM
> In any case, exponent-underflow should not cause a limit-error.
@AlexB ^ is what the ISO standard says.
 
 
8 hours later…
9:26 PM
@Marshall (or @Adám, or anyone else who might know): I am very curious to find out if the horrific complexity of my answer here is related to the issues that motivate BQN's based array model. In particular, the fact that I have to special case opening things like (<2);1 (because it's open mixes a box and atom) made me think it might...
 
Hm, that'd take some thought.
 
It's a weirdly hard problem in J. I thought I'd be done in 5m and it took more than an hour of thinking even to get my current abomination of a solution...
 
I'm getting almost the same length with a completely different approach in APL.
 
One test of my theory would be if the BQN solves it tersely.
 
It might be easiest to build up a an APL/J/BQN expression to evaluate.
 
9:36 PM
Can you elaborate?
 
Take the deltas, whenever the value increases, insert ,(<(<(<(<… and whenever it decreases insert )))…)),
 
That's a good idea, I tried to box the values by n times, partition where depth changes and then somehow distribute the depth across the leafs
 
@Adám Oh, yes, I considered that, because no doubt the building up of a string like in some of the other answers would be at least slightly simpler. But I set myself the challenge of trying to do it without eval. The other option, which might be a bit better than mine (hard to tell without writing it) is to recurse with $: during the melding process.
 
It is easier to target JSON, though.
 

« first day (1824 days earlier)      last day (114 days later) »