Live data from Hacker News

Phoenix 1.7 is View-less

germanvelasco.com

91–100 of 224 posts

Re: Phoenix 1.7 is View-less

#91
post #81

Earlier quoted context omitted.

Jose has been working with some PhDs to attempt to implement static typing https://elixir-lang.org/blog/2022/10/05/my-future-with-elixi... In the meantime I don’t know what people have against using @spec. It’s a far more powerful type specification than the majority of static-typed languages out there

Typespec is a nightmare to work with. The error messages are arbitrary and at times misleading. I use it because it is better than nothing, but it has much room for improvement.

I think I've encountered a couple of times where I've gotten obscure errors, and I agree that error messaging needs to be improved. On the other hand, every time it's pointed out an error, it was right. And IMHO union type-checking alone puts it above most popular static-typed languages out there.

The other problem with specs is that they can become out of sync with function signatures.

Re: Phoenix 1.7 is View-less

#92

Can someone _please_ get around to building a framework for Gleam[0] so that I can finally get over my hesitance to dive into a BEAM language over erlang's/elixir's dynamic typing? [0] https://gleam.run/cheatsheets/gleam-for-rust-users/

I think if you actually try elixir you will find its lack of typing to be of little concern.

Re: Phoenix 1.7 is View-less

#93
post #82
post #80

Earlier quoted context omitted.

IIRC (don’t claim to be an expert) the main issue is gracefully handling the case where the server end goes away unexpectedly - network issues, reboots, that kind of thing.

Does that include deploys?

yes active clients reconnect automatically, if you are doing rolling traditional deploys its great. It is running on beam so you can do live in place deploys too (although it is much more work).

Re: Phoenix 1.7 is View-less

#94
post #59

Earlier quoted context omitted.

Actually, I think the next big unlock in user adoption is static typing. Lack of it is frequently cited as the number one reason that makes people hesitate in switching to Elixir. I know it is an active research project right now, and I hope it bears fruit.

I really don’t get this, personally. I’ve worked in Java, Ruby, Typescript, Elixir, JS, and a bit of Elm and I literally never feel like I’m missing anything by not having static types in Elixir. This is doubly true with web based projects. What are people looking for that they might get from static types?

In a large JavaScript codebase that's partway to being a TypeScript codebase, I find myself constantly having to insert `console.log` statements to find out what attributes some object actually has. Plus, our number one source of crashes and errors is unhandled null/undefined because someone didn't realize a parameter might be nullish. Static typing would basically eliminate both of those issues.

Re: Phoenix 1.7 is View-less

#95
post #6

Elixir/Phoenix has hit full-stride. I feel like the next big unlock in user adoption is continued improvements to BeamAsm. Hopefully something on the order of 100-200% raw performance speed up. Note: I’m talking about raw perf, not concurrency. A few other additions to Phoenix 1.7 include: - verified routes - tailwind built in - additional web server support (bandit) https://www.phoenixframework.org/blog/phoenix-1.7-…

Honestly without proper editor support from a company like intelli-j, I just can't see myself picking it up. Hard to give up on the niceties it provides, especially when working on a non-static language I did try the third-party intelli-j plug-in but never got it to work If it had that... look out!

Re: Phoenix 1.7 is View-less

#96
post #6

Elixir/Phoenix has hit full-stride. I feel like the next big unlock in user adoption is continued improvements to BeamAsm. Hopefully something on the order of 100-200% raw performance speed up. Note: I’m talking about raw perf, not concurrency. A few other additions to Phoenix 1.7 include: - verified routes - tailwind built in - additional web server support (bandit) https://www.phoenixframework.org/blog/phoenix-1.7-…

Actually, I think the next big unlock in user adoption is static typing. Lack of it is frequently cited as the number one reason that makes people hesitate in switching to Elixir. I know it is an active research project right now, and I hope it bears fruit.

I’m currently doing two startups: one with rapid consulting-esque development and one more long term B2B one. I would 100% be using Phoenix for the the majority of the projects in the former if it had static typing. Have been a fan since release but, for me, it’s a hard requirement for anything that isn’t a personal project

Re: Phoenix 1.7 is View-less

#98
post #76

Earlier quoted context omitted.

Each LiveView requires a persistent WebSocket connection to the server. This means it does have a different scaling profile than the usual request/response lifecycle, but the Erlang VM is greatly capable of holding millions of connections at the same time and therefore is a perfect fit for the LiveView model. In fact, LiveView is built on top of the same Phoenix Channels we used to achieve 1 million connections on a…

What situations would face possible issues with the persistent-socket-per-view approach? A sprawling app with hundreds of distinct views that over-use LiveView? Would there also be multiple persistent sockets for each particular page? I can't imagine the type of site that would need that sort of structure. Typically you'd have your highly-interactive primary subset of your app, about <10-25% of the routes/views which…

In a situation where you hit the scaling limitations of the BEAM, you’re going to have the budget to address it.

Re: Phoenix 1.7 is View-less

#99
post #42
post #19

We're building a startup ( https://www.batteriesincl.com/ ) with Elixir and Phoenix 1.7rc (git master really). It's been amazing; I could not be happier. - We went hard on components and it's made building UI's easy. In fact I wrote a test library to make component testing easier. - Live view is so easy with a good component library. I'm not a designer, but with snappy interactions and easy to use components, it's no…

I'm also doing a solo-startup right now that relies heavily on LiveView and Channels/Websockets. I wouldn't have been able to build it by myself without Elixir/Pheonix. It's absolutely fantastic, can't recommend it highly enough.

How did you settle on Elixir/Phoenix? Did you consider any other languages + frameworks?

Re: Phoenix 1.7 is View-less

#100
post #95
post #6

Elixir/Phoenix has hit full-stride. I feel like the next big unlock in user adoption is continued improvements to BeamAsm. Hopefully something on the order of 100-200% raw performance speed up. Note: I’m talking about raw perf, not concurrency. A few other additions to Phoenix 1.7 include: - verified routes - tailwind built in - additional web server support (bandit) https://www.phoenixframework.org/blog/phoenix-1.7-…

Honestly without proper editor support from a company like intelli-j, I just can't see myself picking it up. Hard to give up on the niceties it provides, especially when working on a non-static language I did try the third-party intelli-j plug-in but never got it to work If it had that... look out!

You are missing a lot of the best tech out there in the programming world if you are waiting for an IntelliJ-like IDE for each programming language.
Post reply on HN