This IDE started as a final project in Gerry Sussman's LISP class at MIT.
When programming and debugging, you often want to know what your code is going to do without the possibility of unintended side effects (state change) by actually running the code.
Towards this goal, we added a concept we call "preview execution." That is: you can preview the output of code in our IDE simply by highlighting a section of code. The IDE will show the output of the highlighted section, but when you de-select the section, there are no side effects: no state is changed in the Scheme instance.
It's downloadable as a Mac app, but also open source. Would love to hear people's thoughts on it!
I don't think the goal can be achieved pragmatically for many types of modern applications generally. Maybe offering some sort of debug snapshotting and mocking layer for things like that and libraries to implement might be an idea. The debugger should then also be able to identify for which parts preview execution can be done and for which ones it's not possible to contain side-effects.
So if your code deletes itself on disk - that code path will run in a sandbox, and roll back? Or are you talking only of state contained/managed by scheme (eg not the os) like global data structures etc?
> How Preview Execution Works
> Under the hood, preview execution works by using Scheme environments.
> When code is highlighted, Toski duplicates the current environment and executes the code. Then, when the cursor is moved or the code is de-selected, Toski removes the new environment, returning the instance to the previous state.
Which makes sense - but it would be cool if it automagically mocked all external calls... ;)
I really liked the first version and did some research some time ago on how to make this usable by a wider audience: https://ferrucc.io/posts/a-new-ide/
I have MIT scheme installed on the system. How do I tell it where to find Scheme?
Or better yet, any chance you can just package up the interpreter with the IDE, or make that an optional download?