Talk:Memfractal

From Esolang
Jump to navigation Jump to search

Very clear 10/10 TuxCrafting (talk) 15:31, 3 November 2016 (UTC)

I've tried to rewrite the spec in my own words:
It's a 2D esolang, where the starting position in unspecified, but could be a corner or one of the sides. (Probably the latter.)
The program is surrounded by a rectangle of #s, with one directional arrow on each side, pointing inwards.
The program has a single bit of state. It is unspecified, but it probably starts at 0.
  • + makes an instance of the current program (with it's own state), starting the new program at the inward pointing arrow pointing in the direction of the IP when meeting +.
    • If this + has already been used to make a new instance, the state is kept from the last usage.
  • / and \ are mirrors that act as they do in most 2D esolangs.
  • * toggles the state.
  • X the control flow operator - acts like / if the state is 1, \ otherwise.
  • # crashes the program.
When an child instance of a program (that is, not the main one) terminates by touching one of the border arrows, it returns control to it's parent instance. The parent's IP goes towards where the child one exited.
The program terminates when the main instance exits by one of the border arrows.
The only way to have unlimited access to memory is to create instances.
Maybe coming in from different sides could interface differently with some internal state similar to ABCDXYZ?
Camto 23:29, 16 March 2019 (UTC)
Sorry my document isn't very good, but what you wrote look like good to me. --Zzo38 (talk) 05:20, 17 March 2019 (UTC)

Truth Machine

##v#
#/+#
#\\#
>?X<
##^#

? = * for 1, <space> for 0

This tries to adhere to the original + rewritten spec above. I'm assuming the IP starts at the left wall's > and heads right, though that's not stated anywhere.

I only just discovered this language. It seems similar to Thue-Mirr, which I like. I may try to create an interpreter for this at some point. It doesn't seem like it'll be able to do too much though. Even encoding anything of much length could be tricky Salpynx (talk) 01:24, 11 February 2020 (UTC)

Rewriting the specs... Again

Someone already rewrote the specs, but I still have my own take on it.

The program consists of a rectangle with a size of at least 3x3.

At the edges of the rectangle are 4 walls of "#" (one for each edge), each consisting of 1 arrow pointing inwards, one of those arrows optionally being marked with "S" instead of an arrow.

Each copy of the program contains a single bit of memory, which can be changed, but you only have access to the current bit of memory.

The commands are:

  • Arrows:
    • S: Marks an arrow as the starting arrow of the program. If not in the program, the starting arrow is chosen at random.
    • >, v, < and ^: These are the points where the program can be entered/exited from. These must point inwards. In case the starting copy of the program is exited, there are more copies to use.
  • Control flow:
    • +: Contains an entire copy of the program. When entered from any direction, the respective arrow is where the program starts.
    • Mirrors:
      • / and \: Change the direction of the IP by reflecting it.
      • X: If the current memory is 1, act like /, otherwise act like \.
      • =: Does nothing if the IP's direction is horizontal, acts like / otherwise.
  • Memory:
    • ?: Replace the current memory with a bit from STDIN.
    • *: Flip the current memory.
  • Misc.:
    • .: Output the current memory.
    • #: Instantly halt the program.

All other commands not listed there are NO-OPS.

Here's an example:

#v####
#  ++#
S? X <
#/*./#
#^####

The program above is a Truth Machine. Joaozin003 (talk) 18:59, 3 May 2023 (UTC)