icedvariables / replace-lang

A esoteric language based around regular expressions and self-modifying code
GNU General Public License v3.0
1 stars 0 forks source link

Misleading interpreter definition #1

Open groowyCZ opened 5 years ago

groowyCZ commented 5 years ago

The official interpreter doesn't allow for self-modifying code, even though the esolang and github pages claim that it does.

abc/def
(.|\s)+/abc

should return def, but instead returns abc.

Patrolin commented 4 years ago

https://github.com/icedvariables/replace-lang/blob/b9d2cffd1906db08df05dff4fba9c02c857b9b23/replace.py#L12

program.split("\n")

This creates a copy of the original program, which prevents self-modification.