News for hackers. Stuff that matters.
Re:Erlang/OTP 25.0 Release by lenkite on Wednesday May 18, 2022 @12:42PM (#31424862)
> The JIT now works for 64-bit ARM processors.

Does this mean mobile apps in Erlang is not far off ?

Re:Erlang/OTP 25.0 Release by R0b0t1 on Wednesday May 18, 2022 @01:46PM (#31425571)
There are some really high integration ARM servers, like Cavium Thunderheads. And others. They're all unobtanium.

Could be repurposed for Android development. I don't see it happening soon. Binding to Erlang is pretty difficult, see https://github.com/joshnuss/elixir-ffi.

If it did happen it would be useful, just... take some time.

** Warning: Turns out this is a really bad idea, do not use! When the BEAM calls native functions it needs to know how many reductions should be used. Otherwise calling a long running function can break the scheduling completly, because with this approach a long running function is considered 1 reduction **

Re:Erlang/OTP 25.0 Release by mikedelago on Wednesday May 18, 2022 @02:00PM (#31425740)
I haven't used it, but in a recent Thinking Elixir episode, they talked about Elixir-Desktop, which supports Android and iOS, as well as the standard Windows/Mac/Linux

https://github.com/elixir-desktop/desktop

Re:Erlang/OTP 25.0 Release by lvass on Wednesday May 18, 2022 @12:53PM (#31424978)
I don't see any serious attempt at UIs with erlang. I think erlang processes would provide a great foundation for UI components, but has it even been tried?
Re:Erlang/OTP 25.0 Release by toast0 on Wednesday May 18, 2022 @05:51PM (#31428106)
IMHO, you want to do it from scratch if you want it to really work with Erlang, but that means a ton of work. ex11 exists, but I don't know that it was ever very complete, and it was built in the old era of X11 where clients didn't render fonts, etc, so there'd be a lot of work to complete it. The most active fork has moved towards using it for embedded systems.

Personally, I used ex11 because the wxWidgets interfaces are hard for me to grasp and then accept; it was easier for me to understand X11 as a distributed communication protocol that has a side effect of occasionally outputting graphics; but my application only outputs a bitmap once in a while, so really I could have made anything work. ex11 doesn't help you with mobile though, because Android and iOS don't run X11.

There's also gtkNode, but I don't know how well that works, because it didn't seem any less confusing than wxWidgets. gtk has some ability to run on mobile, I think.

Re:Erlang/OTP 25.0 Release by jolux on Wednesday May 18, 2022 @01:15PM (#31425236)
Erlang comes with a binding to wxWidgets that is used to implement the graphical debugger and observer it comes with, but they are fairly utilitarian in their styling and I don’t know of any other Erlang/Elixir GUI apps. Which is to say: it probably could be done, but doesn’t seem to be popular even among Erlang programmers.
Re:Erlang/OTP 25.0 Release by outlog on Wednesday May 18, 2022 @01:59PM (#31425726)
I'm in elixir land - but have a look at https://github.com/elixir-desktop - they even have an ios app in the app store..

basically wxwidgets comes with a webview, and that one is loaded up - and everything is packaged as an app - so you can use phoenix (liveview), or even react or anything to your liking..

believe certain improvements were made to OTP 25, so multiple things will land soon - even livebook https://github.com/livebook-dev/livebook are aiming at shipping a native app..

Re:Erlang/OTP 25.0 Release by the_duke on Wednesday May 18, 2022 @01:56PM (#31425680)
Not really, because UI components inherently need tight integration for event propagation, layouting, drawing... Sure, you could render individual components in their own processes and have one process accumulate a render tree , but I don't see much sense in that.

The lack of GC also is a problem, so you might have to do each redraw in a fresh process or something like that to avoid accumulating too much memory.

Processes would be good for all sideline functionality like API/db requests and expensive computations.

Re:Erlang/OTP 25.0 Release by Wuzado on Wednesday May 18, 2022 @01:50PM (#31425608)
Probably mostly focused towards running on Graviton et al.