Skip to main content
added 14 characters in body
Source Link

Runic Enchantments, 13 bytes

`/-R`A*+k$!;

Try it online!

Slightly ungolfed for readability, with spaces to separate operational segments:

'/  2'RA  '- *+k $ !;

The difference of 45 is encoded in the - char literal, as chars are implicitly converted to integers when fed into a operator expecting a number value.

2'RA randomly generates a 0 or a 1, multiplied against the - and added to the / char resulting in either / or \, which is then printed after being coerced back to a char from an int. In the golfed version the (0x02) serves as the 2.

Then the program loops forever by skipping the terminator, !;.

Runic Enchantments, 13 bytes

`/-R`A*+k$!;

Try it online!

Slightly ungolfed for readability, with spaces to separate operational segments:

'/  2'RA  '- *+k $ !;

The difference of 45 is encoded in the - char literal, as chars are implicitly converted to integers when fed into a operator expecting a number value.

2'RA randomly generates a 0 or a 1, multiplied against the - and added to the / char resulting in either / or \, which is then printed after being coerced back to a char from an int. In the golfed version the (0x02) serves as the 2.

Then the program loops forever by skipping the terminator, !;.

Runic Enchantments, 13 bytes

`/-R`A*+k$!;

Try it online!

Slightly ungolfed for readability, with spaces to separate operational segments:

'/  2'RA  '- *+k $ !;

The difference of 45 is encoded in the - char literal, as chars are implicitly converted to integers when fed into a operator expecting a number value.

2'RA randomly generates a 0 or a 1, multiplied against the - and added to the / char resulting in either / or \, which is then printed after being coerced back to a char from an int. In the golfed version the (0x02) serves as the 2.

Then the program loops forever by skipping the terminator, !;.

Source Link

Runic Enchantments, 13 bytes

`/-R`A*+k$!;

Try it online!

Slightly ungolfed for readability, with spaces to separate operational segments:

'/  2'RA  '- *+k $ !;

The difference of 45 is encoded in the - char literal, as chars are implicitly converted to integers when fed into a operator expecting a number value.

2'RA randomly generates a 0 or a 1, multiplied against the - and added to the / char resulting in either / or \, which is then printed after being coerced back to a char from an int. In the golfed version the (0x02) serves as the 2.

Then the program loops forever by skipping the terminator, !;.