Live data from Hacker News

Asset minification with Elm (2018)

elm-lang.org

41–50 of 59 posts

Re: Asset minification with Elm (2018)

#41
post #27

Earlier quoted context omitted.

> You can actually finish projects and never return to them How do you manage that? Migrating from 0.18 to 0.19 wasn't hard in my limited experience, but it wasn't "finish and never return" either.

I dont even think upgrading to 0.19. If you have 0.18 code that works, why upgrade? I think NoRedInk has some very old versions of Elm still in production, like 0.16 or something.

Years ago we had some 0.18 and 0.16 code coexisting, but last year we updated everything to 0.19!

Re: Asset minification with Elm (2018)

#42

Elm is not consensual but is definitely influential specially considering the small investment involved. From the top of my mind: - TEA (the elm architecture) -> Redux - Elm compiler error messages -> Rust error messages Elm's BDFL, according to his talks or his twitter account, seems to be a thinker, not a politician. Every new release brings something new. I wonder what 0.20 will be.

> Every new release brings something new.

Elm giveth, and Elm taketh away. I remember seeing stories about how new Elm versions removed some bits of functionality available in the previous versions...

Re: Asset minification with Elm (2018)

#43

I don't want to downplay Elm's accomplishments here, but I really disagree with the "RealWorld" example here. Does a 29kb asset make a meaningful difference compared to a 100kb asset? Especially if the framework is a fixed chunk of that, the space savings as the project grows in size is not incredibly meaningful in the grand scheme of things. 50kb of excess code on my page due to missed optimizations isn't going to k…

Of course it is meaningful. Go ahead and do your next demo on a shitty android phone.

> mocks in tests, lint rules, isomorphic

What, is that like the stuff that irked you this week? Elm has tons of stuff to offer, some drawbacks too.

Re: Asset minification with Elm (2018)

#44
post #42

Elm is not consensual but is definitely influential specially considering the small investment involved. From the top of my mind: - TEA (the elm architecture) -> Redux - Elm compiler error messages -> Rust error messages Elm's BDFL, according to his talks or his twitter account, seems to be a thinker, not a politician. Every new release brings something new. I wonder what 0.20 will be.

> Every new release brings something new. Elm giveth, and Elm taketh away. I remember seeing stories about how new Elm versions removed some bits of functionality available in the previous versions...

It is true. Elm has taken some syntax away and native packages, and made the language better by being simpler and error free (I have never had a runtime error).

Upgrades since 0.17 have been pretty easy too - there is automated tooling that does the heavy lifting.

Re: Asset minification with Elm (2018)

#45
post #4

Has anyone started a project with elm and continued it for a long time?

We have been using for about 3 years now. Myself and the two other devs enjoy working in it more than the other languages we use (Ruby, Go and vanilla JS).

Upgrades have been pretty painless, and each new release brings a new level of ease of use.

We have made some architectural mistakes as we have learned the language. And since it is a newer language there are not as many established conventions for code organization – but we are figuring out.

Re: Asset minification with Elm (2018)

#46
post #7

Earlier quoted context omitted.

Yep we build CircuitHub (YC startup) on Elm. I know quite a few companies that also have large Elm code bases.

The “example” is crashing my safari on iphone xs. Impressive product though. https://circuithub.com/projects/ti/TIDA-00230

Thanks for the bug report, I'll let the dev team know!

I wouldn't consider that a problem with Elm it's just that our users are mostly on desktop Chrome so we don't test very often on mobile Safari.

Re: Asset minification with Elm (2018)

#47

Earlier quoted context omitted.

I have been writing Elm for 5 years now. I work at Humio, where our front end is 100k lines of Elm code. What would you like to know? I love Elm. I'm absolutely hooked. I don't want to go back to doing Frontend work in JS, and I hope one day there can be an Elm-like experience for backend development as well. Just off the top of my head a few bits of what I like about Elm: - You can actually write code, have no error…

I'm curious if you tried out ReasonML[0] at all, for any length of time, before Elm, or even after. https://reasonml.github.io/docs/en/what-and-why I've really been digging slowly into ReasonML and the biggest gain I can see is that valid reason === valid ocaml (and there's some good server libraries out there for ocaml) I also like that JSX is the templating language, not that it matters. Also, have you had any succ…

One way to get static HTML/CSS from Elm is to execute the JS it produces and serialise the results from the DOM. That's what I do in my static site generator Elmstatic: https://korban.net/elm/elmstatic

Re: Asset minification with Elm (2018)

#48
post #22

Earlier quoted context omitted.

I've worked on two (2) substantial production Elm applications. 1. Healthcare Fall 2017, I started integrating Elm into an AngularJS application after experimenting with it on a couple of side projects. After a successful initial feature, I convinced the team to use it for new features. Another couple of developers helped to create the initial version until late 2018. We started in Elm 0.18 and converted it to 0.19.…

Since January 2019, I work on an Elm project, once again weaved into an existing AngularJS app, with ~34k lines of Elm code. Watching a simple example in the elm website, the codes make judicious use of new lines, would you say those 34k lines would represent 17K in js?

Yes, something like that. Almost everyone who writes Elm code uses elm-format which is very "spacey". So foo = 1 is formatted with foo = on one line and 1 on the next, with some leading space.

Re: Asset minification with Elm (2018)

#49
post #4

Has anyone started a project with elm and continued it for a long time?

I wrote a library that parses a subset of LaTeX and renders it as HTML. See https://demo.minilatex.app/ or more at https://minilatex.io I was astonished by what is possible to do with Elm. This is a continuing project. It is easy to go back to the code even after leaving it untouched for several months. I've engaged in "extreme refactoring" many times. No fears!

I've also written a bunch of small mathy apps, e.g. https://jxxcarlson.io/apps/

Elm has been a joy to work with.

Re: Asset minification with Elm (2018)

#50

Earlier quoted context omitted.

I'm curious if you tried out ReasonML[0] at all, for any length of time, before Elm, or even after. https://reasonml.github.io/docs/en/what-and-why I've really been digging slowly into ReasonML and the biggest gain I can see is that valid reason === valid ocaml (and there's some good server libraries out there for ocaml) I also like that JSX is the templating language, not that it matters. Also, have you had any succ…

I havent actually written any ReasonML, but I once had to review some my former coworker wrote. Thats the extent of my ReasonML experience, so I dont have much of an opinion. However, I was surprised that the ReasonML code I looked at relied on impure functions. I like pure functions so that scares me off a bit from the OCaml as a whole. Regarding static html/css, I havent done that either, so I dont know about it.

> the ReasonML code I looked at relied on impure functions. I like pure functions so that scares me off a bit from the OCaml as a whole.

ReasonML (OCaml) allows impure functions but the best practice is to stay pure whenever possible. It's a very pragmatic language so despite providing all the functional and immutable programming features, it allows you to cut through the bureaucracy if you need to.

Post reply on HN