Live data from Hacker News

IBM releases Elm-powered app

discourse.elm-lang.org

31–40 of 199 posts

Re: IBM releases Elm-powered app

#31

This inspired me to look up the Elm docs, and came across this gem: view model = div [] [ button [ onClick Decrement ] [ text "-" ] , div [] [ text (String.fromInt model) ] , button [ onClick Increment ] [ text "+" ] ] The html elements themselves are Elm functions. Code looks like data. Nice. Now considering Elm to be potentially useful tool to know.

If you like that, you might be interested in ClojureScript's reagent: https://reagent-project.github.io/ And check out re-frame as well, which adds on tools for handling data flow and many other things: https://github.com/Day8/re-frame

re-frame is beautiful.

the real world implementation in re-frame up on https://github.com/gothinkster/realworld has excellent comments and is a great way to learn it after the docs

Re: IBM releases Elm-powered app

#32

I don't understand why this is noteworthy. I think maybe this is when you decide 'maybe our language has failed'. Or at least admit it's a toy language that hasn't been properly engineered to be effectively used commercially. When it's a 'worth mentioning' when a single app has been written in it by some dying company. I mean, imagine if we had a headline on the frontpage of HN for every app written in C or C++ or Ja…

I think it is newsworthy because it details the strengths and weaknesses of Elm in what looks like a fairly complex project. I already use and like Elm better than any other front-end framework, but if I was considering Elm as a possibility, this information would be quite useful, I think. Definitely not the most important thing on the list, but I use Vim to code so IDE integrations mean absolutely nothing to me. I h…

One of the reason I like Elm is that it has great potential for great IDEs. If you use Vim with lot of plugins then it is already sort of a minimal IDE right? Most IDE you hate perhaps have a lot of UX design problems. Good IDEs should aim for a better overall coding experience, by this definition.

For example in Elm, all the nice error messages can appear next to the line, and all the case-of statements can be auto-completed according to the type definition, it all adds to an overall better coding experience.

Re: IBM releases Elm-powered app

#33
post #28

Earlier quoted context omitted.

That's how literally every VDOM-based framework looks, including React. Elm isn't special in this regard. It is special in many other regards, however, and I appreciate it for that. It's also interesting as one of the few languages that have parametric polymorphism but no ad-hoc polymorphism, which leads to some interesting designs. I don't like how only the BDFL is allowed to do certain things, like create new opera…

"one of the few languages that have parametric polymorphism but no ad-hoc polymorphism" I wonder what others are? Would like to try them.

OCaml and Standard ML are two others, and I'd say OCaml is established enough that Elm is not really breaching new ground here. The main difference is that OCaml has other features you tend to use instead, particularly the module system.

Re: IBM releases Elm-powered app

#34
post #14
post #3

* Obligatory Pine joke here * (I know the Elm people don't like jokes about the email client. Tough; they should have picked a name that wasn't already used.)

> Obligatory Pine joke here But Pine Is Not Elm. I wonder how many of today's Linux users don't get why the editor is named nano . The fact that you can trace the name back to "electronic mail" is my favorite command-name joke in an environment full of them. (If you missed the chain, it was 1. "electronic mail" = "elm" 2. "pine" as a joke on "elm" -- though I believe they deny the "PINE Is Not Elm" derivation, it's s…

I didn't realize there was that much of a backstory behind nano's name! Thanks for sharing!

Re: IBM releases Elm-powered app

#36
Shameless plug - I'm trying to improve upon Elm and React's programming model with my Concur UI framework. Its programming model is a bit unusual, it uses Monads to sequence widgets in time, but it is designed to be extremely simple to use, and you don't need to actually understand Monads to use it. An advantage is that it's not artificially restricted like Elm, and allows you to use advanced Functional Programming tricks when you can and want to.

It is available for [Haskell](https://github.com/ajnsit/concur), [Purescript](https://github.com/ajnsit/purescript-concur), and [Javascript](https://github.com/ajnsit/concur-js) (so no need to learn a new language), and also allows using external React components. The Javascript version uses Async Generators as a substitute for Monads.

With Concur, you can implement the entirety of Elm architecture with a few lines of idiomatic code.

Purescript or Haskell -

    elm render update = go
      where go st = do
          action 
Or in JS -

    function elm(render, update){
      var go = async function*(st) {
        action = yield* render(st);
        yield* go(update(st, action));
      };
      return go;
    }

Re: IBM releases Elm-powered app

#37
What I find most interesting about Elm as a designer who also "codes", is that because of its bottom up frontend philosophy (types first instead of components first) it somehow assumes that the UI designer and coder is the same person, that there is no clear designer to developer handoff where you hand over a thought out design to implement. It's more the other way round, where you'd hand over what you've come up with in Elm to a designer (which might be another problem because it reduces the designers job to just make things pretty).

So the best use would be for designers who code, basically unifying frontend design and engineering.

Re: IBM releases Elm-powered app

#38

I don't understand why this is noteworthy. I think maybe this is when you decide 'maybe our language has failed'. Or at least admit it's a toy language that hasn't been properly engineered to be effectively used commercially. When it's a 'worth mentioning' when a single app has been written in it by some dying company. I mean, imagine if we had a headline on the frontpage of HN for every app written in C or C++ or Ja…

> Functional languages are great toys but nobody uses them to get work done, almost without exception.

I run my own businesses on functional programming languages (Haskell and Elm) almost exclusively.

100% of my income comes from the three software products I own, all primarily written in Haskell.

You're displaying a pretty amazing level of ignorance here.

Re: IBM releases Elm-powered app

#39
post #3

* Obligatory Pine joke here * (I know the Elm people don't like jokes about the email client. Tough; they should have picked a name that wasn't already used.)

I’ve found that Elm people don’t like jokes in general.

Is this statement also a joke? :)

Re: IBM releases Elm-powered app

#40
> Ports == lots of boilerplate and “loose” typing

This is a common criticism of Elm, and I've never understood it.

The criticism seems to be that "Elm is bad because I still need some JavaScript, and JavaScript is dangerous."

Like, what's the alternative? More JavaScript?

Post reply on HN