KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
317 stars 24 forks source link

Debug mode that displays the scene at every intermediate step #2932

Closed jtran closed 3 days ago

jtran commented 2 weeks ago

We're in a unique position to improve the development experience. When writing code, whether it's KCL or any other language, the developer has to read the code, simulate the execution, and imagine the output at every intermediate step. Because KCL has output that can be visualized, it's great that we always, immediately display it. But it would be nice if we had a debug mode where we also displayed the output at every intermediate step to help developers find where their program went wrong.

For a visual example of what I mean, see Bret Victor's Substroke. In that, when you create a drawing, you add transform operations step-by-step, the output of each step is displayed horizontally, and the final result is the right-most image. The developer can see the steps that brought them to the final result without having to simulate the computer's execution. To paraphrase Bret Victor and Jonathan Edwards before him, the computer is already doing this execution. Why can't it just display it?

For another example, see the Nile programming language, around this timestamp in Alan Kay's talk.

Irev-Dev commented 2 weeks ago

Because the FE doesn't get the intermediate steps, do we think this would require engine side changes too?

Or might we get some of this stuff for free just by having a step through debugger, as we step through is LOC it will fire off more modelingCommands building up the model slowly, and so long as we keep track of things possible we could tell the engine to delete features if the user wants to travel backwards through time? (that might not be simple, I don't think we have delete endpoints of every time of entity, like fillets etc)

jtran commented 3 days ago

I'll close this for now, but I'm not giving up on it.