José announces Livebook - a web application for writing interactive and collaborative code notebooks

José just announced Dashbit‘s latest project: Livebook, a web application for writing interactive and collaborative code notebooks

It seems to be similar to Jupyter Notebooks, which works with Python Code. I‘m very impressed by this project since it constitutes another major leap towards allowing data science and machine learning to be conducted in Elixir. Jupyter Notebooks are an essential tool for this kind of work in Python. Livebook not only allows quick evaluation and sharing of Elixir scripts but also reduces the friction for data science and ML folks to jump on the Elixir train.

What do you think about Livebook?
Will you use it and if yes, for what?

Links

40 Likes

Your link seems to be broken. It sends me to /Liverpool instead of /livebook.

1 Like

Ah yes sorry, stupid auto correct. I fixed it now :+1:

Jupyter notebooks are not limited to python. The web frontend works with anything that implements the kernel protocol, and there are kernels for a lot of languages.

2 Likes

Oh, I didn’t know that! Thanks for the info! I’ve been only using it with Python that’s why I assumed it was a Python-only project.

I’ve cloned and run it locally and it’s tremendous. The video from José was great too, I’ll follow it up by watching the more in-depth presentation he did at the conference.

But. it’s PEL not PETAL! I was excited to see how the top team had laid out their modals, incorporated some nice transitions etc, but no, not a text-gray-600 nor a x-init in sight. :wink:

5 Likes

Jupyter = JUlia PYThon R

Iirc They renamed it from iPython when the julia and r folks hacked into the protocol and urged them to make it cross platform.

4 Likes

Looks nice! Where does the code run? Do I have to install some kind of client on my workstation or does it run on the server?

But it does use Tailwind, so it’s more like, PETL

It is PETAL minus the A, as we are definitely using Tailwind. We are not using Alpine but Jonatan ended-up implementing the world’s smallest Alpine here: livebook/morphdom_callbacks.js at main · elixir-nx/livebook · GitHub

The main trick is to use “data-js-” attributes to keep data that survives Morphdom callbacks. Then there is one phx-hook at the top that registers all relevant callbacks for a notebook and persists states using data-js-.

15 Likes

It is just a Phoenix application you should be able to do both of these options. I’m running it on my Macbook on Elixir 1.11.3. For this demo you need Elixir v1.12+ to be able to install the dependencies.

So, if the code can run on the server, is there any security or is assumed that only trusted people use the notebook?

Only trusted people use the notebook, after all the whole purpose of the notebook is code evaluation. :). There is both token and password authentication available.

4 Likes

makes perfect sense for the application, was just curious if livebook brings a safe way to sandbox elixir.

Just watched the presentation, looks beautiful, well done everyone!

Am I the only one who thought that a livebook woulld make for an exciting interactive sort of blogging platform? Like not only including code sections but allowing people to run them and inspect them in detail while reading the post.

Man, I should create a company selling livebook blogging themes :stuck_out_tongue:

I’ve watched the whole thing and it’s beautifully executed, even though Jose says it’s a “first draft” it looks and works wonderfully.

Can’t wait to replace Python with this at work!

Great job!

1 Like

That would require that the Elixir code can’t do any harm to the blog-server.
Otherwise I come to your blog and install a dogecoin-miner. :money_mouth_face:

1 Like

Yeah, you’re right of course- still, there might be a way to do this

The same feeling came to me.
But as mentioned, one will have to secure the code execution.
Maybe let people run code that you wrote but not add anything of their own, so taking away the collaborative aspect of the equation.

Public read only version?

P.S. Regarding ML direction - sometimes you want to output images, charts etc, and current elixir ecosystem is pretty far away from this at this moment. Something for version 2.0 or so :wink:

1 Like