News for hackers. Stuff that matters.
Re:Elm and Phoenix/Elixir in Production for France TV by matt4077 on Sunday October 16, 2016 @10:19AM (#12718682)
You can do progressive web apps quite easily. Your Elm code is included as always with <link..> and you pass the id of any container to initialize it.

The container can be <body>, but you can just as well attach to some <div> 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 by sotojuan on Sunday October 16, 2016 @10:26AM (#12718709)
Right, I get the last part. Just saying I wish I could have it now with little to no configuration :-) Not blaming Elm, it's still quite young and evolving.