loading...
Cover image for I am the author of Elm in Action. Ask Me Anything!

I am the author of Elm in Action. Ask Me Anything!

rtfeldman profile image Richard Feldman ・1 min read

I am Richard Feldman, author of Elm in Action and instructor of the Frontend Masters Elm Workshop. The main open-source projects I'm working on right now are elm-test and elm-css.

I work at NoRedInk, where we have 80,000 lines of Elm code in production. We introduced Elm in 2015, and since then our production Elm code has thrown a total of zero runtime exceptions. We hired Elm creator Evan Czaplicki in 2015 to continue developing the language, and we're hiring!

I'll be here until noon Pacific Time. Ask Me Anything!

Discussion

pic
Editor guide
Collapse
dubyabrian profile image
W. Brian Gourlie

Languages tend to be designed one of two ways: By committee or by BDFL (benevolent dictator for life). Elm is clearly the latter, and it’s hard to argue against that considering how well Elm has turned out under Evan’s watchful eye.

One unfortunate consequence of this is that there’s quite a few native browser functions that don’t have Elm-equivalent APIs, or there are Elm equivalents that feel incomplete (shameless plug).

There’s this conundrum as an Elm user who’s come to appreciate Evan’s design sensibilities. I find myself frustrated over the tight control of elm-package (in particular, restricting native modules from the community), or long-standing issues without even a comment. On the other hand, I understand why it’s this way; It just doesn’t prevent it from being a source of frustration.

Evan is only one person, and this is beginning to become a popular language with diverse needs. Are there any plans to address this?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

I totally get the frustration, but basically I think this is the least bad option. We've tried various ways to accelerate this, and all the cures have ended up being worse than the symptoms.

That said, Evan moves much faster than TC39, so catching up seems more or less inevitable—just not as quickly as we'd all like. :)

Collapse
gothy profile image
Dmitry Utkin

Are there any chances Elm development will become more open? It's easier to get info about future Apple products than to guess what's happening to the Elm language next.

How's Elm Software Foundation doing now? It was publicly announced about a year ago. But it's still not very clear what the purposes are, who's on board and what's the roadmap.

Thank you!

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

I think Elm doesn't have a concrete roadmap because Evan adapts his plans based on what he learns from the community. If you ask him "what will you be working on 6 months from now?" the answer will probably be "depends on what happens in the next 6 months." He does post periodic status updates on the elm-dev mailing list, if you're wondering what he's working on and how it's going.

My understanding is that the Elm Software Foundation is primarily for organizing money-related things. The main reason it exists is that Evan is friends with Python creator Guido van Rossum, and Guido recommended that he set up a nonprofit a la Python Software Foundation. It's not really for project management or anything like that.

Collapse
gothy profile image
Dmitry Utkin

I think Elm doesn't have a concrete roadmap because Evan adapts his plans based on what he learns from the community. If you ask him "what will you be working on 6 months from now?" the answer will probably be "depends on what happens in the next 6 months."

That's great, but how can we get Evan interested in community feedback that have already been crystalized in "meta" issues on github for the virtual-dom, html, elm-compiler? Like this one github.com/elm-lang/html/issues/53

He does post periodic status updates on the elm-dev mailing list, if you're wondering what he's working on and how it's going.

Actually, there is a status report on elm-dev now. Same day as I've asked this question :)
It was almost two months since the previous one.

Thread Thread
rtfeldman profile image
Richard Feldman Ask Me Anything

how can we get Evan interested in community feedback that have already been crystalized in "meta" issues on github for the virtual-dom, html, elm-compiler?

Another way to phrase this is "how can we get Evan to stop working on what he thinks is the most important thing, and instead to work on what we think is the most important thing?"

Ideally everything would get addressed sooner rather than later, but there isn't time for everything, it's impossible to please everyone, and prioritization is hard.

For example, right now there are a lot of people who literally cannot use Elm because it doesn't have sufficient asset management tools to get acceptable performance on low-end mobile devices.

I don't think Evan is wrong to focus on that right now. :)

Thread Thread
gothy profile image
Dmitry Utkin

Another way to phrase this is "how can we get Evan to stop working on what he thinks is the most important thing, and instead to work on what we think is the most important thing?"

