XCODX |

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

Samarium takes a rule most languages consider sacred, readable literals, and discards it: created around 2021 by developer trag1c with a small open-source team, this Python-implemented language writes every number in binary using slashes and backslashes, so three is // and zero is an empty backslash form. The rest of the syntax is equally alien by design, with => * declaring the entry point, a trailing exclamation mark printing a value, and tildes, ampersands, and brackets carrying meanings you must learn from scratch. It sits firmly in the esolang tradition of usable-but-strange, complete with real documentation, a standard library, and active maintenance. XCODX runs Samarium in a live terminal, so its input operator works interactively without any pip installing.

Hello World in Samarium

== Samarium comments start with two equals signs; ! prints a value
=> * {
    "Hello, World!"!;
}

When to use Samarium

Samarium is an ideal weekend expedition for esolang fans: it is strange enough that even FizzBuzz requires real thought, especially once numbers must be spelled in slash-backslash binary, yet documented well enough that progress never stalls. It suits rotating-language challenges and polyglot events where rarity is rewarded, and it makes a sharp teaching prompt about notation, showing students how much of programming difficulty is convention rather than computation.

Common questions

How do numbers work in Samarium?

All integer literals are written in base two, with a slash for a one bit and a backslash for a zero bit. So a lone slash is one, slash-backslash is two, and two slashes make three. There is no decimal literal syntax at all, which turns even small constants into little binary puzzles and is one of the language's defining jokes.

Is Samarium maintained and documented?

Yes. The project lives on GitHub under its creator trag1c with published releases on PyPI, a documentation site covering syntax, built-ins, and the standard library, and a changelog showing steady iteration. For an esoteric language that is unusually good support, and it means answers to most questions exist somewhere official rather than only in community folklore.

Does Samarium support input and interactive programs?

It does: the language defines a dedicated input operator that reads from standard input, along with the trailing exclamation mark for output, so prompt-and-respond programs are straightforward once you internalize the symbols. Running in the XCODX terminal, a Samarium read genuinely blocks until you type, making it practical to test interactive snippets while learning.

How Samarium runs on XCODX

Sandbox filename
main.sm
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 Samarium!"!;
    "Welcome to XCODX!"!;
}