Enter the Matrix
summary
core.matrix provides an n‑dimensional array API for Clojure with broadcasting, slices, transpose, matrix multiply and higher‑order array ops, pluggable backends and optional mutability for performance. Implementations include persistent vectors, an NDArray view like NumPy, and native BLAS via clatrix uses BLAS. Protocols enable open extension with protocol dispatch nearly as fast as direct calls. Demo builds PageRank with one matrix multiply per step and shows steady state convergence and a practical 4x speedup from controlled mutability.
AI-written summary · about
chapters (41)
- 0:00Intro
- 1:19Plug-in paradigms
- 2:27Modern array programming
- 3:02Why Clojure for array programming?
- 4:18Abstraction
- 6:04Multi-dimensional array properties
- 6:41Arrays = data about relationships
- 7:31Why arrays instead of functions?
- 8:59Expressivity
- 10:05Principle of array programming
- 10:33Equivalence to Clojure vectors
- 11:50Scalars vs. arrays
- 12:11Indexed element access
- 12:23Slicing access
- 13:05Arrays as a composition of slices
- 14:54Broadcasting scalars
- 15:26Broadcasting arrays
- 15:47Functional operations on sequences
- 16:53Specialised matrix constructors
- 17:12Array transformations
- 17:43Matrix multiplication
- 18:14Geometry
- 19:02Demo
- 26:02Mutability?
- 26:23Mutability - the tradeoffs
- 26:58Mutability - performance benefit
- 27:24Mutability - syntax
- 28:50Lots of trade-offs
- 29:21What's the best data structure?
- 30:56Secret weapon time!
- 31:10Clojure Protocols
- 31:48Protocols are fast and open
- 32:23Typical core.matrix call path
- 33:03Most protocols are optional
- 33:46Default implementations
- 34:26Extending a protocol
- 34:57Speedup vs. default implementation
- 35:30Internal Implementations
- 36:32External Implementations
- 37:34Switching implementations
- 38:33Future roadmap
related talks
25mMore Clojure Less Complication
38mScientific Clojure, a bird's eye view
39mProgress of Ruby/Numo: Numerical Computing for Ruby
40m"Clojure in the Fintech Ecosystem"
41mInteractive GPU programming with ClojureCUDA & ClojureCL
29mLarge-Scale Matrix Operations
52m"The Amazing Clojure"
42mDesign in Practice in Practice
