Skip to main content

🧠 Chapter 3: Fysh Logic and Operations

🤔 Logical Operations

  • AND (&&), OR (||), and NOT (!!): Steven is experiencing an existential crisis. They're questioning the very fabric of reality.
    • If steven is real and they found the truth, they're happy. (Steven && theTruth)
    • Steven is happy if either they're real or found the truth. (Steven || theTruth)
    • But then Steven thought about it and said "hey it would be kinda cool if I wasn't real" and is now only happy if they're not real. (!!Steven)
><steven> && ><TheTruth> ~
><steven> || ><TheTruth> ~
!! ><steven> ~

🔧 Bitwise Operations

  • Steven is bored and looking to have their bits rearranged. At Fysh, we're hereto help! We have provided Steven with a variety of tools and bitwise manipulations to satisfy their bit busting needs:
    • AND (&)
    • OR (|)
    • XOR (^)
    • NOT (!)
><steven> & ><(({°> ~
><steven> | ><(({°> ~
><steven> ^ ><(({°> ~
! ><steven> ~
  • Logical shifts: Steven can also use logical shifts! Steven shifts their bits to the left then right by 1.
    • Left shift (<<):
    • Right shift (>>):
><steven> << ><(({°> ~
><steven> >> ><(({°> ~

🐸 Tadpoles

Tadpoles are Fysh too. They swim towards bigger Fysh (they like the danger) and are represented by ~o or o~. Here, we are checking if Steven is bigger than 5 and less than 7, respectively.

><//> Greater/Less than
><steven> o~ ><{({°>
><steven> ~o ><{{{°>

><//> Greater/Less than or equal to (replace ~ with ≈ or =)
><steven> o= ><{({°>
><steven> ≈o ><{{{°>