Playlist

From Esolang
Jump to navigation Jump to search

Playlist is an esoteric programming language based on playlists invented by User:A.

Rules of operation

Playlist operates over a playlist. There are a few commands in Playlist; they are listed here.

"Sequential" means to play the next item in a playlist.

"Looping" means to play the first item in a playlist.

"Random" means to choose a random next item in the playlist.

"Unique" is a condition to check whether all items are played.

"Played" is a condition to check whether the player is playing an item that was already played.

Shorthand Notation

"S" = Sequential

"L" = Looping

"R" = Random

"U" = Unique

"P" = Played

Example programs

Plays all in playlist randomly without repeating

Random Played
Random Played
Random Played
Random Played
Random Played
Random Played
Random Played
Random Played

The specifier indicates a conditional jump; it only allows playlist switching when the right side of the expression is not true.

An example of a looping algorithm. This evaluates 8! = 40320 times.

Looping Unique
Looping Unique
Looping Unique
Looping Unique
Looping Unique
Looping Unique
Looping Unique
Looping Unique

Finish the playlist

Sequential
Sequential
Sequential
Sequential
Sequential
Sequential
Sequential
Sequential