I did not know about revery, of course, if it is done with Reason.
Revery looks interesting, specially due to the use of ReasonML, which looks like an OK functional deviation of JavaScript.
However, right now I am not really sure I have the time to learn yet another technology, never mind remaking the entire project from scratch.
CEF looks interesting, but I am afraid my lack of experience with CEF as well as how to link erlang binaries with something else binaries is a decisive factor to not use this solution.
Did you seen this one in your research:
Itās the Elixir bindings for:
Maybe @Gee5ive can tell more to us about his experience:
And you also have this research from Joe:
http://erlang.org/pipermail/erlang-questions/2017-July/092949.html
Webview for elixir, unfortunately is not being maintained, nor is it active.
It never left alpha and its development stop 2 years ago.
Looked promising though.
As for the post from Joe, I couldnāt take much, as most of the links from there are no longer active (they are broken) and the few links that arenāt are for C and Red and REBOL, languages I do not plan on integrating in the project.
Thanks for the research though!
Itās essentially Ocaml, which should feel quite similar to Elixir.
Why not have a study of the Wings 3D codebase and try it out yourself? It has the installer code in it too. I think Fred Herbert made a project in wx not too long ago too which would be worth a look too.
Do you have a link? I am afraid I donāt quite understand what you are trying to show me.
Written in Erlang, wings3d.
You could try tauri which targets rust, or sciter-js. Both allows for you to connect to your phoenix server.
Iām not too sure if the self-healing properties of the beam are as beneficial for gui apps, which users can just force kill and restart in seconds. It might even be detrimental to user experience, especially if the app gets stuck in an infinite loop of restarting without the user being able to manually handle the error.
onivim autocompletes every do
as defmodule
or another word, you have to go back to normal mode each time. Awful. Iād say it is not ready for elixir right now
But the autocomplete and docs for all the standard library and own modules works well!
Is using the users default web browser out of the question?
You could use something like Bakeware and then use System.cmd("open http://localhost:<my-port>")
to open the default browser on the users machine. The command would differ between OSs, but should be pretty easy to implement.
You should probably also consider a method to figure out an unused port, and include that in your command to launch the browser.
I donāt mind using the default browser, itās just I donāt know how to make an Elixir program open a new browser window (using the default browser) and then making it open the url I have in mind.
Bakeware looked promising, but it doesnāt work for Windows, which is a requirement.
I did find this code snippet:
def open(url) do
start_browser_command =
case :os.type do
{:win32, _} ->
"start"
{:unix, :darwin} ->
"open"
{:unix, _} ->
"xdg-open"
end
if System.find_executable(start_browser_command) do
System.cmd(start_browser_command, [url])
else
Mix.raise "Command not found: #{start_browser_command}"
end
end
From the project:
Could prove useful, as long as I can make it work for both Windows and Linux.
Iāve been working on a library to make the desktop apps part possible here: GitHub - dominicletz/desktop: Elixir library to write desktop apps with OTP24 & Phoenix.LiveView it all depends on Erlang OTP24 because that includes my pull request to include :wxWebView and so you can have a native window that shows your Elixir LiveView app. So the desktop library brings you all of that and avoids the need to mess around with any of the :wx* libs in your app.
Iāve got a local version of an app builder that produces a .dmg for macOS and a nsis Windows installer but itās still a work in progress - planning to get that desktop-builder ready for the Code Beam V in May.
Wow, this is awesome
Link to the pull request so that we can upvote it
Oh, I though it was pending approval(bad interpretation from me), but it was already merged in February
And for Linux?
For linux Iāve got a self-extracting installer based on makeself.io . That one Iām not super happy with though, would prefer a deb package. Iāll push to github as soon as possible.
Better then nothing
It would be a great addition for sure
Thanks man. I am really excited with the possibility of writing a modern looking desktop app in Elixir with LiveView. I may make a version of my video notes web app with your desktop library
This project looks rather interesting. Let me know if you give any conferences or do any articles on it, I really would like to learn more about it.
Wow, thatās cool!
Is it limited to browser features or some deeper OS integration is possible?
Yeah Iāll talk at the code beam sto about this project and next steps Virtual Erlang and Elixir Conference for Europe
So far there is a native widow, native desktop notifications and native app icon. Also the sample app is using the sqlite ecto library for local storage. What are you thinking of in terms of deeper OS integration?
For example registering itself as a service in macOS and handling NSPasteboard
data.
@dominicletz Hello again, do you have a link for the conference? I wasnāt able to get a ticket but I am still interested to see how your presentation went !