Essential and accidental configuration

These are some thoughts that come out of building elm-review, and I feel like this is a problem we're avoiding quite well in the Elm tooling ecosystem.

https://jfmengels.net/essential-and-accidental-configuration

https://redd.it/1m0fxi6

@reddit_elm
Elm Town 85 – Wander: Elm Camp 2025

In a short break from the Wonder series, John Pavlick, Wolfgang Schuster, and Tristan Pendergrass join Jared to report on the Elm Camp 2025 unconference experience in Michigan, USA.

Elm Town 85 – Wander: Elm Camp 2025:

* https://elm.town/episodes/elm-town-85-wander-elm-camp-2025
* https://youtu.be/VpFlP5XcB7w

https://redd.it/1m6ov21

@reddit_elm
Built a virtual DOM in Gleam to learn the language
/r/gleamlang/comments/1mqqzlf/built_a_virtual_dom_in_gleam_to_learn_the_language/

https://redd.it/1mqqzv7

@reddit_elm
Announcing elm-field
https://elmwithdwayne.dev/blog/dev.to/dwayne/announcing-elm-field-opb

An Elm package for constructing valid data from unreliable string inputs. It provides a Field data structure that models the non-UI related aspects of an input field. It's useful for building forms.

https://redd.it/1mtlkpe

@reddit_elm
Elm's Future for large projects

I'm a backend developer who started studying Elm out of curiosity and I've been really impressed with the language. I'd like to adopt it for my personal projects, some are simple, but others can be quite complex and critical.

​With that in mind, I'd love to hear the community's perspective on a couple of things before i start addopting elm on real comercial projects:


​Future and Sustainability: What is the community's view on the long-term future and development of Elm, is there any risk of elm Just get discontinued or deprecated?


​Impact on Large Projects: For those with experience, what has been the long-term impact of using Elm on large, complex projects? I'm curious about the positive outcomes (like maintainability) as well as any potential negative impacts or challenges you've faced (security, integration with the JS ecosystem, large-scale refactoring, etc.).



​Thanks!

https://redd.it/1nc8kou

@reddit_elm
Solving Elm Router "Double Update" Problem

I found some older discussions on this issue, but they did not really provide a clear answer:

* Understanding the "double update" behavior of Browser.application
* Routing when you are already there

It turns out I discovered a simple solution, so I am writing it down in case I forget, or in case someone else finds it useful.

Imagine we have an expensive parseAppRoute function that performs many effects. We do not want it to run twice: once for Navigate and again for UrlChanged. (I am ignoring LinkClicked in this explanation, since in my app I only use Navigate, but the principle is the same.)

The idea is to keep track of a boolean flag called isInternal that indicates whether the URL change originated from inside the app or from an external action such as the browser's back/forward buttons. By default this flag is False, because back/forward navigation can happen at any time.

Whenever I change the route from inside the app, I set isInternal to True. Then, when the follow-up UrlChanged message arrives, I check the flag:

* If it is True, I ignore the message and reset the flag to False.
* If it is False, I know the change came from the browser (back/forward), so I call parseAppRoute.

This way we avoid calling handling the route change twice.

On initial page load, the route is handled in init, so there is no issue there either.

Here is an example implementation:
parseAppRoute : String -> (Route, Cmd Msg) 
parseAppRoute url =
let
newRoute = urlStringToRoute url
in
(newRoute, getCmdFrom newRoute)

cmdFromRoute : Route -> Cmd Msg
cmdFromRoute route =
-- perform expensive side effects


init : Flags -> Url -> Nav.Key -> ( Model, Cmd Msg )
init _ url key =
let
(initRoute, initCmd) = parseAppRoute url
in
( { route = initRoute
, isInternal = False
, key = key
}
, initCmd
)


-- UPDATE

update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
UrlChanged url ->
if model.isInternal then
-- Ignore the UrlChanged that we triggered ourselves;
-- then reset the flag.
( { model | isInternal = False }, Cmd.none )

else
-- Triggered by browser back/forward navigation
let
(newRoute, newCmd) = parseAppRoute url
in
( { model | route = newRoute }, newCmd )

Navigate route ->
let
href = toUrlString route
newRouteCmd = cmdFromRoute route
in
( { model
| isInternal = True -- Mark this as an internal change
, route = route
}
, Cmd.batch [ Nav.pushUrl model.key href, newRouteCmd ]
)

LinkClicked req ->
case req of
Browser.Internal url ->
-- Treat internal clicks like Navigate
let
(newRoute, newCmd) =
parseAppRoute url
in
( { model | isInternal = True, route = newRoute }
, Cmd.batch
[ Nav.pushUrl model.key (Url.toString url)
, newCmd
]
)

Browser.External href ->
( model, Nav.load href )

None ->
( model, Cmd.none )


I hope to hear from others if they reach the same conclusion. Feel free to ask me anything as well.

https://redd.it/1nihdua

@
reddit_elm
Elm Town 87 – Wonder: From machine to mob learning with Sophie Collard

Sophie Collard describes her transition from environmental engineering to software, mob programming to teach functional concepts, and building a startup app with Elm.

Elm Town 87 – Wonder: From machine to mob learning with Sophie Collard:

* https://elm.town/episodes/elm-town-87-wonder-from-machine-to-mob-learning-with-sophie-collard
* https://youtu.be/D3-shZomLF8

https://redd.it/1novdmm

@reddit_elm
Any good introductary material to get a feel for "what elm is"

Hey there, I recently heard about elm somewhere (only in passing), and after watching a very short video on it it peaked my interest.

In particular the FP seeming aspects seemed interesting, and I saw a decent bit of interesting looking syntax which I'd like to learn more about.

So I was wondering if there are some good "this is what elm is, what it does, and how it does it" type introductory materials you guys would recommend, both articles or videos would be cool.

I'm not really into web dev (kinda the opposit tbh, embedded), but I do have a big love for functional languages, and would be interested to learn "what" elm is/does :-D

https://redd.it/1nu8n18

@reddit_elm
To what extent condemnation of Elm is unfair?

Seeing many posts saying that Elm is worse than language X, I wonder how much of it is a lie and exaggeration. Why do the languages that promise to be better than Elm drive you insane with their error messages? Why can't you declare a type and simply use it a few lines down? To what extent is having several functions in Elm for different argument types quicker than struggling with silly languages like X?

https://redd.it/1o8jcau

@reddit_elm
2025/10/19 02:56:30
Back to Top
HTML Embed Code: