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.
Hourglass
Jump to navigation
Jump to search
Hourglass is an esolang where all variables are hourglasses with two values: top,bottom. Each action 1 is subtracted from the top and add the the bottom unless the top is 0. By default all hourglasses start with 0,0.
(Note: no numbers allowed. Hourglass 0 is accessible via #() and all other commands referencing nothing as a value)
Commands:
#(x) the value at the bottom of the xth hourglass @(x) swap the values of the top and bottom of the xth hourglass $(x) print the bottom of the xth hourglass %(x) if the input is 1, flip hourglass x, if it is 0, don't !(x) add one the the top of hourglass x [x|code] while the top of hourglass x is not 0 run code ?(x) 50% chance to flip hourglass x * NOP
Actions:
Executing @(x) Executing $(x) Executing %(x) Executing !(x) Checking the conditional in [x|code] Executing ?(x) Executing *
Programs
Hello world!
probably a faster way to do this
!()!()!()...(104 !()s)$()@()***...(100 *s)$()**!()!()!()!()$()$()!()!()!()$()@()***...(31 *s)$()***...(78 *s)!()!()!()!()!()!()!()$()@()***...(110 *s)$()**$()@()***...(103 *s)$()@()***...(90 *s)$()