2010-12-19

Valag 1.1 released, graph generator for the Vala AST

Hello,
a new version of Valag, a graphviz generator for the Vala language AST, has been released.

Changes since 1.0 version:
  • Add --format and --prefix options.
  • Update to latest libvala-0.12.
  • Bug fixes.
This new version also distributes the xdot.py program as a viewer for the generated graphs.

More information and download at the Valag homepage.

2010-12-17

Maja - The Vala to Javascript compiler

Hello,
the first version of Maja, the Vala to Javascript compiler, has just been released. The mapping is not quite complete but you can do pretty much everything you could do with javascript directly. There are (still incomplete) bindings for the qooxdoo framework and the demo browser is being ported to vala successfully.
Maja can be used in any environments, not only web browsers.
Programming in Vala saves you from lots of type safety troubles (Javascript), lot of typing (Java) and the syntax is really enjoyable as it is quite close to the Javascript model.

Usage and download at the homepage.

2010-11-08

Vala 0.11.2 released

Hello,
the development series of Vala continues and we got another release full of bug fixes, binding updates as usual and enhancements on the GIR side.

Changes

  • Update libnotify bindings to 0.7.0.
  • Improvements to the .gir reader.
  • Bug fixes and binding updates.
More information and download at the Vala homepage.

2010-10-26

Vala 0.10.1 released

Hello,
the new version of the most stable Vala compiler has been released. Obviously, no features have been added, instead many bugs have been fixed.

Changes

  • Remove outdated GTK+ 3 bindings.
  • Many bug fixes and binding updates.
More information and download at the Vala homepage.

2010-10-25

Vala 0.11.1 release

Hello,
this is a new release of the development series of the Vala programming language. As you can see a lot of improvement on the side of GDbus has been made. Also notice the resolution of the out parameters nightmare, guarded access is provided automatically by Vala so you don't need to check whether the out parameter is null or not.

Changes

  • Require and target GLib >= 2.16.

  • Guard access to out parameters to allow null arguments.
  • Add support for local constants.
  • Support file descriptor passing with GDBus.
  • Support cached property values in GDBus clients.
  • Support Cancellable parameter in GDBus clients.
  • Support no-reply methods in GDBus clients and servers.
  • More refactoring in the code generator.
  • Many bug fixes and binding updates.
As usual, more information and download at the Vala homepage.

2010-10-06

Vala 0.11.0 released

Hello,
after Vala 0.10.0 a new development series has begun with new features and changes. Vala 0.10 will continue to be updated when necessary. So these are the release notes of this new release:
  • Use byte indices for strings. Accessing strings by index is now based on bytes, no more on characters. This is an important change for applications relying on character indices for unicode strings.
  • Use uint8[] for binary data in bindings.
  • Add support for parallel compilation. To take advantage of this feature it is suggested to make use of parvala, distributed together with vala under the contrib/parvala directory.
  • Improve compiler performance.
  • More refactoring in the code generator.
  • Many bug fixes and binding updates.
As usual more information and downloads at Vala homepage.

2010-09-17

Vala 0.10.0 released

Actually, there are two announcements today.
Let's start with the interesting one,

Vala 0.10.0 has just been released!

download at: http://download.gnome.org/sources/vala/0.10/

Changes since 0.9.8 include
* Port GIR parser and writer to GIR version 1.2.
* Update GLib bindings to 2.26 branch.
* Bug fixes.

That's it. Nothing too fancy for this round release, so you'll enjoy it mainly if you are interested in bindings or a bug that affects you has been fixed.
Also, if you didn't know already, you probably just noticed that 1.0 is not next in line. That's right and I don't think we should expect it anytime soon. There's still so much to do, you know.


Let's get to the other announcement then, no less important..
Blogger SUCKS!
No, seriously, should we switch to wordpress or some other blog hosting? Actually, the first ever comment on this blog was a request that we move there. I didn't pay much attention back then. So what do you think? What is your experience?

2010-09-05

Vala 0.9.8 released

Hello,
a new version of the Vala programming language has been released yesterday.

