Sha256: 358e67fc4b0a48ec29c6282e11cd5c4c5c7c374c875fd898b345f054f5ce4644

Contents?: true

Size: 373 Bytes

Versions: 12

Compression:

Stored size: 373 Bytes

Contents

# vim: ts=2 sw=2 et ft=ruby
# Call with two strings of ones on the tape:
# $ turing.rb ones_difference.mtm 1111 11

0. right 1, :goto => 1
1. right 2, :goto => 2
2. cond  1, :if => '1', :then => 3, :else => 4
3. cond  2, :if => '1', :then => 0, :else => 5
4. cond  2, :if => '1', :then => 5, :else => 7
5. write 0, :symbol => '1', :goto => 6
6. left  0, :goto => 0
7. halt

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
tins-1.3.0 examples/ones_difference.mtm
tins-1.2.0 examples/ones_difference.mtm
tins-1.1.0 examples/ones_difference.mtm
tins-1.0.1 examples/ones_difference.mtm
tins-1.0.0 examples/ones_difference.mtm
dslkit-0.2.13 examples/ones_difference.mtm
dslkit-0.2.12 examples/ones_difference.mtm
dslkit-0.2.11 examples/ones_difference.mtm
dslkit-0.2.10 examples/ones_difference.mtm
dslkit-0.2.9 examples/ones_difference.mtm
dslkit-0.2.8 examples/ones_difference.mtm
dslkit-0.2.7 examples/ones_difference.mtm