Skip to content

Instantly share code, notes, and snippets.

@mloughran
Last active May 24, 2019 12:40
Show Gist options
  • Save mloughran/c3c029791a81d16934680ca81c12071a to your computer and use it in GitHub Desktop.
Save mloughran/c3c029791a81d16934680ca81c12071a to your computer and use it in GitHub Desktop.
Suggestions for getting started with Elm

Learning Elm

Start by following the guide from start to finish. It's really clear and written by Evan, Elm's author. Do the exercises!
https://guide.elm-lang.org

I found this example helpful as an example of piecing everything together after reading the guide
http://elm-bootstrap.info/getting-started

Don't worry about modules or splitting stuff into separate files. This advice is oft repeated in the Elm community and it's absolutely correct. The patterns that work in Elm aren't the patterns that work in other languages, and if you split modules out too early you'll make it harder to get a sense of the right module abstractions. Refacting is a breeze so you can modularise later. (See /The life of a file/ below).

General talks

“What is Success?” by Evan Czaplicki | Elm Europe 2018
I think it really helps to understand where Evan is coming from. This talk is totally non-technical, but just watch it anyway!

Talks about the type system

“Making Impossible States Impossible” by Richard Feldman | elm-conf 2016
I think this is a good place to start, nothing too funky yet.

"Solving the Boolean Identity Crisis" by Jeremy Fairbank | elm-conf 2017
The the message is spot on. Lots of examples for why there is often a more elegant solution than using a boolean.

"Types Without Borders" by Dillon Kearns | elm-conf 2018
Wonderfully dense talk. Moves on from types to talk about his GraphQL library and TypeScript interop with Javascript.

Talks about modules and refactoring

"The life of a file" by Evan Czaplicki | elm-europe 2017
After getting comfortable with building a 'single file' Elm application, watch this.

Other resources

Elm Destructuring (or Pattern Matching) cheatsheet
I open this every time I think "Can I destructure this?"

If you like listening to podcasts, try Elm Town. I've listened to a handful and the conversations have all been interesting.

Package docs site is great. Go straight here rather than using google which often takes one to old package versions. https://package.elm-lang.org

If you know the type you want, just enter it in here. Super useful.
https://klaftertief.github.io/elm-search/

Other tips

I have found the included elm reactor awkward to use, and it doesn't support applications with multiple URLs. I'm using https://github.com/wking-io/elm-live, which works really well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment