Live data from Hacker News

IBM releases Elm-powered app

discourse.elm-lang.org

21–30 of 199 posts

Re: IBM releases Elm-powered app

#22

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.

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 operators in external libraries, but overall, it's a very pleasant experience.

Re: IBM releases Elm-powered app

#23

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: IBM releases Elm-powered app

#24
post #5

Earlier quoted context omitted.

I think this is interesting to me because Elm is an extremely unique way of doing frontend development on the web by utilizing functional programming concepts. IBM, in my mind, is a massive dinosaur. To know that some group there was able to make a consumer facing product using the latest tech is cool. Definitely gives IBM a better favorability rating in my view.

Not to be glib, but what you are saying, kind-of, is "the worse a company is at staying up to date with technology, the more meaningful it is if they use a fringe langauge"

Considering they sold most of their hardware department, such as harddrive to Hitachi and thinkpad to Lenovo, and went focusing on patents, this is a change in their image. I had the view they were risk adverse, to be using Elm is interesting.

Re: IBM releases Elm-powered app

#25
Anybody who liked elm is highly recommended to check out Scala.js. With scalatags, it looks close to what elm does AND you have the entire power of jvm libs.

And you get code sharing across client and server as its just plain old scala. I believe elm is not big server side.

Re: IBM releases Elm-powered app

#26

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.

This is actually cool. Scala.js + scalatags has this looking like this:

```

  val model = div(
      button( onClick := decrement )( "-" ), // decrement is typechecked as being a function of event 
      div( float := float.letf )( model.toInt ) //left float is typechecked and hence the misspelling is caught at compile time so big changes can be made with confidence
  )
```

Re: IBM releases Elm-powered app

#27
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…

More of an "mh" dude myself. It was an efficient and pleasantly humorless system. :-)

Re: IBM releases Elm-powered app

#28

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.

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.

Re: IBM releases Elm-powered app

#29
post #25

Anybody who liked elm is highly recommended to check out Scala.js. With scalatags, it looks close to what elm does AND you have the entire power of jvm libs. And you get code sharing across client and server as its just plain old scala. I believe elm is not big server side.

Scalatags is not a VDOM implementation, though, and the Elm architecture (one giant state machine) is very different to what you'd typically see in a Scala.js application. A closer analog, in my opinion, would be ClojureScript + Reagent, but even that doesn't feature Elm's focus around immutability.

Re: IBM releases Elm-powered app

#30

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.

This was also the thing that attracted me to Elm years ago. But at that time Elm doesn't have a CSS module yet. Now with Elm-UI, it is like my dream HTML/CSS replacement.

However that was all for static UI though. Writing Elm app is still a pain if you are not a Javascript expert. Elm's implementation of the web API is minimal and the progress is extremely slow. In addition, most function that's in libraries in Javascript's ecosystem can not be directly used as you have to write Ports, which requires a lot of Javascript experience.

Post reply on HN