

Introducing Mozilla Bespin, a Canvas-based IDE - mqt
http://labs.mozilla.com/2009/02/introducing-bespin/

======
natrius
This is all sorts of awesome.

My current editor of choice is vi(m) because it is available everywhere,
doesn't clutter the interface with things I never use, supports (at least
syntax highlighting for) every language I care about, and has powerful
keyboard shortcuts. If I weren't so anti-chording, emacs would be just as
good.

New editors these days tend to focus mainly on one language, like Eclipse with
Java, so the interface gets bloated with things that are only useful for that
language. I've tried PyDev in Eclipse and it just feels foreign. Sure, I could
customize Eclipse if I felt like it, but I'd have to learn plenty of SWT and
the Eclipse codebase itself to do so. I already know HTML, CSS and JavaScript,
so customizing Bespin should be far more trivial.

If I were running Bespin on a machine I control, it could theoretically access
any machine I can ssh into (though the security implications of this merit
further thought). If enough people use it, it will have decent support for
every language I care about and powerful keyboard shortcuts (hopefully
borrowed from vi wholesale). Since it's built with HTML, CSS and JavaScript, I
can easily customize it to work how I want it to, adding in the language
support and keyboard shortcuts myself if need be.

I'll probably be hacking on this when I wake up.

~~~
kqr2
You can try vi in javascript:

<http://gpl.internetconnection.net/vi/>

