Skip to content

Commit

Permalink
πŸ“• Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Apr 30, 2020
1 parent 580ab81 commit d46fea4
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 23 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Pluto"
uuid = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
license = "MIT"
authors = ["Fons van der Plas <[email protected]>", "MikoΕ‚aj Bochenski <[email protected]>"]
version = "0.7.6"
version = "0.7.7"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand All @@ -22,7 +22,8 @@ julia = "^1.0.5"

[extras]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Dates"]
test = ["Test", "Dates", "Random"]
73 changes: 52 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,65 @@
<h1><img alt="Pluto.jl" src="assets/logo.svg" width=300 height=74 ></h1>
<h1><img alt="Pluto.jl" src="https://raw.githubusercontent.com/fonsp/Pluto.jl/master/assets/logo.svg" width=300 height=74 ></h1>

Lightweight ***reactive*** notebooks for Julia ⚑ - welcome to Pluto!
_Writing a notebook is not just about writing the final document β€” Pluto empowers the experiments and discoveries that are essential to getting there._

_**Explore models and share results** in a notebook that is_
**Explore models and share results** in a notebook that is
- **_reactive_** - when changing a function or variable, Pluto automatically updates all affected cells.
- **_lightweight_** - Pluto is written in pure Julia and is an installable package.
- **_modern_** - responsive, intuitive user experience; beautiful exported documents; custom themes.
- **_lightweight_** - Pluto is written in pure Julia and is easy to install
- **_simple_** - no hidden workspace state; intuitive UI.

<img alt="reactivity screencap" src="demo/plutodemo.gif" >
<img alt="reactivity screencap" src="https://user-images.githubusercontent.com/6933510/80637310-152cb880-8a5f-11ea-8a92-fbd807b8f146.gif" >


## Input
### Input

