We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Overshoot Dirac Delta

From Esolang
Jump to navigation Jump to search

Overshoot Dirac Delta or ODD is an Esoteric programming language created by User:Yayimhere, based on counting transients in cycles/under a modulo and seeing if a specific transient moves up or down 1 every time.

Etymology

It is named after concepts listed in the "See Also" of the wikipedia article for audio transients. Specifically those are Overshoot and Dirac Delta, Overshoot being taken from a transient response in electrical engineering.

Memory

Memory is stored in an ordered list of "slots". Slots can hold a single symbol. The amount of slots is equal to N, a register stored separately. A new slot willl be added whenever N increases. There is no case in which N decreases. N starts off at the 3. There's two pointers both starting at index 0. One points to the program symbol list, and another to the slots list. Theres also a stack which store slot list states. These do not have pointers.

Syntax

Each "symbol" is a string separated by a string. Thats it. Simplest syntax ive ever made!

Semantics

A program is a list of symbols(which in reality are written as strings but are just read as unique identifiers), which must be 3 symbols long, and there must be at least two different types of symbols. First, the symbol currently pointed to is inserted the slot currently pointed to(which override its original value if it had any). Afterwards both pointers increment. If the slot pointer increments out of bounds it wraps around to the start. All logic associated with moves happens before insertion. This process ends when the last character is reached of the program, in which both counters increment one more time. The program pointer also wraps around. Note the slot list pointers location will be where it starts from next iterations of actions. Then it pushes the slot list state to the stack. Then, insertion starts again, incrementing the two pointers together, though the save pointer location for the slot list is used instead of the start. When it's done, we compare the slot list and the slot list on the top of the stack, popping that. we compare them by seeing for some index i(0 indexed) in the popped list, its held symbol is equal to i+1 mod N in the current slot lists state. If such an index is found, it is saved as D, if not, the following loop is skipped with failure. The slot list state is pushed to the stack. Then the same writing algorithm starts, with the program pointer at the start of the program, and the slot list pointer at where it left off, with the slot list pointer wrapping, and both incrementing at the same time. When this is over, the exact same check is performed, however only testing the index D. If the check turns out correct, D is changed to the value D+1 mod N. Then the slot list is pushed, and the loop goes back to writing once again. This keeps going until:

  1. D has gone through every value from 0 to N-1, which exits with success.
  2. An index check failed, which exits the loop with failure.

In the case of success, it is checked what character remained equal across all checks of index. Then thats appended to the program N times. Then all of memory but the program is removed, and the program skips back to interpreting this newly generated program. In the case of failure, everything but N resets, N is incremented by 1, and the inserting process starts again(but with adjusted slot list length).