GUI programming in Elixir?

There’s a kind of chicken and egg problem here. IMHO, the BEAM would be a pretty awesome GUI app environment, but it doesn’t have a robust interface to the client windowing API. There is the wx interface, but the problem with putting any GUI library in as a NIF is that it can crash the BEAM.

One way around this is to use the browser and javascript as your GUI interface.

Creating a Port interface to OpenGL is also pretty intriguing. However, I think for Native UI Desktop Apps, Elixir is going to be an uphill battle. There will likely be places where this battle is worthwhile, but I think for most applications the time to delivery penalty will be too great until more of the spadework in library interfaces is available.

What might make more sense is to drive an Elixir app via a GUI wrapper if your underlying problem maps well to what the BEAM does well. (i.e. if your basic problem is “embarrassingly parallel” and I/O limited ) What would scream “Elixir Desktop App” to me is a problem that using the increasing number of cores available on high end desktops would help.

While Elixir will never likely be the fastest on 1 or two cores, once you’ve solved your problem in Elixir it becomes much easier to throw 24 or (128) cores at it and see reasonable speed ups. Right now those kinds of machines are mostly servers, but that level of concurrency will eventually make it’s way into desktop computing.

1 Like