What Is cube composer on david-peter.de?
Updated
cube composer is a browser-based puzzle game listed on david-peter.de, the personal site of developer David Peter. It is inspired by functional programming: in each level, you arrange colored cubes into a target pattern by composing a series of transformations. The game is written in PureScript, a Haskell-like language that compiles to JavaScript, and is playable at the /cube-composer path on the site.
How the game works
The core loop is about composition rather than direct manipulation. Instead of dragging individual cubes into place, you build a sequence of transformations and apply them in order, so the result depends on how the steps combine. This mirrors a central idea in functional programming, where small functions are chained together to produce a larger behavior.
A level gives you a starting arrangement of colored cubes and a target pattern. Your task is to find a transformation sequence that turns the start into the target. Because the puzzle is about composing operations, the challenge is usually in the ordering and combination of steps, not in moving one cube at a time.
What you need to play
- A modern web browser; the game runs in the browser and needs no installation.
- No prior programming knowledge is required to start, though familiarity with the idea of chaining operations can make the intended logic easier to see.
Why it is written in PureScript
PureScript is a statically typed language in the Haskell family that compiles to JavaScript. For a puzzle built around composing transformations, that choice fits the subject matter: transformations can be modeled as small, composable pieces, and the type system helps keep those pieces consistent. The page notes the game is written in PureScript and that it is inspired by functional programming methods.
Where it fits among David Peter's projects
david-peter.de collects several personal projects alongside the author's background in science, math, and programming. cube composer sits among them as a game, distinct from the site's command-line tools and the Numbat calculator. If you are exploring the site, the projects fall into a few rough groups:
| Project | Type | What it does |
|---|---|---|
| cube composer | Puzzle game | Compose transformations to arrange colored cubes into a pattern |
| Numbat | Scientific calculator | High-precision calculator with full physical-unit support, in the terminal and browser |
| fd, hyperfine, bat, hexyl, pastel, vivid | Command-line programs | Tools for file finding, benchmarking, syntax-highlighted viewing, hex viewing, color manipulation, and ls coloring |
When cube composer is worth trying
Try it if you want a short browser puzzle that teaches composition through play, or if you are curious how functional-programming ideas translate into a game. It is less suited to someone looking for a full-featured game with accounts, progression systems, or installable software; the page presents it as a personal project playable on the site. For the exact current level set and any updates, check the /cube-composer page directly, since the site description does not enumerate levels or features beyond the core mechanic.