Open electricWah opened 1 year ago
I don't even know what could have changed to produce this, but I have witnessed something similar. I don't know how to consistently replicate it. looking into this.
As a note, my expected output would be different:
Input: [1 2] dup first .s
Expected output: [ [ 1 2 ] 1 ]
Can you also share what platform this is on? (OS and Architecture)
P.S. Feel free to add command ideas into #61 but do know that I plan to be extremely conservative with builtins and the standard library.
Even stranger: I cannot replicate this on Linux, but I get similar output on a Mac
Reproduction:
[1 2] dup first .s
Expected output:[ [ 1 2 ] 2 ]
Actual output:[ [ 2 -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037206620809969885 ] 1 ]
I'm not sure whats causing the weird float in the output, but whats happening is obviously some kind of "copy by reference" bug, especially because
[1 2] dup rev rev first .s
works as expected.While on the subject, may I suggest adding a pop_from_other_side command (aka the opposite of
enq
), as that is what I was trying to do here but it probably should be a builtin.