J
A high-level array programming language descended from APL, using ASCII characters instead of special symbols to express powerful array operations concisely.
Created by Kenneth E. Iverson and Roger Hui at Jsoftware
J is a high-level, general-purpose programming language that descended directly from APL (A Programming Language). Created by Kenneth Iverson and Roger Hui, J preserves APL’s powerful array programming paradigm while replacing the special character set with ASCII characters, making it accessible on any standard keyboard.
History & Origins
The story of J begins with Kenneth Iverson’s desire to improve upon his earlier creation, APL. While APL was revolutionary, its reliance on special characters created practical problems: specialized keyboards, display limitations, and portability issues across systems.
The Birth of J
One summer weekend in 1989, Arthur Whitney visited Kenneth Iverson at Kiln Farm in Ontario, Canada. In a single afternoon, Whitney produced a one-page interpreter prototype on an AT&T 3B1 computer. Roger Hui then took this seed and, on Sunday, August 27, 1989, wrote the first line of code that would become J’s implementation.
By August 1990, J was publicly released. Iverson and Hui, along with Eric Iverson (Ken’s son), founded Iverson Software Inc. in February 1990 to develop and distribute the language.
ASCII Revolution
J’s most significant departure from APL was its use of ASCII characters. Where APL used ⍴ (rho) for reshape, J uses $. Where APL used ⌽ for reverse, J uses |.. This made J:
- Usable on any standard keyboard
- Portable across all computing systems
- Embeddable in plain text files and emails
- Easier to discuss in technical documentation
Why J is Unique
Vocabulary: Verbs, Adverbs, Conjunctions
J uses grammatical terminology to describe its parts of speech:
- Nouns: Data (numbers, arrays, strings)
- Verbs: Functions that act on nouns (
+,-,%for division,#for count) - Adverbs: Modifiers that take a verb and return a new verb (
/for reduce,~for reflex) - Conjunctions: Combine two words to make a new word (
.for various compositions)
This terminology reflects J’s philosophical approach: programs are sentences in a mathematical language.
Tacit Programming
J excels at tacit (point-free) programming, where you define functions without explicitly naming their arguments:
| |
The mean function never mentions its argument—it’s defined purely in terms of other operations.
Array-Oriented Operations
Like APL, operations in J naturally apply to entire arrays:
| |
No loops needed—the operations simply work on all elements.
Right-to-Left Evaluation
J evaluates expressions from right to left with no operator precedence:
| |
This reads as “2 times (3 plus 4)” = 14, not “(2 times 3) plus 4” = 10.
J’s Relationship to APL
J is often called “APL without the funny symbols,” but this undersells its innovations:
| APL | J | Meaning |
|---|---|---|
⍴ | $ | Reshape |
⍳ | i. | Index generator |
⌽ | |. | Reverse |
⍋ | /: | Grade up (sort indices) |
∘. | / | Table (outer product) |
J also introduced concepts not present in original APL:
- Gerunds: First-class verb collections
- Forks and Hooks: Composition patterns for tacit definitions
- Explicit definitions: Clear syntax for complex function definitions
Modern J
Active Development
J is actively maintained by Jsoftware Inc. The J904 release (2022) demonstrates continued development with:
- Cross-platform support (Windows, macOS, Linux, Raspberry Pi)
- Integrated development environments
- Web-based interfaces
- Modern package management
Open Source
In March 2011, the J source code was released under the GNU General Public License, ensuring its future as open-source software.
Available Implementations
| Implementation | Platform | Notes |
|---|---|---|
| J (Jsoftware) | All | Official reference implementation |
| JHS | Browser | J HTTP Server for web interface |
| JQt | All | Qt-based desktop IDE |
The J Community
J has a dedicated community of practitioners, many in quantitative finance and data science. Resources include:
- Jsoftware Wiki - Official documentation
- J Forums - Community discussion
- Learning J - Official tutorial
Getting Started
J programs are typically stored in .ijs files. The typical workflow:
| |
Continue to the Hello World tutorial to write your first J program.
Timeline
Notable Uses & Legacy
Quantitative Finance
Used for financial modeling, derivatives pricing, and algorithmic trading due to its concise expression of complex mathematical operations.
Data Analysis
Array-oriented design makes J excellent for data manipulation, statistical analysis, and exploratory data analysis.
Research & Education
Used in academic settings to teach array programming concepts and computational thinking.
Rapid Prototyping
J's expressiveness allows quick development of algorithms and data transformations, often in a fraction of the code of other languages.
Code Golf
J's extreme conciseness makes it popular for programming puzzles and code golf competitions.
Language Influence
Influenced By
Influenced
Running Today
Run examples using the official Docker image:
docker pull nesachirou/jlang:latestExample usage:
docker run --rm -v $(pwd):/app -w /app --entrypoint /usr/bin/ijconsole-9.03 nesachirou/jlang hello.ijs