billgathen / thinking-in-elm

A series of experiments exploring how to think using the Elm programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Thinking in Elm

A series of experiments exploring how to think using the Elm programming language and how it can play nice with JavaScript. To try Elm without installing it on your machine (as well as seeing a bunch of examples) check out Try Elm!

This is not intended as an "Elm 101": I gloss over most of the syntax details to focus on how to think about Elm applications, in particular the Elm Architecture and JavaScript interop. The Elm docs are a good place to start if you're learning the language from scratch. Either read them through beforehand or use them as a reference when you see a bit of syntax you don't understand.

The Steps

  1. Why Should I Care About Elm?
  2. Hello World
  3. The Elm Architecture
  4. The World Outside
  5. Going Deeper

The Slides

The slides for the presentation that drove this can be downloaded in PDF on my website.

It's just 2 diagrams, but they're very helpful for visualizing the flows in the Elm Architecture and the World Outside sections.

Playing with the examples

To play with the examples on Linux/OSX machine:

NOTE: I don't have instructions for doing Elm development on Windows, but the commands should be similar.

  1. Install Elm
  2. git clone https://github.com/billgathen/thinking-in-elm.git

Each project has been compiled, so to try the examples on your local machine, run this command in your terminal in the main directory for the example:

open index.html

When you make a change to one of the .elm files in any of the examples, run this command in your terminal, in the main directory for the example:

elm make Main.elm --output elm.js

That will re-build the Elm application and store it in elm.js so the index.html page can find it.

The first time you build one of the projects, Elm needs to pull down all the dependencies: accept the defaults for all the questions it asks you.

LICENSE

About

A series of experiments exploring how to think using the Elm programming language

License:MIT License


Languages

Language:JavaScript 99.4%Language:Elm 0.3%Language:HTML 0.3%