Live data from Hacker News

Build a real-time Twitter clone with LiveView and Phoenix 1.5

phoenixframework.org

151–160 of 249 posts

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#151
post #103

Earlier quoted context omitted.

To add to this, it's worth noting that Elixir would have difficulty _ever_ becoming statically typed because of how message-passing works. For example, if you look at Gleam [0] -- the recent project that's trying to create a statically typed language for the BEAM -- it can't handle message-passing [1]. And I totally agree with you here: > I've found that it's possible to pretend it is a statically typed language if y…

I've heard a number of times that static typing would be near impossible for Erlang because of how message-passing works, but just the other day I read a quote where one of the creators (I think it was Joe Armstrong, but not completely certain) indicated that the primary reason they decided against static typing was the hot code reloading, not the feasibility. or not primarily anyways. Not disagreeing with you, I gue…

Joe Armstrong, RIP, also stated they tried to add type to Erlang later on but gave up.

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#152
post #125
post #14

I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…

> When I say perfect, I mean, there has been never once in my career where I hit a roadblock due to the language's limitation or complexity or flawed assumption. I faced this with other languages, but not Elixir. That is interesting. I've gone from Geocities pages to ASP Classic, PHP, WP, Rails, Flask and have been dabbling with Elixir and Phoenix for a bit. So far LiveView (and some bits of Elixir in general) has be…

It sounds like you're mostly backend and struggle with the blending of backend/frontend with liveview?

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#153
post #60
post #14

I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…

I actually agree with every pain point that Dave Thomas described in his talk[1] and is outlined in the Component github repo[2]. Sadly, it's unclear to me if anyone else is as passionate and willing to continue the effort. Nonetheless, it put to words exactly what I hated about genservers and such. [1]: https://www.youtube.com/watch?v=6U7cLUygMeI [2]: https://github.com/pragdave/component

I loved his complaints about genservers (and his complaints about nomenclature), and it made me settle on my own genserver structure. I think the hard thing about dave thomas' component is that it just doesn't have enough buyin in the community to make it "its own thing". I wish it did though. But on the other hand, if elixir had diverged too much from erlang it would have made people angry...

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#154
post #136
post #14

I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…

Wait, for loops and nested conditions is an OO concept? What does Elixir do instead?

Recursion lol.

Erlang does it too.

If you want to have state you do recursion and call itself with the updated value.

fn me(iter) -> me(iter+1) end

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#155
post #125
post #14

I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…

> When I say perfect, I mean, there has been never once in my career where I hit a roadblock due to the language's limitation or complexity or flawed assumption. I faced this with other languages, but not Elixir. That is interesting. I've gone from Geocities pages to ASP Classic, PHP, WP, Rails, Flask and have been dabbling with Elixir and Phoenix for a bit. So far LiveView (and some bits of Elixir in general) has be…

LiveView is much much easier to understand if you have a solid understanding of how Elixir works in a non-webdev setting, because Phoenix hides a lot of the process architecture that it's leveraging to serve pages, and it's front-and center in LiveView.

And also, it's easy to find help for Flask and Rails by googling because... It's been around longer. LiveView has been GA for less than a year, and even some major shifts have come around (like mount/2 suddenly becoming mount/3 in one of the last releases).

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#156

We are really excited about this release! I also wanted the screencast to be a single take, so I'm happy to answer questions if there are gaps to fill in for things I could have explained more clearly.

Any hope of getting this as a text article, or even a git repo? Blind user here who can't see code embedded in a video, but can read ascii-text with a screen-reader perfectly fine. People who don't enjoy videos for various reasons would probably like a text version too.

Hi miki123211, I wrote up a transcription for you. It details the code he's talking about, along with the context of what's going on, and why.

https://pastebin.com/raw/WxH0uAsf

If Pastebin doesn't work for you, let me know and I can get it hosted at a different location.

My apologies if there are any mistakes in this. I'm not familiar with Phoenix, but found this video very interesting, so wanted to make sure it could be shared.

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#157
post #14

I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…

Are there any good tutorials to get started? What major sites are currently using Elixir?

I heard Divvy, Brex, Slab, and PagerDuty use elixir, so if you're a bay area startup, there's a good chance you're already using elixir as part of your business stack.

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#158
post #22

Earlier quoted context omitted.

First of all, great demo, and great showcase for this technology. I think it did a great job of showing its strengths to traditionally backend developers like me. I also appreciated the twitter analogy. I just couldn't help but think "Wait, Twitter doesn't have 'Update/Edit Post'!" :) I've heard that Blazor in the .net world has similar goals to LiveView, but I haven't gotten into it much. Can anyone confirm?

Yes, there are two Blazor variants. Serverside Blazor is basically the same thing as Phoenix Live View, client side Blazor is providing some optimized Mono runtime as webassembly.

From an empty repo, how many minutes do you think it would take one to do what Chris McCord did in Phoenix Live View in Blazor?

Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5

#160
post #61
post #14

I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…

> And once you start thinking interms of functions, you just won't touch any of those terrible OO programming paradigms Also worth noting (because Elixir was strange and new for everyone at some point) that a lot of what used to be mind-boggling to me in earlier versions of Elixir/Phoenix have become relatively commonplace when dealing with things like React or modern Javascript. If you've ever handled a JS promise f…

Unlike a Promise, I hope you can cancel processes in Elixir
Post reply on HN