Changes
  • Add --fatal-warnings commandline option.
  • Deprecate string.len () in favor of string.length.
  • Deprecate use of D-Bus GLib in favor of GDBus.
  • Many bug fixes and binding updates.
As usual, more information and download at the homepage.

2010-08-19

Vala 0.9.7 released

A small update was released today that fixes a regression introduced with previous version. In case you use 0.9.6 already, update is very recommended.

As always, see homepage for further details and download.

2010-08-18

Vala 0.9.6 release

Hello,
a new versione of the Vala programming language has been released. This version contains some bugfixes and the beginning of the codegen refactoring which will lead to lots of bugfixes in the next releases.

Changes
  • Drop deprecated support for assigning to construct properties.
  • Some refactoring in the code generator.
  • Bug fixes in bindings and vapigen.
As always, download and more information at the homepage.

2010-08-09

Vala 0.9.5 released

Hello,
another version of the Vala programming language has been released. The homepage has been reorganized and some content has been added for planning and bug triaging. Release notes:
  • Add version suffix to support parallel installation.
  • Define VALA_X_Y according to compiler version.
  • Enable version header by default.
  • Add vala.m4 with VALA_CHECK_PACKAGES macro.
  • Add gedit-2.20 bindings (Andrea Del Signore).
  • Add tokyocabinet bindings (Evan Nemerson).
  • Various improvements to the Dova profile.
  • Many bug fixes and binding updates.
More information at the download page.

2010-08-04

Puzzled by locking in Vala?

If you can't wrap your head around how Vala locks variables, take a look at this great article about locking in Vala by Jim Nelson.
Apart from explaining how it actually works, he also compares it to Java, which is perfect if you come from that strange world :).

http://www.yorba.org/blog/jim/2010/08/synchronization-in-vala.html

2010-07-27

Vala 0.9.4 released

Hello,
a new version of the Vala compiler has been released. This version does not introduce major features but mostly bug-fixes and Dova profile enhancements:
  • Append documentation comments to generated C files.
  • Skip <doc> tags in .gir files.

  • Various improvements to the Dova profile.
  • Many bug fixes and binding updates.
As usual, you can find more information at live.gnome.org/Vala.

2010-07-14

Vala 0.9.3 released and documentation news

Hello,
this 0.9.3 release of the Vala programming language adds many interesting features as well as many bug fixes and binding improvements. Also I'd like to point you out to the new collaborative Vala Reference Manual and Hackers' Guide to Vala. The release notes:
  • Support newlines in double quoted string literals.
  • Add experimental support for main blocks.
  • Add experimental vala tool to compile and run code.
  • Initial support for generic delegates.
  • Support using GClosure for delegate parameters.
  • Support GBoxed-based memory management.
  • Improvements to the .gir reader and writer.
  • Various improvements to the Dova profile.
  • Many bug fixes and binding updates.
Check out the Vala home for more information and download.

2010-07-11

Vala for scripting

Hello,
the upcoming release of Vala will have basic scripting capability (mostly for small tests). Yes, this sounds weird, but it's more trivial than what you expect. The installation will create a symbolic link /usr/bin/vala -> /usr/bin/valac that you can use to run vala scripts.

Also, vala scripts can have implicit main(), so that it becomes faster to write test scripts. An example:
#!/usr/bin/env vala
message ("test");
Save it as test.vala, now you can either chmod +x test.vala and run ./test.vala or just vala test.vala.
Valac will automatically compile the script and run it. After that the executable will be deleted, which means there's no cache.

This feature is of course experimental and it's not currently possible to import other vala files.

2010-06-24

Vala and Monads

Hello,
I've been reading around lately about functional monads written in imperative languages, then I've tried to bring them to Vala. I'm not going to explain what a monad is, there's a lot of papers out there.

If you want to test the code below you need Vala git master (more recent than 0.9.2).

First of all we need a basic framework and some monads you can immediately read here.
Notice some comments are in do notation and that related functions are really only utilities to let the example code below be more readable, they respect the functional semantics of monads without adding more imperative power.

The only difference with other implementations is that BindFunc not only passes the underlying value but also the return function. This is helpful to avoid keeping monads around in termporary variables.

