livebook-dev / livebook

Automate code & data workflows with interactive Elixir notebooks
https://livebook.dev
Apache License 2.0
4.87k stars 417 forks source link

Live programming ideas #1351

Open josevalim opened 2 years ago

josevalim commented 2 years ago

This is a meta issue to describe what we want to implement in relation to live programming:


References on probing/example-based live programming:

derpycoder commented 1 year ago

I loved Projection-boxes, I had to watch the slowed down version to understand what's going on and it blew my mind.

The approach is awesome, and it's seems like a great tool for live programming.

Going through other links.

derpycoder commented 1 year ago

The Microsoft paper, Usable live programming, is interesting but looks ugly in comparison to Projection Boxes.

I wish there was a tool like, Kernel.dbg, for Recursive code, so I don't have to trace it manually or have a mental model for it.

The paper had links to two YouTube videos, which made some sense compared to the paper itself 😅: sqrt fib

derpycoder commented 1 year ago

Example-based live programming for everyone: building language-agnostic tools for live programming with LSP and GraalVM

This is really awesome, I liked the usage of Emoji, which made it lot less confusing than the Projection Boxes method. I liked how it allows inspection of the Recursive code as well.

It's like the stepping through code and debug is happening simultaneously while coding, so no more separate code, run and debug cycle.

It also has Polyglot thing, so Elixir & Erlang both can benefit I guess.

Elixir will be even more developer friendly.

Live Programming

derpycoder commented 1 year ago

Jupyter Notebook also uses the GraalVM for live feedback: Ipolyglot

IPolyglot

Adzz commented 1 year ago

This is a great recent talk in that space too: https://youtu.be/8Ab3ArE8W3s

derpycoder commented 1 year ago

I liked how he said: "Stuff it in a docker container & then ship it out to the cloud for a CI job, wait for it to compile, why do we tolerate this, Docker shouldn't exist, it exists only because everything else is terribly complicated that they added another layer of complexity to make it work, it's like they thought if deployment is bad, we should make development bad too!"


No one will say no to Live Programming.

A self documenting, always running code, that removes the mental burden about the state of the code while writing, it will be a game changer.

I think Elixir will have the best implementation.

100phlecs commented 1 year ago

Here's a related talk that explores "an immediate connection to your creation" with programming. Has some interesting examples.

derpycoder commented 1 year ago

This is a much fleshed out video, with lots of working examples and filled with ideas to the brim, thank you.

It points out all the pain points in programming.

I really liked Swift Playground because of REPL and the immediate feedback while coding.

Mapping between code and the output was next level!! The way he used that magnifying glass and it pointed out which code made that, is something I want badly.

thelastinuit commented 1 year ago

LiveView feels like the perfect tech to do Bret Victor's Media for Thinking the Unthinkable!

derpycoder commented 1 year ago

Yup, @100phlecs also pointed out a talk by him:

Bret Victor - Inventing on Principle


It's like Serendipity: "The occurrence and development of events by chance in a happy or beneficial way."

derpycoder commented 1 year ago

@josevalim,

I was blown away by the the demo when Swift was introduced, back when I wanted to make games. The demo felt extraordinary!!

WWDC 2014 - Swift Demo

RichMorin commented 1 year ago

At this point, there are about a dozen code notebooks. Several of these are support multiple programming languages and a couple even support Elixir.

This begs the question "what can (should) Livebook do that the others can't (or won't)". One possible answer is that Livebook can support the growing variety of BEAM-based languages. In particular, it could support Erlang.

I even have a minor use case to suggest for this. There is an Erlang test suite that I'd like to play with. If Livebook supported Erlang, I could incorporate these tests as executable code.

josevalim commented 1 year ago

@RichMorin there has been a discussion for it: https://github.com/livebook-dev/livebook/issues/190 - I would suggest moving it there to keep this issue focused.

hugobarauna commented 1 year ago

Related to

Module explorer: we can show which modules each section defines under the Sections pane in the sidebar

It would be useful to have a way to navigate to a module using a keyboard shortcut, similar to what symbol navigation looks like in a code editor.

bt-maps commented 1 year ago

ZeroBrane Studio Lua IDE has some nice live coding features

https://youtu.be/FpxIfCHKGpQ?si=IdG7abN7w5BhEPAp&t=86 http://notebook.kulchenko.com/zerobrane/live-coding-in-lua-bret-victor-style