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.
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.
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.
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.
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.
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.
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.
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.
main.forteplain text — no highlighter ships for this languageno standard input construct1 PRINT "Hello from Forte!"
2 PRINT "Welcome to XCODX!"
3 END