Inspiration

We were inspired by Xcode's Swift playground, which evaluates code live in a sidebar.

What it does

This is an extension for Atom that evaluates Python code and presents it live next to the corresponding line in the code editor. Thus, the user can see how every variable is changed as the user is typing the program. Users can keep typing and catch whatever mistakes they has have committed without having to run the code. This benefits for students of computer science and more advanced users who would like to prototype quickly.

How we built it

There is a Python backend with our custom Python interpreter that evaluates expression and displays user-friendly output. On the front-end, we created an Atom package. We used Javascript ES6 and Atom APIis.

Challenges we ran into

The main challenge was building the interpreter. It was difficult to do this since no interpreter out there already did what we needed. We had to parse the code and prevent all sorts of errors involved in running code within code.

It was also challenging to figure out the Atom APIs to get a user-friendly and very responsive interface.

Accomplishments that we're proud of

We got some logic in the interpreter, and it is somewhat useful. It is also extensible and can be built-upon by others.

What we learned

We learned about interacting between a Python program and an Atom extension. We learned Atom APIs and also some basic Python parsing and interpreting.

What's next for atom-playground

We would like to add graphics to understand loops and support for recursion analysis.

Built With

Share this project:
×

Updates