Competitive Programming in Haskell
summary
Shows Haskell solving contest problems live: a working pipeline from input string to output using interact and lazy IO to treat the whole run as a pure function, a simple exponent-and-sum solution that passes samples, a shopping‑list intersection sped from TLE to accepted by switching to ByteString and Set optimisations, and a lazy recursive graph DP that leverages memoisation to count good endings. A 30‑minute contest runs with multiple accepted solutions and one team solves all problems.
AI-written summary · about
chapters (24)
- 0:00Introduction by the host and talk overview
- 0:46What is competitive programming – core structure and constraints
- 1:47Strange incentives – correctness over maintainability
- 2:51Popular sites and Haskell resources
- 3:22Contest announcement and setup
- 4:30Problem 1 – Exponent parsing and summing
- 5:52Using interact and Haskell’s functional approach
- 6:52Writing a minimal solution for problem 1
- 9:13Testing and submitting the first solution
- 10:30Problem 2 – Common items in shopping lists
- 12:08Using Set and Haskell containers
- 14:16Performance tuning with ByteString
- 17:14Re-submitting after optimisation
- 18:06Problem 3 – Graph traversal and lazy evaluation
- 21:52Contest rules explained
- 22:50Contest starts
- 54:48Contest winners and wrap-up
- 55:17Q&A – Can Haskell win CFP contests
- 57:12Useful parsing libraries and code snippets
- 1:03:01Where Haskell struggles in contests
- 1:05:03Educational use of competitive programming
- 1:07:20Why not Parsec – tooling decisions
- 1:07:53Recreational problem-solving without pressure
- 1:08:29Final thanks and speaker applause
related talks
01h 22mHaskell for Everyday Programmers
59mWeb Programming and Streaming Data in Haskell - Part 1 of 2
46mPainless software development with Haskell
01h 02mHaskell for Java Programmers
01h 04mHaskell - A Peek Inside the Ivory Tower
39mCoder Decoder: Functional Programmer Lingo Explained, with Pictures
54mHaskell Project Showcase and Community Contributions
03h 04mHaskell for Beginners: Learn Functional Programming from Scratch
