Skip to main content

Manipulating Space-Time Fabric by Rewriting Javascript AST

Nate Murray (Fullstack.io)
Average rating: ****.
(4.60, 5 ratings)

Thinking procedurally is one of the hardest concepts to grasp for the beginning programmer. “Live-coding” environments show the result of code, but not the steps taken to get there.

We recently wrote a toolkit called Choc which is different from other “live-coding” environments in that each step of the execution is controlled by the learner.

By showing the flow of a program explicitly we can build new intellectual structures for thinking about how procedures execute.

In this talk, we’ll dig deep into the implementation of Choc and see how to

- use esprima to parse the javascript AST
- rewrite code to control execution in time
- use wisp, a javascript lisp, to generate human-readable descriptions of code
- generate rich visualizations of the execution flow
- edit (and see) all frames of a visualization simultaneously

By controlling time in javascript execution, we’re pushing the boundaries of what’s possible in a browser-based teaching tool. By using this new breed of javascript libraries, we can create new tools for thinking powerful thoughts.

Photo of Nate Murray

Nate Murray

Fullstack.io

Nate Murray is the co-founder of Fullstack.io and formerly the head of platform at IFTTT. He loves APIs and beekeeping. He’s interested in how we learn and effective ways to teach others.