The Bootstrap Blog

Introducing Patch

Today, we are proud to announce Patch, the environment that will eventually replace WeScheme for the tens of thousands of students and teachers worldwide! Patch is the result of years of development work, and offers more speed, stability, and features than WeScheme. You can play with it right now, and try copying-and-pasting your WeScheme programs into it. We often tell people "it's not about the software", and we mean it. But it would be wrong to say that software doesn't matter, so for just this moment we're going to talk about WeScheme's origins, why we need a new IDE, and how we're using the lessons of the last 7 years to guide us.


WeScheme was written by Danny Yoo, and released in 2009. At the time, it was one of the first cloud-based IDEs, and offered exotic features like a Stop button, mathematical numbers, structured error messages, and rich media support. These features were unique at the time, and many online environments still don't have them - even in 2017! We stored student files on AppEngine, since Google Drive didn't exist yet. On the right, you'll see a picture of WeScheme running on Internet Explorer 6.0 - a recognition in 2009 that schools rarely have the latest-and-greatest software installed. Our support for legacy browsers continues to this day.

Why a new IDE?

WeScheme has improved gradually over the years. We've rolled out regular, iterative improvements to reliability and performance. We've fixed dozens of small bugs over the years, revised the user interface, and implemented many new features as well.

Unfortunately, WeScheme has a number of limitations that come baked-in. Google Drive is now one of the easiest ways to store and manage files, and many LMSs, workflows and scripts allow teachers to distribute and collect homework assignments using Drive. Our reliance on AppEngine prevents us from using any of that, and AppEngine is much, much slower for loading programs. WeScheme's runtime performance (how fast a program runs) is quite slow. Even on very fast computers, you can see this performance problem by running a WeScheme game and holding down one of the arrow keys!

A Foundation for the Future

Some of us have been involved in the development of an exciting language called Pyret. Pyret keeps Racket's math-like behavior, but uses a familiar, Python-like syntax ("Pyret" is a portmanteau of "Python" and "Racket"). Pyret also adds dozens of new, powerful features that are great for professional programmers and students alike, and stores its files in Google Drive! The Pyret environment, ("CPO" for short), also has a powerful compiler and runtime system, meaning that performance of running programs is light-years ahead of WeScheme. We've been using CPO as the basis for Bootstrap:2 for more than a year now, and we've been really happy with the feedback we've gotten. We're continuing to improve the CPO experience, thanks to requests from the Bootstrap community.

The more we use CPO, the older WeScheme feels. If only there was a way to get all of CPO's compiler and runtime system, but still use the WeScheme UI and the Racket language...

Over the last 18 months, Dorai Sitaram has led a project to translate Racket code into Pyret. The resulting Pyret code can then be compiled and run using all the modern Pyret infrastructure, resulting in some pretty eye-popping performance changes! Just try running this benchmark on WeScheme, and then copy-paste it into Patch. You can make the benchmark tougher by raising the value of DIFFICULTY - try setting it to 25! Meanwhile, Patch uses Google Drive for file storage, which means programs load almost instantly. Down the road, this will also allow us to integrate Patch with all your favorite LMSs, scripts, and workflows.

Patch is very much a work in progress. For a project of this magnitude, there are sure to be some bugs. If you find one, please send bug reports to Dorai. Here are some things that aren't yet where we'd like them to be, and you can expect improvements over the next semester...

Setting Sail

WeScheme isn't going away. We know it will continue to serve tens of thousands of students for many years to come, but it's time we set a course for the next decade. WeScheme has served roughly 4.5 million requests over the past 8 years, and kept on ticking even as we grew from a tiny research project into one of the largest formal CS curricula in the country. Much of the code in WeScheme today is unchanged since 2009, and we're grateful to Danny for making Bootstrap possible.

But for now, it's time to peer into the spyglass, plot a course for the future, and set sail. We hope you'll join us.

Posted January 17th, 2017