Division expressions in the Shakespeare interpreter always fail because the prefix string is sliced incorrectly.
esolang_bench/interpreters/shakespeare.py#L369
expr[22:] should be expr[21:] — the prefix "the quotient between " is 21 characters, not 22. The extra character eats the first letter of the left operand, so yourself becomes ourself and fails with unknown noun in phrase 'ourself'.
Reproduce:
from esolang_bench.interpreters import get_interpreter
program = """
Romeo, a young man.
Juliet, a young woman.
Act I: The only act.
Scene I: The test.
Enter Romeo and Juliet.
Juliet: You are the quotient between yourself and yourself.
Juliet: Open your heart.
Exeunt.
"""
result = get_interpreter("shakespeare").run(program)
print(result.error_type) # runtime_error
print(result.stderr) # unknown noun in phrase 'ourself'
Fix: Line 369: expr[22:] → expr[21:]
Workaround: Add one extra whitespace after "the quotient between", so 2 spaces in total after it
Division expressions in the Shakespeare interpreter always fail because the prefix string is sliced incorrectly.
esolang_bench/interpreters/shakespeare.py#L369
expr[22:]should beexpr[21:]— the prefix"the quotient between "is 21 characters, not 22. The extra character eats the first letter of the left operand, soyourselfbecomesourselfand fails withunknown noun in phrase 'ourself'.Reproduce:
Fix: Line 369:
expr[22:]→expr[21:]Workaround: Add one extra whitespace after "the quotient between", so 2 spaces in total after it