No, actually another way to phrase this is "how can we get Evan to start doing frontend stuff in Elm every day".
Your answer on another question about Evan's involvement in NRI day-to-day tasks is practically 0 is the saddest thing I've learned today. I might be wrong, but this is harmful to prioritization.

Thread Thread
rtfeldman profile image
Richard Feldman Ask Me Anything

I think you're underestimating the amount of feedback he gets from all different corners of the community as to what the most important thing is. There are so many people with different priorities who think their particular thing is the most important.

If Evan worked directly on our production code base, he'd probably feel pushed to bump priority for the things that matter most to us, at the expense of all the other voices he hears. As members of this community, that would be a very short-sighted preference for us to have.

Collapse
saucewaffle profile image
SauceWaffle

Where do you draw the line of functionality in your 'let/in' before breaking out into multiple functions to accomplish the same thing?

I find myself commonly having 5 or more variables defined in my 'let' that are staged versions of the first and wonder if that is a bad thing.

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

I tend to pull things into the toplevel early and often, but I also tend to use the (|>) operator wherever possible.

That said, I wouldn't call having several declarations in the same let a bad thing per se. So long as you find it readable, it's unlikely to cause problems outside that let, so I wouldn't worry about it. :)

Collapse
joshhornby profile image
Josh Hornby

Can you explain the structure of the main NoRedInk Elm app? With it being the largest Elm app in the world it, would be really cool to know how it was structured and what you've learned along the way scaling up?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

Sure! I should emphasize that we don't put a big priority on "getting this right." More than anything we try to be consistent (but don't always succeed), and the compiler makes it pretty easy to rename things if we change our minds, so we don't sweat it. (The biggest drawback to renaming is plain old vanilla merge conflicts.) So I wouldn't take any of this as advice so much as a data point if you're curious. :)

We have a series of pages, e.g. "Teacher Dashboard", "Grading", "Splash Page". Each of these has its own main; back when I joined the company we were a non-SPA Rails app, and we have not transitioned to SPA yet. (We have long-term plans to head in that direction, and I don't expect the transition to affect our module structure much - outside of main, of course, but main modules are a small fraction of our total modules.)

We have a top-level module namespace called Nri for things specific to our UI, as opposed to things that we might open-source someday (e.g. the Analytics module, the Emoji module, etc). Here's an example of three related ones:

Nri.QuizHeader.Model
Nri.QuizHeader.Styles
Nri.QuizHeader.View

So our Quiz Header has a model, and a view, and some elm-css styles. (We've been migrating from Sass to elm-css and it's been sweet!) We don't have a Nri.QuizHeader.Update because the quiz header doesn't have any state. I think this is worth emphasizing, because I see people create a model/update/view any time they want to reuse code, and I think that's the wrong way to scale. Unnecessary state management is bloat! We had no need for an update function here, so it was simpler not to have one.

Plenty of times we just have a module to hold view, and plenty of others it's not even a separate module, it's just a plain old function inside an existing module, e.g. viewSidebar : User -> Html msg

We also have reusable views that are used across multiple pages, for example:

Nri.Tabs
Nri.TextInput
Nri.Toggleable
Nri.Tooltip

All of these are stateful, and their APIs looks like github.com/evancz/elm-sortable-table - they do not define their own Msg types, and callers don't have to use Cmd.map. Their states are super simple, and defining their own Msg types would have been overkill - more trouble than it was worth. This is also worth emphasizing; immediately reaching for a custom Msg and Cmd.map any time local state is involved is a surefire way to get needlessly overcomplicated wiring.

My rule of thumb is that reusable views where view returns Html msg instead of Html Msg are nicer by default, and I only reach for a custom Msg once I have enough state transitions that Cmd.map would reduce verbosity substantially.

Finally we have some reusable data structures, which begin with Data., for example:

Data.Assignment
Data.Assignment.Decoder

We debated the right namespace for these and settled on Data because what they have in common is that they're about representing and encoding/decoding some piece of data.

These are a mix of various union types and type aliases that represent common data structures in our app. Some of them have a lot going on, so it's decently common to have a data structure defined in one module, and then the decoder and/or encoder in a separate module. It's no big deal if they live in the same module, though. Again, we don't spend a ton of time on module structure because it's so easy to change reliably if we change our minds.

Hope that helps!

Collapse
manysmallapps profile image
ManySmallApps

Very helpful, thanks

Collapse
joshhornby profile image
Josh Hornby

When you first began using Elm at NoRedInk which parts of the system did you begin to port across first? What were the road blocks you encountered to begin with and any advice for other teams who are thinking of slowly moving away from React like environment to Elm?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

We actually started with some business logic in our quiz engine. I wrote a guide for how to do this, but I haven't updated it since Elm 0.16. (This reminds me that I should really get around to that...) I forget where we first used Elm for actual rendering, but it started to snowball pretty quickly after that.

The biggest roadblocks were around build tooling. I didn't do a good job figuring out how production deployments (via Rails - we hadn't started using Webpack at that point) would differ from development builds, and the build tool plugin ecosystem wasn't as far along as it is today. (And it's still got a ways to go.) I guess maybe "roadblock" is too harsh, since we got past it, but even after migrating a bunch of stuff to Webpack we're still dissatisfied with our build process overall—and not just with the Elm parts.

