Blog of Stéphane Épardaud

Ceylon webinar Monday 5th of November

Emmanuel and I will be presenting An introduction to Ceylon on Monday, 5th of November online as a webinar. That's this coming Monday, at 18:00 CET or 12:00 noon in NY. Come and join us!

Find out all the info online and don't forget to register.

Ceylon M4 and Ceylon IDE M4 released!

Ceylon M4 "Analytical Engine" is now available for download, along with a simultaneous compatible release of Ceylon IDE. The compiler now implements almost all of the language specification, for both Java and JavaScript virtual machines as execution environments. New Ceylon platform modules are available in Ceylon Herd, the community module repository.

You can download the Ceylon command line distribution here:

http://ceylon-lang.org/download

Or you can install Ceylon IDE from Eclipse Marketplace or from our Eclipse update site.

Ceylon M4 and Ceylon IDE M4 require Java 7.

The Ceylon team hopes to release Ceylon 1.0 beta in January.

Language features

M4 is an almost-complete implementation of the Ceylon language, including the following new features compared to M3:

The following language features are not yet supported in M4:

  • reified generics
  • user-defined annotations, interceptors, and the type safe metamodel
  • serialization

This page provides a quick introduction to the language. The draft language specification is the complete definition.

Ceylon IDE

Ceylon IDE is a complete development environment for Ceylon, based on the Eclipse platform. This release of Ceylon IDE introduces:

  • support for JavaScript compilation and execution,
  • module import completion,
  • the brand new Ceylon Repository Explorer view,
  • support for Maven repositories, and
  • more than 30 other improvements and bug fixes.

Ceylon IDE M4 requires Java 7. Users of Ceylon IDE on Mac OS should install Eclipse Juno. Users on other platforms may run Ceylon IDE in either Eclipse Indigo or Eclipse Juno on Java 7. Ceylon IDE will not work if Eclipse is run on Java 6.

Compilation and execution on the JVM and JavaScript VMs

The Ceylon command-line tools and IDE both support compilation to either or both of the JVM or JavaScript.

Ceylon programs compiled to JavaScript execute on standard JavaScript virtual machines. The Ceylon command line distribution and IDE include a launcher for running Ceylon programs on Node.js.

Interoperation with Java

Interoperation with Java code is robust and well-tested. As usual, this release fixes several bugs that affected Java interoperation in the previous release.

Contrary to previous releases, the JDK is no longer automatically imported, so you need to import the JDK using the modularised JDK module names as defined by Jigsaw (Java 9).

Platform modules

The following new platform modules are now available in Ceylon Herd:

  • ceylon.net provides URI and HTTP support
  • ceylon.io provides charset and socket (blocking and non-blocking) support
  • ceylon.json provides JSON parsing and serialization
  • ceylon.collection collection implementations organized into mutable array-based collections, mutable hashtable-based collections and immutable linked-list based collections

The language module, ceylon.language is included in the distribution.

Modularity and runtime

The toolset and runtime for Ceylon are based around .car module archives and module repositories. The runtime supports a modular, peer-to-peer class loading architecture, with full support for module versioning and multiple repositories, including support for local and remote module repositories, using the local file system, HTTP, WebDAV, or even Maven repositories for interoperation with Java.

The shared community repository, Ceylon Herd is now online:

https://herd.ceylon-lang.org

Source code

The source code for Ceylon, its specification, and its website, is freely available from GitHub:

https://github.com/ceylon

Issues

Bugs and suggestions may be reported in GitHub's issue tracker.

Community

The Ceylon community site includes documentation, the current draft of the language specification, the roadmap, and information about getting involved.

http://ceylon-lang.org

Acknowledgement

We're deeply indebted to the community volunteers who contributed a substantial part of the current Ceylon codebase, working in their own spare time. The following people have contributed to this release:

Gavin King, Stéphane Épardaud, Tako Schotanus, Emmanuel Bernard, Tom Bentley, Aleš Justin, David Festal, Flavio Oliveri, Max Rydahl Andersen, Mladen Turk, James Cobb, Tomáš Hradec, Michael Brackx, Ross Tate, Ivo Kasiuk, Enrique Zamudio, Julien Ponge, Julien Viet, Pete Muir, Nicolas Leroux, Brett Cannon, Geoffrey De Smet, Guillaume Lours, Gunnar Morling, Jeff Parsons, Jesse Sightler, Oleg Kulikov, Raimund Klein, Sergej Koščejev, Chris Marshall, Simon Thum, Maia Kozheva, Shelby, Aslak Knutsen, Fabien Meurisse, Paco Soberón, sjur, Xavier Coulon.

At devoxx 2012? Come write Ceylon code for real, challenge yourself!

Feel like learning Ceylon but you don´t know how to get started? You want to start contributing to Ceylon?

