Subscribe now

Elm Weekly Drip #38 and Exercise: More Contextmenu [03.02.2017]

This week we'll add the ability to remove shapes in our SVG editor. Before we get into that, though, here are some links from around the community.

stil4m/elm-analyse

A tool that allows you analyse your Elm code and identifies deficiencies and best practices.

This is basically a linter for Elm code. It includes an awesome web interface for fixing deficiencies in your code just by clicking a button. I cleaned up 126 unnecessary imports in just a few minutes without opening my editor, on a 6K LOC project. Extremely cool

[ h/t @stil4m ]


Documentation on Elm's internals

Noah Hall produced some documentation on how Elm code gets compiled.

This is a really interesting document if you care to see how Elm code is compiled. Noah Hall knows this stuff pretty well, so it's great that he took the time to write it up for the rest of us.

[ h/t @eeue56 ]


In depth overview of Elm and Purescript.

Lessons learned porting a game from Purescript to Elm.

An excellent overview and comparison of Elm and Purescript. I personally am entirely scared by the ability to produce functions that aren't referentially transparent in Purescript, but it's a great read :)

[ h/t @_alpacaaa ]


json-to-elm

The tool to produce a decoder from your JSON easily.

Noah has updated json-to-elm to support 0.18. He also added the ability to produce a human readable description of your decoder. Very cool!

[ h/t @eeue56 ]


elm-avl-dict-exploration

An API-compatible implementation of Elm's Dict type using AVL trees.

Elm's core Dict implementation uses Red-Black trees. This is a version that uses AVL trees. It has similar worst-case performance characteristics to core's Dict, but much better insertion performance.

[ h/t @zwilias ]


Understanding The Elm Architecture

This is a great writeup of the Elm Architecture with nice diagrams and pseudocode for a runtime. Worth a read!

[ h/t @toretore ]


Exercise

This week we looked at elm-ffi and used elm-contextmenu to add a context menu to our SVG editor. For this week's exercise, start with dailydrip/elm-svg-editor tagged before this episode and add the ability to remove shapes from the context menu.

Resources