News for hackers. Stuff that matters.
Re:Interactive C++ for Data Science by cozzyd on Wednesday December 23, 2020 @07:34PM (#25523973)
The problem with a notebook (that you don't have with a REPL) is the execution order is sort of arbitrary and changes don't propagate well.

A notebook is great if you don't change anything, but at that point it's basically a REPL with inline graphics, which is usually what I really want...

Re:Interactive C++ for Data Science by kortex on Wednesday December 23, 2020 @10:09PM (#25524728)
This is both a pain (state gets confusing) but this statefulness also a huge boon when rapid prototyping. You don't need to rerun calculations to tweak a single variable. Sometimes the data preprocessing can be really expensive.

It does take a certain discipline to make reproducible notebooks. I like to always end the day with a "restart and run all" if possible.

Re:Interactive C++ for Data Science by cozzyd on Wednesday December 23, 2020 @11:31PM (#25525076)
Right I guess what is needed is some way for cell dependencies to be known, so that all cells that depend on a changed cell will automatically update.
Re:Interactive C++ for Data Science by prestonh on Thursday December 24, 2020 @12:21AM (#25525255)
Just restart your kernel if you think something spooky related to state is occurring. This is the number one criticism I see of notebooks, but it is so easy to deal with if you are aware of it. The benefits of being able to rerun an isolated part of your code far outweigh the harms IMO.
Re:Interactive C++ for Data Science by tikej on Thursday December 24, 2020 @05:41AM (#25526464)
Its done in Pluto.jl - Julia notebooks that have cell dependencies implemented (and rerun them upon change of variable’s value).
Re:Interactive C++ for Data Science by kortex on Thursday December 24, 2020 @09:57AM (#25527959)
Maybe I am misunderstanding how the system works but I don't actually want that kind of Excel-like eager behavior like 90% of the time. Sure it's neat for simple computations but some cells take hours to run in my workflow.

Give me an indicator that a cell is stale but I don't want eager execution on all the time.

Re:Interactive C++ for Data Science by nerdponx on Monday December 28, 2020 @12:06AM (#25556847)
The problem with a notebook (that you don't have with a REPL) is the execution order is sort of arbitrary and changes don't propagate well.

How so? You can execute lines of a file out-of-order in a REPL just as easily as you can execute notebook cells out-of-order.