News for hackers. Stuff that matters.
Re:Elixir – Phoenix LiveView Native by vineyardmike on Friday September 02, 2022 @05:06PM (#32695724)
One thing that isn’t clear - does the elixir runtime (OTP) run on the iOS device?

It looks like a well integrated web view, but it’s not clear if it’s all running on device. Does apple support a web page not loaded from local?

Re:Elixir – Phoenix LiveView Native by oomkiller on Friday September 02, 2022 @05:44PM (#32696057)
There's no WASM involved and the BEAM is not running on the device. It works like LiveView, except instead of an HTML DOM you have a SwiftUI hierarchy. The client side of LiveView is a SwiftUI view itself, you can use many standard SwiftUI views, and also add your own custom ones for when you need something bespoke. It can be the whole app or just part of one.
Re:Elixir – Phoenix LiveView Native by lawik on Saturday September 03, 2022 @02:10AM (#32699223)
People have shipped the BEAM VM as part of iOS apps recently though. I think Thinking Elixir covered it in an episode.
Re:Elixir – Phoenix LiveView Native by lefrenchy on Friday September 02, 2022 @05:10PM (#32695753)
If it's anything like Phoenix, it's just websocket based on the client (iOS device in this case) which has a DOM diffing mechanism to patch in updates from the Elixir backend.

Short answer: no the client side is not elixir I suspect.

Re:Elixir – Phoenix LiveView Native by olivermuty on Friday September 02, 2022 @05:23PM (#32695867)
They jumped the gun a bit with the page, but what I have been able to piece together so far is that they renamed the WASM runtime from Lumen to FireFly and FireFly is what powers this through WASM.

So OTP is running natively on the phone.

This is essentially React Native reinvented with Elixir, which to me is pretty awesome because I really dislike React Native although we have done quite a few projects with it :)

Edit: Totally mistaken, I stand corrected! Turns out I jumped the gun instead. Hopefully FireFly and this CAN give me the RN replacement I desire.

Re:Elixir – Phoenix LiveView Native by ricketycricket on Friday September 02, 2022 @05:37PM (#32696008)
It is not on the phone, no. I'm sure eventually you could run it on the phone like Elixir Desktop[1], but that isn't what it is at the moment. The phone connects to the server via a websocket and the SwiftUI "DOM" is pushed to the client just like HTML would be. In fact, I already built a hybrid Web & Native demo[2] that demonstrates that it's just bog-standard LiveView.

[1] https://github.com/elixir-desktop/desktop

[2] https://natetodd.com/building-for-web-and-native-with-livevi...

Re:Elixir – Phoenix LiveView Native by uxcolumbo on Saturday September 03, 2022 @03:53AM (#32699719)
What do you dislike about RN?

Some are using ClojureScript to write RN apps, like the folks at vouch.io … here is a talk by David Nolan

https://youtu.be/3HxVMGaiZbc?t=1015