livebook
livebook copied to clipboard
Add live evaluation
The idea with live evaluation is that we will show the result as the user types. However, instead of evaluating every time, we will understand which lines changed, how, and only evaluate the necessary bits.
What is unclear, however, is how we will configure this feature and how it will play with Reevaluate automatically. Reevaluate automatically will be the default mode of a notebook when deployed, so I wonder if we should instead move that to a global setting to make it closer to the deployment mode. We also need to discuss if "Live evaluation" implies "Reevaluate automatically" for a specific cell, but most likely yes.
I was thinking a bit on how to make the "Live evaluation" / "Reevaluate always" more accessible and I realized we could have a dropdown close to the Evaluate button:
![Screenshot 2022-06-21 at 23 51 12](https://user-images.githubusercontent.com/9582/174903460-c9bd1c49-02af-4ad7-82eb-41d31bc478ea.png)
Clicking the button will open up a menu where you can between "Evaluate on demand" or "Evaluate automatically".
If that's not distinct enough, we could make the button a bit closer to GitHub buttons:
![image](https://user-images.githubusercontent.com/9582/174903594-ed6691e5-db19-4cac-9d44-683dbbb5518d.png)
Similarly, if we have a "Evaluate all automatically", I think we could have it toggle in the code zen button. When you press it, it opens up a menu with "enter code zen" on top and a bunch of toggles. We could also move those to the sidebar.
Is this right?
![image](https://user-images.githubusercontent.com/43606066/175056689-cfa878bd-7b45-4d33-a6b5-4e34d08c63b9.png)
Thank you! That’s definitely one of the ideas but I have also asked our designer to explore some concepts as well before we move forward. So hold on tight :-)
Another idea we can build on top of this is to highlight on the left side which line number we are currently evaluating.
As someone learning to program using livebook I think this will be very helpful. When I am confused and someone takes the time to show me what each bit of code is doing and how relates to other code the lightbulb goes off in my head and the code is understood.
The more information, (function and variable names, values, and the like) concerning how the code is being worked with is better for the inexperienced to begin to build good intuitions about programming. All efforts in this direction are truly valuable. Thanks
Closing this for now as my experiments with live evaluation shows it is much trickier to implement than anticipated.