Slander

From Esolang
Jump to navigation Jump to search

Slander is a programming language in which you write programs in two dimensions. Programs take the form of a route that autonomous craft must take to safely land on a planetoid. craft are represented in code as the letter S. The route it takes to the landing pad is a source program. Source is divided into blocks that are one character in size. The language was created by User:PixelatedStarfish in 2022 in response to a comment to "do slander slander" for the next installment of TheSTEMGamer's youtube series on programming language slander, which is actually a series of truthful roasts.

Piloting

A ship is directed by a command, and moves in a direction until landing or redirecting. A ship stores one byte in the range of 0 to 255 called battery. Multiple ships are allowed, for concurrent programming and (maybe) Turing completeness. When two ships overlap, they exchange battery.

Changing directions reduces battery by 1, and a ship with no battery cannot change direction. A ship starts with 50 battery unless it is an escape pod. Note that a ship has a maximum capacity of 255, battery goes no higher.

Ships move simultaneously on a global ticker. They move at the rate of one cell per tick. If two ships land at the same tick, output occurs from left to right.

Commands

S  : program start, S spaceship.
=  : ship can land here. Output battery as char.
X  : hostile ground that destroys a ship.
r  : go right and decrement battery by 1.
l  : go left and decrement battery by 1.
d  : go down, decrement battery by 1.
u  : go up, decrement battery by 1.
*  : Star! Ship battery increments by 10.
~  : Galaxy! If the ship has battery it will reverse direction, decrementing battery.
$  : Quasar! The ship drops an escape pod that takes floor of half the battery.
?  : UFO! Battery is set to input.
#  : Nova! Set battery to a random amount.

All other characters are comments

The Source Field

Blocks are set on a coordinate plane of (X, Y) tuples. Block (0,0) is the top left block. (1,0) is right adjacent and (0,1) is down adjacent. The source field is sized according to the number of characters in the source file and the location of border commands.

Going up decreases Y. Going down increases Y. Going left decreases X. Going right increases X.

Exchanging

After an exchange, each ship has the average battery of all exchanging ships. Exchanges happen at overlap.