We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Recursive sleeping

From Esolang
Jump to navigation Jump to search

Recursive sleeping is a programming language that uses sleeping and recursive sleeping to do stuff

Instructions

Instructions
Thing Desc Ex
Sleep (while knowing (somethings))?:
(code)
Wake up
sleep maybe while knowing something Sleep:
Wake up
Sleep layer returns the sleep layer Sleep layer (note: sleep layer is 0)
Remember (something) at this layer remember something and can go out of sleeping Remember Sleep:
Wake up at this layer
Remember the thing remembered in (a sleep) returns the thing remembered in the sleep there Remember the thing remembered in Sleep:
Remember Sleep:
Wake up
Wake up
Use the (n)th thing you knew before returns the nth thing you knew when you slept Use the 1st thing you knew before
Use the (n)th thing you knew right now returns the nth thing you knew now Use the 1st thing you knew right now

Examples

Cat

Remember "hi" at this layer
Remember the thing remembered in sleep while knowing (use the 1st thing you knew right now):
 Remember (use the 1st thing you knew before)
Wake up