Purescript for Elm developers.

I’ve been running Elm in production since March 2017. Purescript always caught my eyes as a very interesting language and I’ve been learning it more and more over the past couple of months. I found that getting productive with Purescript is not as straightforward as it could be for people familiar with Elm. So I put together a document highlighting the most significant differences between the two languages. You can find it here: »

Author image Marco Sampellegrini

In depth overview of Elm and Purescript. Lessons learned porting a game from Purescript to Elm.

TL;DR I’m finally able to read through Purescript/Haskell source code. I ported a game written in Purescript to Elm. You can play with the Elm version of the game right here, what follows are my thoughts on the two languages. How I got here A few months ago, I decided I was going to learn Haskell. The first thing I noticed was that I couldn’t read Haskell code. »

Author image Marco Sampellegrini

Let's make a GraphQL client in Elm!

I’m a big fan of GraphQL and I’d like to explore how to use it in Elm. With a statically typed language (like Elm) we should be able to achieve very nice things, such as using a DSL to write queries and determine their correctness at compile time. We’ll initially build a simple implementation and see where that takes us. I’m going to use a service called graphqlhub which exposes some famous REST apis as a GraphQL endpoint. »

Author image Marco Sampellegrini

Building a Mastermind game in Elm.

Let’s kick off the new year with another game. This is a little bit more complex than the Memory Game and Rock Paper Scissors clones I implemented in Elm over the past few weeks. You might want to refer to those previous tutorials if you’re not entirely familiar with Elm and how the Elm Architecture works. This is what we’re going to build: So this is Mastermind! I created this little explanation of the types we’re going to use. »

Author image Marco Sampellegrini

Rock Paper Scissors in Elm. A beginner friendly implementation.

This is the classic Rock Paper Scissors game on steroids. There are two more choices that I’ve never heard before – Lizard and Spock – and the implementation is a bit more spicy because we’re going to grab random numbers from random.org so that we get to explore the Http module as well. This is based off the pux-rock-paper-scissors game made by @spicydonuts in Purescript. If you’re interested in that language you should definitely give Pux a go because it has an almost 1:1 reimplementation of the Elm architecture and I find it pretty awesome. »

Author image Marco Sampellegrini

Building a memory game in Elm. Step by step, from scratch.

This is the classic Memory Game that I always use to approach a new frontend framework/language. It is based on a super old implementation that somebody made years ago – this little game is my point of reference to understand how things work. What are we going to build Here’s a working demo of the finished project: The whole thing will be about 200LOC so it should be pretty easy to follow. »

Author image Marco Sampellegrini