XCODX |

MATL Online Compiler & Interpreter

Select Language
Online Code Compiler
Full HTML IDE
Py main.py
Program Output Ready
  Welcome to XCODX Online Compiler

  Quick Start:
  Ctrl+Enter  Run code
  Ctrl+S      Save / Download
  Ctrl+L      Clear output

  Select a language and start coding.
Success
Operation completed

About MATL

MATLAB seems an unlikely golf substrate, yet Luis Mendo proved otherwise when he released MATL in 2015: a stack-based golfing language whose single-character commands map onto MATLAB and Octave functions. Matrices are the native currency, so operations broadcast over whole arrays by default, and the stack contents are displayed implicitly when the program ends. MATL earned a devoted following on Code Golf Stack Exchange, particularly for numerical, matrix, and signal-style challenges where MATLAB semantics are a superpower, and Mendo's meticulous documentation and answer explanations became a community model. On XCODX the Octave-backed interpreter runs in a true terminal, so input requests pause for your typing and there is no MATLAB license or local setup involved.

Hello World in MATL

% string literals use single quotes; the stack is displayed when the program ends
'Hello, World!'

When to use MATL

MATL is the tool to reach for when a challenge smells like linear algebra: convolution, reshaping, cumulative sums, and logical indexing are one or two bytes each, and whole-array thinking eliminates loops entirely. It doubles as a compact introduction to vectorized programming for students who will later meet MATLAB, Octave, or NumPy, since every MATL answer can be read as a golfed trace of idiomatic array code.

Common questions

Do I need to know MATLAB to learn MATL?

It shortens the trip but is not mandatory. Each MATL command corresponds closely to a MATLAB or Octave function, so existing MATLAB users mostly memorize the character mapping. Newcomers can learn from the specification and from Code Golf Stack Exchange answers, which by community habit almost always include command-by-command explanations, a tradition the language's author started.

How does MATL handle input and output?

Implicitly where possible. Commands that need input take it from stdin on demand, and at program end everything remaining on the stack is displayed using MATLAB-style formatting. Explicit display commands exist for finer control. In the XCODX terminal, an input request genuinely blocks mid-program until you respond, matching how interactive MATL sessions behave.

When does MATL beat Jelly or 05AB1E?

On problems where MATLAB's matrix machinery is the algorithm: two-dimensional convolution, reshape-and-permute puzzles, image-like grids, and numeric linear algebra. There a single MATL byte can invoke what other golfing languages must assemble from primitives. On string manipulation and compression-friendly output the codepage languages usually reclaim the lead, so MATL specialists pick their battles by domain.

How MATL runs on XCODX

Sandbox filename
main.m
Entry point
single main source file
Editor grammar
plain text — no highlighter ships for this language
Reading stdin
no standard input construct
Input delivery
live WebSocket stream
Prompt flushing
flush manually before reading input
Compile limit
10 s
Run limit
3 s batch · up to 3 min live
Memory
256 MB per stage
Max source
50,000 characters

Default program on this page

'Hello from MATL!'