Showing posts with label eclipsecon. Show all posts
Showing posts with label eclipsecon. Show all posts

Friday, January 23, 2015

XtextDay and EclipseCon San Francisco 2015

In case you've missed it, we are organizing a so called XtextDay co-located with EclipseCon 2015. The program is already online for a couple of weeks:

Sebastian and I will start the day talking about the newest developments (e.g. Intellij IDEA support, web editor support, incremental standalone builders, etc.). After that we will hear how Xtext languages are used to design REST APIs. In the afternoon we have in-depth sessions on Xbase, performance and scoping, and after the coffee break we will learn how a silicon valley company use Xtext to build a commercial product for designing systems on a chip (IoT). The full program details can be found here. But that's not all..

Additional Xtext content at EclipseCon

Although it's possible to register only for the XtextDay, I recommend to book the whole EclipseCon conference as it is not only an awesome community event where you will find many new friends, but in addition to the XtextDay, there is some Xtext-related content there as well. It starts with a beginner's tutorial on Monday, which is a good preparation for the technically deeper talks following. In addition to the XtextDay and the tutorial we have:

So quite some content in addition to XtextDay. If you consider using Xtext for something or you are already using it, then you should definitely come and join the sessions, discussions and party! :-)

Thursday, February 23, 2012

EclipseCon 2012 and Xtext

In case you didn't recognize this year's EclipseCon has a whole track on DSLs, covering a lot of interesting sessions around Xtext. There are many technical sessions, success stories, and even a full tutorial.

Here are the technical talks given by the core committers of Xtext and EMF:

And just in case you need some inspiration, there are a lot of sessions talking about stuff which was built with Xtext:


Finally there are some more general sessions like:

Xtext core committers, that is Jan, Moritz, Sebastian, Ed and me, will be at the conference all days and be happy to discuss all kinds of topics with you. We'll have a booth where you can always find someone to talks to and most likely we'll also have a BOF session at one of the evenings.

So if you are in any case interested in Xtext and/or domain specific languages, EclipseCon 2012 is the conference to go to. It's only in five weeks, so you should register now!

And by the way there are many, many other interesting sessions going on there.

I'm looking forward to a fun community meet-up! :-)

Tuesday, October 25, 2011

This Is Not Your Father's Java

The Java language and so its community has traditionally been relatively conservative when it comes to API design and language features. After all Java seems to be the very last language on earth without closures! Also a lot of other language features are highly demanded by many people.

With limits come creativity! 


To compensate for the verbose language and missing convenience, the Java community created the three single best IDEs in the world. Also the popularity and maturity of code generation and language add-ons like AspectJ or even XML stems from the limitations in Java as a language. With the rise of alternative languages for the JVM, Java folks started to think out of the box. Modern API design is pushing Java to its limits and with some creativity you can even emulate missing language features.

Next week at EclipseCon Europe I'll be giving a talk on creative API design in Java.

The talk will be structured like a quiz: I show a working piece of Java code to the audience and explain what it does. Then you tell me how it does so. So it's a slightly similar structure to the popular Java Puzzlers talks but in this case the puzzlers are actually unconventional but useful idioms. I expect a lively discussion about the pros and cons of the various idioms and I'm almost sure there is something new for everybody. Feel challenged? Come to the session! :-)

Monday, March 21, 2011

A rough performance comparison between Xpand and Xtend 2

Xtend 2 is still in an early state. It works quite well, but there are still some issues and we haven't even started measuring and improving performance yet. Although I was pretty sure that Xtend 2 would easily outperform Xpand, I was curious how much.

Today, I wrote a small code generator (the traditional domain model to Java Beans stuff) in Xpand and Xtend 2 and compared the execution time with different numbers of model elements, just to get a first impression.
Disclaimer: Doing benchmarks is hard and I don't claim that do a fair comparison here, although I tried.

The Xpand version


The Xtend 2 version

Generating files for 1000 entities (1 file each) containing 20 properties and 5 operations each took (on average exec. the generator 10 times) :

Xtend 2 : 663 ms
Xpand : 4254 ms

If I remove the actual file writing and only do the in memory string concatenation the result was (again on average exec. the generator 10 times) :

Xtend 2 : 247 ms
Xpand : 3302 ms

So it seems as if the computation and string concatenation in Xtend2 is roughly 10 times as fast as in Xpand. As we haven't yet profiled Xtend 2, there should be room for improvements.

On a side note, I have also implemented the quicksort benchmark you can find here with Xtend 2, and found that the Java version was only twice as fast as Xtend. Compared to Groovy which was 20 times slower than Java it's quite good. It is mostly slower than Java, because we do a lot of conversion between ints and Integer (auto boxing) when using operators, so some special treatment in this area should make that even faster. Anyway, sorting int arrays is not the main focus of Xtend ;-).

