Haskell

Haskell is an advanced purely-functional programming language. An open-source product of more than twenty years of cutting-edge research, it allows rapid development of robust, concise, correct software. With strong support for integration with other languages, built-in concurrency and parallelism, debuggers, profilers, rich libraries and an active community, Haskell makes it easier to produce flexible, maintainable, high-quality software.
Site: https://www.haskell.org

Videos

Laziness and ...

Added Laziness and ...

Laziness (non-strictness) can have confusing effects, especially with a fake pure function like trace. And on the topic of laziness, we'll encounter lazy ByteStrings for the first time.

 Watch

Redoing Make

Added Redoing Make

Let's build an implementation of djb's redo from scratch in Haskell. In this, the first episode, I'll explain what the purpose of the program is, write some initial code, and create a GitHub repository for you to follow along with if you want.

 Watch

Hoogle in GHCi

Added Hoogle in GHCi

Run Hoogle from GHCi and save yourself some time switching over to a browser. Or just take a look at how to customize your GHCi with me.

 Watch

Unsafe Functions

Added Unsafe Functions

The Prelude contains an innocent-looking but unsafe function. We'll encounter it as we add support for default .do files. The implementation of defaults will be guided by a paper from Alan Grosskurth who himself created a redo implementation (in shell script).

 Watch

Refactoring Monads

Added Refactoring Monads

Monad do notation is convenient but can also get in the way of writing concise code. We'll refactor the code until it's shorter, (arguably) more readable, and less error-prone to make changes to. In the process we'll also add the feature we were missing to get default .do files working.

 Watch

Tracing and Showing

Added Tracing and Showing

'Printf-style debugging' is possible with Haskell thanks to Debug.Trace, as long as the value you're interested in has a Show instance. Using tracing, we'll start to explore a method of collecting dependency/prerequisite information from .do scripts through the use of a redo-ifchange program.

 Watch

Exception Handling

Added Exception Handling

Exceptions are a pain in any language, but they have some unique quirks in Haskell. We'll look at how to catch certain types of exceptions, figure out the type of exception you've ended up with, and how to handle it.

 Watch

GHCi's Debugger

Added GHCi's Debugger

Interactive debugging is possible in Haskell with GHCi. We'll look at how, and use it to fix what broke last episode. Then, we'll extend the implementation to support target selection on the commandline.

 Watch

HLint and Flymake

Added HLint and Flymake

HLint helps keep your code clean. With Flymake and GHC you can keep it clean in realtime. Join me as I finally modernize my development environment so that I can see errors and warnings as I type.

 Watch

Recursion and Redis

Added Recursion and Redis

It's time to test our implementation or redo by converting an existing make-based build system over to it. I've picked redis as our target due to its relatively simple Makefile and its avoidance of automake.

 Watch

Replacing Make

Added Replacing Make

Goodbye, Make! It's time to see where the design of redo really shines by replacing the Makefiles in redis with .do scripts. We'll adapt a style that djb adopts for his own projects when writing build scripts.

 Watch

Cabal and Hackage

Added Cabal and Hackage

It's time to release our code to (upon?) the world. The Haskell community is still small and trusting, and getting your code on Hackage (hence making it cabal installable) is pretty simple. We'll generate a .cabal file for redo and then use that to package our code for Hackage.

 Watch

Documentation and Haddock

Added Documentation and Haddock

I'm embarrassed by how long I've let this program go without a single comment, let alone some proper documentation. We'll add documentation in 3 layers: external (README.markdown), top-level (Haddock), and narrative (comments).

 Watch

Porting to Windows

Added Porting to Windows

Running redo on Windows seems counterintuitive first considering that redo is built around many Unix philosophies. But as it turns out, it's possible. We'll make some changes to the Cabal install process and then add some conditional installation instructions for Windows.

 Watch