One is Mine

Tech Listicles by Makers.

Top 10 Shapeless Resources

December 26, 2018

Intro

What is shapeless? Well its a library for doing generic programming in Scala. What is generic programming, well that is a little harder to explain. Generic programming is the type of polymorphism your lanugage doesn’t support. That is how it was described by Simon Peyton.

To me, that description seems like circular reasoning, but hopefully it will all make sense by the time you get to the end of this list.

1. The Type Astronaut’s Guide to Shapeless Book

This free ebook from underscore walks through shapeless in some fun detail. I recommend after reading it you attempt to build your CSV parser and after that try your own Json parser using the techniques learned in the book.

2. The Shapeless Gitter channel

If you have questions after reading the shapeless book then gitter is a great place to go. There is an IRC channel and a mailing list as well, but gitter seems to be where the action is.

3. Shapeless Exercises

Scala Exercises has a whole section of shapeless exercises that you can use to cement your knowledge of the shapeless library.

4. Generic Programming and Shapeless with Miles Sabin

In this interview with Miles Sabbin, the creator of shapeless, he explains how he created shapeless and also the reason why he created it. The why is actually a pretty interesting story. This was one of the first interviews I did for my podcast, and talking with Miles helped me understand some of the big picture ideas behind type level programming.

5. Is Shapeless worth it?

An article tackling whether using shapeless is worth it. Spoiler alert, it is if you like type safey and avoid boiler plate.

6. Getting Started with Shapeless

@skaalf’s guide to getting started with shapeless.

7. @milessabin

Here is Miles on twitter. Follow him to keep up to date not just on shapeless but on many exicting type level projects.

8. Code Mesh Kind PolyMorphism Talk

This talk by Miles is about Kind Polymorphism. It is not totally related to Shapeless itself, but very interesting. If you listen to the inteview in #4, you will hear me fail to understand what kind polymorphism is. After this talk, it is making more sense.

9. The Type Astronaut’s Guide to Shapeless Video

Here is a video version of the first link. I think the book is actaully based on the talk. The video gives a great overview of the high level reasons for wanting to abstract over arity and use generic representations to reduce boilerplate.

10. Shapeless Source

Last, but not least, is the source for shapeless. Shapeless is an opensource project with many contributors, so jump in and see if you can contribute.

Wrapping up:

There we go. So shapeless is geneic programming and generic programming is the type of polymorphism your lanuage doesn’t support. I hope I’ve given you some resources to learn about shapeless and generic programming.


Written by Adam Gordon Bell.

Adam Gordon Bell is a Scala developer, who also hosts a podcast on software development

Tech Listicles by Makers. About and Contribute and Twitter.