Home

Awesome

1.1-Lang

Perl interpreter for esolang 1.1

More info can be found at: https://esolangs.org/wiki/1.1

Can be run from the commandline in the form: perl main.pl <commandline args> <scriptfile>

I have created a very simple batch script for Windows so you can run 1p1 <commandline args> <scriptfile> instead. Creating other equally simple shell scripts should not be a problem.

Commandline Args:

Script Format:

The first line should be: 1|<starting buffer or nothing>

The rest of the lines should be in the form: #1|<needle>|<replacement>|#t|#f

The last line must be in the form: #|Halt

Examples

These are included in this repo.

Hello World

1|Good morning you!
2|Good morning|Hello|3|4
3|you|World|4|4
4|halt
  1. The buffer is set to Good morning you!.
  2. Good morning is found and replaced by Hello.
  3. you is found and relaced by World.
  4. halt stops the program.

Cat

1|
2|HALT

Binary Incrementer

A conversion of the Thue example

1|_11_
2|1_|1++|2|3
3|0_|1|3|4
4|01++|10|4|5
5|11++|1++0|5|6
6|_0|_|6|7
7|_1++|10|7|8
8|HALT

Roman Numeral Converter

Also a conversion of the Thue example

1|**************
2|*|I|2|3
3|IIIII|V|3|4
4|IIII|IV|4|5
5|VV|X|5|6
6|XXXXX|L|6|7
7|XXXX|XL|7|8
8|LL|C|8|9
9|LXL|XC|9|10
10|CCCCC|D|10|11
11|CCCC|CD|11|12
12|DD|M|12|13
13|DCD|CM|13|14
14|HALT