Skip to content
0:00 / 0:00

#apl#sudoku#dyalogapl

A Sudoku Solver in APL

Dyalog

1.4K subscribers • 3 videos on Hallway

YouTube
  • Recommended by 5 people: 4 on Hacker News and 1 on Lobsters.
  • A classic. People kept recommending it from 2018 to 2022.
  • Presented by John Scholes, Dyalog developer
  • Made by the vendor. The company whose product it covers made or sponsored it.

Advanced. Deep dive for people who know the field.

47K views14 years ago5 recommendations

Programming languagesComputer scienceAlgorithmsFunctional programming

John Scholes demonstrates how to build a concise Sudoku solver in Dyalog APL using an array-oriented approach.

Development of a Sudoku solver in APL. You might want to hit pause now and again. Experiment for yourself at TryAPL.org. Notes on the algorithm: dfns.dyalog.com/n_sudoku_bfs.htm Algorithm: Arthur Whitney Performance: John Scholes -------------------- GET STARTED Download the latest version of Dyalog: dyalog.com/downloads TAKE PART IN OUR APL COMPETITIONS THE APL CHALLENGE Learn APL and compete for one of three $100 prizes. Open to all experience levels. challenge.dyalog.com THE APL FORGE Got a problem to solve or a library to share? Use Dyalog APL to build something great — and win £2,500 + an expenses-paid trip to present at a Dyalog user meeting. forge.dyalog.com --------------------

Why it's here

5 people recommend this

What people say. Highly recommended as a beautiful, mind-bending demonstration of APL's power and conciseness in solving complex problems.

geocaron Lobsters • Recommends

A Sudoku Solver in APL Also: Not Conway's Life.

geocaron Hacker News • Recommends

On “Non-English-based programming languages”

APL is great. If you haven't seen them, the late John Scholes did a number of absolutely beautiful demonstrations programming in APL1, 2, 3. 1: link 2: link to this video 3: link

paliilapon Hacker News • Recommends

On “J can look like APL or English”

That 1975 APL demonstration is lovely. Much has been preserved in Dyalog and GNU APL - it's very interesting to see how timeless the core APL functions are. I'm very fond of a number of videos by the late John Scholes narrating APL solutions step by step, including the well-known demonstration of Conway's Game of Life in APL (0). His videos on depth-first search (1) and solving sudoku (2) are also brilliant. (0) link (1) link (2) link to this video

moonchildon Hacker News • Recommends

On “J Notation as a Tool of Thought”

> My point was that general programming usually looks more like writing the sorting algorithm than simply calling it. Thus, I would be more interested in seeing real examples of how the properties of J allow you to write algorithms more concisely or otherwise better. Ah - I see. Here1 is quicksort in j. John scholes's videos are excellent and very illustrative, though they deal with apl rather than j; conway's game of life2 and sudoku3. > The article showed how J solves some mathematical problems with built in functions or their built-in modifiers. But in general programming, you won't find a function that does exactly what you wanted, maybe with a little adverb. You'll usually have to…

lizardactiviston Hacker News • Recommends

On “Dyalog APL 18.2”

I've always liked this video, where one of the Dyalog developers effortlessly writes a Sudoku solver in APL: link to this video

u/Rhomboidin r/compsci • Mentions

On “Extended characters in programming language syntaxes?”

Watch this guy write a Sudoku solver in APL.

wickawicon Hacker News • Mentions

On “Solving Every Sudoku Puzzle (2006)”

I've noticed that solving a sudoku is something of a rosetta stone for how people program. Norvig's solution is very straightforward in hindsight, but I think that code was either the result of many iterations or of a career of making progressively more readable code. Here are some other sudoku solvers that give more insight into the coder than the problem: Sudoku in APL: link to this video Test driven sudoku: link

kickon Hacker News • Mentions

On “Stages of denial in encountering K”

…y by any stretch of the imagination. For example, here's 2 3 4 some videos disproving your statement, the first two being APL, the last being k itself. For extra bonus points, see Aaron Hsu's talks 5; pick any of them, they're all pretty good, and most have a segment in them explaining how that viewpoint is wrong. 1 link 2 link 3 link to this video 4 link 5 link…

u/jb55in r/haskell • Mentions

On “Conway's "Game of Life" with Repa & stencil convolution”

I've been thinking recently about how cool it would be to have an APL-like array dsl in Haskell backed by repa so you could do stuff like: link to this video and link to this video Has there been any work done in this area?