Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "schrödinger's cat"
-
So I have somehow created schrödinger's cat in my program. If you observe what is happening, it works. But if you stop observing it, it starts corrupting.
If I put any print statement in it, it works. But if I have no print statements at all, it produces corrupted data. Doesn't matter what or when I'm printing.
I'm guessing its there's some fuckery going on with stdin/stdout and buffers. Even though the data coming to and from stdin/stdout should not affect the output.10 -
I would know how is Schrödinger's cat by just seeing this:
val cat = getSchrodingersCat()
> cat: Option[Cat]