Live data from Hacker News

Integrating Elm and Phoenix Channels via Elm-Phoenix-socket

dailydrip.com

71–76 of 76 posts

Re: Integrating Elm and Phoenix Channels via Elm-Phoenix-socket

#71
post #63
post #62

Earlier quoted context omitted.

It's not mutated or changed it points to a totally different memory location. It's called immutable data not immutable identifiers. Immutable data is what eliminates a large number of potential bugs. Having a ton of intermediate variable names could actually be a source of bugs plus you have to care if someone reuses the name above the point in code you used it. By allowing rebinding you only care about the code belo…

> It's called immutable data not immutable identifiers. immutable/mutable data and immutable/mutable identifiers are two different things. One is not called the other, they are separate things really. > It's not mutated or changed it points to a totally different memory location So you said it yourself. It points to a different memory location. So how is x not mutated then? "Mutated" is a synonym for "change", or so…

a simple illustration of rebinding vs mutation

  def t() do
    x=1
    f=fn -> x end
    x=2
    f.() 
  end
will return 1

Re: Integrating Elm and Phoenix Channels via Elm-Phoenix-socket

#72

How come no one (seemingly) uses Elm, despite all the love? I've noticed a lot of quick, drive-by posts in Elm related threads about how great the language is. This thread ("This is a great little webstack!") and today's other front-page elm thread[1] both do this. With such high praise, I would expect the language to be more popular. What's with the disconnect? My hypotheses: 1) There are no unhappy users because un…

The JS community has been pretty good about taking ideas from Elm. Redux is an insanely popular JS library that is basically a replica of the Elm architecture (though, having used both extensively, redux doesn't come close to the beautiful simplicity of Elm). As far as why people don't just use Elm, I think it's the same reason functional language are less popular in general: fewer familiar engineers and steep learni…

Having used them both quite a bit I really cannot say that Redux is much at all like the Elm Architecture. It separates views and state machines. This works well for managing state in an application-wide sense but complicates state which is more local to your components.

Re: Integrating Elm and Phoenix Channels via Elm-Phoenix-socket

#73
post #64

Earlier quoted context omitted.

The Native interop changed with core >= 4.0, so that relatively straightforward way of accessing native js no longer works, and the new Native is (deliberately, I believe) undocumented.

That's Elm's weakness then. The goalposts keep moving.

In a pre-1.0 language, this should be entirely expected. It's bleeding edge a bit, but I've yet to find someone who used it to build something non-trivial and wasn't sold on it. There's definitely some survivor bias there, obviously.

For the record, I looked at Elm over 2 years ago and completely dismissed it. I regret that strongly now as I am extreeeeemely happy developing with it and I can build stuff in far shorter timelines with zero runtime errors than I could in react even (which was a high-watermark before Elm for me in that respect)

Re: Integrating Elm and Phoenix Channels via Elm-Phoenix-socket

#74
post #63
post #62

Earlier quoted context omitted.

It's not mutated or changed it points to a totally different memory location. It's called immutable data not immutable identifiers. Immutable data is what eliminates a large number of potential bugs. Having a ton of intermediate variable names could actually be a source of bugs plus you have to care if someone reuses the name above the point in code you used it. By allowing rebinding you only care about the code belo…

> It's called immutable data not immutable identifiers. immutable/mutable data and immutable/mutable identifiers are two different things. One is not called the other, they are separate things really. > It's not mutated or changed it points to a totally different memory location So you said it yourself. It points to a different memory location. So how is x not mutated then? "Mutated" is a synonym for "change", or so…

This summarizes my thoughts on "compromise" exactly. It may be a good thing to some people but it was still a compromise to change it for potential benefit in exchange for some potential loss of strict identifier immutability.

I prefer the way Erlang does it. But I get why Elixir did what they did as well.

Re: Integrating Elm and Phoenix Channels via Elm-Phoenix-socket

#75

How come no one (seemingly) uses Elm, despite all the love? I've noticed a lot of quick, drive-by posts in Elm related threads about how great the language is. This thread ("This is a great little webstack!") and today's other front-page elm thread[1] both do this. With such high praise, I would expect the language to be more popular. What's with the disconnect? My hypotheses: 1) There are no unhappy users because un…

I'm looking at Elm for a product that I'm working on at the moment. The language is great and I've wanted an excuse to do actual work in an ML-like language for a long time. The difficulty I'm having at the moment is just trying to find examples of non-toy application architectures. An application with multiple top-level screens, for example. For a bit of context, the product I'm working on is a customer-facing kiosk…

http://package.elm-lang.org's source code is online and implemented in Elm. Not a large application, but it demonstrates a way to break up components like the header, sidebar, and a main content area across files. It's maintained by Elm's creator and stays up to date with Elm upgrades.

https://github.com/elm-lang/package.elm-lang.org/tree/master...

Re: Integrating Elm and Phoenix Channels via Elm-Phoenix-socket

#76
post #69
post #37

Earlier quoted context omitted.

I walked away from Elm still being very enthusiastic about it and watching its progress. I started coming to Elm hackathons in 2014, did a few helloworlds of increasing complexity, eventually tried to write a portion of my app in Elm; there were ups and downs and then one of my (very few) customers asked me to create an API call to something that was happening in the browser. This code was written in Coffeescript, an…

Elm keeps sounding like a great language, but the fact that it locks my code into a web browser, with no headless way to run it, is a deal-breaker indeed.

server-side is coming, but Evan wanted to be very smart about it. I.e. don't just default to "run in node all will be well". There is a concurrency layer that's being introduced (see Process) and I'm hopeful it will eventually run on Erlang's VM (seems likely atm but time will tell)
Post reply on HN