◀◀SYNTHESIZE▶▶

From Esolang
Jump to navigation Jump to search

◀◀SYNTHESIZE▶▶ is an Esolang where the main way to modify a variable (and only strings!!!!!!) is to fuse them together or to set one equal to another. However other than that it is not too hard to program in. Other than that being the only way to modify variables, the syntax and execution is not too unusual and/or hard-to-read. Though the conditionals are intentionally cut down as much as possible and the conditionals not found are doable via the "negate next" command. Also, Indentation does not matter, but can be used to make the program more readable (or not, if you want to make it look bad)

Commands

The commands in ◀◀SYNTHESIZE▶▶ are as follows, also you no longer have to scream to read a program as all of them. Strings can also be treated as integers without evaluation.

Commands in ◀◀SYNTHESIZE▶▶
Command Function
print [string in quotes/variable name] Prints the string given or variable's value. Add "without newlines" to not print a new line.
define [variable name] as [value] Makes a variable with that name, strings only
delete [variable name] Deletes a variable if needed.
get [prompt] into [variable name] Get input from user and prompt with the given prompt, stores the input into the variable name given.
[variable] becomes [variable 2] sets the two variables equal to each other (the value being the second variable's value)
synthesize [list of strings/variable names/mix] into [variable name] Fuses given strings and stores answer into a variable with given name (or new one), separate parts with "+"
evaluate arithmetic-wise [string] into [variable name] Evaluates the string as if a math expression. Stores answer into given variable name.
evaluate bit-wise [string] into [variable name] Evaluates the string as if a boolean expression. Stores answer into given variable name.
while [var] equals [str/var] do While loop, you can replace equals with greater than / less or equal to.
if [var] equals [str/var] then If statement, you can replace equals with greater than / less or equal to.
else If the condition found in the If statement, run this instead
else if [var] equals [str/var] then Do if all previous conditions not met, check this, cannot come after else.
for [local scale variable, name anything] less than [number] increment [number] For loop, increment is optional and defaults to one. Less than is max value.
negate next Negates next while/if statement found. If the direct next statement isn't a while or if, it just waits for first while/if found.

(note that leaving out the variable name in the evaluate statements just change the variable used.)

Example Commands!

Hello World

Prints "Hello World!" To the console.

print "Hello World!"

Truth machine

See Truth Machine

get number into input_
if number equals "0" then
   print "0"
else
   while number equals "1" do
      print "1" without newlines

FizzBuzz

Counts up from 1, if % 3 == 0, print "Fizz", if % 5 == 0, print "Buzz", if % 15 == 0, print "FizzBuzz"

define temp as "temp"
define count as "0"
while temp equals "temp" do
   synthesize count + %3 into modthree
   synthesize count + %5 into modfive
   synthesize count + %15 into modfifteen
   evaluate arithmetic-wise modfifteen
   evaluate arithmetic-wise modfive
   evaluate arithmetic-wise modthree
   if modfifteen equals "0" then
      print "FizzBuzz"
   else if modfive equals "0" then
      print "Buzz"
   else if modthree equals "0" then
      print "Fizz"
   else
      print count
   synthesize count + +1 into next
   evaluate arithmetic-wise next into count

(The old version had a very big problem)

99 Bottles of Beer

99 Bottles of beer on the wall, 99 bottles of beer, take one down, pass it around- yea

define bottles as "99"
while bottles greater than "1" do
   print bottles without newlines
   print "bottles of beer on the wall"
   print bottles without newlines
   print "bottles of beer"
   print "take one down"
   print "pass it around"
   synthesize bottles + -1 into temp
   evaluate arithmetic-wise temp
   bottles becomes temp
   print bottles
   print "bottles of beer on the wall"
print bottles without newlines
print "bottle of beer on the wall"
print bottles without newlines
print "bottle of beer"
print "take one down"
print "pass it around"
print "No more bottles of beer on the wall"
print "Go to the store and buy some more, 99 bottles of beer on the wall..."

Computational class

◀◀SYNTHESIZE▶▶ is Turing-complete, because it can simulate Minsky machine

Implementations

None... yet, add yours here if you have one!