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.

Polynomix

From Esolang
Jump to navigation Jump to search
Author's note: I don't think Polynomix is esoteric, although its syntax looks weird. I admit, though, reading the code can be very difficult for beginners.
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
Polynomix
Designed by User:I am islptng
Appeared in 2026
Computational class Turing-complete
Reference implementation Python
Influenced by APL
SletScript
Python
File extension(s) .plx

Polynomix is a computer language designed by User:I am islptng.
It combines APL's array-oriented programming paradigm with Python's dynamic typing, along with a new design of syntax. There's also inspiration from C++ and Haskell.

Home Page (Requires Pyodide, be patient the first time loading)

Syntax

For the symbol reference dictionary, see Polynomix/Symbols.

Examples

Hello World

`Hello, world!'+["\n]>.

Factorial

(x>x<2?(1x-1\.*x)) # \fact
10 fact! $$ 3628800

FizzBuzz

1#\x x<101@{x%\[15 5 3 1]%0/0/!![`FizzBuzz'`Buzz'`Fizz'x]>.;"\n>.;x#+1}\;

brainfuck interpreter

$$ brainfuck.plx - Brainfuck Interpreter in Polynomix
$$ islptng, 30 June 2026

300 # \TAPEWRAP
(src>
    [] # \brackets
    src # \tmp
    src ^ \(i>
        i#(\index, \char)
        char="[?(
            brackets #+ [index]
        char="]{
            brackets / \1 #\matching
            brackets #/(\;,\1)
            tmp #/(matching index-matching)
            tmp #/(index matching-index)
        })
    )!;

    [0] * TAPEWRAP # \tape
    0 # \ptr
    0 # \ip
    tmp < # \len
    ip < len @ {
        tmp / ip # \cmd
        ip #+ 1
        cmd & $+$ ?(
            cmd < 0 ?(
                tape / ptr = 0 -?(ip #+ cmd)
                tape / ptr = 0  ?(ip #+ cmd)
            )
        cmd = "+   tape #/((+1%256) ptr)
        cmd = "-   tape #/((-1%256) ptr)
        cmd = "<   ptr #(- 1 % TAPEWRAP)! ;
        cmd = ">   ptr #(+ 1 % TAPEWRAP)! ;
        cmd = ",   tape /(ptr \;<.<)
        cmd = ".   tape / ptr ~ >. ;
        )
    }
\;) # \brainfuck

`+[-->-[>>+>-----<<]<--<---]>-.>>>+.>>..+++[.>]<<<<.+++.------.<<-.>>>>+.' brainfuck!