Now let's port some Haskell typic examples to Vala:

safe_div a b = if b == 0 then Nothing else Just (div a b)

Monad safe_div (int a, int b) { if (b == 0) return nothing; return new Just (a/b); }

The nothing variable is initialized with Nothing.instance which is a singleton.
Now let's map a simple multiplication function:

bind_and_mul monad factor = do { x <- monad; return (x*factor); }

Monad bind_and_mul (Monad monad, double factor) {
return monad.bind ((v,unit) => unit (((int)v) * factor)) as Monad;
}

Pretty easy, we get the unpacked value and multiply it with the given value.

Things get a bit longer with list monads. We want that given an x the function returns [x,x+1]:

bind_and_list_plus monad val = do { x <- monad; return [x,x+1]; }

Monad bind_and_list_plus (Monad monad, int val) {
return monad.bind ((x,unit) => {
var l = new List (); l.add (x); l.add (((int)x)+val); return unit(l);
});
}
Ok, but what is the result of those weird definitions?

Haskell: do { x <- safe_div 5 2; return (x*2); }
Vala: bind_and_mul (safe_div(5,2), 2);
Result: Just (4)
What if we divide by zero?

do { x <- safe_div 5 0; return (x*2); }
bind_and_mul (safe_div(5,0), 2);
Result: Nothing
Transform -10 into some useless list:

do { x <- -10; return [x,x+1]; }
bind_and_list_plus (new Just (-10), 1);
Result: [-10,-9]

Now do the same transformation for a list:

Haskell: do { x <- [1,2,3]; return [x,x+2]; }
Vala: var l = new List(); l.add(1); l.add(2); l.add(3);
bind_and_list_plus (l, 2);
Result: [[1,3],[2,4],[3,5]]

Again, the complete code with test cases can be found here.

2010-06-20

Vala 0.9.2 has been released

Hello,
this new release follows the huge changes coming along with GLib and GTK+ latest releases:
  • Initial support for GDBus-based clients and servers.
  • Support implicit and explicit GVariant casts.
  • Add support for [Deprecated] attribute.
  • Add GenericArray as alternative binding to GPtrArray.
  • Add gdk-pixbuf-3.0, gdk-3.0, gdk-x11-3.0, and gtk+-3.0 bindings.
  • Updates to the GLib bindings.
  • Many bug fixes.
Stay tuned with furter updates.

2010-06-08

Vala 0.9.1 is out

Hello,
yesterday the announce of the 0.9.1 release of Vala. You can find release notes here.
This is more like a transitional development release torward a new 0.8.x branch stable release.

Changes

  • Support constants in enums.
  • Deprecate +=/-= syntax to connect/disconnect signal handlers.
  • Add experimental support for Dova profile.
  • Update Genie parser (Jamie McCracken).

  • Add clutter-gst-1.0 bindings (Ali Sabil).
  • Add gdu and gdu-gtk bindings.
  • Add libesmtp bindings (Adrien Bustany).
  • Add mx-1.0 bindings (Evan Nemerson).
  • Add orc-0.4 bindings (Fabian Deutsch).
  • Add rest-extras-0.6 bindings (Adrien Bustany).
  • Updates to the GLib, GStreamer, Linux, SQLite, and other bindings.
  • Many bug fixes.

2010-05-27

Post Vala 0.8.1 update

Hello,
thanks to Jiří Zárevúcký for giving me the permission to write to this blog, this is my first post.

It's been at least a month since 0.8.1 has been released, and Vala is growing day by day. I'd like to share some news that will be available in the next release:
  • New regex literals
  • New libesmtp, mx-1.0, rest-extras and orc-0.4 bindings.
  • Improvements for sqlite3, alsa, libgdata and gstreamer-0.10 bindings
  • rest bindings renamed to rest-0.6
  • Several bug fixes for the compiler (especially for arrays, async and delegates), bindings and lots of other vapigen and vala-gen-introspect improvements.
  • Gtkdoc support for Valadoc.
  • And more...
Stay tuned!

2010-03-31

