Timefuck

From Esolang
Jump to navigation Jump to search

Timefuck is an esoteric language based on brainfuck and TwoDucks, made by Alternative678 in December 2009.

Commands

Characters that aren't commands do nothing. Because 'v' is a command, replace it with w or u in comments.

  • '+-<>.' do the same things as in brainfuck.
  • '(f)' does f if the current cell is not 0.
  • '|' is a label for time traveling.
  • '^fv' does f in the temporal and spacial context of the last label.

Examples

|+.(^-v)

This program demonstrates Timefuck's handling of the grandfather paradox. Using the many-worlds view of space-time, this program simply arrives at the . with the current cell 0 even though that value hasn't been created yet.

Turing-completeness

Any brainfuck program can be converted to Timefuck by replacing '[foo]' with '|(^foov)'.

In Progress

BF to TF Converter in Python (Golfed)

print(input().replace("[","|(^").replace("]","v)"))