Except for Smalltalkers, dynamic language programmers are used to their tools and IDEs being written in lower level languages. Writing developer tools for a language in the language has big advantages, particularly for users (ie. developers). In the case of editors and IDEs, it means developers can extend their tools without having to deal with another language and platform. Java developers today can choose from a list of Java-based IDEs, all extenѕible by writing a bit of Java code. That's not quite the case for Javascript or Ruby.

Two new IDEs try to change that: Cloud9 IDE written for/in Javascript and RedCar written for/in JRuby.

Cloud9 - Javascript

Serious editors and IDEs written using Javascript and HTML were hard to imagine half a decade ago. Then Javascript VMs became much faster and HTML components gained functionality that made sophisticated editors possible. Skywriter (formerly known as Bespin), Mozilla's programmer's editor, uses the Canvas element and API to draw it's editor component.

At startup (in the browser), Cloud9 visually resembles Eclipse visually a bit, and it also uses the idea of building the whole IDE out of plugins. All functionality is contributed via plugins, including the editors, views, behaviors, etc. One advantage Javascript can be seen in the plugin metadata descriptors, which are written in JSON, which is easily handled (and manipulated) in Javascript - less hassle for plugin developers.

When it comes to functionality, it's early days for Cloud9 at the moment - at least compared to mature IDEs. There are some convenient features in the IDE already, though. The Javascript debugging support has a GUI and connectors for debugging with Node.js and Chrome runtimes. It's possible to write a Javascript project in Cloud9, start it in Node.js in debug mode and use the GUI to suspend, resume the execution or set breakpoints. The feature uses the debuggers built into the Javascript VMs.

Cloud9 uses ACE as the editor component. Where Skywriter draws the editor contents using Canvas, ACE uses the DOM. The editor content pane is a DIV element; the ACE determines which lines in the editor's backing store are visible on the screen, renders each as DIV elements and adds them do the editor's DIV. ACE uses multiple layered DIVs to render different elements of the editor, in particular selection highlights and the cursor.
Turns out today's HTML renderers and DOMs are fast enough to make this possible and let ACE run fast enough to feel like a native editor component.

An HTML5 API useful for editor components is the Web Worker API, which allows Javascript code to fire up new Javascript processes; not threads but instead shared-nothing processes, that communicate sending messages that can contain JSON data. In a programmer's editor it's crucial to run tasks in the background; a lot of work has to be done for every keystroke or every operation. Syntax highlighting using regexes is one thing, but modern editors need to parse the source code to do semantic highlighting, ie. color local variables differently from global ones, static methods differently from virtual methods, etc. Other tasks are code-aware folding, etc.
Running all these tasks on the foreground thread (GUI thread, event dispatching thread) can work by using the setTimeout function in clever ways. Web Workers avoid hacks of this kind, and can be used to run extra tasks in the background, potentially making use of multiple cores.

While it's name might suggest otherwise, Cloud9's default installation runs locally and can access the local filesystem. For that, it uses a backend written in Javascript on Node.js with which it communicates via a socket. Contents of files are provided by Node.js via WebDAV, which uses the jsdav library.

RedCar - JRuby

RedCar is an extensible editor, with IDE ambitions, written in Ruby, JRuby to be precise. RedCar uses SWT as its GUI framework which available across many platforms.

A built-in REPL makes it possible to explore and experiment with the API, and the existing plugins make it easy to get started with extending the system. Actually, RedCar can be extended with HTML/Javascript as well. Views can contain a SWT web component, which allows to build GUIs or displays using HTML/Javascript/CSS, instead of having to use the SWT component or drawing APIs.

TextMate users will be happy to hear that RedCar has support for TextMate bundles, making the transition easier.

Wow that's a long list; thanks fo that. Question, though: how many of the editors/IDEs that are written _in_ Python (not just extensible with Python) are actually w usable and still actively maintained? Which editor/IDE (written in Python) do _you_ use on a daily basis?

