Livebook, Jupyter Notebook, etc.

Linux for blind general discussion blinux-list at redhat.com
Sat May 28 17:32:44 UTC 2022


tl;dr - Livebook is an Elixir-based re-imagining of Jupyter Notebook.  Might anyone here be interested in checking it out?

Although Jupyter Notebook (https://jupyter.org/) is very popular, my impression is that it isn't particularly accessible for blind users.  It also has some limitations in the areas of concurrency, distribution, and failsoft operation.

Livebook seems to address these limitations nicely, but I'm not qualified to evaluate its accessibility.  If some folks here would like to check it out and report on a11y issues, I think they would get addressed pretty quickly.  I'll be happy to help in editing and posting bug reports, if that helps...

- Rich Morin

# Details

A Livebook notebook is composed of text (in an enhanced version of Markdown) and code (in Elixir).  Notebooks are typically developed and run in interactive sessions, using a web-based UI.  They support collaborative development, with (soft) real-time updating of all active notebooks.

# Primary Stack

The Livebook stack is laid out roughly as follows:

## Erlang VM, OTP, etc. (https://www.erlang.org/) 

> Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability.  Some of its uses are in telecoms, banking, e-commerce, computer telephony, and instant messaging.  Erlang's runtime system has built-in support for concurrency, distribution, and fault tolerance.

## Elixir (https://elixir-lang.org/)

> Elixir is a dynamic, functional language for building scalable and maintainable applications.  Elixir leverages the Erlang VM, known for running low-latency, distributed, and fault-tolerant systems.  Elixir is successfully used in web development, embedded software, data ingestion, and multimedia processing, across a wide range of industries.

## Phoenix Framework (https://phoenixframework.org/)

The Phoenix Framework is similar to Ruby on Rails, but it uses Actors, Elixir, and Functional Programming concepts.  So, for example, each user session can have one of more processes which retain the current state.

## Phoenix LiveView (https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.html)

> LiveView provides rich, real-time user experiences with server-rendered HTML.  The LiveView programming model is declarative: instead of saying "once event X happens, change Y on the page", events in LiveView are regular messages which may cause changes to its state.  Once the state changes, LiveView will re-render the relevant parts of its HTML template and push it to the browser, which updates itself in the most efficient manner.  This means developers write LiveView templates as any other server-rendered HTML and LiveView does the hard work of tracking changes and sending the relevant diffs to the browser.

## Livebook (https://livebook.dev/)

> Livebook is a tool for crafting interactive and collaborative code notebooks.  It is primarily meant as a tool for rapid prototyping - think of it as an IEx session combined with your editor.  You can also use it for authoring shareable articles that people can easily run and play around with.  Package authors can write notebooks as interactive tutorials and include them in their repository, so that users can easily download and run them locally.

# Add-on Packages

Here are some add-on packages which play nicely with Livebook.

## Nerves (https://www.nerves-project.org/)

Some folks have been using Livebook to develop Nerves projects.  It can create very small and fast loading Linux images for a variety of single-board computers.

> Nerves is the open-source platform and infrastructure you need to build, deploy, and securely manage your fleet of IoT devices at speed and scale.

## Nx (https://hexdocs.pm/nx/intro-to-nx.html)

Nx (Numerical Elixir) supports image processing, machine learning, and other numerically-intense application areas.  In particular, it supports compilation and downloading of code to assorted GPUs.

> Elixir's primary numerical datatypes and structures are not optimized for numerical programming. Nx is a library built to bridge that gap.  Elixir Nx is a numerical computing library to smoothly integrate to typed, multidimensional data implemented on other platforms (called tensors).  This support extends to the compilers and libraries that support those tensors. ...




More information about the Blinux-list mailing list