Live data from Hacker News

Pluto.jl – a reactive, lightweight, simple notebook

github.com

51–60 of 63 posts

Re: Pluto.jl – a reactive, lightweight, simple notebook

#51

Really happy to see that the good ideas from Observable notebooks are being copied elsewhere. I don't use Julia myself at the moment (although I think it's a beautiful language), but I know some people who will be very happy with this! Also, the playful enthusiasm in the presentation video linked in the description just makes me smile: https://www.youtube.com/watch?v=IAF8DjrQSSk

Very interesting, thanks. I don't understand the point of the "reactive" cell order, instead of conventionally doing top to bottom. It seems like it goes against the idea of "the program state being completely described by the code you see".

Reactive notebooks are closer to the idea you mention than other kinds of notebooks, because global state is reflected in the outputs of each cell. The biggest source of bugs when working in Jupyter for instance is that a variable was re-defined somewhere and it's not easy to see that it is changed when you have a cell somewhere above that has the output `foo = x` when the global state claims that foo = y.

Re: Pluto.jl – a reactive, lightweight, simple notebook

#53

Really happy to see that the good ideas from Observable notebooks are being copied elsewhere. I don't use Julia myself at the moment (although I think it's a beautiful language), but I know some people who will be very happy with this! Also, the playful enthusiasm in the presentation video linked in the description just makes me smile: https://www.youtube.com/watch?v=IAF8DjrQSSk

Very interesting, thanks. I don't understand the point of the "reactive" cell order, instead of conventionally doing top to bottom. It seems like it goes against the idea of "the program state being completely described by the code you see".

In reactive notebooks, the program state is still being completely described by the code you see - it's just that it doesn't have to be in top-down order! Instead of forcing you to manually define everything before use, a reactive notebook just looks at the references you make, forms a dependency graph, and then evaluates it in topological order (and, as optimization, only re-evaluates things that depend on the thing you've just changed).

This leads to a much nicer code organization, particularly when you're writing something resembling an interactive document (e.g. an "explorable explanation"). Much of the documents I do on ObservableHQ has roughly the following structure:

  Title
  Prose
  Visualization
  Interactive UI elements (possibly mixed
    with further visualizations)

  ------------------------------
  All the actual source code
  powering the implementation,
  organized in readability order.

Re: Pluto.jl – a reactive, lightweight, simple notebook

#54

I've switched from Jupyter to Pluto recently. Here's a few experiences with it. * The fact that I can actually use the source files later because they're just Julia files is incredibly useful. I often copy-paste from them into actual REPL-code, and sometimes I just polish the notebook until its source becomes usable as a command-line tool. * I like the reactive notebook concept. It does really help with bugs * Pluto…

The inability to simply import jupyter notebooks as python files has always been a point of friction for me, I’m glad to see this is a main feature for Pluto.

I frequently use Jupyter Lab notebooks as "pre-programming" sessions before coding an actual app or script in Python. I'll document all the interesting bits in Markdown cells, and test the bits I don't understand entirely in code cells. Then I copy/paste chunks of working code out into my text editor or IDE to begin "real" coding.

Re: Pluto.jl – a reactive, lightweight, simple notebook

#55
post #28
post #24

Earlier quoted context omitted.

> I like the reactive notebook concept. It does really help with bugs Can you say more? An example, maybe?

It completely fixes a huge number of the gripes in the JupyterCon talk I don't like notebooks by Joel Grus. The primary complaint there is that notebooks have a disconnect between the state of the program and the display of the cells. By using a completely reactive mode the state is no longer hidden. It's more akin to a spreadsheet than a notebook. A number of other complaints are completely circumvented by using a f…

Now we just need to port all this over to python... or switch to Julia? Which one would take the least amount of effort?

Re: Pluto.jl – a reactive, lightweight, simple notebook

#56

I've switched from Jupyter to Pluto recently. Here's a few experiences with it. * The fact that I can actually use the source files later because they're just Julia files is incredibly useful. I often copy-paste from them into actual REPL-code, and sometimes I just polish the notebook until its source becomes usable as a command-line tool. * I like the reactive notebook concept. It does really help with bugs * Pluto…

The inability to simply import jupyter notebooks as python files has always been a point of friction for me, I’m glad to see this is a main feature for Pluto.

You mean like nbdev?

Re: Pluto.jl – a reactive, lightweight, simple notebook

#57
post #22
post #18

Earlier quoted context omitted.

wonder if you have tried it on large datasets given ur background. Does it work well with large-datasets given its reactive nature?

Everything is cached unless something upstream changes, so it should work just fine with big datasets. I've only been using relatively small datasets so far, though.

[deleted]

Re: Pluto.jl – a reactive, lightweight, simple notebook

#59

Earlier quoted context omitted.

What happens if you reassign a variable below? Like: a = 1 println(a) a = 2 Does it show 1 or 2? Edit: tested it, it throws an error "Multiple definitions for a: Combine all definitions into a single reactive cell using a `begin ... end` block." Not sure I like that way of working.

Think of it as working with immutable data, because that's essentially what it is. Which has all the pros and cons of that approach (in my opinion a lot more pros, but YMMV).

Yes, that's the best explanation in the end I think. Maybe I'm too used to reuse variables and that's a bad habit I should work on. For example most of my counters are called i.

Re: Pluto.jl – a reactive, lightweight, simple notebook

#60
post #28

Earlier quoted context omitted.

It completely fixes a huge number of the gripes in the JupyterCon talk I don't like notebooks by Joel Grus. The primary complaint there is that notebooks have a disconnect between the state of the program and the display of the cells. By using a completely reactive mode the state is no longer hidden. It's more akin to a spreadsheet than a notebook. A number of other complaints are completely circumvented by using a f…

Now we just need to port all this over to python... or switch to Julia? Which one would take the least amount of effort?

Switching to Julia. You can just use PyCall to call all of your old code, so py"\paste" and you're using Pluto is like a 1 minute process. Then you can get fancy later.
Post reply on HN