Collapse
lydell profile image
Simon Lydell

The blog post for Elm 0.17 mentions: "Generated JS is smaller and works with Google's Closure Compiler"

Do you have any experience/numbers on this? Do you know if Google's Closure Compiler is superior for making Elm's JS small (compared to UglifyJS, for example)?

Collapse
eeue56 profile image
Noah

At NRI, this isn't really a concern or issue. We don't use Closure compiler, and we currently don't need to. There's a bunch of posts on the mailing list about this though -> groups.google.com/forum/#!searchin... and groups.google.com/forum/#!searchin...

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

Yeah, I don't have any personal experience comparing them. Sorry!

Collapse
onlydole profile image
Taylor Dolezal

What are the next big things in store for Elm that you're excited about, what's it like writing Elm in Action, and what is the best way to start contributing to Elm (ex. Good starting places?)

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

What are the next big things in store for Elm that you're excited about?

Asset management - what Evan's working on right now - as well as the next release of elm-test, and the improvements to the debugger Yosuke Torii has been working on.

There are also lots of smaller things I'm excited about, like union types becoming comparable, which is vaguely in the pipeline somewhere, and broader coverage of the Web platform. So much awesome in the works! 😸

What's it like writing Elm in Action?

Time-consuming! It's swallowed just shy of my entire social life.

It's also one of the most rewarding projects I've ever worked on, so no regrets in committing to it. :)

What is the best way to start contributing to Elm (ex. Good starting places?)

Evan curates a list of projects at github.com/elm-lang/projects - but I'd also like to put in a shameless plug for elm-css - the CSS spec is huge, and there are lots of ways to improve our coverage of it!

Collapse
pruett profile image
Kevin Pruett

Asset management - what Evan's working on right now

Does this involve a focus on code splitting and/or techniques for lazy loading?

Thread Thread
eeue56 profile image
Noah

If you want to read about this, please check out the elm-dev mailing list. It's a google away :)

Thread Thread
pruett profile image
Kevin Pruett

Awesome! Didn't know this was publicly discussed 👍

Collapse
onlydole profile image
Taylor Dolezal

Thank you for the answers Richard! Looking forward to working more on Elm this year :)

Collapse
_joshburgess profile image
Josh Burgess 🤔

Can you describe your experience with Elixir/Erlang/OTP so far? Do you have a rough estimate of the ratio of Ruby to Elixir being used for the backend @ NoRedInk? Do you see the company moving more and more of the backend to Elixir in the future?

Thanks,
-Josh

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

Elixir is super new for us, so the back-end is still almost exclusively Ruby.

We have one Elixir service in production right now, and it's not user-facing. We are currently working on our first (small) user-facing Elixir service, and once that's done, we plan to start working on a third (much larger and more mission-critical) user-facing Elixir service. A ballpark timeline for that third one would be getting it into production six months from now.

Our approach is generally to use new technology when we expect a specific benefit, not just because it's enjoyable. (Although it is certainly enjoyable!) So to the extent that we keep finding ways that doing more Elixir will benefit our code base, we'll keep doing more of it, but we're not going out of our way to rewrite Ruby code in Elixir without a tangible benefit in mind.

