Dev Diary (July 2017)
Corey Montella - 14 Aug 2017
We’ve had quite a busy July! Let’s get to it:
v0.4 Release Timeline
When it became clear that despite our move to an incremental evaluation strategy, v0.3 wouldn’t be fast enough to run the database explorer, we started work on the Rust runtime in hopes that a lower-level host language would offer greater speed improvements. That bet paid off (as demonstrated by our bouncing ball program). Since the Rust runtime is here to stay, we will skip releasing v0.3 officially, and release v0.4 by the end of the summer. Right now the core runtime is feature complete, and we are working hard at making the product easy to use by fixing bugs and adding helpful tooling.
In July we started using v0.4 to build internal projects, in order to find bugs in the runtime and test the limits of its performance. If you’ve hit performance walls with the v0.3 runtime, you’ll be happy to know the Rust runtime is several orders of magnitude faster. Beyond the runtime itself, we’ve started fleshing out the tooling:
Server - The sever works like it did in v0.2, hosting an Eve instance listening on a websocket. We also include a static file server that hosts the output of your program.
Browser Client - The browser client connects to a remote Eve server to which it streams records like key presses and receives HTML records that are rendered on the screen. All the functionality from previous versions is still present – no matter where Eve is running, the watcher system lets it interact with your browser (or anything else running JS or Rust) as if it were local.
Persistance - This is one of the features that has been missing since v0.2 and frequently requested. Persistence is implemented by writing to an append-only binary file at a user specified location. Right now this is a flag passed to the Eve executable, but this could be controlled from within Eve itself. Transactions are written to this log as they are executed in the runtime, and only those needed to reconstruct the state are persisted. We have no guarantees on durability/consistency yet, but that work will come when we start to tackle Eve in a distributed context.
Library - The entire standard library will be re-implemented in Rust for a number of reasons:
- JS functions require a browser context, and therefore cannot be run in the terminal.
This is largely a matter of wrapping native Rust functions for use in Eve, but we want to hold off on that until we implement a custom number system we have planned (more on that in a future post). We’ve added old watchers like
compiler; as well as new watchers like
json. These newest additions allow you to parse JSON files into records, or send HTTP requests to API endpoints and parse the response.
Errors - We are reporting errors in the console, including line numbers and a helpful hint. We will also make these errors available through a request to the server, allowing 3rd party developer/editor extensions to integrate error reporting. That said, this work was mostly a matter of plumbing; providing good error messages is an ongoing process.
More testing - Rust has really nice testing facilities that make writing and running unit tests very easy. We’ve written a bunch of those that broadly cover the core functionality of the language. Testing in this context also means we just have to write a bunch of Eve applications to probe the runtime for weak spots.
Packaging and Distribution - To reach a wider audience, packaging and distribution will be a primary focus for this release. Packaging the Eve server is mostly handled for us by Rust, as it emits executables for all major platforms. The server can even host a native Eve editor. We’ve also experimented with embedding the Eve server in an Electron app. This solution allows us to present Eve as more of a native application, separate from the browser.
Editor Modes - When we released v0.2, we included a built in editor that showcased many of Eve’s features like the inspector and literate programming. However, we recognize that many people enjoy their own editor, so we will be writing various editor modes that support Eve. So far we have Eve modes for Emacs, Visual Studio Code, and CodeMirror. Right now these only provide syntax highlighting, but we intend to make the various services that power the v0.2 editor editor open for integration into mainstream editors as well.
Eve Around the Web
One member of our community, Vincenzo Ferrari wrote a great article about Eve for the website ibuildings.it. It’s a great summary of the language, and we’re very happy to see Eve reaching a wider international audience. Here’s a quick link to an English translation.
Eve Around the World
San Francisco, Tuesday July 25
We were very happy to see some new faces at our meetup in July! Thanks to everyone who stopped by, we always appreciate getting to talk about the bleeding edge of programming languages with people who are as interested in these topics as we are.