It is officially (and chronologically) The Glorious Day of Links. Also, a
fairly straightforward (if mechanical) exercise awaits those-who-dare. In the
links: Reuse, and Private State; Elm Remote Meetup #4 is coming!; autocomplete;
strings of HTML.
The Elm Guide Section on Reuse
@czaplic added an (of-course) well-thought-out and
extremely detailed resource to The Elm Guide related to building reusable
things. The tl;dr is that nuance exists so maybe don't reach for
one-size-fits-all. He also lays out four distinct situations and corresponding
appropriate solutions. I love the final quote:
Note: I plan to fill this section in with more examples of growing your Model
and update functions. It is roughly the same ideas though. If you find
yourself repeating yourself, maybe break things out. If a function gets too
big, make a helper function. If you see related things, maybe move them to a
module. But at the end of the day, it is not a huge deal if you let things get
big. Elm is great at finding problems and making refactors easy, so it is not
actually a huge deal if you have a bunch of entries in your Model because it
does not seem better to break them out in some way. I will be writing more
[ from @czaplic ]
Private State: A Contrived Example (ML Thread)
This is a really long thread that has some interesting discussions related to
the concepts addressed in the reuse page above (mostly).
Elm Remote Meetup #4
So the 4th Elm Remote Meetup is happening on Wednesday, September 21st at 20:00
UTC. So far
here's what's planned:
- Jonas Coch, @klaftertief - The why, how, past, present and future of
- @luke - I just wrote a nifty little word-wrap optimization algorithm with
elm that’d be fun to talk about at meetup #4
- @eeue56 - I can talk about some of the stuff we do at NRI/walk through
some of my experiments and briefly discuss the interesting parts of the code
This is one of my favorite days each month. If you wanted to see videos of past
remote meetups they're here:
And here are links specifically related to marketing this meetup:
[ from @knewter ]
elm-autocomplete v4 was released
A reusable, navigable menu for all your text input needs.
[ from @gregziegan ]
Elm - Awesomesauce or just yet another language for the Front-end ? : Magnus Rundberget
A nice intro to Elm. [Ed. Note: Use it to trick people into being happier.]
[ from @mrundberget ]
Elmx is a tiny precompiler that takes an Elm program with embedded HTML and
desugars the HTML into elm-html syntax.
Like JSX for Elm.
[ from Patricio Zavolinsky ]
An HTML Parser, written in Elm. It has a nice demo.
[ from @jinjor ]
So this week was a little unusual, in that I started it with a very clear list
of seemingly-achievable-things to do and ultimately got arguably one and a half
of them done (errors messages and validation, light refactoring but nowhere near
where I wanted to end up).
For this week's exercise, add the elm-mdl/elm-simple-form fields, with
server-side validation wired up, to the remaining forms. If you're still
feeling frisky after that, feel free to look at more radical ways you might want
to refactor. See you soon!