Don´t worry, we´ve got you covered. Gavin, Emmanuel and I will be at Devoxx Belgium 2012 for two important gigs.

Hands-On Lab on Monday 12th of November

This is the best place to feel what Ceylon is like.

On Monday 12th of November we are holding a Hands-On Lab where you will write your first Ceylon programs with a series of guided exercises. Come with your laptop, we will help you install the Ceylon IDE. This should be interesting, after all: the language authors and implementers will be there to answer your every question.

HackerGarten on Tuesday 13th of November

This is the best place to start contributing.

On Tuesday 13th of November we will be holding a full-day HackerGarten with the rest of the JBoss team. Here we will not only help you get started with coding in Ceylon but also help you get started with contributing to the Ceylon project, and its many sub-projects.

If you want to contribute but don´t know how to get started, Gavin, Emmanuel and I will be there to guide you. And contrary to popular belief, none of us have bitten anyone in the last... four months at least! Come with your laptop, that would not be fun otherwise.

Some planning required

Make sure to register for the University part of Devoxx: there are still tickets left. Also remember to bring your laptop for both those occasions.

Install JDK 7. We´ll provide everything else required via WiFi or USB keys.

Ceylon IDE M3.2 released

Gavin, Sjur and Tomáš have been hard at work all summer to deliver a much-improved version of the Ceylon IDE. This release support exactly the same language constructs and features the same JVM backend compiler as the M3.1 release, so it's 100% compatible with it. But while the backend is the same, the UI is much improved, as you can see from the following change log and screen shots.

No more dependence on IMP

We recommend removing IMP from your Eclipse installation.

Ceylon Explorer view

The Ceylon Explorer View presents packages as children of the containing modules. You should reset your Ceylon Perspective after updating the IDE on order to get the Ceylon Explorer in place of JDT's Package Explorer.

Awesome documentation hover

Hover over the name of a Ceylon or Java declaration to see the gorgeous new hover info. Click in it to browse to other related declarations.

Code popup

Ctrl-P, or "Show Code" pops up an information control containing the code of the referenced declaration. Ctrl-P again opens an editor. Hyperlink navigation from the Code popup is also possible.

Hierarchy and Outline popups

As before, Ctrl-T and Ctrl-O open the popup Hierarchy and Outline views. These now look a lot prettier, and they are also more functional. You can filter the contents by typing inside them, and they remember their bounds. The Hierarchy View is also much better integrated with Java stuff. Ctrl-T inside the open Hierarchy View cycles between Hierarchy View, Supertypes View, and Subtypes View. These popups have configurable background colors.

Auto-addition of needed imports

Refactorings, quick fixes, and autocompletions now add any needed imports to the top of the source file. In addition, autocompletion will propose declarations from any imported module, even if the package is not imported in the current unit.

New Quick Fixes/Assists

Thanks to Sjur and Tomáš, we now have some new quick fixes and assists:

  • convert if/else to then/else, then/else to if/else
  • invert if/else
  • add type constraint to type parameter

Clean Imports

Clean Imports now automatically fills in missing imports if unambiguous, and prompts the user to choose a declaration to import if ambiguous.

Terminate Statement

Ctrl-2 adds any necessary semicolon, closing parens, and closing braces to terminate the statement at the current line. This feature is almost magical in how good it is at guessing where the closing punctuation needs to go.

Mark occurrences

Occurrence marking is now enabled by default and works like JDT (the declaration to highlight is the one under the caret).

Proposals popups

Completions proposals and quick fix/assist proposal popups now have syntax highlighting. Typing a "." automatically activates the completion proposal window. When only one completion proposal is available, it is automatically applied.

Select Enclosing/Restore Previous Selection

Ctrl-shift-up expands the selection to the containing expression or program element. Ctrl-shift-down takes you back to the previous selection.

Also Ctrl-Shift-P takes you to the matching bracket and Show In now works.

Outline View

There is now a popup context menu on Outline View nodes. The selected node now follows the editor caret location.

Tomáš added a toolbar to the Outline View, letting you filter out local declarations and expand/collapse all nodes.

Open Ceylon Declaration / Open Type

The default keyboard binding for Open Ceylon Declaration is now Ctrl-Shift-O instead of Ctrl-Shift-C. This is more ergonomic and works even inside the Java editor. Inside the Ceylon perspective, Ctrl-Shift-T opens the Open Type dialog, which lets you choose between Ceylon and Java types in one dialog (a very slow-to-load dialog, but hey...).

F3 (Open Selected Declaration) now handles Java declarations.

Support for multiple module repositories

The New Project wizard and Ceylon Preferences page now let you configure multiple module repositories for a project.

Backend errors

Errors from the compiler backend now show up in the Problems View and vertical ruler, and compiler progress is visible in the Progress View and status bar. The 80s-style scrolling console is gone.

Progress

