A polyglot Project Euler workspace with modern build tooling, test frameworks, and starter structure so you can focus on writing solutions.
- Keep each language idiomatic while giving you one predictable workflow.
- Make adding a new problem fast and scriptable.
- Encourage tests for helper logic and invariants without hardcoding final Euler answers.
- Java (JDK 21, Gradle, JUnit 5)
- Scala (Scala 3, Gradle, ScalaTest)
- Kotlin (Kotlin 2, Gradle, JUnit 5)
- Groovy (Groovy 4, Gradle, Spock)
- Clojure (Clojure 1.12, Gradle + Clojurephant, clojure.test)
- TypeScript (Node 22+, TypeScript 5, Vitest)
- Haskell (GHC via cabal, Hspec)
- Rust (edition 2024, Cargo, built-in test)
- Go (Go 1.24+, go test)
- Python (Python 3.12+, pytest, Ruff)
languages/
jvm/ # Java, Scala, Kotlin, Groovy, Clojure modules under one Gradle build
typescript/ # npm + TypeScript + Vitest
haskell/ # cabal + Hspec
rust/ # Cargo project with one binary per problem
go/ # Go module with one cmd package per problem
python/ # pyproject + pytest + Ruff
problems/ # per-problem notes/specs independent of language
scripts/ # bootstrap, scaffold, run, and test helpers
bash scripts/bootstrap.sh
bash scripts/test-all.shbash scripts/new-problem.sh 0002This creates a top-level problem markdown file and starter files in each language project if they do not already exist.
bash scripts/run-problem.sh java 0001
bash scripts/run-problem.sh scala 0001
bash scripts/run-problem.sh kotlin 0001
bash scripts/run-problem.sh groovy 0001
bash scripts/run-problem.sh clojure 0001
bash scripts/run-problem.sh typescript 0001
bash scripts/run-problem.sh haskell 0001
bash scripts/run-problem.sh rust 0001
bash scripts/run-problem.sh go 0001
bash scripts/run-problem.sh python 0001- Test helper functions and algorithm properties.
- You can use small examples from the Euler prompt (for example, below 10 for Problem 1).
- Avoid committing final-answer assertions for the full target input when you want to keep solutions private.
- Prefer invariant tests (monotonicity, divisibility checks, edge cases, parity across implementations).
Your original Clojure file remains at main/clojure/src/projecteuler.clj for reference.