We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

CJam

From Esolang
Jump to navigation Jump to search

CJam is a stack-based programming language inspired by GolfScript. It was created by aditsu in 2014. The official interpreter is written in Java.

Instructions

Consult the CJam cheat sheet (PDF) by User:Lynn.

Example code

Hello, world!

"Hello, world!"

Cat program

q

Truth-machine

ri{_p}h;

Turing-completeness

CJam is Turing-complete. To show this, writing a Brainfuck interpreter wouldn't be too hard. A lazier proof is to say that the Underload commands :()^ correspond to the CJam commands _{}~.

External resources