DateFuck

From Esolang
Jump to navigation Jump to search

DateFuck is an esolang designed by John Ohno (User:Hakware) in 2007 for use in creating text-based dating sims and text adventures. It is probably Turing-complete, and consists entirely of printing, xor, and implied jumps. It contains no instructions, and has no data storage, save from the program counter itself. Despite this, it is capable of being used to create rather complex programs. It is also interactive, with each jump requiring user input, though it would be possible to pipe two such programs into one another in order to create one self-sufficent program.

It was rewritten in 2010 with some semantic modifications, forming DateFuck-2.

README for DateFuck-2

DateFuck is a programming language designed for writing text-based dating sims.
It is not useful for much else.

Syntax:

There is one internal variable, initially set to one. Each non-indented line
is a line of dialogue/info. Labels are numbers representing the state necessary
to go to that piece of dialogue, followed immediately by a colon. It is in
hexadecimal. Indented lines are options, preceeded with labels which are xor'd
with the internal state variable if that option is chosen. The list of options
terminates at the next non-indented label.

Example:

1:What do you want to say?
        2:Hello World!
        5:Hello Sailor!
        1:Exit
3:Hello World!
        3:Exit
4:Hello Sailor!
        4:Exit

README for the original DateFuck

DateFuck is a programming language designed for writing text-based dating sims.
It is not useful for much else.

Syntax:

There is one internal variable, initially set to zero. Each non-indented line 
is a line of dialogue/info. Labels are numbers representing the state necessary 
to go to that piece of dialogue, followed immediately by a colon. It is in 
hexadecimal. Indented lines are options, preceeded with labels which are xor'd 
with the internal state variable if that option is chosen. The list of options 
terminates at the next non-indented label.

Example:

0:What do you want to say?
	1:Hello World!
	2:Hello Sailor!
	0:Exit
1:Hello World!
	1:Exit
2:Hello Sailor!
	2:Exit

Status

There is a compiler available, which works. One known bug, however, is the fact that every program must start with an empty line. It compiles to C.

Notes

It has been brought to light recently that DateFuck code is in fact valid YAML, despite YAML not being capable of interpreting the structure as it exists in DF or compiling it to C. This may make it possible for future DF compilers to use a YAML parser as a frontend, though that is not really necessary as the FLEX parser in the existing compiler is a mere 47 lines at time of writing.

External resources