Coding Around The Clock

GolfScript, 11 10 bytes

21;;3#9];6

Uses # as padding character.

12 o'clock

6
;
]
9
#
3
;
;
1
2

Try it online!

How it works.

  • 6 is pushed on the stack, ; discards it.

  • ] wraps the stack in an array (does not affect output).

  • 9 and 3 are pushed on the stack, ; and ; discard them.

  • Finally, 1 and 2 are pushed on the stack, and implicitly printed without separation.

3 o'clock

6
;
]
9
#
3
;
;
1
21;;3#9];6

Try it online!

How it works

  • 6 is pushed on the stack, ; discards it.

  • ] wraps the stack in an array (does not affect output).

  • 9 and 3 are pushed on the stack, ; and ; discard them.

  • 1 and 21 are pushed on the stack, ;; discards them.

  • 3 is pushed on the stack.

  • # begins a comment until the end of the line.

6 o'clock

6
;
]
9
#
3
;
;
1
2
1
;
;
3
#
9
]
;
6

Try it online!

How it works

  • 6 is pushed on the stack, ; discards it.

  • ] wraps the stack in an array (does not affect output).

  • 9 and 3 are pushed on the stack, ; and ; discard them.

  • 1, 2 and 1 are pushed on the stack.

  • ; and ; discard the last 1 and 2.

  • 3 and 9 are pushed on the stack.

  • ] and ; wrap the stack in an array and discard it, clearing the stack.

  • 6 is pushed on the stack.

9 o'clock

#########6
#########;
#########]
#########9
##########
#########3
#########;
#########;
#########1
6;]9#3;;12

Try it online!

How it works

  • All lines but the last are comments.

  • 6 is pushed on the stack, ; discards it.

  • ] wraps the stack in an array (does not affect output).

  • 9 is pushed on the stack.

  • # begins a comment until the end of the line.


><>, 20 bytes

X   n-+g+aa0g+9a2c!v

There's unprintables in there, namely:

  • After the X is \x06\t
  • After the c is \x03

The same part of source code is run each time, using g on two parts of the source code to determine what to subtract from 12.

v                         Make IP move downwards
 !\x03                    Jump over the \x03
      c                   Push 12
       2a9+g              Get the char at position (2, 19), i.e. the \t for
                          3 o'clock, the \x03 for 9 o'clock, 0 otherwise
            0aa+g         Get the char at position (0, 20), i.e. first char on
                          the line after the X, \x06 for 6 o'clock
                 +        Add
                  -       Subtract from the 12
                   n      Output as number
                    \t    Unrecognised instruction - errors out

12 o'clock | 3 o'clock | 6 o'clock | 9 o'clock (looks misaligned due to the tab)