ring0 » blog

migrating jabberd2 to ejabberd

tags: ring0, services 2010-04-27 08:30 by lhw

After being constantly pelted to change our Jabber/XMPP services from jabberd2 to ejabberd. We took a few hours of time and gone through with it once and for all.

“Thats gonna be easy”, was our first thought on it, “There are merge tools and such”. After testing the tools and running into problems with each of them(not merging at all, producing garbage output), we simply converted the information presented in the jabberd2 database to a ejabberd compatible format. Here is the sql we used to convert our database format: git.ring0.de

Okay the next problem was way worse then the first one. jabberd2 uses UNIX crypt() with salt for saving the passwords where as ejabberd uses plain text passwords by standard, hashes with hacking. As we are not really good with an old language like erlang we hacked ourselves something together. Mainly relying on the features (My)SQL provides us with. And here is the patch against ejabberd 2.1.2: git.ring0.de

Of course this version of the patch requires you to use MySQL with ejabberd therefore relying on the module from ejabberd.im But from this point on it’s easy to patch yourself some SQL together for other servers as well.

vala 0.8

tags: vala 2010-04-05 14:32 by sre

Vala 0.8 has been released on March 31th. Apart from the usual added bindings there are the following really awesome features:

chained relational expressions

void main(string[] argv) {
	var number = argv[1].to_int();
	message("number: %d", number);

	if(1 < number < 10)
		message("number is between 1 and 10");
}

regular expression literals

void main(string[] argv) {
	string msg = argv[1];
	message("msg: %s", msg);

	if(/foo.*bar/.match(msg))
		message("string matches foo.*bar");
}

Support of in for arrays

void main(string[] argv) {
	if("--help" in argv)
		message("You can't be helped!");
}

dova profile

This is kind of secret (note: it has not been announced with the release). You can use the dova profile instead of the glib profile. The leightweight glib alternative can be enabled with “–profile=dova”, but it’s still in heavy development and lots of stuff won’t work. You can find out more about dova on gitorious.


Update (2015-12-27)

Project is most likely dead some information about it can still be found on Gnome.

introduction

tags: ring0 2010-03-21 21:43 by lhw

Welcome to a side product of ring0 development.

As our C version of our blog software is halted for now I took the opportunity, and fixed us up with some Vala CGI. Which is basicly displaying you nicely formated text files.

What this blog is all about is very simple: Displaying our progress in certain fields of development and solutions for uncommon issues with software. Also code snippets.

Have a nice day folks