CAT

From Esolang
Jump to: navigation, search

CAT is a joke language, created by User:S. R. Farmer in 2005. It consists of 34 commands and tons of syntax. There is no interpreter yet. The CAT language has "cats" to do things, sort of like the Mix command in Chef. CAT is not an acronym, it's just capitalized to look all fancy-shmancy.

The basic commands are Purr, which prints text (or rather puts the "print text" command on a cat's "action queue"), Scratch, which makes a cat execute its action queue, and Meow, which ends the program. So here's the "Hello World!" Program in CAT:

"Hello World!" the cat- purr
Scratch "Hello World!"
Meow

The first command puts "purr" on the action queue of the cat named "Hello World!". Cats always purr their names. The "scratch" command tells Hello World! to execute his command, purr, which prints his name on the screen. Finally, Meow ends the program.

The "sniff" and "leap" commands open and close files. Sniff opens a file and leap closes one. These commands look for the file's path in the cat's name. So, the following process would open a file in the WINDOWS directory:

"C:/WINDOWS/fileA.txt/" the cat- sniff leap
Scratch "C:/WINDOWS/fileA.txt"
Meow

Now a new set of commands awaits you. As you read before, "C:/WINDOWS/fileA.txt" is a pain to type every time you want it to open that file, close it, etc. ect. That's why the next commands are very useful. The command is Owner. Owner tells the "rename" command (Sit tight and i will explain that command, too) the cat's name. The next command is Sell. Sell tells the "owner" command that you want to change a cats name. Now the third command is the real deal. This command is Rename. It renames the cat after it knows its name. Here is a sample on what you just learned:

"Larry McMann whos really cool" the cat- purr
Sell Owner- "Larry McMann whos really cool" Rename "Bob"
Scratch "Bob"

Rename does not change the cat's core value/name.

Time commands can change and tell you your computers time. Not so useful! Never the less, it can help you with variables (later on). The "watch" command stops any commands or actions for 0.1 seconds. The "time" command tell the time. The "min" command, that follows Time, only tells the minutes. The "hour" command work just like Min except it shows the hours instead of the minutes. The next command, Pounce on, changes the time. But must be typed in a certain form. This form is: Pounce On- Min- 0:00 Hour- 0:00. These are some of the very easy commands in CAT.

Now it is time for a more harder but more useful commands. Kittens, which are variables replace cat the in '"Blah" the cat'. Instead, you would put, '"blah" the kitten'. You must first use the "hiss" command to ask a question before you can use kittens. Kittens use two commands that cats don't regularly. These are Paw and Noop. Paw is the answer to a question. You put the text wanted to be printed next to "paw". Noop does nothing. So,

"Hello! Do you wanna soda?" the cat- purr
"yes" the kitten- paw "Ok, here you go!"
"no" the kitten- noop
Scratch "Hello! Do you wanna soda?"


You can create new commands if the commands in CAT are not enough. You must use the "to" and "bump" commands to start and end it. Here is an example:

to hello
"hello" the cat- purr
Scratch "hello"
bump


Creating new commands is like the LOGO procedure format. All new commands must be written before the program itself.

There are simple math commands to do complex problems.

* multiplication
/ division
+ addition
- subtraction
2]_ square root
3]_ cube root
x]_ where x = the number to root
y^2 where y is squared
y^x where y is raised to the x power


There are random commands to choose random numbers. Blink sets up a randomized counter up. The "slash" command let's Blink know the range of numbers to randomize. Lick picks one random number from blink. And finally, Tabby prints the random number picked.

There is no interpreter yet (if any of you could make one, that would be great!)

If you are going to make an interpreter, don't send it .exe format, (gmail gets all antispywareish) but send it in .cpp, .pl, etc. etc. If your interpreter isn't in .cpp format, please send me a URL linking to a free compiler. Please send the file to stuart.farmer.gamemaker6@gmail.com. Thanks a ton!!!

P.S. Send me an email telling me that you will make the interpreter so I won't be wondering if anyone will be making one.