Collapse
alejandronanez profile image
Alejandro Ñáñez Ortiz

What is the most difficult part about switching 100% to ELM?

Have you thought about going back to JS at some point (at least for an specific project)? I mean, maybe something was really complex/troublesome to build in ELM instead of Js?

Thank you!

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

What is the most difficult part about switching 100% to Elm?

Legacy code - there's rarely a good justification to porting really old code that doesn't get used anymore. (So we haven't really done it!)

Have you thought about going back to JS at some point (at least for an specific project)? I mean, maybe something was really complex/troublesome to build in Elm instead of Js?

Only for Node stuff, as Elm is only built for browsers right now.

For browsers, it's the opposite: I don't think I can ever go back. I can't predict the future or anything, but right now I have a really hard time seeing myself applying for a JS job ever again.

Collapse
alejandronanez profile image
Alejandro Ñáñez Ortiz

That was super quick!

Thanks Richard and thanks for pushing ELM forward <3

Collapse
joeandaverde profile image
Joe Andaverde

Richard,

I use some jQuery plugins, d3, and react in my application. We use a ton of Elm too!

We are having trouble embedding components in our Elm applications. Working with ports is a great abstraction to help us protect the purity of our lovely Elm world. However, many of the projects I embed in my Elm project hook up event listeners to DOM elements. This causes memory leaks because there's no way for the component to know it's being unloaded.

You seem to have some experience with this at NoRedInk - the jQuery Datepicker plugin by XD Soft.

Do you know if there's any intent on providing a mechanism for the modules we embed in our Elm app and interact with through ports to be notified when the DOM is being recreated or going away?

This is our last major hurdle for converting ALL of our frontend code to Elm. If we try to embed our D3 graphics in Elm it would cause MAJOR performance issues. I understand I could write this in Elm but it works great and would be costly to reimplement.

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

We haven't run into performance problems around this, but thank you for surfacing it! There was some discussion around whether this was needed, and the consensus was "in theory it would be useful, but in practice, who knows if it's actually necessary?"

Seems like you've found a case where it is! I'd post specifics of your use case on github.com/elm-lang/virtual-dom/is... - ideally with a link to the D3 code in question.

Collapse
borisrozinov profile image
Boris Rozinov

is it anti pattern to use Message like: UpdateModel (Model -> Model). When handling of the message is just to update model with function passed as parameter like:
case msg of
UpdateModel f -> (f model, Cmd.none)

.....

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

That seems overcomplicated, yeah. I wouldn't do that. :)

Collapse
pruett profile image
Kevin Pruett

Any advice for a team looking to incorporate Elm into a large React-based app who relies heavily on server side rendering (SSR) in Node? In a similar vein, do you have thoughts on apps that are SSR'd vs apps that are single page applications?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

See dev.to/rtfeldman/i-am-the-author-o... regarding SSR in Elm.

My thoughts on SSR in general are "don't do extra work unless it's going to solve a problem you have." 😄

Collapse
saucewaffle profile image
SauceWaffle

Is there a board somewhere that Evan is posting packages he would like to see in Elm that he just can't get to. It would be great to contribute to the development of the environment.

Collapse
rtfeldman profile image
Collapse
joshhornby profile image
Josh Hornby

What's your favourite and worst part about Elm?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

Favorite part (I'm gonna go with the American spelling, sorry!) is the feeling of invincibility when refactoring. I get some exciting idea for how to make my code cleaner, and I just do it. I don't worry about regressions, and lo and behold, when it all compiles again it still works! That feeling never seems to get old.

Worst part? Being smack dab in the middle of two communities that are almost polar opposites. Many people coming to Elm from JavaScript want Elm to be more like JavaScript, and many people coming from Haskell want Elm to be more like Haskell. I see Elm as its own thing—neither "JavaScript enhanced" nor "Haskell simplified"—and I've sometimes struggled to engage constructively with groups who don't see it the same way.

Collapse
saucewaffle profile image
SauceWaffle

Since Elm seems to expose everything to the user, do you have a preferred method of keeping sensitive information from being presented? i.e. hiding API Keys

Have accomplished this with having a simple Python API set up parallel to the Elm app to feed Elm objects, but this seems overly complicated.

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

Yeah, for API keys I recommend creating something like Secrets.elm and adding that file to .gitignore. Locally, developers have to create that file as part of setting up their systems, and then you have your build process swap in a different file (containing different constants) for production builds.

This way you can easily access the secrets from any module, and if you forget to set them up locally, you'll get a compile error because the module won't be found!

I do this with the Frontend Masters workshop for GitHub API access tokens; you can check out the repo here github.com/rtfeldman/elm-workshop

Collapse
matthewoden profile image
Matthew Potter

What is your biggest pain point when writing Elm?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

The pain point that leaps immediately into my mind is build tools. I'm not gonna sugarcoat it: Webpack has been slow and crashy and I can't wait for us to stop using it.

However, I'm assuming you meant "pain point specifically with Elm the language." For me it's definitely that union types are not comparable yet. I really want to be able to use them as keys in a Dict for things like form validation. Unfortunately this is a ways off because the implementation requires modifying how Elm generates JS code to include a bit more information at runtime.

My #2 pain point is how much of the Web platform still requires interop to access. For example, if I could use an Elm library with a nice API that let me work with IndexedDB, I'd probably be up until 2am upgrading Dreamwriter.

Oh, and there's that value doesn't Just Work the way it does in React. This is kind of inside baseball, but it can Just Work in React because setState updates synchronously, whereas Elm does requestAnimationFrame batching to improve performance. The alternative of defaultValue works fine for most use cases, but when it doesn't it's a big pain. I can conceive of a way to make value Just Work, but it would be a pretty invasive change for elm-lang/virtual-dom.

Collapse
pruett profile image
Kevin Pruett

Hm, interested in hearing more about the issue with value and how it's affected with requestAnimationFrame batching. Is that to say if a text field isn't "bound" to the model with key presses, relying on the DOM to keep state, there will be inconsistencies?

Thread Thread
rtfeldman profile image
Richard Feldman Ask Me Anything

Right - if you use defaultValue to let the DOM's version of reality "take precedence" and use onInput to listen for changes, it's all good.

Unless you actually need to manually override that value! Then it's a pain. 🙂

Collapse
eeue56 profile image
Noah

To expand on the Webpack issues:

  • Webpack is very memory intensive
  • If there are multiple entry points (i.e lots of bundles) then Elm is not very good at parallelizing shared asset control.
  • Elm-make is slow, and if the dependency tree triggers an expensive change, then it's important to realise that Elm causes a slow re-compile - but webpack is responsible for filling up memory, and therefore slowing everything down
  • Webpack can segfault (and does if you aren't careful)

I worked on this a bit to help fix it:

Collapse
marioruizfont profile image
Mario Ruiz

I just know that the Elm is a programming language but... I'm a frontend dev and I like anything related with the web browser platform... If you can give me an advice related to learn Elm vs MVVM frameworks (Angular, React, others less popular), RxJS why I should give a try?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

The first chapter of Elm in Action is a free download, and I go into this question there.

Hope it helps!

Collapse
pgiesin profile image
Peter Giesin

Hi Richard!

I have used the Real World Elm demo as the basis of a project I am working on. So far it is working out really well, and I am happy with the structure and flow of the code.

The one area where I am struggling is providing application authentication. The demo provides authentication between the front-end and back-end, however, I need to protect enforce authentication at the front-end elm level.

How would you recommend handling this? Do you have demo code available that provides this type of authentication and routing?

Thanks,
Peter

Collapse
ckoster22 profile image
Charlie Koster

Richard, you've mentioned not receiving any runtime errors in Production. How often do you receive runtime errors in Development?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

I haven't asked others on the team, but the only times I can recall seeing any in development, they weren't a surprise - e.g. I was mocking something up with Debug.crash with the goal of "I'll finish implementing this later, but for now I just want it to compile so I can try out the rest of what I've done" and then reaching one of the code paths that called Debug.crash as I was playing around with it.

Of course that's what I expected it to do, and naturally I replace every Debug.crash with a real implementation long before making a pull request!

Collapse
eeue56 profile image
Noah

As the ops guy at NRI responsible for Elm, the main source of errors with Elm is actually during builds. From 0.15-0.17, Elm did not correctly handle the caching of artifacts, leading to occasional compile errors that were not reproducable easily. It was simple enough to fix - just wipe the artifacts. But that also slowed the builds down a lot.

I'm also fairly certain I'm the leading expert on runtime exceptions in Elm - it's possible to make them happen, but most of the time you have to really understand Elm to make them happen. Unless you're using Array or Regex, of course. Both of these can lead to runtime exceptions - e.g Regex.regex "[a". However, you'll not likely run into that in production - unless you are taking using input as regex input.. which probably isn't a good idea unless you're escaping things.

Collapse
ckoster22 profile image
Charlie Koster

Thanks for the reply.

I think I must be unlucky then. I've been doing Elm for about 18 months and have observed 4 legit runtime exceptions (some bug with the compiler or the Array implementation, for example).

4 is still a super lower number for that time scale, but when an unexpected runtime exception does occur it's difficult to figure out what happened.

Collapse
wintvelt profile image
wintvelt

How are you dealing with mobile device support at RedInk? And specifically touch?
Ps Thank you for taking the time to do this AMA!

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

About 25% of our users are on tablets, so we always have to keep touch in mind. When possible we've used pointer events (with polyfill) to keep things consistent, but that hasn't always been realistic for some drag-and-drop stuff. We haven't used any touch-related subscriptions yet.

It's still WIP, but you can see some non-polyfilled touch stuff we're doing in github.com/NoRedInk/drag-and-drop - which is already open source, but very unpolished at this point. For example, there's still more JS interop in there than there needs to be. 😄

Collapse
joshhornby profile image
Josh Hornby

Where do you see the future of Elm and can you envision Elm becoming more mainstream? If so how do you feel the community can help make this happen?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

Where do you see the future of Elm?

Someday I see it being an awesome back-end language too, but that's quite a ways off I think. With respect to the browser, I see the future of Elm being one where Elm's ecosystem becomes one of its biggest selling points.

Right now Elm's ecosystem is much smaller than JavaScript's, so ecosystem is a drawback overall. However, the overall quality of the Elm ecosystem is much higher - in terms of usability and reliability - than the (much larger!) JS ecosystem. I think this quality-over-size trend is likely to continue, because Elm's package manager has a blanket policy of accepting only Elm code, not JavaScript code.

As the gaps in the ecosystem fill in over time, I see the high-quality Elm ecosystem becoming a big selling point. Today people say "Elm's ecosystem is so small, you inevitably have to do some JS interop" but I think in the future people will say "Elm's ecosystem is big enough to meet all the needs of a typical web app, and it is so much nicer than the JS ecosystem."
We're not there yet, but we're headed in that direction. It will take time, but I think it'll absolutely be worth it. :)

Can you envision Elm becoming more mainstream?

Definitely. For any language aimed at industry use, I think success stories among industry early adopters are likely to predict long-term adoption. A very high percentage of Elm's early adopter stories are on the extreme end of positive.

I think the direction JS is moving is helping Elm out a lot. Virtual DOM libraries, type-checking, and functional programming concepts are all becoming more mainstream in JS, each of which narrows the familiarity gap between what people are using on JS teams and what they could be using if they introduced Elm.

How do you feel the community can help make this happen?

Posting experience reports. These are the biggest ways to help things become more mainstream, because people look for data points when making decisions about whether to dive into a language.

"I am thinking about trying Elm. Who else has done that? How did it go? Would the benefits help our team too? Did the costs seem like costs we can accept?" The more data points out there, the more easily people can make informed decisions about these things.

Our story at NoRedInk is out there, but do people know your story? If not, help them out by writing about it!

Collapse
rofrol profile image
Roman Frołow

What do you think about such approach to structuring application with Return.Optics toast.al/posts/2016-10-20-optical-...

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

One of my favorite programming sayings is "I've learned there are worse things than boilerplate."

Over the years I've found that most things promising to "reduce boilerplate" do so in ways that make maintenance and debugging harder. I think back with regret on the times I decided to accept that tradeoff, and I think this falls under that category. I wouldn't recommend it. :)

Collapse
lukewestby profile image
Luke Westby

What's the most unusual thing you've ever seen Elm used to do?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

Pretty sure I saw someone (and I think it was you, but I could be misremembering) write Elm code to control a synthesizer!

Collapse
joshhornby profile image
Josh Hornby

Does Evan work on NoRedInk work as well a building Elm or solely on Elm?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

He only works on Elm. He's worked here for over a year and he's never touched our product repo. :)

Collapse
liamcurry profile image
Liam Curry

Are there plans to move away from Javascript for Native code? If so, could you speculate on what Elm would look like post-JS?

Thanks!

Collapse
eeue56 profile image
Noah

There is definitely no solid plans for that. WebAssembly gets brought up and that might be a good idea one day but right now it's definitely not.

Collapse
rtfeldman profile image
Collapse
ben profile image
Ben Halpern

What word is best used to refer to Elm developers and why is it Elmos?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

I like Evan's preferred term: "Elm programmers"

I heard a great point once, which is that calling ourselves "Elmists" or "Elmers" or "Elmos" kind of suggests that we're a tribe, that we treat the language as more than a tool we use for a particular job.

But at the end of the day, that's what it is: a tool we use for a particular job! We should choose Elm when we think it's a good fit, and choose other tools when they're a better fit - not because we're part of a tribe. :)

