▲ 30 ▼ I'm still working on it... (lemmy.world) submitted 5 months ago by over_clox@lemmy.world to c/programming_horror@programming.dev 5 comments fedilink hide all child comments
[–] theit8514@lemmy.world 3 points 5 months ago (1 child) Technically Zero is 0-0 since One hasn't been set to anything yet. permalink fedilink source hideshow 2 child comments replies: [–] over_clox@lemmy.world [S] 5 points 5 months ago* (1 child) Indeed. But... If One was defined as random garbage, then still... Zero=One-One See my definition of One afterwards, it's a bit awkward, but works.. Edit: Stop using digits, 0 is a digit... permalink fedilink source parent hideshow 2 child comments replies: [–] ignirtoq@feddit.online 2 points 5 months ago (1 child) I'm not super familiar with BASIC. Can you explain how the definition of One works? If variables have random values when declared but not set due to memory garbage, I would expect ZeroBit to be "true" half the time and "false" the other half. When it's false, I can reason through it, but when it's true I don't see it. I imagine it has something to do with the details of ABS()? permalink fedilink source parent hideshow 2 child comments replies: [–] over_clox@lemmy.world [S] 2 points 5 months ago* (last edited 5 months ago) Different BASIC dialects work differently, you're absolutely right to ask. Honestly, the ZeroBit code part is the hack within Mobile Basic, it always returns Zero, meaning the ABS(NOT(ZeroBit)) will always return One permalink fedilink source parent
[–] over_clox@lemmy.world [S] 5 points 5 months ago* (1 child) Indeed. But... If One was defined as random garbage, then still... Zero=One-One See my definition of One afterwards, it's a bit awkward, but works.. Edit: Stop using digits, 0 is a digit... permalink fedilink source parent hideshow 2 child comments replies: [–] ignirtoq@feddit.online 2 points 5 months ago (1 child) I'm not super familiar with BASIC. Can you explain how the definition of One works? If variables have random values when declared but not set due to memory garbage, I would expect ZeroBit to be "true" half the time and "false" the other half. When it's false, I can reason through it, but when it's true I don't see it. I imagine it has something to do with the details of ABS()? permalink fedilink source parent hideshow 2 child comments replies: [–] over_clox@lemmy.world [S] 2 points 5 months ago* (last edited 5 months ago) Different BASIC dialects work differently, you're absolutely right to ask. Honestly, the ZeroBit code part is the hack within Mobile Basic, it always returns Zero, meaning the ABS(NOT(ZeroBit)) will always return One permalink fedilink source parent
[–] ignirtoq@feddit.online 2 points 5 months ago (1 child) I'm not super familiar with BASIC. Can you explain how the definition of One works? If variables have random values when declared but not set due to memory garbage, I would expect ZeroBit to be "true" half the time and "false" the other half. When it's false, I can reason through it, but when it's true I don't see it. I imagine it has something to do with the details of ABS()? permalink fedilink source parent hideshow 2 child comments replies: [–] over_clox@lemmy.world [S] 2 points 5 months ago* (last edited 5 months ago) Different BASIC dialects work differently, you're absolutely right to ask. Honestly, the ZeroBit code part is the hack within Mobile Basic, it always returns Zero, meaning the ABS(NOT(ZeroBit)) will always return One permalink fedilink source parent
[–] over_clox@lemmy.world [S] 2 points 5 months ago* (last edited 5 months ago) Different BASIC dialects work differently, you're absolutely right to ask. Honestly, the ZeroBit code part is the hack within Mobile Basic, it always returns Zero, meaning the ABS(NOT(ZeroBit)) will always return One permalink fedilink source parent
all 5 comments