Thursday, June 05, 2008

On AJAX problems with prototype.js v1.5+ (till 1.6.0.2 at least)

My (a little tiring now) work on JOnto 2.0 is getting closer to the finish line. I can almost see the crowd cheering.
Many changes, including WordNet in RDF/OWL and OpenThesaurus (non-English thesauri) support, full-text index, etc.

I decided to check the current version (let’s call it JOnto 2.0 PR 1) with the most recent prototype.js.

To my surprise it did not work. Hanged with no logs whatsoever (as usually with prototype.js).
The bug was not, however, in my code.
It took me a while to recall the details of this deja-vu feeling.

To make sure I will not forget it next time, and for other people to know what is going wrong, here a short description:

If you catch exception with onException(resp, ex) you will see that your script is trying to perform illegal operation.
Firebug reports “Component returned failure code: 0x80070057”
Safari is a little more precise - reports problems with an attempt to set illegal header in the HTTP request.

Where is the bug?

Apparently since prototype.js v1.5, i.e., the first time I have discovered it (since it worked in v1.4) the setRequestHeaders method uses following implementation:

for (var name in headers)
this.transport.setRequestHeader(name, headers[name]);

which does not catch any exceptions

My fix is the following, change this two lines to

var transport = this.transport;
$H(headers).each(
function (header){
        
try{
                 transport.setRequestHeader(header.key, header.value);
        }
catch(ex){
//                 YAHOO.log(header.key, header.value, ex);
        }
});

The question remains how is that possible that some invocations of Ajax.Request do and some don’t produce this problem.
For now - I’d rather patch the script and live on.

Tuesday, May 27, 2008

Ordering cafe in Starbucks - be sure to spell your name right ...

Otherwise your surname might become “Cru” (instead of Kruk)

SP_A0164_2.kqhKgfrXX7qP.jpg


And, never, ever say your name is the “same” as the person who was ordering just before you

SP_A0163_2.OoRCmXjHGypd.jpg

Fat frog

Ever wondered how to make a fat frog cocktail?

SP_A0221.Uyg0RMo0zgRp.jpg

In case you've spent too much time abroad...

(Part 2) Wizzair teaches us new, unified language Polenglish

This is a photo of a boarding card. The whole card is in English, except for the large-font caption, which reads:
“Please go to the gate immedietally” in Polish. The only problem is that word “gate” can no longer be translated into Polish, right? It had to stay “Gate” (instead of “Bramka”). At least someone was trying to make it a Polish-kind of word and did declension (Gate’u).

SP_A0332.WmpcbSurHbD2.jpg

Some problems with geography ?

This is the first post (of many coming) with stuff that is so funny I could not resist myself to capture the moment with mobile phone camera ...

Part 1: Hertz and the the lesson of geography

I never knew for my whole life I was Czech, not Pole. Apparently, Hertz is convinced I am.
And this is not just the labels being switch. The prices sounds right - €50 for “the region I called Poland” and €34 for “the region I used to call Czech Republic”.

SP_A0341_2.5dx6WjtTC6pK.jpg

Monday, May 26, 2008

Leopard supporting Java programming

The problem I usually have when starting to use a new library/API is which JARs to include so that only those required are included, and none else. Usually this is a wild guess, or listing content of all available JARs.

With Leopard (Mac OS X 10.5) this is no longer the case. The new “Preview” comes very handy in times like that.

bydefault1.Qt4uzNyljG2O.jpg

Thursday, March 06, 2008

Is Semantic Web Technology Taking the Wrong Turn?

This is the question Chris Bussler asks in his recent article in the IEEE Internet Computing "Peering" column, edited by Charles Petrie, from DERI Stanford. It is interesting that among few examples of successful, ongoing products of Semantic Web research, Chris mentions JeromeDL. I personally, consider it great success, since it is more than two years now since met the last time. That time JeromeDL was a little more than a rough idea. Now, it can even impress (maybe not everyone - but I do not care about these maggots).

Yesterday I got a chance to present JeromeDL and notitio.us to Nova Spivack from Radar Networks (I am still waiting for my beta account to Twine). He was clearly impressed, with access control module (Extensible Access Control - to be published soon) in JeromeDL, IKHarvester, SSCF (how isn't?), and last but not least - recommendations in notitio.us. TagsTreeMaps and MultiBeeBrowse weren't left without positive impression either. I think this were the best 15 minutes (stretched a little, I know) of sales pitch. Ok, meeting with INEK in Korea was jaw-dropping experience as well, but I had much more time than.

Tomorrow, I should be ready to announce the results of the our evaluation of Semantic and Social technologies in JeromeDL. Stay tuned - you might got surprised if you thought that semantic web technology has gone astray.

Blogged with Flock

Sunday, February 10, 2008

Why do I prefer ntriples?

A thought experiment (actually I had to do that just a minute ago): you have a number of publications backed up from JeromeDL. Each publication is in a separate folder, named as an ID of this publication. Inside you will find dublin core file (XML), couple of binary files (PDFs and such), and RDF description of the resource.

The task: Map a title to each resource using anything you can get on MacOSX or Linux.

Solution: The RDF description in JeromeDL is exported using ntriples format. Which means - one statement per line. Therefore a solution is a very simple workflow:

  1. find the RDF files

  2. prepare grep command

  3. execute


Which on any UNIX system will translate into:
find . -name "rdf.abstract.ntriples" | awk '{print "grep \"xontology#hasTitle\"",$0}' | sh -

Teaser: Try to do that spending only as little time as I did with either RDF/XML serialization or/and Windows. Good luck.

Friday, February 01, 2008

Snow in Ireland (First Day of Spring)

If you ever been to Ireland long enough you know certain facts:
  • there is so much rain - you could start inventing names for different kinds
  • the temperature (almost) never drops below 0C - so there is proper winter
  • the seasons in the Celtic Calendar are different. Spring, for example, starts on Feb, 1st.

And there you go - today is Feb, 1st - and we had quite a "snow storm" in the morning :)

Saturday, January 26, 2008

What is keeping me so busy recently? (2)

Another missing piece of my PhD Thesis was evaluation - which for obvious reasons could not have been done before :)

The first phase has just finished - I have managed to convince 25 victims to finish the evaluation.

Now it is my time to process all the data (I still hope from some help from Ewelina - as usual :D)

What is keeping me so busy recently? (1)

One of the things missing in my PhD Thesis was a chapter on an architecture of a generic SemDL. But before one can move to SemDL architecture, first you need to understand the research in "classic" DLs, and what are the plans for the future. In order to do that, I had to:

1) Take this pile of almost 100 articles on digital libraries architectures, read them, annotate them

DL Arch (source)
Originally uploaded by skruk



2) Compile all this information into a mindmap

DL Arch (mindmap)
Originally uploaded by skruk



3) Write up the results into a missing chapter in my thesis :)