Muninn

View Repo

A small statically typed scripting language. Change a program below and run it here, in this tab, on the interpreter itself.

Loading the interpreter.

Loading
Ctrl/Cmd + Enter runs

Result

    
                
                
                
              

    Execution

    Load a program to step through it.

    Operands

      Frames

        Bytecode

          What this page is

          The editor runs Muninn. Not a recording of Muninn, and not a JavaScript imitation of it: the interpreter in src/ is compiled to WebAssembly and executes in this tab, so the output, the diagnostics, and the bytecode below are the ones the command line produces. The page draws them and holds no model of the language.

          Edits are yours while you type, and nothing leaves the tab. The page is static: there is no server behind it, and there is no account, no history, and no stored program.

          What this host allows

          A script on a web page runs inside someone else's browser, so this host grants a smaller set of capabilities than the command line does. Muninn's builtins reach the host process for arguments, environment variables, files, the clock, and stdin; the table below says which ones this page lets through. The ones it does not trap with a policy error rather than failing quietly, and that trap is the program below the table.

          Tensors

          Muninn has a tensor type with broadcasting, matrix multiplication, and reductions. A printed tensor is drawn as a grid, because the shape is the point: tensor(shape=[2, 2], ...) is a two-by-two matrix, not four loose numbers.

          Builtins

          Generated from the running interpreter's own table, so this list cannot drift from what the language actually has.

          Name Signature In this page