Live data from Hacker News

Integrating Elm and Phoenix Channels via Elm-Phoenix-socket

dailydrip.com

51–60 of 76 posts

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

#51
post #48
post #46

Earlier quoted context omitted.

> Elixir is entirely immutable - it has to be as it just runs on the Erlang VM! No, variables are mutable in Elixir. Interactive Elixir (1.1.0-dev) iex(1)> x=1 1 iex(2)> x=2 2 Notice how x is 1 then x is 2. Variable x mutated. In Erlang: 1> X=1. 1 2> X=2. ** exception error: no match of right hand side value 2 Variables are immutable in Erlang. I suspect you misunderstood gp's post and thought they were talking about…

I did not misunderstand. You're calling renaming something mutation. It isn't. You're referring to static single assignment. This has been covered before in more detail than I care to go into.

> You're calling renaming something mutation. It isn't.

I think you are confused though ;-) There is no renaming -- x=1, then x=2. Nothing was renamed. x wasn't renamed, it is still variable x. 1 and 2 wasn't renamed, it is still 1 and 2 (could have been a map, or list for example). So what do you think was renamed there?

> You're referring to static single assignment.

No, I am referring to immutable variables. Variables are not changing, they are immutable in Erlang. In Elxir variables change, they can be assigned different values later in a function. If that is not a change i.e. a mutation I don't know what is.

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

#52
post #47

Earlier quoted context omitted.

I hear this criticism about ports a lot. Out of curiosity, how could we make it better? Do you have any examples of what you consider to be the ideal FFI? I haven't used ports a ton, but I have used them for interop between Elm and the Google Maps Javascript API, and I didn't think it was that bad.

PureScript is a good example. The problem isn't that it doesn't work. It's that what you do with ports only work in the context of your application. The JavaScript part has to be defined somewhere else, the Elm code assumes the JavaScript part will be there. You can't redistribute that easily. How to make it better? that's easy. IT ALREADY EXISTS and is part of Elm. It's just a private API. But it totally does work.…

> How to make it better? that's easy. IT ALREADY EXISTS and is part of Elm. It's just a private API. But it totally does work. It's how the native wrappers are written.

You mean like this: https://github.com/mcapodici/capodicis-notes/blob/master/elm...

That is an example where I connected chrome extension storage functionality using native wrappers.

This is the Elm wrapping for it:

https://github.com/mcapodici/capodicis-notes/blob/master/elm...

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

#53

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. It'll be driven by a C# ASP.NET back-end. We have several different products using common back-end code but exposing different sets of features to the customer. We're moving from an old architecture that was your standard WinForms UI to something using HTML5 as the UI layer (definitely a big mindset change!).

Right now I'm trying to figure out what the front-end Elm code structure would look like. Is it going to be one huge monolithic Elm project that covers all our cases? Can it be broken up? Does the front-end have to know in advance what screens will be available? (the back-end uses the typical 'load features as plugin DLLs') etc. These are all questions I'm facing right now.

This is especially exacerbated by the recent change from 0.16 to 0.17. The changes themselves seem extremely positive (I jumped in at 0.17, so I'm only going off an impression here) but much of the example material that I've found which might be useful is still using stuff from 0.16 and I'm having trouble wrapping my head around it right now.

So from a commercial dev perspective, Elm, like anything else so new, is massively risky. I'm pushing on for the moment (would love any pointers if anyone has them!). I'm aware of the huge element of "not knowing what I don't know" that I've taken on right now. I'm hoping the payoff will be worth it :)

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

#54
What makes Elm + Phoenix so good together? I use Elm professionally and love it, but a back end is a back end. Is the love just "I really like Phoenix?" The way people talk about it makes it sound like it is uniquely suited to Elm, which I don't understand.

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

#55
post #31
post #26

Earlier quoted context omitted.

Elm is very new in the grand scheme of things and it was considered experimental for quite a while. The recent changes show that its developers are still willing to make big changes. But I do believe it's stabilizing quickly and I wouldn't be surprised to start seeing it used a lot more, though still mostly in smaller hobbyist projects simply because even if it stabilizes it's still so new that you can't expect large…

FWIW, I don't think Cisco counts as a hobbyist shop: https://github.com/CiscoCloud/mantl-ui-frontend :D

Cisco is doing some cool things in open source and let us (read: the team at aster.is who wrote that) do it mostly how we see fit.

Somehow, though, convincing them to use a language that almost never has any runtime errors was not a hard sell.

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

#56

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…

Go to the Elm home page. View source. Things have swung too far to the JS side. I'm not going to force my users to have to use that. The beauty/accesibility/advantages of the web architecture is being lost to things like this.

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

#57
post #56

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…

Go to the Elm home page. View source. Things have swung too far to the JS side. I'm not going to force my users to have to use that. The beauty/accesibility/advantages of the web architecture is being lost to things like this.

That's pretty unfair given the fact that it's 0.17. Before this release, server side rendering was possible but super weird. This release includes most (all?) of the big changes necessary to make the server side rendering story great. This is already basically done but not yet release ready.

Please don't reject something based on its current (admittedly not 1.0!) state based on assumptions about its future! Evan and co. are in fact extremely smart and by no means does anyone consider Elm "done." I'd suggest playing with the language itself. That's the important part - not the state of the current runtime.

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

#58

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…

I'm also looking for more structured examples but so far haven't found much. These are some apps that go a little beyond the "hello world" kind. Some of them are being updated to elm 0.17.

https://github.com/plentiful/shop

https://github.com/srid/chronicle

https://github.com/CultivateHQ/seat_saver

https://github.com/NoRedInk/elm-blogger

https://github.com/massung/elm-hn

https://github.com/sporto/elm-tutorial-app

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

#59

What makes Elm + Phoenix so good together? I use Elm professionally and love it, but a back end is a back end. Is the love just "I really like Phoenix?" The way people talk about it makes it sound like it is uniquely suited to Elm, which I don't understand.

Out of curiosity, where do you work? And are you hiring? Haha. I only know if ~5 companies currently using Elm

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

#60

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 learning curve.

Post reply on HN