Finding Success

Our first completed book is now available as a PDF or epub from Leanpub. You can read more about that there or on the home page. We wanted to tell you a little about where it came from and how it relates to the rest of our work.

As we started writing the book we originally announced, we realized that we have a lot that we want to say about Haskell. We found that the sheer scope of what we were originally trying to accomplish was pulling us in a lot of directions, and that there was some tension between the goals of wanting a desk reference or handbook style and presenting explanations in a linear way, where they could build off each other. We wanted both linear courses and a reference style guide to things like language extensions and libraries. Additionally, we wanted a guide to the topics in logic and mathematics that routinely come up in public Haskell forums.

Public discussion within the Haskell community tends to be about topics experienced Haskellers find engaging and fun, leaving the impression on newcomers that if you haven’t read the work of Gottlob Frege in the original German, then you don’t really belong here – or, at least, you can’t expect to understand a lot of the discussion. That obscures the fact that many of the topics under discussion are not necessary to be a productive Haskell programmer, whether as a hobbyist or professional. Some of the pedagogical materials available now for Haskell are of very good quality, but for various reasons, many of them leave gaps, and often those gaps are practical things; it’s helpful to see how concepts are used to solve the kinds of real problems that programmers routinely do have to solve, and a lot of the educational materials (not all, of course) out there right lack now these kinds of extended, practical examples.

One of our main goals has always been to make Haskell (and eventually Nix) as accessible to anyone who wants to learn it as, say, Ruby or Python tend to be. As well, we want to create a community where newcomers, hobbyists, and everyone else feels welcome and able to participate in the public discussions. We realized that this set of goals is – well, they’re going to take some serious time and commitment to achieve. We felt we needed to be able to write full time, or close to it, if we were to succeed.

We started Type Classes with these goals in mind. That site has been operational for nearly a year now, and it’s permitted us to spend most of our work time on writing about Haskell (and sometimes Nix). It’s allowed us to develop both structured, linear courses and also reference pages. Another gap we’re starting to fill is showing how concepts in one language may translate to Haskell, in order to ease the transition for Python, Java, and JavaScript programmers, for example. It’s given us the time and structure to work towards all of our goals; doing them on the site is more flexible and permits more experimentation and interlinking than books do.

As we’ve developed content for that platform, it made sense to offer some parts of it as discrete content. The subscription model that allows access to all the content we produce isn’t the right fit for everyone, after all. Also, many people prefer to read paper books than take an online, serialized course. Thus, we’ve been developing the site content into standalone books in some cases. The reference pages are the content for the reference book we’ve mentioned, tentatively titled The Joy of Haskell Desk Reference, while the courses are being edited into short monographs.

The series of monographs begins with the first course that we published on Type Classes; there, it is known as The Validation course because

In doing so, it illustrates the relationship of types and typeclasses in the Haskell type system, introduces what monads are and also applicatives, and gives a clear picture of the differences between those two classes. The things we think are important about this book include:

And now this basic structure forms the model for other courses on Type Classes, and thus for future monographs. The next monograph, on web servers, has been written and is currently in editing. It begins with a discussion about sockets and the HTTP protocol and works through parsing, the differences among the string types in Haskell, and how to use a streaming library called pipes.

Another one, from the Type Classes course called Functortown, will be a complete exploration of all the functors – Functor, Bifunctor, Applicative, Monad, Contravariant, and Profunctor, with some things about Traversable and Monoid appearing along the way. Each segment of that course begins with a motivating, practical example – why do we need this function, and then why do we want this to be a typeclass? It also covers details such as property testing your instances to ensure they are law abiding, what features of certain types mean they are not a Functor, and so forth.

Meanwhile, we continue to work on reference materials for the Desk Reference, and they appear on the site first and then we edit them into a suitable style for what will be the standalone book. We hope to have an initial version of that out this year. It will be similar to a pocket reference book, intended more for looking something up quickly than for linear reading, and will cover important vocabulary, GHC language extensions and other pragmas, GHCi commands (including some of the lesser known ones and how to use them) and some critical libraries, among other topics.

The Type Classes site does host some content that will likely never make it into a book; not everything can be distilled in that way. A Type Classes membership allows members to access everything we write, as we write it, while also ensuring we are able to continue the work we’re doing.

Over time, in line with our goals of easing access and promoting inclusivity in the Haskell and Nix communities, we will also be offering more free resources on the Type Classes site. Our Transitions content is already free, along with tutorials about using the fltkhs package to make native GUI apps, posts about contravariance and profunctors, and more. We hope it will be recognized that having two people write full-time to not only produce but also maintain, as the ecosystem changes, all this writing means that we can’t release it all for free; it’s an enormous amount of work, and relies on expertise in teaching, writing, and programming that we’ve gained over many years. That said, we do have a couple of large(ish) projects in the works this year that will be freely, publicly available. Additionally, we release open-source libraries from time to time, taken from the work we’ve done building the Type Classes site (almost entirely written in Haskell and Nix).

As we enter our second year of business, we have a lot planned and a lot of exciting work to do. We hope that we can help bring the joy of Haskell to everyone who wants it.