Skip to main content
Commonmark migration
Source Link

O

Factoid

#O ##Factoid OO is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#Length 5

Length 5

'69+o

This programs prints 69.

  • '6 pushes 6 as a string
    • ' pushes the next character in the program as a string to the stack
    • 6 is the next character, so it gets pushes as a string
  • 9 pushes the number 9 to the stack
  • + adds the top two elements of the stack. Since of them is a string, they get concatenated.
  • o outputs the result

#Length 4

Length 4

M]+o

This program gets the sum of all the digits of the input number. (1234 = 1 + 2 + 3 + 4 = 10)

  • M is a builtin macro that calls [i~.
    • [ Starts an array (which really acts like another stack)
    • i Gets an input from stdin and pushes it to the stack (the array in this case)
    • ~ Evaluates the top of the stack (the input) as O code, which pushes each digit of the input number to the stack.
  • ] Closes the array, pushes it to the stack
  • + Folds the array by adding all the elements together
  • o Outputs the sum of the digits to stdout.

It's a pretty complicated program for only being 4 bytes!

##Length 3

Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

##Length 2

Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

##Length 1

Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything.

#O ##Factoid O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#Length 5

'69+o

This programs prints 69.

  • '6 pushes 6 as a string
    • ' pushes the next character in the program as a string to the stack
    • 6 is the next character, so it gets pushes as a string
  • 9 pushes the number 9 to the stack
  • + adds the top two elements of the stack. Since of them is a string, they get concatenated.
  • o outputs the result

#Length 4

M]+o

This program gets the sum of all the digits of the input number. (1234 = 1 + 2 + 3 + 4 = 10)

  • M is a builtin macro that calls [i~.
    • [ Starts an array (which really acts like another stack)
    • i Gets an input from stdin and pushes it to the stack (the array in this case)
    • ~ Evaluates the top of the stack (the input) as O code, which pushes each digit of the input number to the stack.
  • ] Closes the array, pushes it to the stack
  • + Folds the array by adding all the elements together
  • o Outputs the sum of the digits to stdout.

It's a pretty complicated program for only being 4 bytes!

##Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

##Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

##Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything.

O

Factoid

O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

Length 5

'69+o

This programs prints 69.

  • '6 pushes 6 as a string
    • ' pushes the next character in the program as a string to the stack
    • 6 is the next character, so it gets pushes as a string
  • 9 pushes the number 9 to the stack
  • + adds the top two elements of the stack. Since of them is a string, they get concatenated.
  • o outputs the result

Length 4

M]+o

This program gets the sum of all the digits of the input number. (1234 = 1 + 2 + 3 + 4 = 10)

  • M is a builtin macro that calls [i~.
    • [ Starts an array (which really acts like another stack)
    • i Gets an input from stdin and pushes it to the stack (the array in this case)
    • ~ Evaluates the top of the stack (the input) as O code, which pushes each digit of the input number to the stack.
  • ] Closes the array, pushes it to the stack
  • + Folds the array by adding all the elements together
  • o Outputs the sum of the digits to stdout.

It's a pretty complicated program for only being 4 bytes!

Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything.

Post Made Community Wiki by Dennis
length 5
Source Link
jado
  • 2.7k
  • 1
  • 17
  • 36

#O ##Factoid O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#Length 5

'69+o

This programs prints 69.

  • '6 pushes 6 as a string
    • ' pushes the next character in the program as a string to the stack
    • 6 is the next character, so it gets pushes as a string
  • 9 pushes the number 9 to the stack
  • + adds the top two elements of the stack. Since of them is a string, they get concatenated.
  • o outputs the result

#Length 4

M]+o

This program gets the sum of all the digits of the input number. (1234 = 1 + 2 + 3 + 4 = 10)

  • M is a builtin macro that calls [i~.
    • [ Starts an array (which really acts like another stack)
    • i Gets an input from stdin and pushes it to the stack (the array in this case)
    • ~ Evaluates the top of the stack (the input) as O code, which pushes each digit of the input number to the stack.
  • ] Closes the array, pushes it to the stack
  • + Folds the array by adding all the elements together
  • o Outputs the sum of the digits to stdout.

It's a pretty complicated program for only being 4 bytes!

##Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

##Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

##Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything.

#O ##Factoid O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#Length 4

M]+o

