dwyl / phoenix-liveview-counter-tutorial

🤯 beginners tutorial building a real time counter in Phoenix 1.7.7 + LiveView 0.19 ⚡️ Learn the fundamentals from first principals so you can make something amazing! 🚀
https://livecount.fly.dev/
GNU General Public License v2.0
357 stars 35 forks source link

Opening an issue to be closed :) #172

Closed ndrean closed 10 months ago

ndrean commented 10 months ago

I would like to have a repo that demonstrates "live navigation" because it is not at all obvious. The Liveview API is still quite unstable. Would you like to create a repo and I would push a demo repo? It would be navigation between liveviews, and navigation between LiveComponents (children of the main liveview). I would then like to (for example) stream data into a page to demonstrate how to pass data between livecomponents, and between liveviews.

I made an example: https://github.com/ndrean/navigation-liveviews-livecomponents

ndrean commented 10 months ago

@nelsonic

I pushed the repo https://github.com/dwyl/live_navigate.

Things seem pretty intricate with Phoenix LiveView (at least this example extracted from the LiveBeats app).

I believe this solution is rather simple. Maybe too much? Feel free to do what you want with this.

Perhaps the Livedashboard could be a good example to understand?

We can close this issue

nelsonic commented 10 months ago

@ndrean looks good. thanks! 🙏 Agree that LiveDashboard is a good example to understand a more complex LiveView app. 💭

ndrean commented 10 months ago

I am still puzzled with this SSR though. Ok you don't write JS because the JS is written for you - and in fact very heavy (130K of JS!!!!!) - but things are pretty complicated, a bit intricate. However, I like this functional language with the actor model and the Elixir implementation: it is a pleasure to use it. Its a pity Erlang/Elixir performance is still low (compared to pur JS I mean) and not a main focus, so it will remain a niche. They seem to focus on types, but will it make the code run faster? If yes, it is good., otherwise... On the other side, I was trying to think 🤯 of how one could build a "ChatGPT" for Elixir. They have ML tools, so should build a model based on all the good code they have: you would ask to the endpoint questions to generate code for you. This would be a game changer in terms of adoption!

ndrean commented 10 months ago

An example that impressed me because this was exactly what I was thinking of. You digest the Elixir/Phoenix/Liveview code, all the libraries in Hex, and when you reach the service endpoint, you find a kind of nearest response. The output is submitted to some model (from the Hugging Face hub).

Screenshot 2023-08-23 at 16 59 14

youtube link

ndrean commented 10 months ago

Sorry for polluting this repo. I will close this as it is not at all relevant. It is more like a chat...

nelsonic commented 10 months ago

@ndrean not pollution at all. Always insightful. An LLM in Elixir would with distributed compute for training would be very interesting.