Live data from Hacker News

Asset minification with Elm (2018)

elm-lang.org

31–40 of 59 posts

Re: Asset minification with Elm (2018)

#31

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 hope one day there can be an Elm-like experience for backend development as well. Haskell?

They are pretty different. They have similar syntax, and their type systems are similarly strong, but beyond that they are pretty different.

Haskell has a huge syntax and a ton of language features. It has a big ecosystem. Haskell is very mathy. Elm is the opposite in each of those regards.

Re: Asset minification with Elm (2018)

#33
post #4

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

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…

How is your experience with more "advanced" stateful interactions such as drag&drop?

Re: Asset minification with Elm (2018)

#34
post #22
post #4

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

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?

Re: Asset minification with Elm (2018)

#35
post #4

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

Been suggesting we use it for a complicated bit of interface for a company I was working at two years ago, we were pleasantly surprised at how well it held both in requiring low (almost no) maintenance once written and how easy it was to improve on the codebase.

We migrated pretty easily from 0.18 to 0.19, we only had to import a bit of code here and there from libs that would not migrate or update where changes had been made, strong typing and the compiler made it a rather pleasant experience.

The only thing we did not do was migrate to an SPA ; the scope of the app was wide and the cost to achieve this was too high I guess.

Few pain points, amongst which:

- Sometimes you have to do something you would expect to find off-the-shelf (like a souped-up drop-down or a tag editing system) but it's ususally a matter of designing your ui well and can be fun (plus you get to really design the user experience).

- Sometimes you have to do a bit of JS for stuff that aren't designed in Elm (anymore, ie websockets) and use ports to communicate.

- If you're building incrementally, and make mistakes (over-design, useless code to conform to an unrequired philosophy, etc.) it's a good thing to sometimes challenge the bad old choices and get them smoothed down ; thankfully the compiler is your friend here too.

- The learning curve, especially if your team isn't fond of functional programming, can be daunting if you don't have an Elm advocate. That was me in my team, and we grew fond of it, but made quite a few beginners mistakes on the way. All very fixable though.

Well, that's about it ; if you want help getting people started and boosted on the functional programming paradigm, please have a look at my blog: it's Elm-centric, focusing on the most important functional programming concepts that'll get you up and running on what's happening there :) https://medium.com/wat-the-elm-ist And it might even explain what monads are ;)

Re: Asset minification with Elm (2018)

#36
post #4

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

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 success with manipulating Elm to output static HTML/CSS as well as JS? I know it can do it, but I've never been able to manipulate how it does it (most recent version I tried with: 0.18)

Re: Asset minification with Elm (2018)

#37

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…

How is your experience with more "advanced" stateful interactions such as drag&drop?

Good. I have written drag and drop functionality in Elm a few times. I have a clear enough idea on how that code looks that if I had to write a drag and drop today, I think I could crank it out quickly.

You call it stateful tho. I dont know that drag and drop needs to be all that stateful. For drag and drop, the information your model needs is whether you have mouse-down-ed on something, the coordinates on the html element you mouse-down-ed, and the coordinates the mouse's current location is. 2 pairs of coordinates and a maybe type? Not too bad. I guess there is the code too, but at least the data is just few values, and not a complex and nested data structure.

On my team at work, we avoid state. Complex nested state is a big code smell for us.

Re: Asset minification with Elm (2018)

#38
post #4

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

Yeah, our work frontends are done in Elm, my side-project SaaS is done in Elm, etc. The maintainability is fantastic. Do you have more specific questions / concerns?

Is ELM a good fit for non-SPAs web apps?

Re: Asset minification with Elm (2018)

#39

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…

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.

Re: Asset minification with Elm (2018)

#40
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.

Post reply on HN