Welcome! I’m excited that you’re excited about getting started with Elm. Elm is great. It’s hip, cool, a little funky, and genuinely powerful. Let’s get started.
What is Elm?
The basic building block of Elm is the function. Every Elm application is built from a bunch of functions composed together and wired up in such a way that data flows from user interactions, through a store-like architecture, and changes are presented to the view. The program “reacts” to the user’s actions. Elm could even be called a functional “reactive” language. It really depends who you ask though, “reactive” is kind of a fuzzy word.
What’s it good for?
How do I get started?!
npm install -g elm
2 Download the Elm plugin for your favorite editor.
You can get it for Atom, Brackets, Emacs, Intellij, Light Table, Sublime Text, Vim, and VS Code.
I also recommend
elm-format. Since the Elm compiler needs things to be formatted a specific way,
elm-format saves you a lot of time by automatically indenting and formatting things the way the compiler likes. You can even configure
elm-format to run every time you save your file. This greatly improves the already-pleasant development experience with Elm.
3 Open up
elm-repl and start experimenting!
Do this by typing
elm-repl into the terminal and voila!
Now, some of you may be getting the following error (or something very similar):
libtinfo.so.5: cannot open shared object file: No such file or directory
If you happen to be one of the lucky ones, try entering this command and it should fix the issue:
sudo ln -s /usr/lib/libncurses++w.so.6.0 /usr/lib/libtinfo.so.5
3 elm-lang/elm-platform issue #115 - solution for issue mentioned in last section