Collapse
ben profile image
Collapse
sebastiansebald profile image
Sebastian Sebald

Where do you see the pros + cons of TEA? Especially, compared to Redux (used in combination with immutables).

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

I got into React very early after Facebook open-sourced it, but I switched to Elm before Redux came out...so I've never actually used Redux. :)

I think the following is the most honest way for me to answer the question of pros + cons:

The Elm Architecture in Elm

It's the only game in town. If you want to build UIs in Elm, the Elm Architecture is the only way to do so.

Pros: the entire ecosystem is optimized around it; no fragmentation
Cons: it's not well suited to doing major manual DOM manipulation

The Elm Architecture in JS

I've never tried this. JS is a totally different language, and I don't think it would be useful for me to guess what it might theoretically feel like to use Elm Architecture in JS. A better person to ask would be someone who's tried precisely this, and especially someone who's also tried Redux. :)

If the subtext here is "can I get many of Elm's benefits by using the Elm Architecture in JS?" the answer is unfortunately "not even remotely close." In my opinion almost all of Elm's benefits come from its compiler and library ecosystem, and you can't access either from JS.

Collapse
sebastiansebald profile image
Sebastian Sebald

Thanks you very much for your answer. No, I do not want to use the Elm Architecture in JS :)

To be more precise, I was wondering how the "update" function scales in the Elm Architecture, since I do not believe that Elm developers are using one big case statement for all possible messages. I think this is solved very well in Redux by composing reducers. I really dig the way all those small (pure) functions handle part of the application state. All the Elm example I saw didn't had that many messages, but I guess if your app grows you will also use some sort of composition to break the updates in smaller parts.

