Live data from Hacker News

Elm and Phoenix/Elixir in Production for France TV

vincent.jousse.org

1–10 of 80 posts

Re: Elm and Phoenix/Elixir in Production for France TV

#2
Nice writeup. Elixir definitely seems like a solid language for web dev. For the frontend, I prefer Scala.js since I'm kind of a Scala fanboy, but I've heard great things about Elm.

One little comment. At the beginning of the post, you make it seem like the app needs to scale with the number of viewers, when in fact it doesn't. I think you should clarify this to avoid confusion.

Re: Elm and Phoenix/Elixir in Production for France TV

#3
Elixir and Phoenix are stable and by now they're a solid choice (more than enough warranted praise on HN), but I'm still skeptical about Elm from a "platform" perspective. From what I can tell, Elm apps are a single blob of JavaScript that either loads or doesn't (e.g. you can't read the Elm site without JavaScript enabled), while the JavaScript ecosystem is moving towards server-rendering, dead code elimination, and "progressive web apps" so to speak. PureScript for example has dead code elimination—you can make a I know the Elm team is capable of all of these—I just haven't heard of anything yet. While they're "nice to have" now, these features might become crucial and important.

Another interesting thing about Elm is its progressive removal of features (I think the infix operator was or is going to be removed soon) in order to make the language more approachable. I actually support this because if you need "true" ML/Haskell features, there's PureScript.

Anyway, glad to see Elixir and Elm being used productively!

Re: Elm and Phoenix/Elixir in Production for France TV

#4
post #2

Nice writeup. Elixir definitely seems like a solid language for web dev. For the frontend, I prefer Scala.js since I'm kind of a Scala fanboy, but I've heard great things about Elm. One little comment. At the beginning of the post, you make it seem like the app needs to scale with the number of viewers, when in fact it doesn't. I think you should clarify this to avoid confusion.

We are doing a fairly large Elm app right now. And especially the refactoring reasons and static type system are appealing to us when you work in a team.

Also being a functional language it is easy to crank out features in an afterthought, e.g. we added an Undo/Redo feature for operations the user does in this single-page client app. And being side-effect free this "merely" boils down in wrapping function calls in an "undo/redo" function.

So Elm is really exciting stuff. But still the Api is not completely stable, yet. So you have to invest some time to adapt to these (small) Api changes. Also interoperablility with so-called "Native" JavaScript browser functions, e.g. JavaScript typed arrays is possible but not finalized, yet.

Re: Elm and Phoenix/Elixir in Production for France TV

#6
This was great to read and it inspired me to give both a try soon.

Question: Did the app receive millions of visitors or was it basically 1 visitor with millions of viewers via the television showing a recorded screen?

At first I thought Phoenix was used because of scaling reasons but now I'm not so sure.

Either way, nice work and thanks for the write up!

Re: Elm and Phoenix/Elixir in Production for France TV

#7
post #6

This was great to read and it inspired me to give both a try soon. Question: Did the app receive millions of visitors or was it basically 1 visitor with millions of viewers via the television showing a recorded screen? At first I thought Phoenix was used because of scaling reasons but now I'm not so sure. Either way, nice work and thanks for the write up!

In my experience, Phoenix is used because a) it's easy to get started with b) isn't a monolith like Rails (e.g. Phoenix could be one part of your complete application) but it has good conventions and c) it leverages the Erlang VM's performance and concurrency through Elixir.

I know HN gets a lot of hype for X new tech every month, but I'm really liking Phoenix. Ignore the "Phoenix is the future/saved our lives/best thing ever!!" Medium posts and try it out. It's actually pretty good.

Re: Elm and Phoenix/Elixir in Production for France TV

#8
post #3

Elixir and Phoenix are stable and by now they're a solid choice (more than enough warranted praise on HN), but I'm still skeptical about Elm from a "platform" perspective. From what I can tell, Elm apps are a single blob of JavaScript that either loads or doesn't (e.g. you can't read the Elm site without JavaScript enabled), while the JavaScript ecosystem is moving towards server-rendering, dead code elimination, and…

Server side rendering doesn't remove the need for loading js on the client.

Re: Elm and Phoenix/Elixir in Production for France TV

#9
post #3

Elixir and Phoenix are stable and by now they're a solid choice (more than enough warranted praise on HN), but I'm still skeptical about Elm from a "platform" perspective. From what I can tell, Elm apps are a single blob of JavaScript that either loads or doesn't (e.g. you can't read the Elm site without JavaScript enabled), while the JavaScript ecosystem is moving towards server-rendering, dead code elimination, and…

You can do progressive web apps quite easily. Your Elm code is included as always with and you pass the id of any container to initialize it.

The container can be , but you can just as well attach to some in the footer and the rest is rendered independent of Elm.

Regarding dead code elimination: yeah, elm doesn't do it yet. But the code generated by elm-make is very predictable and therefore easy to process. I just tried uglifyjs:

raw elm-make output; 196kb

uglifyjs -m -c: 68kb

tar czf: 20k

The inventor of elm is very deliberate in the project's development. I believe his argument is that including dead code elimination now is premature, because it adds a lot of maintenance work, especially at a time where the language is still evolving. Once the raw js is no longer a moving target it shouldn't be too difficult, and until then uglify and similar do a good job.

Re: Elm and Phoenix/Elixir in Production for France TV

#10
post #3

Elixir and Phoenix are stable and by now they're a solid choice (more than enough warranted praise on HN), but I'm still skeptical about Elm from a "platform" perspective. From what I can tell, Elm apps are a single blob of JavaScript that either loads or doesn't (e.g. you can't read the Elm site without JavaScript enabled), while the JavaScript ecosystem is moving towards server-rendering, dead code elimination, and…

Server side rendering doesn't remove the need for loading js on the client.

The idea is to render as much of the app (usually the "shell" or the static content) through the server and then the client-side JavaScript takes over. As of right now support ranges from excellent (Ember FastBoot, out of the box), okay (React with some configuration), and nonexistent (Elm).
Post reply on HN