Early Access Preview 6
Pre-releaseThis release includes three major changes:
- Execution of programs is done through a client-server model;
- The executing interpreter is selected on a per-document basis;
- Updated to the interface and document handling.
Please keep in mind that this preview is work in progress without various implementation details undergoing constant changes.
Client-Server Model
TigerJython instances to execute programs and evaluate expressions are now run in a client-server model. This allows for much finer grained interaction and control and opens up possibilities such as a debugger. It also allows to start an instance ahead of time and send it the script to execute later on, which will speed up the process of starting scripts.
Although there is hardly anything visible of this, this is a crucial step forward, as it lays the groundwork for, e.g.:
- Monitoring an application during execution and allowing to report on memory usage, thread count, etc.;
- Implementing a debugger that allows to run a program step-by-step and report on variables;
- Returning values other than strings from an interactive session (notebook);
- Discerning between output and results in the interactive mode.
Executing Interpreter
The interpreter to execute a program is now chosen on a per-document basis rather than globally. This is done through a small menu on the top right corner of the editor window. This is step towards running program on external devices such as a micro:bit, a robot, etc. The menu for selecting the executing interpreter/device will contain entries for those devices as well (although this is currently not implemented, yet).
Document Handling
Up to now, documents (such as Python programs) have been cached internally in a database, which has been automatically synchronised with the file on the disc—if one exists and is attached. This has allowed for making documents persistent even before they are saved or have a preview available without the need to access the file on disc.
In this release, the cache has been extended to an internal storage that also captures the undo history of a document. It is now possible to undo any edits of a document across sessions.
We are now switching to a slightly different model where all documents are entirely stored and managed in an internal database without automatic file synchronisation—however, this new model is not yet completely implemented. It will be possible to import any file from disc, just as the new user interface already features a 'download' button to export any document to a file on disc. The internal database will be extended to offer various options, i.e: (1) local internal storage, (2) automatic synchronisation with files in a local directory, (3) automatic synchronisation with an online cloud, (4) backed up by a git engine. In order to keep the overall interface simple, the option for which of these options is chosen will be globally and not on a per-document basis.
The terminology of 'download' etc. is chosen based on the belief that it is closer to the mental models of young users these days, rather than the classic 'save as file'.
One consequence of this new design is that we no longer need a menu with options for 'open', 'save', etc.
Further Changes
There is a number of smaller changes in this release:
- A new 'log' window (besides the output and error windows at the bottom of the editor) records various information that persist during a session. This is primarily meant to help educators understand the steps students took in case of a problem. For instance, it records which interpreter has actually been used to run the script.
- The classic menu has been (temporarily) removed. There will not be such a menu in the main window, anymore. On systems such as Mac OS X, we will keep the systems menu, of course. And we will offer an option in the preferences for displaying the menu. However, the entire interface is geared towards working entirely without the main menu.
- The name of a document can now be easily changed through something like a navigator bar at the top of the editor window. This is accompanied by a 'download' button.