If you are doing code generation or are interested in it and you are visiting EclipseCon, you should definitely come to our tutorial on Thursday. There is much more to Xtend 2 than just the improved execution performance.
And don't be afraid about missing the lunch, attendees get served a delicious, warm, and freshly prepared lunch after the tutorial :-).

A Guice Modules DSL

[Update] The code is available at github

Yesterday Sebastian and I were attending GuiceCon. A nice little get-together with the Guice developers and some very smart Guice users. As Guice is key in Xtext's architecture we took the opportunity to show the people what we do with it. The first idea was to just explain how we use Guice, but while we travelled across California last week a better idea came up : We could develop a Guice Modules DSL using Xtext.

So we did and we did it from scratch right in front of the audience without any tricks or shortcuts. The good thing was that everyone in the room knew the domain very well, so we didn't need to explain anything about the domain of the language.
First I defined the grammar and a first shot on the code generator and then Sebastian added type conformance checks and improved content assist. Today I've spent another two hours on it. The screencast below demos the status quo.

Note that there will be an extended tutorial at EclipseCon this Thursday, where you can learn how to create such things yourself in no time. Not to forget the short talk on "What's new in Xtext 2.0", Tuesday 2 pm.

Have fun!

Monday, March 07, 2011

Xtend Screencast Part 3 - Rich Strings (i.e. Codegeneration)

Xtend is a programming language with special support for code generation and traversing typed object graphs (like EMF models). It is developed with Xtext 2.0. So the question is what is so special about code generation, that we need special support in a language? Well it's mostly string concatenation, and the most readable way of doing string concatenation is using a template syntax.

Today's screencast covers rich string expressions. It resembles the basic template syntax known from Xpand but in Xtend they are expressions, so you can use them everywhere a normal expression is expected. The new and unique aspect about Rich Strings is their intelligent whitespace handling system, including nice tool support. See it yourself:



You can get your hands on this at EclipseCon in just two weeks and/or at JAX in two months.
The final release of Xtext 2 and the new Xtend language is June 22nd (Eclipse Indigo).

Friday, December 03, 2010

Xtend 2 - the Successor to Xpand

M2T Xpand is one of the widest used template languages for code generation. It is statically typed, supports polymorphic dispatching of template definitions and provides a very convenient way to navigate through models. The navigation convenience mostly comes from the built-in higher order functions for collection types, the possibility to have extension functions using Xtend and some syntactic sugar for common expressions.
Also Xpand is known to provide a very open architecture. There are several hooks in the interpreter to integrate profilers, pretty printers or whatever comes to mind. That's all very nice and has led to quite some success.

But there are also some issues with Xpand and Xtend (Just in case you don't know I am not blaming other people's work, because I'm the author of Xpand, Xtend and Check)

  • Performance - Xpand and its siblings are interpreted and the interpreter was written without much performance considerations, i.e. is slow.
  • Tooling - The tooling is hand-made with JFace and Co, the code is old, not well tested and unfortunately a bit buggy. 
  • Ugly conceptual short cuts - built-in higher order functions instead of closures, built-in collection types instead of generics, and a couple of other unsound semantics which pop up occasionally and bite the user frequently.
Xtend 2
The reason I started work on Xtext in the first place was, because it had been so painful to write the IDE support for Xpand, Xtend and Check. I thought that there must be some higher abstraction to derive functionality like syntax coloring, content assist, outline views, etc. from a language description. So I wrote the first prototype of Xtext in 2006 and luckily found some friends and a sponsor to create what was chosen to be the most innovative project at Eclipse this year.

Today Xtext is ready to be the basis for a rewritten version of Xpand. We call it Xtend 2 as it is more like a successor to Xtend which allows to have Xpand's template syntax as an expression. After having designed Xpand and Xtend and having seen so many different applications of it with different requirements and problems to solve, we know what features are helpful and which are problematic. Also during the last years with Xtext I have learned so much about language and IDE design and so did my team. All the languages we built for customers and all the languages we saw people developing with Xtext have helped to get a good feeling of what is good language design and what is not. We are now in a promising position to design a very, very nice language.

And indeed we are all thrilled about the concepts we put together so far. I'm writing up the language specification these days and will post it as soon as it is more consumable state. Today I wanted to share my excitement and give you an idea of what it is going to look like.

What are the main differences?

Based on Xbase

Xtend 2 is of course using the expressions defined in Xbase. That basically means it is tightly integrated with Java, has closures, full generics and a couple of very neat features like operator overloading or the super cool switch statement.

Compiles to Java
Xtend2 files are directly compiled to Java classes. In fact they are compiled to Java source code, which means that you can read (and debug) what the compiler makes out of your Xtend 2 coding. We will put much effort in making the generated code very readable and performant at the same time.

Contains successful features from Xpand and Xtend...
The cool stuff from Xpand and Xtend will be there such as polymorphic dispatch, extension methods or the template syntax.

... but they are even better now
For instance extension methods can be any static Java function and more important any methods from injected objects. This basically allows you to exchange the implementation of any extension methods only by changing the DI configuration. This in turn replaces the whole AOP story we have in Xpand and Xtend.

"Simplicity is the Ultimate Sophistication"
You'll see a lot of other small improvements, but the coolness of the language doesn't come from the amount of features but from the short and carefully chosen list of concepts working consistenly together. It is the overall composition of concepts and the holistic experience (tooling, etc.) which gives a language its "feel". And although I don't have the language in my hands right now, it already feels fantastic. :-)

We want to show this at EclipseCon

There is a submission for a tutorial on Xtend 2 we submitted for EclipseCon 2011. My favorite conference at my favorite location. It is extremely important to us to be able to share with you guys what we have been working on for the last months (actually years if you count the development of Xtext in).
Chris asked people to use the comment system to provide feedback, in order to help the committee composing a great program. So please, if you are interested in attending a hands on tutorial for Xtend 2 at EclipseCon 2011, tell them. :-)