------
bd
Very impressive. Though I suggest you try it with Firefox 3.1 Beta 2 or Webkit
Nightly (Firefox 3 works, but it's slow for large files).

I tried to create browser-based high-performance text manipulation application
myself, but I never imagined to use Canvas.

For performance I used "contentEditable" DOM attribute [1] to piggyback on
browser's native code. According to my unscientific subjective tests it's
faster than Bespin's approach - a bit faster on FF3.1B2, a lot faster on FF3.
Plus it works also on Explorer and Chrome (a kind of, it's buggy and freezes
on large files).

Anyway, finally I had to switch to desktop application as the other parts of
JavaScript/DOM/browser were not fast enough and also working with local files
from JavaScript was very painful.

Still, after creating basically the same application twice, once in a browser
and once as a desktop app, I can vouch for the bright future of fully browser
based applications, once the performance would get there.

Going back from HTML+CSS+JavaScript to fiddling with widgets felt like going
back from Python to C++ (and mind you, I fiddled with widgets in Python). You
get the speed, but you pay the price elsewhere (my code more than doubled and
user interface got a lot uglier).

Good luck to Mozilla/Opera/WebKit/Chrome folks, browsers as a platform are
becoming awesome.

[1] [http://www.whatwg.org/specs/web-
apps/2007-10-26/multipage/se...](http://www.whatwg.org/specs/web-
apps/2007-10-26/multipage/section-contenteditable.html)

------
wmf
It's impressive that they can do this in a browser, but some parts of the
video were pretty funny. We can keep up with the user's typing! We can clone
the Finder! We can measure and ellipsize text! We have layout managers!
Welcome to 1995, Web 2.0.

~~~
daleharvey
heh eclipse and netbeans cant keep up with my typing most of the time, and
even emacs has problems with undo / redo in large files

~~~
elviejo
really? I'm willing to bet that any file that would be "big" for emacs, would
_melt_ eclipse, word or any other text editor, except maybe for vim.

~~~
JulianMorrison
Actually, editing very large (hundred-megabyte) text files is hard. (Example
of real world use: mysqldump files.)

Emacs thrashes. Vim thrashes. Eclipse? I laugh. However, the text-mode editor
"joe" loads the file quickly and doesn't thrash.

~~~
bd
That's why I love SciTE. I just tried it with 126 MB text file and it didn't
break a sweat.

<http://www.scintilla.org/SciTE.html>

Bonus: you can use it in your own wxPython application. Some brave soul
wrapped it and made available as wxStyledTextCtrl widget.

<http://www.yellowbrain.com/stc/index.html>

BTW that's what I finished using for my app I mentioned in my other comment in
this thread.

------
Dobbs
Its kinda cool but I have a few problems (not that I don't want them to
continue with the project).

I personally have problems with this entire everything in the cloud. I like
having things under my own control. I like having my own editor be local. I do
use ssh so I can edit from other's computers. I also sync my various computers
so that I can edit from any of them. I guess part of it is a nostalgic
feeling. I just believe somethings are better left local.

My other issue which is just an extension of the first is how they talk about
writing a sort function. Yes its cool you can write a sort function but they
are reinventing the wheel as he admits. 'Normally I would just use a unix
command.' (paraphrase). No longer will all of your computing actions tie
together. Learning to do something in Bespin doesn't carry over to other
actions on the web. Particularly if its with another company. In unix learning
to use vim allows you to not only write code but edit email. Learning wc lets
you use it with code, with email, with anything you write.

~~~
jgfoot
Bespin says it lets you self-host, which considerably alleviates "fuck the
cloud" concerns. (See <http://ascii.textfiles.com/archives/1717> )

------
voodootikigod
All of this JavaScript would be great to discuss at
<http://www.jsconf2009.com> Mozilla Labs is releasing some amazing things
these days with Ubiquity and Bespin. There is also a lot of there big
JavaScript things going on in mobile (PhoneGap), server (ServerJS Group), and
Desktop (Appcelerator). Come to JSConf and learn about all of them!

------
andreyf
This is precisely what I applied to YC with a year and a half ago. It's really
great to see that people are working on it!

~~~
scotth
How did you intend to monetize this idea?

~~~
andreyf
From the application:

 _We will sell plans that offer version control hosting, testing environments,
and easy web hosting tied into the IDE._

Similar to what github is doing, now that I think of it, but with more
integration into the online IDE.

~~~
whacked_new
Seems like a language-agnostic heroku. Hmm, gotta wonder which would have been
the most appealing.

------
laktek
I think this is a great move..this should be integrated with VCS and CI system
to have a fully blown rapid on the move development platform

------
limmeau
This looks like it would make a nice front-end for CouchDB shareable apps.
<http://jchris.mfdz.com/posts/129>

------
trickjarrett
Overall it is a very exciting beginning. Right now there's nothing in it which
would convince me to switch. I have a laptop with my web development tools in
it, so I can work wherever I am already.

However as the tool progresses and they add features, the web enables further
work and functionality, such as a snippet library or other fun tools, this
could be a major tool for developers and open source.

~~~
durin42
It's already cool to me as a potential non-worthless editor in a CMS for quick
fixes (sometimes I have to write complex JS that lives in a CMS, and I
inevitably end up with a copy-paste-save-refresh cycle that gets tedious once
I need emacs).

------
psadauskas
I was just wondering the other night what it would take to come up with a
js/canvas-based windowing toolkit. This looks pretty sweet.

------
snitko
Firefox 3 on Ubuntu: really slow and with a bug - can't scroll down when
reached a particular line, scrolling seems to be broken.

------
capablanca
Is Steve Yegge participating on this?

~~~
jeresig
No. This is by a team in Mozilla Labs - including Ben and Dion (founders of
Ajaxian.com), Kevin Dangoor (creator of TurboGears), and Joe Walker (creator
of DWR).

------
jwilliams
Click on "Edit Now" on <https://bespin.mozilla.com/> and it does nothing
(presume the "coming soon" is meant to mean this button is disabled?).

~~~
brunoqc
if you register you can try it.

------
ph0rque
A bit off topic, but what I'd really like is a "rich"-text editor, like
TinyMCE that has language syntax features, that can be incorporated into web
apps.

------
capablanca
Canvas:Text is only available on Firefox 3.1, AFAIK.

~~~
fdb
It works in the latest WebKit nightly as well:

<http://nightly.webkit.org/>

------
yeahit
Where is the Demo?

~~~
Raphael
<http://bespin.mozilla.com/>

Register and go to the dashboard.

------
d13hard
i prefer something like itsAllText, which lets me fire up my own local editor
for any textarea (using it now with emacsclient). employing a local editing
tool lets me keep all my keyboard shortcuts, which is why i use one editor
instead of another.

what i would really like to see is direct embedding of your choice of local
editor directly into the textarea. there's no way to satisfy everyone with one
editor.

but still, bespin is very cool and an improvement over plain old textareas

~~~
wmf
_what i would really like to see is direct embedding of your choice of local
editor directly into the textarea._

Back in the day I was hoping that OpenDoc would provide this, but it was not
to be. I wouldn't be surprised if we see some vi and emacs clones evolve out
of Bespin and then some Greasemonkey scripting could use them to replace
textareas.

~~~
tlrobinson
vi clone in JavaScript: <http://gpl.internetconnection.net/vi/>

It could probably be bookmarkletized (or UserScriptified) fairly easily.

------
eli_s
The text editor is impressive in its own right, but what really gets me
excited is the possibility of window toolkits to start popping up. Nice
responsive UI deployed though the browser - I can picture the future
possibilities already :)

~~~
boucher
Definitely exciting, though it will be interesting to see whether or not going
entirely canvas pays off. We've thought about it and thus far rejected it in
our framework.

