Clock

From Esolang
Jump to navigation Jump to search

This language is a WIP.

Clock is a cell-based esoteric language based around time, created by User:Random.esotera.

Structure

':t(h/m/s)' Defines how much time there is in a Clock program. Defaults to 12h0m0s if it isn’t used.

':(h/m/s)(</>)' Rotates current time by specified time. < Means rotate counterclockwise and > means rotate clockwise. This is the main command of Clock.

If you use a multiple of 5 in h/m/s more times than you use a non-multiple of 5 in h/m/s, your program refuses to run, forcing you to be less neat. You may only ever use the same h/m/s value once.

The current second defines the current cell, meaning that there are only 43200 cells, unless you use clock expansions.

Commands

Command Definition
Rotate CW<=1m29s then CCW any amount Increment current cell by 1.
Rotate CCW<=1m48s then CW any amount Decrement current cell by 1.
Rotate CW>=6h25m13s Output current cell as one ASCII character.
Rotate CW>=7h17m59s Output current cell as an integer.
Rotate CCW>=6h34m2s Store input as 1 ASCII character in the current cell.
Rotate CCW>=7h54m33s Store input as an integer in the current cell.
Rotate CW>=1h3m19s<=2h54m Go back to the last time you rotated the same amount of time CCW, unless the current cell is equal to 0.
Rotate CCW>=1h3m19s<=2h54m Skip to the next time you rotate the same amount of time CW if the current cell is equal to 0.
Rotate CW>=8h45m15s NOP.
Rotate CCW>=8h35m42s NOP.

Examples

Truth machine

:15/58/59<
:8/1/1<
:2/0/2>
:10/59/58>
:15/58/58>
:8/1/2>
:10/59/59<
:2/0/1<
:15/58/57>
:8/1/3>
:15/58/59<:8/1/1<:2/0/2>:10/59/58>:15/58/58>:8/1/2>:10/59/59<:2/0/1<:15/58/57>:8/1/3>