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.

Secretiv

From Esolang
Jump to navigation Jump to search

Secretiv is a guessing language designed by User:Cordership.

How will it work?

I'll provide atleast 5 programs and then you have to guess the syntax. Then, when someone makes a guess, I will check their guess. If they get a command wrong three times in a row, I will show them the correct usage.

Programs

Hello, World!

o <- "Hello, World!"

Cat program

`n I
o <- n

Golfed:

o <- I

Truth-machine

`a i(I)
a == 0 ?
    o <- a
?
    !1
        o <- a

Alternative:

`a i(I)
o <- a
!a
    o <- a

A+B problem

`a i(I)
`b i(I)
`sum a + b
o <- sum

Looping counter

`a 1
!1
    o <- a * "*"
    `a a + 1

Fibonacci sequence

[fib(x)
    x == 0 || x == 1 ?
        {x}
    ?
        {fib(x - 1) + fib(x - 2)}
]
`a i(I)
⟳i r(a)
    o <- fib(i)

Collatz sequence

[col(x)
    x % 2 == 0 ?
        {x // 2}
    ?
        {x * 3 + 1}
]
`a i(I)
!a != 1
    o <- col(a)
    `a col(a)

Disan count

`a i(I)
⟳i r(a)
    i % 2 == 0 ?
        o <- i, e" "
        o <- "is even"

Divisors

`a i(I)
⟳i r(1, a + 1)
    a % i == 0 ?
        o <- i

99 bottles of beer

⟳a r(99, 2, -1)
    o <- a
    o <- " bottles of beer on the wall"
    o <- a
    o <- " bottles of beer"
    o <- "Take one down, pass it around"
    o <- a - 1
    o <- " bottles of beer on the wall\n"
o <- "2 bottles of beer on the wall"
o <- "2 bottles of beer"
o <- "Take one down, pass it around"
o <- "1 bottle of beer on the wall\n"
o <- "1 bottle of beer on the wall"
o <- "1 bottle of beer"
o <- "Take one down, pass it around"
o <- "No bottles of beer on the wall\n"
o <- "No bottles of beer on the wall"
o <- "No bottles of beer"
o <- "Go to the store, buy some more"
o <- "99 bottles of beer on the wall"

Guessing area

OPEN!