,(*+): Difference between revisions

From Esolang
Jump to navigation Jump to search
Content deleted Content added
No edit summary
No edit summary
Line 5: Line 5:
* <code>;</code>: dequeue and enqueue.
* <code>;</code>: dequeue and enqueue.
* <code>{S}</code> dequeue a string X. now, all instances of X ever within the stack, are to be replaced with S. this does not include strings that have X within them. these can be redefined. Replacements applied after every command.
* <code>{S}</code> dequeue a string X. now, all instances of X ever within the stack, are to be replaced with S. this does not include strings that have X within them. these can be redefined. Replacements applied after every command.
* <code>+</code> dequeues an element, and makes to copies of it, and puts it back on the queue
* <code>+</code> dequeues an element, and enqueues two copies
* <code>[...]</code> all code within the brackets will not allow subprograms to run(as in it will not allow new program to run from this one), however it will allow all super programs to run
* <code>[...]</code> all code within the brackets will not allow subprograms to run(as in it will not allow new program to run from this one), however it will allow all super programs to run
anything else is a [[NOP]].
anything else is a [[NOP]].

Revision as of 09:23, 8 November 2025

,(*+) is a esolang made by User:yayimhere with only recursion, and nothing else(basically). The commands are:

  • (S): enqueue the literal string "(S)" and then run S.
  • ,: dequeue a string, and replace , with that string. if there is no string, it just gets replaced with nothing. Even though its placed within the program, its still though of as a subprogram alike in (S).
  • *: reverse queue.
  • ;: dequeue and enqueue.
  • {S} dequeue a string X. now, all instances of X ever within the stack, are to be replaced with S. this does not include strings that have X within them. these can be redefined. Replacements applied after every command.
  • + dequeues an element, and enqueues two copies
  • [...] all code within the brackets will not allow subprograms to run(as in it will not allow new program to run from this one), however it will allow all super programs to run

anything else is a NOP. a program halts whenever it:

  • reaches the end of the program

Programs

Infinite Loop:

(,)

Truth machine:

(i)

i is the input. for 0 replace it with -, for 1 replace it with +,

Tips

to make a program loop forever, simply put the whole program within a (;...;,), doing *; instead of *. also when the loop ends, make sure your queue is in the order you want it to be!