Monday, March 22, 2010

EclipseCon 2010

I'm sitting in my room at the Hyatt hotel in Santa Clara, California. It's 6 am and I'm glad I could sleep til 5 am at least. Seems that the 7h bike trip we did yesterday did its job (we hoped that being outside most of the day would get us in tune with the local time zone). I only wished the saddle hadn't been so hard....

Today, the conference starts and I'm currently looking at what sessions I'ld like to attend.

Monday
Monday starts with the introduction of the e4-Rover Mars Challenge. I bet you've already heard of it. Right after that Jan, Moritz and Heiko give a 3 hour tutorial called "Xtext meets e4". They will show how one can model a workbench in a textual way. They have worked hard on preparing the workshop material and I'm curious to see how the audience like what they have. After lunch the shorter presentations begin. I'm going to see what Stephan and Kenn think the twenty modeling things are and am looking forward to the b3 talk. After that Peter has his session on Xpand just before Heiko presents on how one can apply MDSD to develop IPhone apps. Also I want to note Jan's talk on combining GMF and Xtext.
In the evening I have a modeling panel and after that there's the community awards ceremony. Xtext is finalist in the category "most innovative project". How cool is that? :-)

Tuesday
In the morning I'll be out on another bicycle trip. After that I'll have to practice my presentations for the afternoon (yes I practice and I always hope nobody watches me while I'm doing so :-)).
After lunch there are a couple of talks I find interesting. Kai presents on CSS in e4 and Berni does his penalty shoot out of textual modeling tools (didn't know there are other than Xtext ;-)).
I'm also interested in what's new in CDT. Not because I'm a big fan of C/C++, but I'm interested in Eclipse-based IDE development. At 2 pm it's showtime for Sebastian and me. We'll demo the coolest IDE features you get when developing a language in Xtext. And right after that there's the Modeling Runway, where a couple of modeling projects present their projects (5 min each).

Later that day I'll likely attend the Graphiti talk. Let's see if it is any better than GMF. I think I'll have a break after that in order to read through Wayne's revised Eclipse Development Process in order to be prepared for the Development at Eclipse panel I am attending.

Wednesday
I am not yet decided whether to go to "Modular Architecture from Top to Bottom" or "API Design and Evolution" in the morning. Both seem very interesting, but I guess I'll have more fun asking controversial questions in the API talk :-). In the afternoon I probably will visit the Groovy IDE talk. The new version of the Eclipse plugin looks great. Especially the tight integration with JDT is pretty cool. But I also might go out for another trip, since the weather is forecast to be great. If not I'll go to see what cool features Eike and his team brought to CDO lately. In the evening Sebastian will present the new version of MWE2. It's implemented in Xtext and we're very proud of the result and how easy it was to implement it using Xtext.

Thursday
For me the day certainly starts with "Understanding and Using Git at Eclipse". Actually we're still using CVS and I personally am ok with it because of the great tooling Eclipse provides. The only problem we have is its slowness. Synchronizing my development workspace sometimes takes 15 min. So we plan to switch to Git right after Helios.
In the afternoon the talk about Dependency Injection got my attention. I love DI, though I am also a bit concerned about how DI is used in e4. I'll make sure to have some discussions with the e4 folks about my concerns. I'll have to bring my bicycle back to the store in the early evening, so I won't be able to attend any other talks on Thursday.

These are just my personal selection of a great variety of interesting talks you can attend at this year's EclipseCon. All in all it looks like a very diverse program and I'm looking forward to four interesting days full of great talks and discussions. I especially like the trend towards shorter presentations because I expect them to be better prepared and more focused.
....ups, it's already 8:17 am (I've had a great breakfast in the meantime) and I am missing the e4-Rover Mars Challenge. I'll have to go now. See you!