NeverGonna

From Esolang
Jump to navigation Jump to search

NeverGonna is an esoteric programming language that is designed to look like the famous song "Never Gonna Give You Up".

Syntax

To declare a variable named foo with the value of 2:

we're no strangers to foo
gotta make foo 2

To make an if statement checking if foo == 2, using a user input:

we're no strangers to foo
gotta make foo your heart's been aching but you're too shy to say 'Please type in "orange"' -- get user input
inside we both know foo == "orange" then -- if statement
      i just wanna tell you "You did it!"
never gonna let you down  -- else
      i just wanna tell you "You failed."
never gonna give you up  -- end

To add two numbers into a variable named bar:

we're no strangers to bar
gotta make bar foo + 1

To make a for loop that prints the numbers 0 through 10:

we're no strangers to foo
gotta make foo 0
we've known foo for 10 -- for loop
      i just wanna tell you foo
never gonna give you up -- end for loop

To make a while loop

we're no strangers to foo
we're no strangers to bar
gotta make foo True
a full commitment's what I'm thinking of foo  -- while loop (while foo)
      gotta make bar your heart's been aching but you're too shy to say 'Please type in "orange"'
      inside we both know bar == "orange" then 
            gotta make foo False
      never gonna turn around bar == "" then  -- elif
            i just wanna tell you "You didn't type anything."
      never gonna let you down  -- else
            i just wanna tell you "You didn't type orange."
      never gonna give you up
never gonna give you up
i just wanna tell you "You did it!"

Examples

Hello World

i just wanna tell you "Hello World"

Fizzbuzz

we're no strangers to i
gotta make i 0
we've known i for 100
      inside we both know i % 15 == 0 then
            i just wanna tell you "FizzBuzz"
      never gonna turn around i % 3 == 0 then
            i just wanna tell you "Fizz"
      never gonna turn around i % 5 == 0 then
            i just wanna tell you "Buzz"
      never gonna let you down
            i just wanna tell you i
      never gonna give you up
never gonna give you up