Loading...

Master Haskell.

Haskell mastery exercises. Become your team's resident Haskell expert.

Build your own grep
Build your own grep

Learn about regular expressions and how they're evaluated. Implement your own version of grep in Haskell.

Match a literal character
Login via GitHub to view this stage
Match digits
Login via GitHub to view this stage
Match alphanumeric characters
Login via GitHub to view this stage
Positive Character Groups
Login via GitHub to view this stage
Negative Character Groups
Login via GitHub to view this stage
Combining Character Classes
Login via GitHub to view this stage
Start of string anchor
Login via GitHub to view this stage
End of string anchor
Login via GitHub to view this stage
Match one or more times
Login via GitHub to view this stage
Match zero or one times
Login via GitHub to view this stage
Wildcard
Login via GitHub to view this stage
Alternation
Login via GitHub to view this stage

Backreferences

Single Backreference
Login via GitHub to view this stage
Multiple Backreferences
Login via GitHub to view this stage
Nested Backreferences
Login via GitHub to view this stage
Build your own HTTP server
Build your own HTTP server

HTTP is the protocol that powers the web. In this challenge, you'll build a HTTP server that's capable of handling simple GET/POST requests, serving files and handling multiple concurrent connections.

Along the way, we'll learn about TCP connections, HTTP headers, HTTP verbs, handling multiple connections and more.

Bind to a port
Login via GitHub to view this stage
Respond with 200
Login via GitHub to view this stage
Extract URL path
Login via GitHub to view this stage
Respond with body
Login via GitHub to view this stage
Read header
Login via GitHub to view this stage
Concurrent connections
Login via GitHub to view this stage
Return a file
Login via GitHub to view this stage
Read request body
Login via GitHub to view this stage

HTTP Compression

Compression headers
Login via GitHub to view this stage
Multiple compression schemes
Login via GitHub to view this stage
Gzip compression
Login via GitHub to view this stage
Build your own Redis
Build your own Redis

Discover concurrent programming in Haskell while also learning about TCP servers, network programming, and the Redis Protocol.

Bind to a port
Login via GitHub to view this stage
Respond to PING
Login via GitHub to view this stage
Respond to multiple PINGs
Login via GitHub to view this stage
Handle concurrent clients
Login via GitHub to view this stage
Implement the ECHO command
Login via GitHub to view this stage
Implement the SET & GET commands
Login via GitHub to view this stage
Expiry
Login via GitHub to view this stage

RDB Persistence

RDB file config
Login via GitHub to view this stage
Read a key
Login via GitHub to view this stage
Read a string value
Login via GitHub to view this stage
Read multiple keys
Login via GitHub to view this stage
Read multiple string values
Login via GitHub to view this stage
Read value with expiry
Login via GitHub to view this stage

Replication

Configure listening port
Login via GitHub to view this stage
The INFO command
Login via GitHub to view this stage
The INFO command on a replica
Login via GitHub to view this stage
Initial Replication ID and Offset
Login via GitHub to view this stage
Send handshake (1/3)
Login via GitHub to view this stage
Send handshake (2/3)
Login via GitHub to view this stage
Send handshake (3/3)
Login via GitHub to view this stage
Receive handshake (1/2)
Login via GitHub to view this stage
Receive handshake (2/2)
Login via GitHub to view this stage
Empty RDB Transfer
Login via GitHub to view this stage
Single-replica propagation
Login via GitHub to view this stage
Multi Replica Command Propagation
Login via GitHub to view this stage
Command Processing
Login via GitHub to view this stage
ACKs with no commands
Login via GitHub to view this stage
ACKs with commands
Login via GitHub to view this stage
WAIT with no replicas
Login via GitHub to view this stage
WAIT with no commands
Login via GitHub to view this stage
WAIT with multiple commands
Login via GitHub to view this stage

Streams

The TYPE command
Login via GitHub to view this stage
Create a stream
Login via GitHub to view this stage
Validating entry IDs
Login via GitHub to view this stage
Partially auto-generated IDs
Login via GitHub to view this stage
Fully auto-generated IDs
Login via GitHub to view this stage
Query entries from stream
Login via GitHub to view this stage
Query with -
Login via GitHub to view this stage
Query with +
Login via GitHub to view this stage
Query single stream using XREAD
Login via GitHub to view this stage
Query multiple streams using XREAD
Login via GitHub to view this stage
Blocking reads
Login via GitHub to view this stage
Blocking reads without timeout
Login via GitHub to view this stage
Blocking reads using $
Login via GitHub to view this stage

Transactions

The INCR command (1/3)
Login via GitHub to view this stage
The INCR command (2/3)
Login via GitHub to view this stage
The INCR command (3/3)
Login via GitHub to view this stage
The MULTI command
Login via GitHub to view this stage
The EXEC command
Login via GitHub to view this stage
Empty transaction
Login via GitHub to view this stage
Queueing commands
Login via GitHub to view this stage
Executing a transaction
Login via GitHub to view this stage
The DISCARD command
Login via GitHub to view this stage
Failures within transactions
Login via GitHub to view this stage
Multiple transactions
Login via GitHub to view this stage
Build your own BitTorrent
Build your own BitTorrent

Learn about .torrent files and the famous BitTorrent protocol. Implement your own BitTorrent client in Haskell.

Decode bencoded strings
Login via GitHub to view this stage
Decode bencoded integers
Login via GitHub to view this stage
Decode bencoded lists
Login via GitHub to view this stage
Decode bencoded dictionaries
Login via GitHub to view this stage
Parse torrent file
Login via GitHub to view this stage
Calculate info hash
Login via GitHub to view this stage
Piece hashes
Login via GitHub to view this stage
Discover peers
Login via GitHub to view this stage
Peer handshake
Login via GitHub to view this stage
Download a piece
Login via GitHub to view this stage
Download the whole file
Login via GitHub to view this stage

Magnet Links

Parse magnet link
Login via GitHub to view this stage
Announce extension support
Login via GitHub to view this stage
Send extension handshake
Login via GitHub to view this stage
Receive extension handshake
Login via GitHub to view this stage
Request metadata
Login via GitHub to view this stage
Receive metadata
Login via GitHub to view this stage
Download a piece
Login via GitHub to view this stage
Download the whole file
Login via GitHub to view this stage
Many more to come...
coming soon
We release new challenges based on user votes. Let us know what you'd like to see next!
challenge voting
Vote on upcoming challenges