The central idea is that Pluto notebooks are ***reactive***, just like [Observable notebooks](https://observablehq.com/@observablehq/observables-not-javascript), but using Julia instead of JavaScript. Cells can be placed in any order - our intelligent AST parser figures out the dependencies between them and takes care of execution. When you change a variable, Pluto automatically re-runs the cells that refer to it.
A Pluto notebook is made up of small blocks of Julia code (_cells_) and together they form a [***reactive*** notebook](https://medium.com/@mbostock/a-better-way-to-code-2b1d2876a3a0).
When you change a variable, Pluto automatically re-runs the cells that refer to it. Cells can even be placed in arbitrary order - our intelligent syntax parser figures out the dependencies between them and takes care of execution.

Unlike Jupyter or Matlab, there is **no mutable workspace**, but rather a _one-to-one corresponce_ between variables and code. In a Pluto notebook, the value of a variable _always_ corresponds to the code that defines it.
### Output

## Output
Your notebooks are **saved as pure Julia files** ([sample](https://github.com/fonsp/Pluto.jl/blob/master/sample/basic.jl)), which you can then import as if you had been programming in a regular editor all along. You can also export your notebook with cell outputs as attractive HTML and PDF documents. By reordering cells and hiding code, you have full control over how you tell your story.

Cell output is simple: one cell outputs one variable, which is displayed using the richest available formatter. We believe that this limitation actually [_makes programming easier_](https://medium.com/@mbostock/a-better-way-to-code-2b1d2876a3a0)!
<br >

Your notebooks are saved as pure Julia files, which you can then import as if you had been programming in a regular editor all along. You can also export your notebook with output as attractive HTML and PDF documents. By reordering cells and hiding code, you have full control over how you tell your story.
## Dynamic environment

<img alt="formatting screenshot" src="demo/formatting.png" width="50%">
Pluto offers an environment where changed code takes effect instantly and where deleted code leaves no trace.
Unlike Jupyter or Matlab, there is **no mutable workspace**, but rather a _one-to-one correspondence_ between variables and code. In a Pluto notebook, the value of a variable _always_ corresponds to the code that defines it β€” there is no hidden state.

## Let's do it!
### Interactivity

Your programming environment 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.

In the example below, changing the parameter `A` and running the first cell will directly re-evaluate the second cell and display the new plot.

<img alt="plotting screencap" src="https://user-images.githubusercontent.com/6933510/80637344-24ac0180-8a5f-11ea-82dd-813dbceca9c9.gif" width="50%">

<br >

### HTML interaction
Lastly, here's _**one more feature**_: Pluto notebooks have a `@bind` macro to create a **live bond between an HTML object and a Julia variable**. Combined with reactivity, this is a very powerful feature!

<img alt="@bind macro screencap" src="https://user-images.githubusercontent.com/6933510/80617037-e2c09280-8a41-11ea-9fb3-18bb2921dd9e.gif" width="70%">

_notebook from [vdplasthijs/julia_sir](https://github.com/vdplasthijs/julia_sir)_

<br >

You don't need to know HTML to use it! The [PlutoUI package](https://github.com/fonsp/PlutoUI.jl) contains basic inputs like sliders and buttons.

But for those who want to dive deeper - you can use HTML, JavaScript and CSS to write your own widgets! Custom update events can be fired by dispatching a `new CustomEvent("input")`, making it compatible with the [`viewof` operator of observablehq](https://observablehq.com/@observablehq/a-brief-introduction-to-viewof). Have a look at the sample notebooks inside Pluto to learn more!

<br >
<hr >
<br >

# Let's do it!

### Ingredients
For one tasty notebook πŸ₯ž you will need:
- **Julia** v1.0 or above
- **Linux**, **macOS** or **Windows**, _Linux and macOS will work best_
- Mozilla **Firefox** or Google **Chrome**, be sure to get the **latest** version
- Mozilla **Firefox** or Google **Chrome**, be sure to get the latest version

### Installation

Expand All @@ -44,30 +73,32 @@ _Adding the first package to Julia can take up to 30 minutes - hang in there!_

To run the notebook server:
```julia
julia> using Pluto
julia> import Pluto
julia> Pluto.run(1234)
```

Then go to [`http://localhost:1234/`](http://localhost:1234/) to start coding!

**Work remotely**:
<br >
<hr >
<br >

### Remote access
You can also run Pluto _on a server_, and use the browser on your own computer as user interface. For this, you need to set up an _SSH tunnel_. First, log in to your server using SSH and start a Pluto server. Then open a local terminal on your own computer and type:

```bash
ssh user@ipaddress -LN 1234:localhost:1234
```
with `user` and `ipaddress` filled in accordingly. You can then go to [`http://localhost:1234/`](http://localhost:1234/) on your own computer to get started! For more info and instructions for Windows, see [this guide](https://medium.com/@apbetahouse45/how-to-run-jupyter-notebooks-on-remote-server-part-1-ssh-a2be0232c533).

**To developers**:
### To developers
Follow [these instructions](https://github.com/fonsp/Pluto.jl/blob/master/dev_instructions.md) to start working on the package.

<img alt="plotting screencap" src="demo/plutoODE.gif" >

## Note

We are happy to say that **Pluto.jl is in a stable state**, and we look forward to hearing what you think! 😊

<img alt="feedback screencap" src="https://user-images.githubusercontent.com/6933510/78135402-22d02d80-7422-11ea-900f-a8b01bdbd8d3.png" >
<img alt="feedback screencap" src="https://user-images.githubusercontent.com/6933510/78135402-22d02d80-7422-11ea-900f-a8b01bdbd8d3.png" width="70%">

Questions? Have a look at the [FAQ](https://github.com/fonsp/Pluto.jl/wiki).

Expand Down
Binary file removed demo/cellstopper.gif
Binary file not shown.
Binary file removed demo/formatting.png
Binary file not shown.
Binary file removed demo/multipleclients.gif
Binary file not shown.
Binary file removed demo/plotting.png
Binary file not shown.
Binary file removed demo/plutoODE.gif
Binary file not shown.
Binary file removed demo/plutodemo.gif
Binary file not shown.
Binary file removed demo/reactivity.gif
Binary file not shown.

3 comments on commit d46fea4

@fonsp
Copy link
Owner Author

@fonsp fonsp commented on d46fea4 Apr 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/13914

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.7 -m "<description of version>" d46fea4e25a520102cf0e0d6aad0bac328a88472
git push origin v0.7.7

@fonsp
Copy link
Owner Author

@fonsp fonsp commented on d46fea4 Apr 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#90

Please sign in to comment.