Tizen install

The previous attempt to install Tizen was abandoned because of all the errors that kept popping up. It turns out I had made an elementary mistake; a mix up of 32 and 64 bit binaries. Sorted out that mess and gave it another go. These are the steps installed. Install Oracle JDK

Why on earth Tizen insist on using Oracle JDK is a mystery why not use Open JDK. Let us not forget that Oracle is the company that files a law suite against the use of Java on the Android platform for god's sake

Install an ancient version of Eclipse.

Downloaded the latest and hottest version of Eclipse direct from the site because distro's repositories only have ancient versions. Well buddy you are going to have to go back to apt or yum or  whatever it is that you prefer to use and install that ancient version because Tizen refuses to work with Eclipse Juno.

You know that Tizen development is going to suck because Juno sucks and Eclipse 3.7 sucks even more (what the hell did they call that anyway? I have already forgotten)

Get the tizen installer

Having downloaded a 100 Mb JDK and a 300 Mb over your lousy over priced internet connection, you will no doubt heave a sigh of relief when you realize that the tizen downloader is just 3.5 Mb. Sorry to disapoint you my friend that's just an online installer the real download is 1.6Gb

[caption id="" align="aligncenter" width="628"]Tizen's loooong download Installing Tizen, a right royal pain[/caption]  
Feb. 18, 2013, 1:16 p.m. » Tagged: eclipse , tizen

Pelican or back to Jekyll?

Pelican, looked really promising. I made more progress with Pelican than any of the other static blog generators with the possible exception of mynt. I even found a Bootstrap template which can be used as a starting point, but still there is that little something missing.

The trouble here is that the article template, which is used to display individual blog posts  seems to combine the post content and the tags all into one. The Article class isn't documented, I looked at the source but it doesn't seem to provide methods to separate  the post body from the tags. Pelican also appears to have limitations on the structure of the permalink.

The obvious thing to do is to fork the project and try to change it so that it behaves the way I want it to behave.  But then, I can do the same with mynt as well. So which one is going to be easier to modify? Perhaps it's better to dump them both and return to Jekyll or punch? Decisions. Decisions.


Feb. 18, 2013, 3:36 a.m. » Tagged: jekyll , mynt , Pelican

Tizen on Ubuntu

Lot of speculative news articles and blog posts these days about the world's largest smart phone maker ditching android in favor of Tizen. What I know about tizen at the moment can be written on the back of a postage stamp (if I can find one lying around), so here is an attempt to put that right. Started off by downloading the Tizen binaries for Ubuntu. I have done this sort of thing far too often to know that it will not work the first time so I was quite prepaperd for the first error, when the installer insisted that I switch to Oracle JDK.

 OpenJDK is not supported. Try again with Oracle JDK.

I have moved forward since my rant, in 2008 against /etc/alternatives but unfortunately Oracle has moved Java in the wrong direction. As a result you still need to download the damn JDK manually and configure /etc/alternatives too. The best guide for that is at askubuntu.  I didn't expect to get far forward after changing to Oracle JDK, and once again I wasn't disappointed.

f you want to install TIZEN-SDK, you must install "gtk2-engines-pixbuf" "ia32-libs"  package(s).

Why they can't just make a plugin for eclipse or netbeans is beyond me.  So what happens after adding the dependencies? this:
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.swt.widgets.Display
        at org.eclipse.swt.widgets.Widget.isValidSubclass(Unknown Source)
        at org.eclipse.swt.widgets.Decorations.checkSubclass(Unknown Source)
        at org.eclipse.swt.widgets.Shell.(Unknown Source)
        at org.eclipse.swt.widgets.Shell.(Unknown Source)
        at org.eclipse.jface.window.Window.createShell(Window.java:487)
        at org.eclipse.jface.window.Window.create(Window.java:430)
        at org.eclipse.jface.window.Window.open(Window.java:790)
        at org.tizen.installmanager.ui.InstallManagerWindow.main(InstallManagerWindow.java:743)
        ... 5 more
Surprise, surprise, the installer is looking for eclipse. Now show me where in the tizen installation guide it says that eclipse is a requirement? or that tizen should be installed as part of eclipse? This error is probably caused by the fact that my version of Eclipse is juno and as such was not installed using apt. Ubuntu 12.04 by default provides only Eclipse 3.7. I suppose installing eclipse through apt ought to fix it but Tizen can wait.  
Feb. 17, 2013, 12:27 a.m. » Tagged: eclipse , tizen

django.template.base.TemplateSyntaxError: 'block' tag takes only one argument

Have you run into an error of this nature? It's because your django template blocks are incomplete. You probably have something like this:

{% block %}

where as what you really ought to have is something like this (choose a suitable name):

{% block content %}

