Archive for March, 2009

Intervals in MPS

Wednesday, March 25th, 2009

Language of mathematics contains a lot of domain specific constructs. Almost every part of mathematics has its own domain specific “extensions”. So it’s a good idea to borrow from there. In MPS we have a special base language extension that contains some mathematical notation. In this post we will consider one of such notations that we borrowed from mathematics.

We quite often write code that checks whether a value lies in a specific range. This is especially widespread in a code working with graphics. We might write something like this:

This piece of code checks whether a point lies inside a rectangle. Quite boring, isn’t it? In our jetbrains.mps.baseLanguage.math language we have support for intervals. Instead of the code above, you can write this:

As you can see it is shorter and much easier to read. Intervals, in the language can be open or closed. For example you can write this:

They can even contain infinities:

This language feature will be available in MPS 1.0. In addition to the intervals MPS will provide other mathematical notations, for example sums. We will write about them in one of the following posts.

Posted by Konstantin Solomatov, Lead MPS developer

Find out more about MPS at QCon, London (Mar, 11-13)

Tuesday, March 10th, 2009

Konstanting Solomatov, the lead MPS developer, is at QCon this week. He is showing the latest MPS Beta2 there.

If you are nearby, come to talk, ask questions and share your thoughts.

Posted by Eugene Toporov, Marketing Manager

MPS Beta 2

Thursday, March 5th, 2009

It’s been almost 3 months since the first Beta of Meta Programming System. Since then we have received a good amount of feedback and a lot has been done to improve MPS.

MPS Beta 2 is now available introducing the following major changes:

  • Automatic generator generation. MPS tracks whether the required generator is up to date and generates it automatically, if not, before the model that uses this language is generated.
  • Easier language generation. When a model that uses a language is being edited, an note will appear in the editor reminding to generate the language and providing one-click option to start generation.
    Generation required note
  • Smart complete. The code completion (available with Ctrl+Shift+Space) became even smarter: it filters out actions according to the type of the result.
  • Faster “find usages”. The usages search speed improved by using the persistent caches.
  • Faster “go to root node” action. We use persistent caches in order to make the “go to root node” action work faster.
  • Better search in editor. We have FireFox-like search in the editor.
    Search in MPS Editor
  • Other usability, performance improvements and bugfixes.

You are welcome to download MPS Beta 2, try it and let us know your feedback.