Vala 0.8.0 Released!

For the official release notes and download link, see http://live.gnome.org/Vala/Release ;)

2010-03-17

Shotwell 0.5.0

A few days back, a new version of Shotwell got released.
For those of you who don't know, Shotwell is a great open-source photo manager written in Vala.
The new version has some cool features, including but not limited to uploading photos to Picasa Web Albums. ;)

Read the full release announcement here:
http://www.yorba.org/blog/jim/2010/03/shotwell-050-released.html

2010-02-18

To compare, or not to compare? That is a question for you

Since I don't want to sleep yet, but don't have anything to do either, I thought I might as well start with the new, totally random single-topic approach to the Vala Journal.

A while ago (in the first attempt on this journal thingy to be precise), I noted a proposed feature of "complex conditionals". Since there hasn't been much response, it may be better to dedicate a post to it.

It all boils down to a single new added possibility - chain more relational operations in a single expression. Example: if you need to compare a variable to two values, you currently need to do this:

if (1 < a && a < 5) {}

Well, that doesn't look too bad, you're right. What about this?

if (0 < a && a < b && b < c && c < d && d < 255) {
    // do something
} else {
    error ("Invalid data");
}

I don't know about you, but I think this is just evil.
Now, with the complex conditionals thingy, this would be possible:

if (1 < a < 5) {}

if (0 < a < b < c < d < 255) {
    // do something
} else {
    error ("Invalid data");
}

Muuuuuch nicer. :)

However, Jürg suggested that there are more possible approaches to this problem. For example a range syntax:

if (a in [1..5]) {}

I don't find this possibility particularly bad, but it wouldn't allow any fancier chaining, like in my second example.

So, questions for you: What do you thing about it? Which one do you prefer? Do you have any other suggestions?

EDIT:
Ahh, forgot to link the bug report.
https://bugzilla.gnome.org/show_bug.cgi?id=606480

2010-02-17

Issue #3

I apologize for being late with this one. The flu season has finally caught up with me, so I wasn't in a very good shape for writing long texts.

As I have found out recently, it's pointless to post a verbatim list of changes in git, since you can all see it at http://git.gnome.org/browse/vala/log. That means I'll just stick to stuff I find noteworthy, which will be a challenge since my memory sucks.

Alternatively, since I moved this to a blog, I can very well treat it as a blog and simply write about interesting things ad-hoc, instead of trying to summarize them once a week. That would be a lot better, I suppose. What do you think?

Anyway, there have been a lot of fixes again.
Among others, some threading-related functions have been added to the MainLoop bindings. Good for those of you who want to use async functions within threads. Also libpurple bindings have been added.

It is now possible to use the "in" operator with arrays, which is quite nice I think.
Somewhat related is that it's now possible to use a different iterator style, I quote: "If the iterator object has a .next_value() function that returns a nullable type then we iterate by calling this function until it returns null". This can be useful for containers that can't contain null value.

Some might also find interesting that "likely" and "unlikely" functions have been added to the GLib bindings, binding G_LIKELY and G_UNLIKELY macros. Along with that, "static_assert" was added for G_STATIC_ASSERT, which I find utterly useless in Vala as it would cause a GCC error.

Well, that's all for today. Have a good time hacking (in) Vala. ;)

2010-02-08

Valadoc.org is back online

After an unplanned "extended downtime", our lovely documentation site is back to its former glory.

Well, almost. Since the wiki style that allowed us to improve documentation was making the site incredibly slow, all pages are now static.

The site is now fast and the database is to be uploaded to a git repository as XML files, so changes will still be possible. It will be possible to download it and use locally, which is very nice.

Issue #2; the week after

Ah, so it's a week already! The time sure flies by.

2010-02-05

Vala 0.7.10 Released!

Well, I'm a little late with this, but I guess you all already know.

2010-02-03

Issue #1; introduction, questions and whatever

This one was originally posted to the Vala mailing list on Sunday.

Let there be light

So, a few days back, I started with an idea of a periodic summary of what is going on around the Vala programming language, mainly for those subscribed to the mailing list who are not that much interested in bugzilla.