Yes it's a trivial solution. This error  was encountered when trying to import from Wordpress into Cactus. I had reached that stage only after overcoming another one related to encoding, so I just gave up on it. However I felt I the need to write this blog entry because the previous post ranked pretty high in search results, and it seems rude to turn people away without a solution. .  
Feb. 16, 2013, 1:24 a.m. » Tagged: cactus , Django , templates

exit wp

It suddenly occurred to me that the trouble may not be with the all static blog generators that I have been trying out but with the word press exporters. So far I had been using Wordpress to Jekyll exporter but because pelican had trouble with it, I used pelican's own importer. The pelican importer works with the wordpress xml file where as the former is a WP plugin. The importer didn't work out too well either but that started me looking for wordpress to markdown convertors and exitwp was one of the first that I ran across.

exitwp takes the wordpress xml as input and produces a collection of files as output. If you choose markdown as the format the file extension becomes .markdown which is not to Pelican's taste. However using the little known rename command you can change the suffix quite easily.  rename 's/.markdown/.md/' *markdown

Having done so the generated HTML shows up correctly without any visible garbage. However I still have to open the pandora's box labelled templates. OTH, it might be a good idea to use the output from exitwp on other static blog generators and see what the result is like

Feb. 15, 2013, 4:36 a.m. » Tagged: exitwp , jekyll , Pelican , Wordpress


Now how did I miss Pelican in my quest for the perfect static blog generator? Maybe because it's not perfect either but  certainly deserves to be ranked alongside Jekyll and Punch. Since it's written in Python, which means my religious beliefs are not offended.

When trying to import my blog into one of the static generators, the output from WP to jekyll exporter has always been the input. So that same thing was tried with Pelican but it didn't work out too well. The issue seemed trivial however.  Pelican doesn't like the YAML front matter block in each post. Before trying to create a regext to eliminate it,  I looked around for options and was quite pleased to find that pelican can import directly from Wordpress as long as you have something called pandoc installed. Absolutely kicking myself for not knowing about pandoc till now. It looks like a really useful tool.

However the importer had it's fair share of problems producing errors like these:

Feb. 13, 2013, 4:59 a.m. » Tagged: markdown , Pelican , reStructuredText

The trouble with mynt

Even though I resolved to move away from wordpress late December, here I am typing yet another post into wordpress's all too familiar textbox. This is not the first time that I promised myself to ditch WP but this definitely will be the last. The reason that I am still stuck here is not for the want of effort.

After a long journey fraught with pitfalls, during which I looked at many different static blog generators ranging from Punch to Jekyll, I settled on Mynt. It's pitfalls were craftily hidden. The first problem is that mynt does not allow you to use the archive in anything other than the archive template. What the heck exactly does that mean? Well, can you see the archives side bar on the right hand side? that sort of thing is generated using the archive object in mynt. The trouble is that an individual post template does not have access to that object.

A temporary solution to the problem was to copy paste the html from the existing sidebar into the template, yes, that is hard coding, yes it will have to be manually edited once a month, and after a couple of months, I am going to tire of it completely. Even so I used this approach so that I can try to move forward, but after a few steps, I was in deeper. The new problem is that you cannot easily generate a monthly archive with mynt. It's capabilities are limited to generating yearly archives only.

Feb. 12, 2013, 12:33 a.m. » Tagged: mynt , Wordpress

Being found out.

The most under reported event of the year is the attack by Iranian hackers on nic.lk using an SQL injection. It shouldn't even be called hack because the security loop hole that was exploited was as big as a football field. They had an opportunity to cause some pretty serious damage but it seems like they were satisfied with taking a database dump of all the .lk domain names and placing it online. That lead to an epic tumbler post by Rukshan

Road.LK and Traffic.LK - Something I wanted to know for a long time, who owns this ;)

		<d_admincont>Raditha Dissanayake</d_admincont>
		<d_admincont>Raditha Dissanayake</d_admincont>
Yes, folks, i am the owner of the road.lk and traffic.lk domains. Thanks Ruckshan for mentioning us on the same page as Apple and Google. My being a founder of road.lk was never meant to be a secret but I didn't make a public announcement about it either.  I had spoken with a few friends before the project started and they knew about it prior to the launch. Many of the active users in my rather short friend list on Facebook probably guessed it too. On those rare occasions when  someone asked me whether I do in fact own the domain, I quite readily said yes. The reason that I have not gone public with this information is that I am a hermit and very shy of publicity. I haven't had my name featured in any print media since I gave up playing chess many years ago. But now I have been outed, and I guess it's time for me to start talking a lot more about road.lk. For a shy guy, once I start talking, it's rather difficult to make me stop.    
Feb. 5, 2013, 3:19 a.m. » Tagged: road.lk , security