GulfOfMexico icon indicating copy to clipboard operation
GulfOfMexico copied to clipboard

[BUG] Accidentally broke math

Open Locust2520 opened this issue 2 years ago • 4 comments

Hello,

I ran this piece of code:

fio prime (n) => {
   const var i = 1!
   when (i < n-1) {
      i++!
   }
   when (n % i == 0 && i > 1) {
      return false!!
   }
   when (i >= n-1) {
      return true!
   }
}

prime(7) = false?

and got the following error:

Windows XP broken plz help

After rebooting everything went well again, but I am deeply concerned by the DreamBerd 3's ability to permanently break fundamental laws (and therefore end the simulation of our universe) with an instruction such as:

const const const prime(7) = false!!!

Please consider adding safeguards before this ends up in the hands of CERN researchers.

Locust2520 avatar Oct 30 '23 13:10 Locust2520

Already fixed:

Please be careful with this keyword

- https://github.com/TodePond/DreamBerd#immutable-data

mybearworld avatar Oct 31 '23 14:10 mybearworld

Can you not do something like const const const prime(7) = true!!!!!!!!!!!!!!!!! on the off chance that someone decides to end the world?

TheTechRobo avatar Oct 31 '23 15:10 TheTechRobo

Thanks to both of you for pointing this. I feel safer now.

Locust2520 avatar Oct 31 '23 16:10 Locust2520