MGIFOS

From Esolang
Jump to: navigation, search

MGIFOS, or My God It's Full Of Stars, is an esoteric programming language created by User:Marz. While 1L consists of 2 characters (+ and space), MGIFOS consists solely of the character *. Its command set is based on Brainfuck.

Language overview

MGIFOS is displayed by a series of stars (asterisks). The program is defined by the number of asterisks in the code.

Command (binary) Description
0001 Move the pointer to the right
0010 Move the pointer to the left
0011 Increment the memory cell under the pointer
0100 Decrement the memory cell under the pointer
0101 Output the character signified by the cell at the pointer
0110 Input a character and store it in the cell at the pointer
0111 Jump past the matching 1000 if the cell under the pointer is 0
1000 Jump back to the matching 0111

The commands are concatenated in the order required. For example, to move the pointer to the right and then to the left, the binary would be:

00010010

This in decimal is 18, meaning that the MGIFOS code is 18 stars in a row:

******************

Examples

Cat

The cat program ",[.,]" consists of 423272 stars in MGIFOS.

Infinite loop

The program "+[]" consists of exactly 888 stars. Oh lol.

Hello, world!

The program which prints out the words Hello World! consists of (approximately?) 4.5287549098E+168 stars.

It has been noted that there are more stars in the Hello World program than there are particles in the observable universe - but this is just a minor setback.

See also