Informal
- This is still a work in progress. It may be changed in the future.
Informal is a pseudo-natural language that uses informal English as an attempt to make an esoteric language, created by kiken.
Designed by | kiken |
---|---|
Appeared in | 2023 |
Computational class | Unknown |
Reference implementation | Unimplemented |
File extension(s) | .informal , .infm |
Overview
An Informal statement is part of an English sentence. Informal statements may end with .
, ,
, !
or ?
depending on where they are placed. !
and ?
can follow each other consecutively, like !!!
or ?!
.
At the start of a sentence, an Informal statement must begin with a capital letter, else it should end with a lowercase.
Types
There are three data types:
- Floating point number (
number
- normal digits) - String (
string
- defined with""
- Boolean (
truth
,yes
orno
)
I/O
See
The see
statement is used to output to the console. Example usage:
See yes.
To see a string, use the I'm like
syntax, which is like this:
then I'm like, <string>.
If the statement is in the start of a sentence, use
I'm like, <string>, then
If the statement is in the middle of a sentence, use
then I'm like, <string>, then
If the statement is a stand-alone sentence, then use
I'm like, <string>.
Question
A question gets input and ends with a question mark. The following questions are available:
Question | Return Type |
---|---|
Which is? |
Returns input from the user as the previously mentioned datatype, like: your [datatype], which is?
|
Am I right? |
Returns a boolean. Used after your truth .
|
you're true |
This has to be in the middle of a sentence and is used in conditional sentences. Also returns a boolean. |
Example cat program:
Forever see your string, which is?
Control flow
In the below examples, <code>
represents a section of an English sentence.
If statements
If statements are defined with:
If <boolean>, then <code>
If else statements are like this:
If <boolean>, then <code1> otherwise <code2>
If code1
ends in a question mark then otherwise
must be capitalized.
Example:
If you're true, then forever see your truth, am I right? Otherwise, see no.
Loops
In Informal, there are a few types of loops.
A forever loop loops forever. It is used like this:
Forever <code>
A comma may optionally be inserted in between forever
and <code>
.
An example was just shown above.
An until loop loops until the condition is true. Usage:
Until <condition>, <code>
An example was also shown here.
Conditions
A condition can be of many forms. A less-than operator is done like this:
<thing>'s smaller than <thing>
Similarly, a greater than operator is done like this:
<thing>'s bigger than <thing>
A not operator would be to insert an ain't
between <thing>
and the bigger
/smaller
, like so:
<thing> ain't <bigger/smaller> than <thing>
Equals:
<thing>'s <thing>
Halting
A halt is used with stop
. It can only end with a period or an exclamation mark. Additional code may be added behind stop
and will be executed.
This is valid:
Stop!
This (for some reason) is also valid:
Stop, stop, stop!!!
Variables
Declaration
Declaring variables in Informal is used with the feels like
/feeling like
statement. feels so
/feeling so
refers to an assignment of a constant. In Informal, only identifiers can be used as variables, which are:
- I'm/me (constant)
- Her/She/She's
- Him/He/He's
- They/They're
- It/It's (constant)
For example:
It feels so "Hello, world!", see it!
Basic Math
You can increment/decrement identifiers in Informal with
<identifier>'s <bigger/smaller> than before, mate!
This statement can only end with !
, .
or ,
.
String functions
In Informal, a string is a list of chars. There are a few functions to manipulate these chars.
Grab
Grabbing
a char from a string returns a specific char from a string.
I got <string>!
Merge
Merging a string to another string concatenates them.
<string>'s merged to <string>!
Nahhh
Nahhhing (what?) a char against a string removes all instances of the char in the string.
Nahhh, we ain't gonna have <char> around <string>.
Numbers
Numbers in Informal are represented with a word followed by some adjectives, which add on to the noun. The noun by default is 0, and each adjective adds 1 on to the noun. A number starts with 'a' unless referred to with 'another'.
a happy sad wonderful shwibbly nostalgic colorful apple (returns '6')
Multiplication
Numbers can be multiplied together with times
.
a <number> times another <number>
Of course, variables can be multiplied together, omitting the 'a'.
Examples
Hello, world!
I'm like, "Hello, world!"!
Cat program
Until no, see your string, which is?
Truth machine
If you're true, then forever see a sappy tree, otherwise see grass.
Looping counter
She feels like a weird worm! Forever then I'm like, "*", then she seems bigger than before mate, if she's bigger than him, then see "\n".
99 bottles of beer
He feels like a strange confused green colorful sappy sad leafy red watery liquidy quick bean times another wonderful shwibbly nostalgic colorful happy excited bright delicious eye-burning apple. Until he's smaller than a small bean, see him, then I'm like " bottles of beer on the wall, ", then see him, then I'm like, "99 bottles of beer.\nTake one down and pass it around, ", then see him, then I'm like, " bottles of beer.\n\n". I'm like, "No bottles of beer on the wall, no bottles of beer. Go to the store and buy some more, 99 bottles of beer on the wall.".
Computational class
Unknown.
Implementations
I am currently working on an implementation, thought it is not finished.