CodeSync

CodeSync

Building Livebook Desktop by Wojtek Mach | ElixirConf EU 2023

Code Sync: Building Livebook Desktop by Wojtek Mach | ElixirConf EU 2023

Comments welcome! View the code-sync and elixirconf-eu tags for more Code Sync and ElixirConf EU talks!

Most Liked

wojtekmach

wojtekmach

Hex Core Team

Yeah, I’d say Burrito is focused on CLIs and ElixirKit on desktop apps. The idea behind ElixirKit is you write your native code yourself (AppKit on macOS, Windows.Forms on Windows, etc) and it ships with APIs for both frontend and backend to talk to each other (over a TCP connection). I believe Burrito compiles NIFs for you so it’s easy to talk from Elixir to C/Zig but my understanding is it doesn’t have higher level APIs to do that built-in.

Burrito creates a single (self-extracting) binary whereas e.g. on macOS an app is an .app bundle, a folder, with particular structure. Commonly you distribute these as .dmg files that you need to code sign and ideally notarise too. ElixirKit ships with some simple scripts to automate these steps.

One of the biggest benefits of Burrito is cross-compilation. If there’s a cross-platform GUI toolkit in C/Zig then I believe it would be super compelling. I’m personally pretty wary of these toolkits though.

I think it’s totally possible to build a desktop app with Burrito and if someone tries that, I’m very much looking forward to the results.

ElixirKit is still maintained within Livebook repo. I plan to eventually extract it out as a standalone library but no ETA yet.

linusdm

linusdm

Thanks for sharing those experiences @wojtekmach !

I see you had some PR’s in the burrito :burrito: project. Would you mind pointing out if there is any overlap between what you described here regarding Livebook, and burrito?

At first glance the way Livebook is packaged requires maintaining some native code (which you show in the talk), while burrito handles this transparently.

Or are these two approaches for two different problems?

I don’t think the ElixirKit code has been extracted into it’s own reusable library yet?

Thanks in advance for sharing some insights.

andyleclair

andyleclair

One of the biggest benefits of Burrito is cross-compilation. If there’s a cross-platform GUI toolkit in C/Zig then I believe it would be super compelling. I’m personally pretty wary of these toolkits though.

What about the cross-platform GUI toolkit that ships with Erlang?

wojtekmach

wojtekmach

Hex Core Team

For Livebook Desktop, we started with wx however we run into a lot of issues, I mentioned them in the first half of the linked talk.

andyleclair

andyleclair

Ah yes, sorry, I realized that after I posted (and that I was posting on a year-old thread). What I meant was: should we put effort into improving what we have in OTP with wx and raw opengl, or do you think we should try to create something else from scratch?

I also find the idea of native desktop apps written in Elixir very compelling (especially with cross-compilation in the mix). I agree with your statements in the talk that wx is very large and complex, but seeing what Mitchell Hashimoto has done for cross-platform GUI in Zig and what the Zed people have done in GPUI makes me think that any cross-platform GUI solution is necessarily going to be pretty complex. That is, unless we go the way that Liveview Native and ElixirKit have gone with driving native UI implemented in the lingua franca of the platform?

Where Next?

Popular in Talks Top

blatyo
Looks like videos have started to go up for ElixirConf US 2018. Here’s the playlist of ones available so far. I expect it’ll get updated ...
New
axelson
ElixirConf 2017 - Well Behaved Native Implemented Functions for Elixir - @potatosalad Native Implemented Fun...
New
axelson
ElixirConf US 2018 – Architecting Flow in Elixir - From Leveraging Pipes to Designing Token APIs – René Föhring (@rrrene) ...
New
CodeSync
Code Sync: Writing much better tests in Elixir by Xochitl Pérez | Code BEAM Lite Mexico 2023 Comments welcome! View the <span class="has...
New
axelson
ElixirConf 2017 - Building an Artificial Pancreas with Elixir and Nerves - by @tmecklem People with Type 1 Diabetes have...
New
axelson
Almost done with posting the Elixir Conf talks! ElixirConf 2017 - Realtime Vehicle Tracking with Elixir and Phoenix - @st23am ...
New
axelson
Posting a little bit late today but here you go: ElixirConf 2017 - Elixir + Neo4j - Regina Imhoff Neo4j is ...
New
axelson
ElixirConf 2017 - Building an Open Source, Real Time Forum with Phoenix and Elm - @knewter There’s a lot of ...
New
New
axelson
ElixirConf 2017 - Live APIs with GraphQL Subscriptions - @bruce and @benwilson512 APIs have gone live with G...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New

We're in Beta

About us Mission Statement