skip to content
x2c
the world's most hackable compiler
install
packages
examples
docs
about
source
Start here
1.
x2c essentials
❱
1.1.
Values and conversions
1.2.
Immutable values and shared objects
1.3.
Quoting and interpolation
1.4.
Classes and copying
1.5.
Protocols and operators
1.6.
Patterns and templates
1.7.
Lifetime and cleanup
1.8.
Compile-time code
1.9.
Threads
2.
Language walkthrough
❱
2.1.
Values and types
2.2.
Names and text
2.3.
Collections and literals
2.4.
Iteration and absence
2.5.
Functions and closures
2.6.
Types and methods
2.7.
Classes
2.8.
Protocols and operators
2.9.
Patterns and templates
2.10.
Lifetime and errors
2.11.
Compile-time code
2.12.
Threads and channels
Site Examples
3.
Love
❱
3.1.
var
3.2.
names
3.3.
text
3.4.
collections
3.5.
literals
3.6.
two tests
3.7.
files
3.8.
loops
3.9.
memory
3.10.
lists
3.11.
arrays
3.12.
maps
3.13.
methods
4.
Power
❱
4.1.
classes
4.2.
protocols
4.3.
indexing
4.4.
destructuring
4.5.
matching
4.6.
iterators
4.7.
errors
4.8.
channels
4.9.
packages
4.10.
counting
4.11.
threads
5.
Magic
❱
5.1.
runtime Lisp
5.2.
macros
5.3.
templates
5.4.
decorators
5.5.
keywords
5.6.
extensions
5.7.
meta
5.8.
compile-time
5.9.
autodiff
5.10.
operators
5.11.
same list
Complete programs
6.
Programs
❱
6.1.
Literate Lisp
6.2.
Notes service
6.3.
Recognize digits
6.4.
Game of Life in a TTY
6.5.
Embed scripting
6.6.
Differentiate a function
Progressions and comparisons
7.
From C to x2c
❱
7.1.
The destination
7.2.
V0: The C baseline
7.3.
V1: Automatic cleanup
7.4.
V2: Borrowed words
7.5.
V3: Top ten
7.6.
V4: A count map
7.7.
V5: One operation
7.8.
V6: Directories
7.9.
V7: Parallel work
7.10.
V8: A reusable API
7.11.
Measured performance
7.12.
Run it locally
7.13.
Complete source
8.
Programming language shootout
❱
8.1.
Runtime by problem
8.2.
Data representation
8.3.
Buffered work
8.4.
Source-size tradeoffs
8.5.
Other languages
8.6.
Measurement scope
8.7.
Complete programs
8.8.
n-body
8.9.
spectral norm
8.10.
fannkuch-redux
8.11.
Mandelbrot bitmap
8.12.
fasta
8.13.
k-nucleotide
8.14.
reverse-complement
8.15.
binary-trees
8.16.
regex-redux
8.17.
pidigits
Complete programs.
Longer examples bring the pieces together.