{"id":5082,"date":"2010-06-29T04:44:03","date_gmt":"2010-06-29T11:44:03","guid":{"rendered":"http:\/\/4.99"},"modified":"2010-06-29T04:44:03","modified_gmt":"2010-06-29T11:44:03","slug":"bespin-0-9a1-released-multiple-bespins-code-completion","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/labs\/2010\/06\/bespin-0-9a1-released-multiple-bespins-code-completion\/","title":{"rendered":"Bespin 0.9a1 released: multiple Bespins, code completion"},"content":{"rendered":"<p><em>Bespin 0.9a1 features multiple Bespin instances, the start of code completion, simpler packaging and a curious new version number.<\/em><\/p>\n<h2><!--more-->Multiple Bespins<\/h2>\n<p>Ever since we released the first Bespin Embedded, we&#8217;ve had requests on and off for the ability to have multiple Bespin editors on the page. When you factor in complexities around the plugin system, allowing multiple Bespins on a page is non-trivial. But, now multiple editors on the page works fine:<\/p>\n<div id=\"attachment_100\" style=\"width: 464px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mozillalabs.com\/bespin\/files\/2010\/06\/Multiple-Bespins.png\"><img aria-describedby=\"caption-attachment-100\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-100\" src=\"http:\/\/mozillalabs.com\/bespin\/files\/2010\/06\/Multiple-Bespins.png\" alt=\"\" width=\"454\" height=\"664\" \/><\/a><p id=\"caption-attachment-100\" class=\"wp-caption-text\">Multiple Bespins with command lines in white<\/p><\/div>\n<p>The screenshot above shows off multiple Bespins with two of the new features from Bespin 0.8 (the white theme and the ability to include the command line). A couple of interesting implementation notes: Bespin uses Charles Jolley&#8217;s <a href=\"http:\/\/github.com\/sproutit\/tiki\">Tiki<\/a> CommonJS module loader, which supports separate &#8220;sandboxes&#8221; of modules. The modules are downloaded from the server once, but each Bespin instance gets its own sandbox. That way, modules that store data in module-global variables will not get confused about which Bespin they&#8217;re working with. Settings and themes are shared between Bespin instances.<\/p>\n<h2>Code Completion<\/h2>\n<p>The other big new feature is one that is available today, but will become easier and smoother to use over time. Bespin can now do code completion, take a look at this screenshot for an example:<\/p>\n<div id=\"attachment_102\" style=\"width: 240px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mozillalabs.com\/bespin\/files\/2010\/06\/Code-Completion-in-Bespin.png\"><img aria-describedby=\"caption-attachment-102\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-102\" src=\"http:\/\/mozillalabs.com\/bespin\/files\/2010\/06\/Code-Completion-in-Bespin.png\" alt=\"\" width=\"230\" height=\"187\" \/><\/a><p id=\"caption-attachment-102\" class=\"wp-caption-text\">Code Completion Example<\/p><\/div>\n<p>As soon as you hit &#8220;.&#8221;, Bespin will try to figure out what is available on the object you&#8217;re accessing. That information is gathered up beforehand in the well-known <a href=\"http:\/\/ctags.sourceforge.net\/\">ctags<\/a> format. We&#8217;re using the <a href=\"http:\/\/pcwalton.blogspot.com\/2010\/05\/introducing-jsctags.html\">jsctags<\/a> project (from Bespin team member Patrick Walton) to generate the tags. Using jsctags, we&#8217;ll eventually be generating the tags right in your browser (that&#8217;s the &#8220;easier and smoother&#8221; part that&#8217;s coming in the future).<\/p>\n<h2>Simplification<\/h2>\n<p>Bespin 0.9a1 simplifies two things over 0.8. First, there is now just one downloadable &#8220;Bespin Embedded&#8221; package that combines the features of both the &#8220;Drop In&#8221; and &#8220;Customizable&#8221; packages that we offered in previous releases. You can download this one package and deploy the contents of the &#8220;prebuilt&#8221; directory to your server, and you&#8217;re all ready to go! If you need to go beyond that, you can make sure you have Python installed and customize away.<\/p>\n<p>The second thing we&#8217;ve simplified was the signature of &#8220;command&#8221; functions. A &#8220;command&#8221; in Bespin is basically any action you take in the editor or the command line. In versions prior to 0.9, commands took an &#8220;env&#8221; argument as the first parameter. With 0.9 onward, you should no longer include that parameter and instead just grab the &#8220;env&#8221; variable from the &#8220;environment&#8221; module.\u00a0 There are more details of this change in the <a href=\"https:\/\/bespin.mozillalabs.com\/docs\/releases\/notes09.html\">Bespin 0.9 Release Notes<\/a>. A new tutorial on making commands is coming today or tomorrow.<\/p>\n<h2>Version Numbering<\/h2>\n<p>To date, every release of Bespin has been an alpha release. With 0.9 (codenamed &#8220;Edison&#8221;), we&#8217;re switching to the kind of release cycles used by stable and mature projects. We&#8217;ll start with a series of alpha releases that are not yet feature complete. Then we&#8217;ll move to beta test releases to work out any kinks before having a final release. 0.9a1 is no more or less &#8220;alpha&#8221; than 0.8 was, but the version number reflects that we&#8217;re heading toward a stable state.<\/p>\n<h2>Download Bespin Now<\/h2>\n<p><a href=\"http:\/\/ftp.mozilla.org\/pub\/mozilla.org\/labs\/bespin\/Embedded\/BespinEmbedded-0.9a1.tar.gz\">Download Bespin Embedded 0.9a1<\/a>. Take a look at the full <a href=\"https:\/\/bespin.mozillalabs.com\/docs\/releases\/notes09.html\">0.9 Release Notes<\/a> for more information about what&#8217;s new.<\/p>\n<p>Stay tuned for more interesting developments in Bespin this week.<\/p>\n<p>\u2013 <em>Kevin Dangoor, on behalf of the Bespin team<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bespin 0.9a1 features multiple Bespin instances, the start of code completion, simpler packaging and a curious new version number.<\/p>\n","protected":false},"author":456,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[538],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/posts\/5082"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/users\/456"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/comments?post=5082"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/posts\/5082\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/media?parent=5082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/categories?post=5082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/labs\/wp-json\/wp\/v2\/tags?post=5082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}