XCODX |

Forte 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 Forte

Few esoteric languages attack arithmetic itself, but Forte does: documented on the Esolang wiki since the mid-2000s, it presents a BASIC-like surface of numbered lines and PRINT statements while hiding a genuinely strange core. Its LET statement does not assign variables, it redefines numbers, so LET 4 = 5 makes every subsequent occurrence of 4 behave as 5, including in line numbers and arithmetic. Control flow emerges from redefining the numbers of lines yet to be executed, which turns even simple loops into brain-bending exercises. Interpreters are community-written and scarce, which is why having one behind a real interactive terminal on XCODX, with stdin available while the program runs, makes Forte unusually easy to actually try.

Hello World in Forte

10 PRINT "Hello, World!"
How it works: Forte looks like line-numbered BASIC, so this single line prints the greeting and the program ends. The language's twist appears with LET: a statement like LET 20 = 10 redefines the number 20 itself, rewriting which line runs next and how later arithmetic behaves.

When to use Forte

Forte is best treated as a logic puzzle disguised as a language: figuring out how to loop, count, or branch when your only mutable state is the meaning of numbers is exactly the kind of challenge Esolang wiki regulars relish. It makes a striking classroom illustration that assignment and control flow are design choices, not laws, and it occasionally surfaces in Code Golf Stack Exchange novelty threads where unusual computation models earn attention.

Common questions

What does it mean to redefine a number in Forte?

A statement such as LET 4 = 5 changes the value of the numeral 4 globally from that point on: expressions that evaluate to 4 yield 5, and a line numbered 4 is effectively renumbered. Since line numbers decide execution order, redefinition is simultaneously Forte's assignment, its goto, and its loop construct, which is the language's whole premise.

Is Forte Turing complete?

Discussion on the Esolang wiki treats its computational power as an open, fiddly question that depends on interpreter details like number range and how redefinitions cascade. With unbounded integers the redefinition mechanism can encode substantial state, and constructions for loops and conditionals exist. Claims here stay modest because so few programs and interpreters exist to test the edge cases.

How do I write a loop in Forte?

By redefining line numbers so execution revisits earlier code. A typical pattern ends a block with a LET that maps an upcoming line number back onto an earlier one, and terminates by eventually redefining that mapping away as values change. It feels like programming a goto whose target is computed by corrupting arithmetic, which is exactly the intended discomfort.

How Forte runs on XCODX

Sandbox filename
main.forte
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

1 PRINT "Hello from Forte!"
2 PRINT "Welcome to XCODX!"
3 END