Introducing Notebook

2011.01.12 in code

Since mid-November, I've been using my free time to work on a little application currently called Notebook. It's a REPL of sorts, but implemented in Cocoa, and heavily inspired by Mathematica (since Mathematica also calls its evaluation environment a 'notebook', I'm open to suggestions for a new name, and probably won't be shipping it with the current one).

I pushed up a content-free website last night... it'll get filled in eventually. The code is on Github.

Notebook has a pluggable language system; for right now, I'm primarily maintaining a Python backend, though there is a working Ruby backend in the repository as well. Matt has talked about implementing a Haskell backend, which I think would be awesome, but hasn't gotten around to it yet.

The basic idea of Notebook is simple: you have a bunch of cells, all operating with the same global state, but you can evaluate them in whatever order you want, however many times. You can define a function in one, use it in another, assign a global variable in one, access it in another, etc.; you can go back and edit the definition of your function inline, exactly where you initially typed it.

When you evaluate a cell, its output is captured and attached directly to its bottom; when you re-evaluate a cell, the old output is replaced:

That's basically all there is to it, right now... I just wanted to get it out there. There are a huge number of features planned, and a huge number of known bugs, and many months of work to do before it's 1.0 — if anybody wants to help, feel free!

It is currently 100% not ready for anyone to use it; while it works, many basic features haven't even been considered yet, as it's been all about getting the backends working properly (which was a Distributed Objects learning experience, believe you me!). However, I hope that someday it can be the place that I point people who want to learn Python — the instant, inline feedback that it provides could be extremely useful (it was for me, with Mathematica, anyway!).

blog comments powered by Disqus