Giggle

From Esolang
Jump to navigation Jump to search

What is this?

Giggle is a language designed by User:PixelatedStarfish in 2022. It is the ultimate in programming languages. It can take literally any input, convert it into text, and then convert that text into runnable source code. It's a Starstuff language, an attempt at realizing the vision of turning literally anything into runnable code, so that no one will ever be able to say "Ugh, I just can't code." ever again! So, how does this one work? Well, with the power of a stack! Behold, a language so simple it does not throw errors at all! First off let me introduce you to the accumulator!

The Accumulator

This is a byte that can be incremented and decremented, at the start of each program it is zero!

The Stack

This stack stores integers. When it gets to a size of 500, it empties, that's it!

Interpretation

To interpret data, convert it to ASCII text, convert each character to an integer value, and apply a mod 10 operation to produce a sequence of numbers that correspond with commands.

Commands

Each instruction operates in isolation. Each command can run regardless of program state.

0 - Increment the accumulator.
1 - Decrement the accumulator.
2 - Push the value of the accumulator on to the stack.
3 - Pop value of of the stack and print it as an ASCII character. 
    If the stack is empty, do nothing.
4 - Print the absolute value of the accumulator as an ASCII character.
5 - Set the accumulator to the value at the top of the stack and pop.
    If the stack is empty set to 0.
6 - Increment the program counter by the value of the accumulator. 
    It should wrap to the start and end as needed.
7 - Print a 7.
8 - Set the accumulator to a random integer.
9 - End program.

Computational Class

A push down automata.