Hacker News new | past | comments | ask | show | jobs | submit login
Introducing Mozilla Bespin, a Canvas-based IDE (labs.mozilla.com)
136 points by mqt on Feb 13, 2009 | hide | past | favorite | 43 comments



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.


You can try vi in javascript:

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


As far as your chording concerns, the Ubiquity-inspired linguistic CLI approach has a shot at having all the transparency of emacs commands, without all that wrist damage. I do hope they integrate it with Ubiquity as a whole, though.


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...


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.


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


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.


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.


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.


EmEditor ( http://www.emeditor.com/ ) handles large files very nicely. It has a special 'large file controller' that lets you configure in real-time how to access a file. I've edited 4GB text files (global search & replace) and the only slow step is the final 'save' function.


TextPad handles gigantic files beautifully.


ed is one I assumed would be good. I downloaded a windows distribution of it last year for a problem involving massive files. Turns out that particular version of ed is not designed as efficiently as you might expect.


Meybe they were running it in a MacPro...


Well, in fairness, things haven't changed much since 1995.


It has scroll bars! :)


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.


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


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!


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!


How did you intend to monetize this idea?


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.


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


Sell access to it I would expect, or offer a classic Freemium model with features free and higher level features for cost. Just a guess though.


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


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


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.


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).


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.


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


Is Steve Yegge participating on this?


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).


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?).


if you register you can try it.


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.


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


It works in the latest WebKit nightly as well:

http://nightly.webkit.org/


Where is the Demo?


http://bespin.mozilla.com/

Register and go to the dashboard.


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


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.


vi clone in JavaScript: http://gpl.internetconnection.net/vi/

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


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 :)


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: