Issue #21

Turns out that sorting array elements is not as easy as it may sound. Suppose you have a Kanban board with lots of cards, and you start adding new ones and reshuffling them all around. How many new items do you have to add before running out of index space? Well, it depends a lot about the system you chose for indexing. I can relate to this problem because I saw "Encountered two children with the same key" in React all too often. Alex Drummond describes the journey he took in order to solve a similar problem and how dense ordering is helpful here.

When you need to listen to events like onEnter in Elm, you use subscriptions. Subscriptions come in handy when you need to receive data from JavaScript. In his introductory article Mirko writes how to subscribe to events in Elm. If you're keen on exploring the topic further, I love the Elm Programming book.

Discussions

In using deno for development James Carlson briefly talks about his experience of using Deno in an Elm project. Deno is a secure runtime for JavaScript and TypeScript written in Rust by the creator of Node.js. While Deno cannot run elm.js code (yet), you can write server-side code in TypeScript and communicate with the Elm frontend. Here's some example code from James.

Is Elm right for me? Someone asked this question explaining that they have zero experience in functional languages and they want to build a simple UI. Would Elm be good here? Or React/Svelte/etc? If you have a similar question, it boils down to "You want something quick and dirty? Then don’t use Elm. You want to really understand how FP works? Then use Elm." as one user replied.

A question about elm/parser operators sparked in interesting discussion about custom operators, their pros and cons.

A while ago at work we had discussion about timezones and what to do about user's tz settings in the app. Dealing with time can become a nightmare. Just have a look at the discussion about new datetime library.

Packages

This is neat: "In my last project I needed to parse IBAN / BIC for bank account validation and I was happy to have found https://package.elm-lang.org/packages/groteck/elm-iban/latest/, but there was no package for BIC / SWIFT, so I implemented it on my own. Now after finishing my project, I extracted the BIC module into a package. So if you ever need BIC parsing / validation, here you go: https://package.elm-lang.org/packages/layflags/elm-bic/latest/. "

A new version of Elm Warrior has been released which is a "is a game where you learn Elm by programming the AI of the brave  warrior, named at, as it navigates mazes and battles dangerous opponents".

Quote of the week

While short, a very deep quote from Seneca:

While we are postponing, life speeds by.
Show Comments