Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strange bug #64

Open
electricWah opened this issue Nov 7, 2023 · 2 comments
Open

strange bug #64

electricWah opened this issue Nov 7, 2023 · 2 comments

Comments

@electricWah
Copy link

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 .sworks 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.

@booniepepper
Copy link
Collaborator

booniepepper commented Nov 7, 2023

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.

@booniepepper
Copy link
Collaborator

Even stranger: I cannot replicate this on Linux, but I get similar output on a Mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants