Live data from Hacker News

Elixir Livebook now as a desktop app

news.livebook.dev

31–40 of 111 posts

Re: Elixir Livebook now as a desktop app

#31
post #27
post #25

How many layers can we do!! I’m guessing elixir to JavaScript to v8 or whatever the js vm was called in chrome. Then jit then binary. Communicating over a network or one of those chrome sockets to an elixir or erlang vm so someone else can manage your data. Life is good

Not quite, this is just your standard server side rendering for providing a convenient GUI alongside your erlang vm. There's no layering here, just bundling of things that are usually distributed separately (editor and vm).

And the interaction is handled by Phoenix LiveView (html pushed trough websockets)

Re: Elixir Livebook now as a desktop app

#32
post #20

Earlier quoted context omitted.

I just installed it and it actually doesn't use Electron. It's basically just a local web server that runs on your computer, and opens a browser tab in your default browser pointing to http://localhost:60904/

On macOS this is a great app for turning browser web apps like these into dedicated 'apps': https://www.bzgapps.com/unite I use it with YNAB

Or Fluid which is free except for a few features which cost $5 (https://fluidapp.com/)

Re: Elixir Livebook now as a desktop app

#33
post #19

The Elixir ecosystem is growing incredibly well. I am impressed both from an engineering and a product perspective. It shows that they are playing the long game. I think they are achieving what I wished happen to the Clojure ecosystem: productive, well designed, respected and popular. Clojure missed the last step, unfortunately.

Because of the Java ecosystem, in Clojure you are in much more advantageous position than with Elixir.

Re: Elixir Livebook now as a desktop app

#35

not sure what the livebook is--the landing page is not sufficiently clear or coherent.

> not sure what the livebook is--the landing page is not sufficiently clear or coherent.

The difference between features and benefits. It's good at telling you the features (what it does) but not so much the benefits (why you would use it, how it can help you).

A common issue, but more understandable in this case than most as your average visitor to the Livebook site will likely know they have a need for it already, rather than end up there based on a 'random' link (like this thread).

Re: Elixir Livebook now as a desktop app

#36

This is awesome! Starting it up from the terminal and going to the url was not super convenient for quick tasks and scripts, this is much better. Edit: one thing that would make it even nicer is if it would remember the folder and/or recently opened notebooks.

Recently opened notebooks are on the roadmap. ;)

Re: Elixir Livebook now as a desktop app

#37

I’d be interested to see the details of how they did that. Very cool!

You can have a look at the code: https://GitHub.com/livebook-dev/livebook/tree/main/app_bundl...

I, too, am interested but I'm not terribly literate in elixir yet. I am aware that you can compile executables in elixir with a release command but I'd be curious to hear more about (or at least be pointed to the specific spots in the code) how the bundling was done to give you a discrete application per platform, with app icon and everything.

Having a script that opens a web browser pages is simple enough, but the extra sugar on top to wrap in an app bundle that shows up in your task bar or dock is something I am very curious about.

EDIT: Someone further down the thread linked to a more specific place and that led me to the macos.ex file[1] (which is what I was most interested in, being on macOS myself.

It looks like at least in the case of macOS it will build the bundle by hand, template in enough swift code to build the application, sign and notarize a bundle, and add the compiled elixir program in there. Pretty interesting. I guess the idea is that you write just enough swift to manage the life cycle of the compiled elixir application. It's an interesting approach but it seems like it would be frustrating and fragile.

[1]: https://github.com/livebook-dev/livebook/blob/355527f7e8034e...

Re: Elixir Livebook now as a desktop app

#38

Was excited for this. However on my M1 mac, it launched once, and now it won't open. Tried killing all processes and now nothing.

Sorry about that! A bug report at https://github.com/livebook-dev/livebook/issues/new would be very appreciated, especially with relevant parts from ~/Library/Logs/Livebook.log.

Re: Elixir Livebook now as a desktop app

#39
post #19

The Elixir ecosystem is growing incredibly well. I am impressed both from an engineering and a product perspective. It shows that they are playing the long game. I think they are achieving what I wished happen to the Clojure ecosystem: productive, well designed, respected and popular. Clojure missed the last step, unfortunately.

Because of the Java ecosystem, in Clojure you are in much more advantageous position than with Elixir.

Elixir also opens you up to the entire erlang and Beam ecosystems. Not as common as Java, I know, but still decades of knowledge and tooling around it cutting across many industries.

Re: Elixir Livebook now as a desktop app

#40
post #26
post #23

Earlier quoted context omitted.

Is this required in some OS and not another? A comment in this thread claims it just uses a browser tab.

It's used for the desktop app, as you can see here[1]. [1] https://github.com/livebook-dev/livebook/blob/355527f7e8034e...

Thanks for linking this. I was interested in how it worked but I didn't know enough elixir to get around the codebase by myself. This entry point is very informative for how they managed to do it.

I just looked at the macOS part, but the tl;dr for that is they seem to have compiled the elixir program into a binary and wrote enough swift to manage the lifecycle of the elixir program and signed it and notarized it and prepared it for shipment using CLI via shell! invocations. I didn't look at the windows way of doing things but I imagine it's similar.

Post reply on HN