This program gets the sum of all the digits of the input number. (1234 = 1 + 2 + 3 + 4 = 10)

  • M is a builtin macro that calls [i~.
    • [ Starts an array (which really acts like another stack)
    • i Gets an input from stdin and pushes it to the stack (the array in this case)
    • ~ Evaluates the top of the stack (the input) as O code, which pushes each digit of the input number to the stack.
  • ] Closes the array, pushes it to the stack
  • + Folds the array by adding all the elements together
  • o Outputs the sum of the digits to stdout.

It's a pretty complicated program for only being 4 bytes!

##Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

##Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

##Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything.

#O ##Factoid O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#Length 5

'69+o

This programs prints 69.

  • '6 pushes 6 as a string
    • ' pushes the next character in the program as a string to the stack
    • 6 is the next character, so it gets pushes as a string
  • 9 pushes the number 9 to the stack
  • + adds the top two elements of the stack. Since of them is a string, they get concatenated.
  • o outputs the result

#Length 4

M]+o

This program gets the sum of all the digits of the input number. (1234 = 1 + 2 + 3 + 4 = 10)

  • M is a builtin macro that calls [i~.
    • [ Starts an array (which really acts like another stack)
    • i Gets an input from stdin and pushes it to the stack (the array in this case)
    • ~ Evaluates the top of the stack (the input) as O code, which pushes each digit of the input number to the stack.
  • ] Closes the array, pushes it to the stack
  • + Folds the array by adding all the elements together
  • o Outputs the sum of the digits to stdout.

It's a pretty complicated program for only being 4 bytes!

##Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

##Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

##Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything.

length 4
Source Link
jado
  • 2.7k
  • 1
  • 17
  • 36

#O ##Length##Factoid O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#Length 4

M]+o

This program gets the sum of all the digits of the input number. (1234 = 1 + 2 + 3 + 4 = 10)

  • M is a builtin macro that calls [i~.
    • [ Starts an array (which really acts like another stack)
    • i Gets an input from stdin and pushes it to the stack (the array in this case)
    • ~ Evaluates the top of the stack (the input) as O code, which pushes each digit of the input number to the stack.
  • ] Closes the array, pushes it to the stack
  • + Folds the array by adding all the elements together
  • o Outputs the sum of the digits to stdout.

It's a pretty complicated program for only being 4 bytes!

##Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

##Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

##Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything. ##Factoid O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#O ##Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

##Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

##Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything. ##Factoid O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#O ##Factoid O is a programming language inspired by GolfScript, Pyth, K, and tons of other languages. It was made by Phase (me) over the summer of 2015, so it is relatively new. The interpreter was originally written in Java, but development has recently switched to a C interpreter. Here are some examples of the language.

#Length 4

M]+o

This program gets the sum of all the digits of the input number. (1234 = 1 + 2 + 3 + 4 = 10)

  • M is a builtin macro that calls [i~.
    • [ Starts an array (which really acts like another stack)
    • i Gets an input from stdin and pushes it to the stack (the array in this case)
    • ~ Evaluates the top of the stack (the input) as O code, which pushes each digit of the input number to the stack.
  • ] Closes the array, pushes it to the stack
  • + Folds the array by adding all the elements together
  • o Outputs the sum of the digits to stdout.

It's a pretty complicated program for only being 4 bytes!

##Length 3

{1}

O supports CodeBlocks like GolfScript and CJam. This is a CodeBlock that pushes the number 1 to the stack when it is run. Just creating a CodeBlock pushes the block itself to the stack, without running it. We could assign it to a variable, or use ~ to run it.

##Length 2

Ao

A pushes 10 to the stack. o pops the top of the stack and outputs it to STDOUT. This program outputs 10 to the screen.

##Length 1

1

Any number literal will be pushed to the stack as an integer. The stack is not outputted when the code ends (though this may change soon!), so the program exits without outputting anything.

length 3
Source Link
jado
  • 2.7k
  • 1
  • 17
  • 36
Loading
length 2
Source Link
jado
  • 2.7k
  • 1
  • 17
  • 36
Loading
length 1
Source Link
jado
  • 2.7k
  • 1
  • 17
  • 36
Loading
Source Link
jado
  • 2.7k
  • 1
  • 17
  • 36
Loading