Live data from Hacker News

Pluto.jl – a reactive, lightweight, simple notebook

github.com

41–50 of 63 posts

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

#41
This looks excellent.

In my opinion, these kinds of apps are the future of data science / data analyst work. Forget no-code, just enable these professionals to work in a single programming language that they're familar with and give them visualization superpowers. The Python ecosystem has https://www.streamlit.io/ and https://gradio.app/ now. R has https://shiny.rstudio.com/. I think we'll see more.

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

#42

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'm not sure if Python has something like this, but in julia we have https://github.com/stevengj/NBInclude.jl which allows us to import jupyter notebooks like regular files.

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

#43
Just tried it. A couple of things.

Why are results displayed above the code cell instead of below it (as in Jupyter/IPython)? Was a bit confusing at first.

I'm noticing it crashes a lot. Get messages like:

   Worker 2 terminated.
   Distributed.ProcessExitedException(2)
Really like the reactive aspect, though.

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

#44
post #40

This would be better if there was VS Code integration with their notebook system. Personally, I will never code in a web browser and don't understand how people can do so with large code bases.

Nobody has "a large codebase" in a notebook. They're for explorative programming and visualisations and they're excellent for that. And VS Code is technically a web browser, so...

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

#45

Earlier quoted context omitted.

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'm not sure if Python has something like this, but in julia we have https://github.com/stevengj/NBInclude.jl which allows us to import jupyter notebooks like regular files.

I did not know about this. Nice. Thanks!

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

#46

Just tried it. A couple of things. Why are results displayed above the code cell instead of below it (as in Jupyter/IPython)? Was a bit confusing at first. I'm noticing it crashes a lot. Get messages like: Worker 2 terminated. Distributed.ProcessExitedException(2) Really like the reactive aspect, though.

> Why are results displayed above the code cell instead of below it (as in Jupyter/IPython)? Was a bit confusing at first.

I also strongly agreed with this at first, but after working with it some more I've found it compelling. The key mental model is to think of the code as something akin to a "figure caption."

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

#47
post #5

Earlier quoted context omitted.

1. Dependency graph for cells, letting it automatically rerun what's needed when you change one. This keeps everything up to date. 2. git-friendly.

I wonder how they are doing it? simply re-evaluating every cell?

It's mentioned in the video [1], it does static analysis of the code to create a graph of dependencies (for example which cell uses a variable defined by another cell), so when you update any cell it will find what cells are affected by the change (the downstream nodes on a directed acyclic graph) and only evals the code on them (instead of running everything). Julia is particularly good for those kind of code analysis since it's a very Lispy language.

It also does a trick of creating new modules to manipulate scope to make deleted variables/import/cells invisible (and therefore free to be garbage collected).

[1] https://youtu.be/IAF8DjrQSSk?t=596

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

#48

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.

What do you think about jupytext? https://github.com/mwouts/jupytext

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

#49
post #31

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.

You just update the `a=1` cell, changing it to `a=2`. That's the whole point. Every other cell that depends upon `a` will then automatically update.

Exactly. It requires a change in mindset wrt Jupyter, but it is totally worth it!

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

#50
The thing that still frustrates me about Pluto is that I have to put a `begin ... end` block in each cell where I want multiple commands to run. It would be nice if it ran more like Jupyter notebooks in this sense, where blocks can be blocks of code and not individual lines.
Post reply on HN