Building the completion proposals and hierarchy for the first time is now expensive because it involves trawling the whole JDK. You get a nice progress bar in the status bar of the main window.

Parser lifecycle

Code is lexed/parsed synchronously on every keypress, and lexed/parsed+typechecked synchronously on every keypress when the completions proposals window is open. This results in much more responsive syntax highlighting and fixes some wierd behavior in the completion proposals window. When the completions proposal window is not open, typechecking still happens in a background job as before.

Download it today

The Ceylon IDE is available today from our update site or from Eclipse Marketplace:

Ceylon IDE Eclipse Indigo drag and drop into a running Eclipse workspace

After installing, go to Help > Welcome to Ceylon to get started.

Latest news

I figure it's summer, you might think we're all at the pool enjoying the sun, but that's not quite how it is: we've been busy doing all sorts of things, such as preparing a new Ceylon IDE version that has tons of fixes, new features, improved performance that we will release shortly. We're also hard at work on the next milestone and the Ceylon SDK, but that's not why I'm writing today.

Website news

Did you know you could compile Ceylon to JavaScript? No? Well, you can, we're not only available on the JVM platform. We have this awesome JavaScript compiler that supports the same features as the JVM backend compiler. We even started shipping the SDK modules for both JVM and JavaScript backends on Herd.

Now, you may be wondering why you should care about JavaScript, and here's why: you can now try and run Ceylon code in your browser! We have an online IDE that's pretty awesome for discovering the language. Now, IDE is stretching the term a bit, but: it supports syntax colouring and auto-completion! Seriously: just try your hand at that Ctrl-Space key combo and explore the Ceylon API as you learn. No strings attached. It's still a bit slow, but our engineers are stilling hammering and soldering it as we speak, so expect it to go a lot faster once it realises how deadly we can be to slow code.

And that's not all, see? We even went ahead and plugged in that IDE in our documentation. Seriously! All the code examples in the introduction and tour have this neat and cute Try button that begs to be pressed on in order to show you that Ceylon is not just nice on paper: it's nice on your server and on your browser. How cool is that?

String[] names = { "Tom", "Dick", "Harry" };
for (name in names) {
    print("Hello, " name "!");
}

Ceylon needs you

The other thing I wanted to talk about is what you can do to help drive Ceylon forward. You already know Ceylon is open-source and everything happens in the open. We have a wonderful community working on the many parts that we call Ceylon as a whole.

Here are a few of the things I really love about the Ceylon community:

  • It's open. Not just open-source, but really really open: the discussions happen on public mailing-lists, the issue trackers are public, and everyone can pitch in for ideas, discussions, constructive criticism, opinions and advice. Obviously the core committers have more weight in the matter if there is no clear consensus on discussions, but more often than not, even fly-by commenters can have a pretty big influence on the project if they provide good ideas or comments and are willing to convince us.
  • It's a hacker-fest. Our unofficial manifesto is programming motherfucker. Obviously we love beautifuly designed things, but we hate over-engineered things and in general value more "getting things done" than "getting in the way". We could call it pragmatic programming: whatever needs to be done, we do. We have people that prefer Maven and others Ant, so some projects support both build systems. We use tools that allow everyone to work without fighting, such as git or github. As much as we can, we try to make contributions easy and agreeable — after all, if you're doing this in your free time, it should be fun!
  • It's incredibly diverse. You like client GUI work? Try the Ceylon IDE project. You like visitors, AntLR and type analysis? Try the compiler frontend (aka ceylon-spec aka the typechecker). You like generating Java AST or JavaScript? Try the compiler backends. If you're into Web things, perhaps ceylondoc (our API documentation generator), our Web IDE or even Herd (our module repository) would be your thing? Want to start a .NET backend? We can help you with that (someone already started). Want to see Ceylon run in another IDE? We will help you. Want to work on a kick-ass brand-new modern SDK? Well, why don't you? There's stuff to like for everyone's tastes.
  • It's fun, it's challenging, and it's changing the world. What good is working on something if you're waking up in the morning dreading the day ahead? We do interesting things. We do things that very few have done before. After all, not everyone writes new languages (even though it may appear to be the case), and not every new language has a scope as broad and ambitious as Ceylon. And we do it in a good spirit: it's important to have fun with your colleagues-in-open-source. And we learn a lot, we certainly do. Most of us had never done what we're working on before, so it's certainly an experience that makes you better. And best of all: we're changing the world. This is not some project that only a handful will use. Our goal is to make everyone use Ceylon, so whatever you put in there, whatever little or big thing you contribute, actually ends up being used by a lot of people. That's something to be proud of.

All of this to say: we have a great community and a great project, and we'd love to welcome you aboard! Get in touch with us and we'll help you find the project you will love, and get started with things to do: easy at first, then more and more challenging as you become more expert in the project than we are.

Come and have fun with us changing the world!