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.
Common Lisp has been outliving its obituaries since 1984. Standardized by ANSI in 1994 and essentially stable since, it remains the most powerful macro system in mainstream use — code is data, so programs can rewrite themselves at compile time — wrapped in a surprisingly practical package: CLOS (arguably the most flexible object system ever shipped), a condition system that beats exceptions, and native compilation via SBCL that reaches near-C performance. Grammarly's core text-processing engine and Google's ITA-derived airfare search (QPX) are famous production deployments. It also carries AI history: decades of research at MIT and Stanford ran on Lisp. This page evaluates Common Lisp in a live terminal where read-line captures your actual typing — no SBCL install needed.
(format t "What's your name? ")
(force-output)
(defvar *name* (read-line))
(format t "Hello, ~a!~%" *name*)
(format t "How many squares should I print? ")
(force-output)
(defvar *n* (parse-integer (read-line)))
(loop for i from 1 to *n*
do (format t "~d squared is ~d~%" i (* i i)))
(format t "That was ~r squares - format can spell numbers!~%" *n*)
Common Lisp appears in programming-languages courses as the ancestor of nearly every dynamic language feature students take for granted — garbage collection, REPLs, first-class functions, macros — and 'Structure and Interpretation'-style thinking transfers directly. Working developers use it for exploring metaprogramming seriously: writing a macro that generates code teaches more about language design than months of reading. This page suits Project Euler problems in Lisp, experimenting with format directives and loop's mini-language, or evaluating snippets from 'Practical Common Lisp' without setting up SBCL and Quicklisp locally.
Yes — read-line suspends evaluation until you type a line into the terminal. The force-output call matters because Lisp buffers the output stream: a prompt printed without a newline may sit in the buffer while the program waits for you. Flushing after each prompt makes the interaction read naturally.
SBCL (Steel Bank Common Lisp), the dominant open-source implementation — it compiles to native code and is what most of the modern Lisp community uses in production and for competitive benchmarks. Standard ANSI Common Lisp behaves identically across conforming implementations, so code written here ports cleanly.
No — there is no Quicklisp or ASDF system loading in the sandbox; you write a single file against the ANSI standard library. That library is famously large, though: hash tables, structs, CLOS classes and generic functions, the loop macro, format, streams, and the condition system are all built in.
main.lispcommonlisp(read)(format t "Hello from Common Lisp!~%")
(format t "Welcome to XCODX Online Compiler!~%")