Thread Thread
rtfeldman profile image
Richard Feldman Ask Me Anything

Ah! I posted my thoughts on this over on /r/elm - hope that's useful!

Collapse
joshhornby profile image
Josh Hornby

Any plans for more talks in 2017?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

Yep! My current plans for 2017:

  • QCon London in March
  • Devoxx San Jose in March
  • GOTO Chicago in May
  • Elm Europe in June
  • elm-conf in September
  • ReactiveConf in October
Collapse
ckoster22 profile image
Charlie Koster

Was there a CFP for September already?

Collapse
filib profile image
Philip Cunningham

When will Elm be mainstream?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

February 25, 2018, at 7:42am UTC! ;)

Collapse
lukewestby profile image
Luke Westby

Does NRI do A/B testing in its Elm apps?

Collapse
rtfeldman profile image
Richard Feldman Ask Me Anything

We actually don't do any kind of A/B testing, so definitely no. ;)

Collapse
lukewestby profile image
Luke Westby

I may have asked you this before but I couldn't remember what the answer was. I have to start doing this soon and was hoping there was some secret magic formula to doing a good job with it 😄

Thanks!

Thread Thread
eeue56 profile image
Noah

We actually do do some A/B type stuff - but it isn't testing as such. We have A/B features for dealing with performance related issues or reliability issues. This is done mostly via backend land - the Elm code is still the same Elm code, it just may get the data in a slightly different way