This is not the latest version of Roxen Application Launcher. You’ll find the latest version at the download page
In this release of Roxen Application Launcher (come again?) for Linux I’ve gotten rid of a few dependencies, namely: gconf, libgee and libgnome. The reason I dumped gconf and libgnome was to make it easier to install in KDE. I’ve verified it installs in KDE, although I noticed the translation doesn’t work and the Roxen SVG logo doesn’t show up in the window top border.
Roxen Application Launcher in KDE
Libgee is a collections API written in Vala and since I used a newer version than what is available in most package managers, and I’m not sure all Linux distros provide libgee, I decided to dump it and implement the same functionality with the generic collection classes in Vala. And since the collections used in RAL is quite simple that worked out just fine.
I have also tried to implement bundled download, which is only used in Roxen Editorial Portal. Since I don’t have access to such an installation I haven’t been able to verify it works as expected. I re-implemented the same behavior as in the launcher written in Pike by the Roxen guys.
Oh, and if you already have an installation of my RAL your previously downloaded files and settings will not be available to the new install. Since I dumped gconf I now store the settings in a plain text file and I have put the RAL application directory in
~/.conf is where you should put application specific data according to freedesktop.org. In previous versions of RAL I stored application data in
~/.roxenlauncher so if you want your previously downloaded files copy
The sources is available at Github.
Roxen Appliction Launcher 1.0.3 00:43, Fri 24 September 2010 :: 384.8 kB
I recently began learning how to create Pike modules in C. The Pike module C API seems great and once you’ve sorted things out the modules are easy to build and install. Non the less, when creating a C module from scratch there’s a couple of files you need and some configurations of those before everything is set for go. And here comes “pike-project” into play.
Pike-project is a simple GTK program (works as command line tool also) written in Pike it self. The program will create the basics for a running Pike C module, or a plain installable Pike module. Then it’s just starting programming.
The program is available at my Github repository.
BTW! At the moment it only works on Linux I suppose.
Twingly is a blog search engine that focus on indexing the “blogosphere” rather than being a generic search engine. Twingly has a ping service that let you ping Twingly when you have new content on your blog so that Twingly can head over there and index the new content asap.
Since Roxen CMS have event hooks this module listens for newly published files and when found automatically notifies Twingly about it.
The only thing needed is to set up a config file in the SiteBuilder’s workarea so that this module knows under which paths newly published content should notify Twingly and with which arguments. But all this is documented in the module.
One note! If you run a replicated environment install this module on one of the frontend servers, not the backend. If installed on a backend Twingly might head over to your site before the new content has been replicated.
The Pingly Roxen module 11:32, Fri 09 July 2010 :: 15.4 kB
I ported the original jsmin code written in C to Pike. Then it was just a matter of creating a simple filter module for Roxen. And then it was all done.
You can use two criteria to determine if a script should be minified or not:
And that’s that!
jsmin Roxen filter module 13:34, Mon 28 June 2010 :: 6.1 kB
I’ve found out that it’s great fun programming desktop applications and of course it gets more fun the more you learn. Now I’m doing a Twitter client in Pike – my favorite programming language – mostly because I wanted to try out GTK programming in Pike. I use the good Twitter client Pino – written in Vala – and I have borrowed the concept and layout from it. I call it Tweepi.
The only major difference between Tweepi and Pino – besides they are written in different programming languages – is that Pino uses WebKit to draw the status messages where I am using good old GTK widgets – and I guess there are no bindings to WebKit in Pike for that matter
One thing I noticed is that the
Gtk.Label widget sucks at displaying longer texts that line wraps. Since the label widget handles some HTML formatting I thought that it would be suitable for displaying the status messages, but the text looked like shit, line wrapping where ever it felt like. And the
Gtk.TextView widget doesn’t handle formatting per default so I Googled some and found that you can format text in
Gtk.TextViews by inserting
Gtk.TextTags at desired positions. And since Pike has the most awesome HTML parser It was just a matter of sending the text through the parser and create some
Gtk.TextTags and inserting them at the same position in the text buffer. (Well, actually it wasn’t that easy but with some help from a Python class I found on the web it was doable).
So now I have a start at something that is a
Gtk.HtmlTextView – actually it inherits
Gtk.TextView but has an additional method
insert_html_text(string text) – and albeit quite simple at the moment it’s worth continuing on. The code for the
HtmlTextView is available at my Github repository.
In general I find the GTK implementation in Pike to be pretty OK, but there exist some verbose, and tedious, stuff like getting the text from a
- Gtk.TextBuffer b = my_textview–>get_buffer();
string text = b–>get_text(b–>get_start_iter(), b–>get_end_iter(), 0);
which in Vala and C# would be done like:
- // Vala
string text = my_textview.get_buffer().text;
- // C#
string text = myTextView.Buffer.Text;
Anyway! Tweepi isn’t done yet but I think I have solved the most tedious stuff and it’s starting to become useful. It’ll probably be done in a couple of weeks and I will of course release the sources then.
Although I’m working on some social web related Pike modules where a Gravatar module is included I needed a Gravatar module right now at work so I hacked up a standalone Gravatar Roxen module.
This is how it works
- <emit source=“sql” host=“mydb”
- query=“SELECT name, email, `date`, body FROM my_comments”
- <gravatar-img email=“&_.email;” rating=“pg” size=“32”
- /> &_.name; wrote at <date iso-time=“&_.date;” />
- <wash-html paragraphify=“”>&_.body;</wash-html>
Download the Gravatar Roxen module 14:20, Wed 09 December 2009 :: 7 kB
It’s nice when serendipity is your friend! I was porting my Bitly class from Pike to PHP – I know there’s probably a hundred PHP classes already out there, but mine is better coded – and noted by accident that I had used some Pike syntax in my PHP class but it was working anyway. So what was I doing? In Pike there’s separate data type for associative arrays called
mapping. In Pike, in general, when merging two objects you just join them with a
+ sign. Thus merging two mappings you do like
mapping m1 = ([ “key1” : “Value 1”, “key2” : “Value 2” ]);
mapping m2 = ([ “key3” : “Value 3” ]);
write(“My mapping: %O\n”, m1 + m2);
- //> My mapping: ([ /* 3 elements */
- //> “key1”: “Value 1”,
- //> “key2”: “Value 2”,
- //> “key3”: “Value 3”
- //> ])
And I noted that I had done the same thing in PHP and the result was perfectly valid:
$a1 = array(“key1” => “Value 1”, “key2” => “Value 2”);
$a2 = array(“key3” => “Value 3”);
echo “My mapping: “;
print_r($a1 + $a2);
- //> My mapping: Array
- //> (
- //> [key1] => Value 1
- //> [key2] => Value 2
- //> [key3] => Value 3
- //> )
This method doesn’t work on flat array though so there you’ll still have to use
array_merge(), but pretty nice anyway.
And oh, the PHP Bitly class will be part of the new PLib release once done!
So the Roxen User Conference has come to an end. It’s always nice to meet with people who speak the same “language” (the language of the geeks perhaps), to share experiences and solutions. And of course it was nice to see the Roxen Editorial Portal in action. That’s a pretty cool piece of web based software. It was also nice to get a preview of Roxen CMS 5.0. It will have a few new features that will be nice and perhaps the greatest thing is that it will incorporate Pike 7.8 (which in it self hasn’t been released yet).
Anyway! For me it was a great experience talking to other Roxen customers and share some ideas and views. Oh, and one more nice thing: during the conference Roxen released a community site – planet.roxen.com. I hope it will be a great resource for us Roxen customers and users.
Jonas Walldén, CTO at Roxen, has improved my RXML tag contribution
<trim></trim>. The code is now really beautiful and you can tell the difference from the code written by a lamer, as myself, and a real programmer, as Jonas. Jonas told me that the
<trim></trim> tag will be part of the next Roxen release
Roxen trim tag 17:31, Sat 17 October 2009 :: 4.8 kB
Pike trim module 17:31, Sat 17 October 2009 :: 4 kB
It didn’t take too long to notice that I had f–ked up the
HTMLParser class a little bit. It was how entities was handled that didn’t really worked as expected – entities in tag attributes was duplicated and inserted in the tag content – but the good side of it is that I learned about the
HTMLParser method of the
HTMLParser Pike class. I only want to match entities in the data section – i.e. tag content – and not in attributes and the
HTMLParser method tells you, as the name implies, in what context the entity is found. So my entity callback function now looks like:
- //! Entity callback
protected void ecb(Parser.HTML p, string _data)
- if (p–>context() == “data”)
- line += colorize(entify(_data), “entity”);
which hopefully will be completely bug free now. So one down 854 to go
Codify RXML tag and Syntaxer.pmod 17:31, Sat 17 October 2009 :: 183.9 kB