added 120 characters in body
Source Link
Wheat Wizard Mod
  • 77.7k
  • 1
  • 29
  • 62

Brain-Flak

Input

Input in Brain-Flak will be passed as command-line arguments to the interpreter. (On Try it online this doesn't work and instead they have to be put into the Input field with a whitespace separator) They will appear on the active stack at the beginning of execution.

If a challenge calls for a specific number of inputs they can be passed in any order you choose.

If the challenge requires you to take list or array of items you can have the items all passed as separate command-line arguments.

For example if the challenge is to sum up all the numbers in a list, the following code is valid:

(([]){[{}]{}([])}{})

Output

For Brain-Flak whatever is printed at the end of the program is the output, this does not include the offstack. You may leave anything you wish on the offstack at the end of execution.

For truthy and falsy values only the top item is considered. If the top item is zero, it is falsy otherwise it is truthy.

For example:

5
0
6

is True


0
1
4

is False

Because Brain-Flak's stacks are padded with an infinite number of zeros, an empty stack is considered a zero and is thus falsy in Brain-Flak.

The same does not hold for numeric values. For instance if you must output 5 you may not output:

5
1
0

However the stack is still padded with infinite zeros so when a zero is required for output the empty stack is acceptable.

Brain-Flak

Input

Input in Brain-Flak will be passed as command-line arguments to the interpreter. They will appear on the active stack at the beginning of execution.

If a challenge calls for a specific number of inputs they can be passed in any order you choose.

If the challenge requires you to take list or array of items you can have the items all passed as separate command-line arguments.

For example if the challenge is to sum up all the numbers in a list, the following code is valid:

(([]){[{}]{}([])}{})

Output

For Brain-Flak whatever is printed at the end of the program is the output, this does not include the offstack. You may leave anything you wish on the offstack at the end of execution.

For truthy and falsy values only the top item is considered. If the top item is zero, it is falsy otherwise it is truthy.

For example:

5
0
6

is True


0
1
4

is False

Because Brain-Flak's stacks are padded with an infinite number of zeros, an empty stack is considered a zero and is thus falsy in Brain-Flak.

The same does not hold for numeric values. For instance if you must output 5 you may not output:

5
1
0

However the stack is still padded with infinite zeros so when a zero is required for output the empty stack is acceptable.

Brain-Flak

Input

Input in Brain-Flak will be passed as command-line arguments to the interpreter. (On Try it online this doesn't work and instead they have to be put into the Input field with a whitespace separator) They will appear on the active stack at the beginning of execution.

If a challenge calls for a specific number of inputs they can be passed in any order you choose.

If the challenge requires you to take list or array of items you can have the items all passed as separate command-line arguments.

For example if the challenge is to sum up all the numbers in a list, the following code is valid:

(([]){[{}]{}([])}{})

Output

For Brain-Flak whatever is printed at the end of the program is the output, this does not include the offstack. You may leave anything you wish on the offstack at the end of execution.

For truthy and falsy values only the top item is considered. If the top item is zero, it is falsy otherwise it is truthy.

For example:

5
0
6

is True


0
1
4

is False

Because Brain-Flak's stacks are padded with an infinite number of zeros, an empty stack is considered a zero and is thus falsy in Brain-Flak.

The same does not hold for numeric values. For instance if you must output 5 you may not output:

5
1
0

However the stack is still padded with infinite zeros so when a zero is required for output the empty stack is acceptable.

Source Link
Wheat Wizard Mod
  • 77.7k
  • 1
  • 29
  • 62

Brain-Flak

Input

Input in Brain-Flak will be passed as command-line arguments to the interpreter. They will appear on the active stack at the beginning of execution.

If a challenge calls for a specific number of inputs they can be passed in any order you choose.

If the challenge requires you to take list or array of items you can have the items all passed as separate command-line arguments.

For example if the challenge is to sum up all the numbers in a list, the following code is valid:

(([]){[{}]{}([])}{})

Output

For Brain-Flak whatever is printed at the end of the program is the output, this does not include the offstack. You may leave anything you wish on the offstack at the end of execution.

For truthy and falsy values only the top item is considered. If the top item is zero, it is falsy otherwise it is truthy.

For example:

5
0
6

is True


0
1
4

is False

Because Brain-Flak's stacks are padded with an infinite number of zeros, an empty stack is considered a zero and is thus falsy in Brain-Flak.

The same does not hold for numeric values. For instance if you must output 5 you may not output:

5
1
0

However the stack is still padded with infinite zeros so when a zero is required for output the empty stack is acceptable.

Post Made Community Wiki by Wheat WizardMod