Wednesday, March 11th, 2009

Bespin Talk at Mozilla Labs Meetup

Category: Bespin, Canvas, Comet, Presentation

>

I went along last night to the London Mozilla Labs meetup, where Dion, Ben, and Joe delivered a presentation on Bespin. These are my notes from the event.

Goals

Bespin – initially an experiment, now interested to see how far it can go as a coding environment (among other things).

“The editor of our dreams”:

  • Accessible from anywhere
  • Simple to use, like Textmate – for people who don’t want to muck around with low-level details, too much time in version control
  • Wicked fast – many editors look okay initially but don’t scale well with large files and fast editing
  • Rock-solid real-time collaboration – like SubEthaEdit – watch people in our time, e.g. follow someone like Brendan Eich as he codes (given that it’s already open source). One of the meta-goals here is to lower the barriers for open-source development.
  • Integrated command-line, like Vi
  • “Self-hosted” environment – like Emacs. As a programmer, can get into its guts. And can do this kind of thing in real-time – modify the model as it runs (c.f. Eclipse – must re-compile)

Demo

Dion demos interacting with the Bespin editor. (Always good to see how the creators eat their own dogfood.) Ben points out it’s fast, thanks to Canvas. Some demos of the command-line, its extensibility, and collaboration features.

Collaboration

Moz hired Joe Walker of Comet/DWR fame a month ago. Joe explains collaboration goals.

Typical scenario – two coders working simultaneously, perhaps chatting over skype.

From Neil Fraser (worked on Google Docs stuff around this) – designed as a “little version control system” – sends out diffs and patches it (see Mobwrite. Bizzarely, the bottleneck is not the network or the patch, but the diff. And exarcebated by the fact that typing faster – doing more work – necessitates more diffing.

Joe shows debug messages in Firebug console – showing diff info going to and from the server

Extra Features

Code nav – heatmap showing all of code and what’s been edited. recently. Example of a mashup component you can build.

e.g. IBM coder turned it into a Java compiler – by compiling the Java on the server. Used Bespin’s server API. Likewise, the editor is also a distinct component – can use the editor for other (non-IDE) application – e.g. a wiki project using Bespin’s editor to edit the wiki. Likewise, the command line is separate. And there’s the underlying core, Thunderhead.

Ben further emphasises it’s not just a rich client-side editor – server-side code analysis with the RESTful API.

Upcoming Features

Big things:

  • Collaboration
  • VCS integration – integrate with Mercurial, etc etc
  • Ubiquity Integration
  • Server Side Javascript – can have different server implementations, could be Ruby etc, and want to implement one in JS

Smaller:

  • Some nice commands
  • Plan “follow me!”
  • Syntax highlighting
  • Design concepts
  • Templates (“create project Rails”)
  • Editor functionality
  • … many more – need people to help with it (engaging with the community and supporting contributions in an open-sourcey way is a big theme in this talk)

Fin

They leave us with a clip of Dave Thomas @ RubyConf asking if it’s weird to love your software tools, and answering that you have to love your tools. Fair play!

Questions and Answers

Q. Distributed Version Control – will bespin support it? Bespin designed for two basic use cases (a) standard thing – check in to repo etc (b) bespin.mozilla.com – SAAS type model.

Q. What data structure is being used for patch sets? Because a decent structure would make VCS possible. Mobwrite – Neil Fraser’s project behind Google Docs – so using that format, but we might expect it to change in the future.

Q. (me) Eating your own dogfood Dogfooding by end of month, when VCS lands or using Appcelerator Titanium to run off local file system.

Q. (about integration with Ubiqutiy I think?) Ubiquity as the runtime and Bespin for authoring. Initially, separate to Ubiquity and then normalised commands with Ubiquity. Now just starting to share components like parser. Next phase, access to virtually all of Ubiquity and will work even without Moz browsers. And the other way round – running Ubiquity commands inside Bespin.

Q. With the collaboration engine, can you do more than code creation, e.g. drawing or spreadsheets? Using Mobwrite, the engine behind Google Docs’ collaboration – Mobwrite’s restricted to text – as long as there are changes to some structure (ie it can be serialised), it’s possible.

Q. Codes and tests in the cloud – should be great for continuous integration There are various people already implementing the Bespin server API for other things too. With the code out in the cloud, very possible to do all sorts of things with the code. John Resig (also Moz) is also interested in this area – also wrt manual tests that are downloaded to various people’s browsers and run locally. Maybe could even be automated using the aggregate crowd while the browser isn’t doing anything else. Another project is Test Pilot (usability testing).

(On a related note, I mentioned later on it would be interesting to couple the code with real-time user data, e.g. a heatmap overlay on the code showing how much resources each segment used during real-world use.)

Q. Hyperlinking in code? Could you create ~implicit links, e.g. to other parts of the code? Don’t have hyperlinks because it’s canvas! But will be able to implement these things – would be done as a syntax highlighter extension.

Q. Firstly, the name? Secondly, the offline capability – can I just run it directly off the local file system. With Appcelerator Titanium, would feel like a real desktop app while offline, but can still access the cloud when connected. (No-one answered the name question ;)

Q. Mashups in the browser – loads of scope for in-editor mashups, will it be part of the editor framework Right now, editor has an event bus – events like “he’s opened the file, he’s hit a key”, so can set up events for this kind of thing. It’s all based on an asynchronous model, so very possible.

Q. Will there be user testing – to see what people really want? There’s a huge list in Bugzilla for these kinds of things. This is a tech preview, missing a ton of functionality. Already improved, but a lot more to do.

Q. Vim or Emacs macros – which will be first? Have implemented Elisp and Javascript, so it’s only a matter of time. (cunningly avoided expressing a preference :)

Q. Functional reactive programming (FRP) – Flapjax demonstrates the idea in JS – for pubsub. Would it be possible to extend the current pubsub framework into a FRP framework – avoids bugs around order . Would be good to see something like that.

Q. Are you “re-inventing the web” with this stuff, i.e. finding that canvas doesn’t support it? Yes, do have to reinvent a lot of things – people coming together to discuss these things – ARIA etc. Very focused on accessibility. Two ways to do it – (a) hacks like the cut-and-paste to mirror what’s happening; (b) longer-term – drive the browsers forward.

Aside – Bespin currently leaks memory. Browsers are now runtimes, so want to build a tool for memory tracking. (a) Log each garbage collection. (b) Graphical view of the heap. After that, tool after that is meta – a directory of all the tools out there.

Q. On a much smaller scale, could it be used as a textarea? Yes, Firefox engineers were keen to look at that.

Q. How much implemented in Javascript? Very much the trend in Moz. cf. Aza Raskin’s recent post on doing an extension in Javascript (*cough* Chrome *cough*). All the XUL stuff was necessary at the time. Javascript’s not the bottleneck anymore.

Q. The name? (as was previously asked) So with that, let’s wrap up.

My colleague Fred has also posted his impressions.

Related Content:

Posted by Michael Mahemoff at 6:34 am
2 Comments

++++-
4 rating from 23 votes

2 Comments »

Comments feed TrackBack URI

now I see what you were writing behind me, I though it was a Quake 3 Arena Team Player Match while it was this amazing post!

Comment by WebReflection — March 11, 2009

Do people really not get the name? Lando Calrissian? “Cloud” computing?

Comment by fil — March 11, 2009

Leave a comment

You must be logged in to post a comment.