The Python IDEs I know are Java based (PyDev in Aptana, PyCharm by IDEA, the Netbeans Python support), .NET based (VS support for IronPython; haven't checked if that is actually written in Python), Komodo (C++ or whatever they use) etc. And No -that's not a rhetorical question.

Seco at kobrix.com/seco.jsp. Many useful features, including Mathematica-like notebooks, and the ability to extend the UI with your favorite JVM language. Videos at kobrix.com/secovideos.jsp. A beta version of the same IDE as an Eclipse plugin is also available.

> Question, though: how many of the editors/IDEs that are written _in_ Python (not just extensible with Python) are actually w usable and still actively maintained?

Stani's Python Editor (SPE) is written entirely in Python and is quite feature-complete (close to PyDev) and usable. RedCar on the other hand, seems to be too early in development (both feature-wise and because it failed to show any file contents and crashed when I closed a tab) to note as a shift. Aside from HTML extensions and a code browser, it seems closer (when it eventually works, that is) to IDLE (distributed with Python, written in Python) which Python had as a basic option since 2002. SPE is from 2002 as well, but evolved better than IDLE over the years.

> Which editor/IDE (written in Python) do _you_ use on a daily basis?

Although I am generally finicky about having feature-complete IDEs, I use SciTE, a general purpose text editor for Python for day-to-day needs (short scripts). If I think my project is going to be big enough to warrant an IDE, PyDev is my first choice even if SPE gives all the features since I am comfy with Eclipse shortcuts from my other use of it. I like Netbeans Python editor as well but I am less familiar with its shortcuts. I wanted to like Komodo (it's based on Mozilla code for the platform bits) since it came out, but it never met my expectations.

WingIDE is an old and mature commercial IDE written in Python that had good code-completion, early on. But it looks out of place (At least, used to. Haven't tried it recently) outside Linux (GTK) and is less relevant now, given the excellent free alternatives.

Personally, I think not re-using the extensive and freely-available IDE infrastructure from Eclipse/Netbeans is just a mistake for most part these days, unless when trying something truly innovative and starting with plenty of resources.

I agree, platforms like Eclipse simply have a massive head start that makes it hard for anyone to compete, not just in big features but also in polish and stability. Using newer editors or IDEs can be a bit jarring when you hit all those corners and rough edges that simply haven't been in Eclipse-based editors for half a decade. Also: the Eclipse ecosystem is massive and a lot of software and logic is available in the shape of bundles; a few years ago I published:eclipse-shell.sourceforge.net/to make it easier to access just that functionality and extend Eclipse. Other projects like EclipseMonkey which tried to bring scripting and easy extensibility never really took of (except, I think, Aptana's been using it for a while and seems to be doing more with the Aptana 3 release).

Having said all that, Skywriter and Cloud9 IDE are interesting simply because they're usable editors written in HTML/Javascript. That alone is quite impressive; seriously, who would have thought that to be possible only five years go. Also: having a serious editor component, which can be extended with the usual programmer editor/IDE features (syntax/semantic highlighting,...) is useful simply for teams to want to embed such a thing in a site.

As for RedCar: it might just be an alternative for TextMate users; I never quite understood the appeal of TextMate, not to mention that everyone in the community seems to be holding their breath waiting for they mythical 2.0 release which supposedly is out any day now. RedCar ain't quite there yet but it has momentum, an active community, etc so it might just be interesting down the road.

Borislav, thanks for the tip. I'll have to give this a whirl, definitely looks interesting. Reminds me of my own:eclipse-shell.sourceforge.net/ except I didn't have the guts to try and get something like the Smalltalk image concept to work like you do here.

Is your profile up-to-date? Please take a moment to review and update.

Email Address

Note: If updating/changing your email, a validation request will be sent

Company name:

Keep current company name

Update Company name to:

Company role:

Keep current company role

Update company role to:

Company size:

Keep current company Size

Update company size to:

Country/Zone:

Keep current country/zone

Update country/zone to:

State/Province/Region:

Keep current state/province/region

Update state/province/region to:

Subscribe to our newsletter?

Subscribe to our architect newsletter?

Subscribe to our industry email notices?

You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.