Interactive notebooks ~ Pluto.jl | Fons van der Plas | JuliaCon 2020

Описание к видео Interactive notebooks ~ Pluto.jl | Fons van der Plas | JuliaCon 2020

Introducing a fresh, new notebook system for rapid prototyping! Pluto understands global references between cells, and reactively re-evaluates cells affected by a code change. At JuliaCon, we will show how Pluto can liven up your workflow.

Whether you’re a scientist, a finance professional or an engineer, you use notebooks like Jupyter to tell a story. You fiddle a bit with your code, running cells here and there, and when you’re done - you restart the kernel and keep your fingers crossed that it’ll all work together when you press “run all”.

🙋 In Pluto, things work differently. When you change a variable, Pluto automatically re-runs the cells that refer to it. And when you delete a cell, the variables, methods and imports from the old code disappear. Unlike Jupyter or Matlab, there is no mutable workspace, but rather a one-to-one correspondence between variables and code.

🚨 Reactivity is not just fun for mathematical tricks! It guarantees that the code you see exactly matches the variables you're working with, eliminating bugs before you even knew you had them.

⚡ Your notebook becomes interactive by splitting your code into multiple cells! Changing one cell instantly shows effects on all other cells, giving you a fast and fun way to experiment with your model. And to really spice up your notebook, you can use HTML sliders, or even custom JavaScript widgets, to drive your Julia variables. Change λ = 5 to @bind λ Slider(1:10), and all cells that use λ are controlled by a slider.

💾 Notebooks are saved as pure Julia files and can be exported as rich documents with cell output to HTML or PDF. By separating source code and output, you can take full advantage of git for version control and you can import Pluto notebooks as if they are written in a regular editor.

After a live demo, the second part of the talk will unveil some of the tricks that power Pluto. The core concepts are:
- static code analysis to find global definitions and references in cells;
- directed graph of cells, which tells Pluto which cells to run, in which order;
- managed workspace for code to live in, and cleaning the workspace in milliseconds;
- responsive connection between JavaScript clients and Julia.

Pluto is written in pure Julia, which comes with two benefits: first, it’s easily installable as a package without requiring Python - you only need Julia and a web browser. Second, it is ready to be improved by Julia developers who we hope to inspire at the conference. Pluto is an exciting project to work on, and we are eager to hear your ideas!

Resources
Pluto.jl home page: https://plutojl.org/
Pluto.jl repository: https://github.com/fonsp/Pluto.jl

Contents
00:00 Opening
00:19 Introduction
00:42 Why we made Pluto?
01:06 Programming is easy, programming languages are powerful, but our environments are 70s vintage
01:47 Jupyter notebooks: strong points and pain points
02:23 Alternatives to Jupyter
03:09 Enter Pluto. Live demo
06:00 Pluto doesn't allow multiple expressions in one cell, here is why
07:50 Binding value variable to slider
08:33 Markdown cells in Pluto
09:50 Reactive paradigm
10:35 Taking look behind scene on how reactivity works
11:05 I. Re-evaluating downstream cells
11:55 II. Clean up old code
13:25 Call about re-evaluating cells, which have a long evaluation time
14:53 Interactivity in Pluto
16:22 Using JavaScript you can make any interactive element you want
16:44 Example: using your picture to define matrix (two dimensional array)
17:21 Manipulation picture inside Pluto
17:47 Do you need to know JavaScript and HTML?
18:11 Pluto.jl minimalist file format
20:45 Recapitulation
21:03 What's next?
21:54 Pluto for education
23:23 Thank you!

Want to help add timestamps to our YouTube videos to help with discoverability? Find out more here: https://github.com/JuliaCommunity/You...

Interested in improving the auto generated captions? Get involved here: https://github.com/JuliaCommunity/You...

Комментарии

Информация по комментариям в разработке