More thinking. Less code.
Approach problems like never before
Dyalog APL is an array-oriented programming language that lets you express complex ideas in remarkably little code.
We build it, support it, and have done for over 40 years.
Dyalog APL is an array-oriented programming language that lets you express complex ideas in remarkably little code.
We build it, support it, and have done for over 40 years.
Full commercial support · Source code escrow · Windows · Linux · macOS · Raspberry Pi
Explore Dyalog
Try Dyalog free for educational and non-commercial use, get started or view the docs.
Trusted for over 40 years
Dyalog is used by organisations worldwide to build and run important business systems.
And yes, we know it’s a bit unfair to the competition.
Less code you say?
APL works on whole arrays at once, so tasks that need loops and bookkeeping in most languages collapse into a single expression. And less code isn’t just tidier: it is less to read, less to maintain, and less to get wrong. Compare it for yourself below, across three everyday problems and six mainstream languages.
Already know another language? Start at the first example. Each one adds a single idea.
gives
Suggest a better version
What we are looking for
These examples exist so that someone who already knows your language can read the APL beside it. The best version is therefore the one a working developer in that language would actually write, not the shortest one possible.
Your submission must
- Solve the same problem as the existing example.
- Accept the same kind of variable input rather than being hard-coded for the example values shown.
- Produce the correct result for valid inputs.
- Be valid, runnable code in the selected language rather than pseudocode.
- Not contain a pre-generated or hard-coded answer.
- Not use external libraries, packages, services, or APIs.
Built-ins are welcome
If your language has the operation built in, show it. R should use cumsum, C++ should use partial_sum, Rust should use scan. Part of what these pages teach is which languages hand you the operation and which make you write it out, so hiding a built-in to make the code longer would defeat the point.
Anything in the standard library counts as built in. Imports and includes are shown above the code, greyed out, wherever a snippet needs them.
What counts as an improvement
- It reads the way your language is normally written.
- It is easier for a newcomer to follow.
- It maps more clearly onto the APL beside it, so the correspondence is easier to see.
Dyalog Ltd will review submissions and decide which version is most appropriate to display.
Try some APL in your browser
A live Dyalog APL interpreter, running right on the page. Type an expression and press Enter to run it, or pick one of the examples to watch it execute. The glyph bar enters the APL symbols for you, so no special keyboard is needed. Because APL works on whole arrays at once, a few characters can do the work of many lines.
Enter runs the line. Click an earlier input line to bring it back and edit it. Names persist until you clear. Type APL glyphs with the keyboard above,
or with a backtick prefix (for example `i gives ⍳).
Ready for something more advanced? Put these ideas to work on the short, self-contained puzzles at APL Quest.
Apprehensive? Understandable.
News, ideas, technical insights, and stories from the Dyalog community.
We promote a culture where innovation, fun, pride, and acceptance is part of our daily life. We come from a variety of backgrounds, and our diversity enhances our creativity.
We’re 31 people who believe the tool we make can be useful to the world. Only a couple of us are related, but we feel like a family.
…or perhaps even join the team!
Ready to write less code?
Download Dyalog free for non-commercial use, or talk to us about putting it to work on your problem.