Skip to content

Fysh-Fyve/fysh

Repository files navigation

This is fysh.

><>

Fysh have to be terminated ~.

><> ~

This is Steven.

><steven> ~

Steven has binary scales. } represents 1 and ) represents 0. Steven is valued at 0b101. (5 in decimal)

><steven> = ><})}> ~

Steven doesn’t give a flying fysh about scale direction. ≈ for variable assignment is cool with them too.

><steven> ≈ ><}({> ~

Steven is blind. You have the power to bless them with sight, but it's completely optional. (you can make them biblically accurate by giving them multiple eyes)

><steven> ≈ ><{({°> ~
><steven> ≈ ><{({o> ~

><steven> ≈ ><{({°°> ~
><steven> ≈ ><{({o°> ~

><steven> = ><{({°o°> ~

A school of fysh's value is equal to the sum of each individual member. This gives Steven a value of 0b101 = 0b100 + 0b001. (5 = 4 + 1)

><steven> ≈ ><{((°> ><(({°> ~

Sometimes fysh want to be different and swim the other direction. This takes away from the school’s value. This gives Steven a value of. 0b101 = 0b111 - 0b010. (5 = 7 - 2)

><steven> ≈ ><{{{°> <°)})>< ~

Fysh often get lonely. This loneliness causes fysh to meet new fysh and proliferate. This gives Steven a value of 0b101010 = 0b110 * 0b111. (42 = 6 * 7)

><steven> = ><{{(°> <3 ><{{{°> ~
><steven> ≈ ><{{(o>  ♡ ><{{{o> ~

><steven> ≈ ><{{(o°> ❤️ ><{{{°°> ~
><steven> ≈ ><{{(oo> ❤️‍🔥><{{{°o> ~

><steven> ≈ ><{{(°°°> 🫀 ><{{{ooo> ~
><steven> ≈ ><{{(°o°> 🫶 ><{{{o°o> ~

.
.
.

><//> (Should work with any heart, if we're missing any, let us know)

Not every fysh story is a happy one. At times, separation is unavoidable, and their division breaks their heart. This gives Steven a value of 0b101 = 0b11001 / 0b101. (5 = 25 / 5)

><steven> ≈ ><{{(({°> 💔 ><{({°> ~
><steven> = ><{{(({o> </3 ><{({o> ~

Fysh are often abducted and forced into fyshbowls for terrestrials' amusment. This isolates the fysh and makes them sad. Fyshbowls are represented by ( ). This gives Steven a value of 0b101 = 0b101 / (0b101 - 0b100). (5 = 5 / (5 - 4))

><steven> ≈ ><{({°> 💔 ( ><{({°> <°}))>< ) ~

As life goes on, we learn from our mistakes and improve. Steven’s self help journey allowed them to grow an extra tail, incrementing their value by 1.

>><steven> ~

Sometimes we feel like a fyshup, a failure. And that's ok, it’s a part of being fysh. However for some fysh, this feeling is too much to handle and is internalized. They haven’t received the emotional support they need and have gone on a downward spiral, causing them to feel worthless. They begin to retreat and try to swim away in the opposite direction causing their value to decrement by 1.

<steven><< ~

BEDMAS/PEMDAS has been taught to humans for over a century. But what about fysh? Fysh have a different way of doing things. Introducing FISHS: Fyshbowl, Increment, Species reproduction, Heartbreak, and School of fish ( (), >><>, ♡ , 💔, ><> <>< ). This gives Steven a value of 0b10101111 = (0b11001 + 1) + 0b110 * 0b11001 - 0b1100 / (0b110 + 0b110). (175 = (25 + 1) + 6 * 25 - 12 / (6 + 6))

><steven> ≈ >><{{(({°>  ><{{(°> ♡ ><{{(({°> <°}}))>< 💔 ( ><{{(°> ><{{(°> )  ~

Sometimes Steven fyshs up and throws an error. This can be done using two WTF (What The Fysh) fysh encompassing a string.

><!@#$>
	What The Fysh?!
<!@#$><

Navigator fysh are used to guide the reader through the code. They are represented by ><//>. (comments)

><//> What's cookin good lookin?

Sometimes, the journey through the sea of code is long and dark. In these cases, multiline comments are used to provide a more detailed explanation of the code. They are represented by ></*> and <*\><. (multiline comments)

></*>
How to grill a fysh:
1. Catch a fysh
2. Grill the fysh
3. Eat the fysh
<*/><

This is a grilled fysh. It generates a random signed 32-bit number that determines the doneness of the fysh.

><###> ~

Not all fysh are created equal. But sometimes they are. We can check using ≈≈ or ==.

><steven> ≈≈ ><theFysh> ~
><steven> == ><theFysh> ~

Sometimes we want to check if two fysh are different. This can be done using ~≈ or ~=.

><steven> ~≈ ><theFysh> ~
><steven> ~= ><theFysh> ~

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 (respectively)
><steven> o~ ><{({°>
><steven> ~o ><{{{°>

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

><//> Greater, Less than or equal to (shorthand)
><steven> o= ><{({°>
><steven> ≈o ><{{{°>

Steven is experiencing an existential crisis. They are questioning the very fabric of reality. Are they real? Are they a simulation? Are they a fysh? Are they a human? Are they a fyshuman? Are they a human fysh? Are they a fyshy human? Are they a humany fysh? Are they a fyshy humany? Are they a humany fyshy? Are they a fyshy humany fysh? Are they a humany fyshy human? Are they a fyshy humany fyshy? Are they a humany fyshy humany? Are they a fyshy humany fyshy human? Are they a humany fyshy humany fysh? Are they a fyshy humany fyshy humany? Are they a humany fyshy humany fyshy? ...

So steven is looking for the truth. If steven is real and they found the truth, they are happy. (Steven && theTruth)
Steven would also be happy if either they are real or if they found the truth. (Steven || theTruth)
But then steven thought about it and thought "hey it would be kinda cool if I wasn't real" and are only happy if they are not real. (!!Steven)

><steven> && ><theTruth> ~
><steven> || ><theTruth> ~
!! ><steven> ~

Steven is bored and looking to have their bits rearranged. At Fysh, we're here to help! We have provided Steven with a variety of tools and bitwise manipulations to satisfy their bit busting needs: AND (&), OR (|), XOR (^), NOT (!). For those moments when they're feeling particularly adventurous, they might even consider the logical shift left (<<) or logical shift right (>>) operators.

><steven> &  ><{((°> ~
><steven> |  ><{((°> ~
><steven> ^  ><{((°> ~
! ><steven> ~
><steven> << ><{((°> ~
><steven> >> ><{((°> ~

In the whirlpool of fysh logic, the while loop, symbolized by ><(((@> or ><@>, ensnaring conditions within a fysh tank[ ], with ><> and <>< encapsulating the iterative heart.

><(((@> [ ><steven> o~ ><{((°> ]
><>
	<steven><< ~
<><

><@> [ ><steven> o~ ><{((°> ]
><>
	<steven><< ~
<><

If statements are happy since they're the condition you're looking for. It helps validate them and improve their self-esteem. ><(((^>
Else statements feel like they're the last resort, an afterthought. This makes them feel unimportant and sad. They are represended by a dead fysh ><(((*>
Else if statements are the middle child, they're not the first choice but they're not the last either. They're the middle ground. They are represented by both a happy and a dead fysh ><(((*> ><(((^>

Conditions are encapsulated within a fysh tank [ ], with ><> and <>< encapsulating the conditional heart.

><(((^> [ ><steven> o~ ><{((°> ]
><>
	<steven><< ~
<><

><(((*> ><(((^> [ ><steven> ~o ><{((°> ]
><>
	>><steven> ~
<><

><(((*>
><>
	><steven> ≈ ><(((°> ~
<><

A fysh tank [ ] is also used for an array of fysh that is seperated by fysh food -.

><steven> ≈ [><({(°> - ><({(°>] ~

These fysh tanks can be traversed using a fysh.
(Steven returns the element at index 1 (0-indexed))

><steven>[><(({°>] ~

To define a function or SUBroutine, use a submarine >(funcNameHere) along with any parameters ><param>. By default, last expression in the subroutine acts as the return value. To explicitly return a value, use a baby squid <~ or 🦑.

>(submarine) ><param1> ><param2> ><param3>
><>
	<~ <fysh>< ~
<><

To call a subroutine, put the submarine in a fysh tank along with its arguments in any order. If two params are next to each other, seperate them with a fysh food -.:

[><fysh1> >(submarine) ><fysh2> - ><fysh3>] ~

To interact with the ocean floor (GPIO), use the anchor.

><{({°> o+) <fysh>< ><//>  get value from gpio pin b'101'
><{({°> (+o <fysh>< ><//> write to gpio pin b'101'
(+o ><fysh> ~ ><//> Write the value of Fysh to the GPIO pins

Factorial Example

><//> Comment

><number>    ≈ ><{({°> ~  ><//> b101 = 5
><factorial> ≈ ><(({°> ~  ><//> b001 = 1

><//> while number > 1
><(((@> [><number> o~ ><(({°>]
><>
	><//> factorial = factorial * number
	><factorial> ≈ ><factorial> ♡ ><number> ~

	><//> number -= 1
	<number><< ~
<><

About

A Fish Themed Esoteric Programming Language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published