Šī ir trafiks http://advogato.ev-en.org kešatmiņa. Šis ir lapas momentuzņēmums, kāda tā ir parādījusies Thursday 01st 1970f January 1970 02:00:00. Pašreizējā lapa laika gaitā, iespējams, ir mainījusies.

Planet (Former) Advogato

Planet (Former) Advogato

This is a complement to Advogato, it is an aggregation of blogs of those who used to post on Advogato, but for one reason or another moved their blog from Advogato. It is provided as a service to those who would like to read the "greater Advogato" community.

This site works only as a Planet, it aggregates the post only, to comment on a blog entry, click on the title or time to go to the blog entry on the original site, hopefully it will have a comment facility.

July 19, 2009

Philip Van Hoof [pvanhoof]

More introduction to RDF and SPARQL

Introduction

I plan to give an introduction to features like COUNT, FILTER REGEX and GROUP BY which are supported by Tracker’s SPARQL engine. We support more such features but I have to start the introduction somewhere. And overloading people with introductions to all features wont help me much with explaining things.

Since my last introduction to RDF and SPARQL I have added a few relationships and actors to the game.

We have Morrel, Max and Sasha being dogs, Sheeba and Query are cats, Picca is still a parrot, Fred and John are contacts. Fred claims that John is his friend. I changed the ontology to allow friendships between the animals too: Sasha claims that Morrel and Max are her friends. Sheeba claims Query is her friend. John bought Query. Fred being inspired by John decided to also get some pets: Morrel, Sasha and Sheeba.

Ontology

Let’s put this story in Turtle:

<test:Picca> a test:Parrot, test:Pet ;
	test:name "Picca" .

<test:Max> a test:Dog, test:Pet ;
	test:name "Max" .

<test:Morrel> a test:Dog, test:Pet ;
	test:name "Morrel" ;
	test:hasFriend <test:Max> .

<test:Sasha> a test:Dog, test:Pet ;
	test:name "Sasha" ;
	test:hasFriend <test:Morrel> ;
	test:hasFriend <test:Max> .

<test:Sheeba> a test:Cat, test:Pet ;
	test:name "Sheeba" ;
	test:hasFriend <test:Query> .

<test:Query> a test:Cat, test:Pet ;
	test:name "Query" .

<test:John> a test:Contact ;
	test:owns <test:Max> ;
	test:owns <test:Picca> ;
	test:owns <test:Query> ;
	test:name "John" .

<test:Fred> a test:Contact ;
	test:hasFriend <test:John> ;
	test:name "Fred" ;
	test:owns <test:Morrel> ;
	test:owns <test:Sasha> ;
	test:owns <test:Sheeba> .

Querytime!

Let’s first start with all friend relationships:

SELECT ?subject ?friend
WHERE { ?subject test:hasFriend ?friend }

  test:Morrel, test:Max
  test:Sasha, test:Morrel
  test:Sasha, test:Max
  test:Sheeba, test:Query
  test:Fred, test:John

Just counting these is pretty simple. In SPARQL all selectable fields must have a variable name, so we add the “as c” here.

SELECT COUNT (?friend) AS c
WHERE { ?subject test:hasFriend ?friend }

  5

We counted friend relationships, of course. Let’s say we want to count how many friends each subject has. This is a more interesting query than the previous one.

SELECT ?subject COUNT (?friend) AS c
WHERE { ?subject test:hasFriend ?friend }
GROUP BY ?subject

  test:Fred, 1
  test:Morrel, 1
  test:Sasha, 2
  test:Sheeba, 1

Actually, we’re only interested in the human friends:

SELECT ?subject COUNT (?friend) AS c
WHERE { ?subject test:hasFriend ?friend .
        ?friend a test:Contact
} GROUP BY ?subject

  test:Fred, 1

No no, we are only interested in friends that are either cats or dogs:

SELECT ?subject COUNT (?friend) AS c
WHERE { ?subject test:hasFriend ?friend .
       ?friend a ?type .
       FILTER ( ?type = test:Dog || ?type = test:Cat)
} GROUP BY ?subject"

  test:Morrel, 1
  test:Sasha, 2
  test:Sheeba, 1

Now we are only interested in friends that are either a cat or a dog, but whose name starts with a ‘S’.

SELECT ?subject COUNT (?friend) as c
WHERE { ?subject test:hasFriend ?friend ;
                 test:name ?n .
       ?friend a ?type .
       FILTER ( ?type = test:Dog || ?type = test:Cat) .
       FILTER REGEX (?n, '^S', 'i')
} GROUP BY ?subject

  test:Sasha, 2
  test:Sheeba, 1

Conclusions

Should we stop talking about ontologies and start talking about searchboxes and user interfaces instead? Although I certainly agree more UI-stuff is needed, I’m not sure yet. RDF and SPARQL are also about relationships and roles. Not just about matching stuff. Whenever we explain the new Tracker to people, most are stuck with ‘matching’ in their mind. They don’t think about a lot of other use-cases.

Such a search is just one use-case starting point: user entered a random search string and gives zero other meaning about what he needs. Many more situations can be starting points: When I select a contact in a user interface designed to show an archive of messages that he once sent to me, the searchbox becomes much more narrow, much more helpful.

As soon as you have RDF and SPARQL, and with Tracker you do, an application developer can start taking into account relationships between resources: The relationship between a contact in Instant Messaging and the attachments in an E-mail that he as a person has sent to you. Why not combine it with friendship relationships synced from online services?

With a populated store you can make the relationship between a friend who joined you on a trip, and photos of a friend of your friend who suggested the holiday location.

With GeoClue integration we could link his photos up with actual location markers. You’d find these photos that came from the friend of your friend, and we could immediately feed the location markers to the GPS software on your phone.

I really hope application developers have more imagination than just global searchboxes.

And this is just a use-case that is technically already possible with today’s high-end phones.

July 19, 2009 01:16 PM

Michael Still [mikal]

An awesome weekend

I don't tend to write personal things here all that much any more, but I just wanted to say that I had an awesome weekend. It started off with a mate I haven't talked to in years inviting me to go checkout the U brew it place in Hume that the Riot ACT tried out... That was great fun, with the mate putting on a great barbecue, and us producing about 200 liters of beer for bottling in a couple of weeks. I don't think its cheaper than the beers that I would buy from the store, but when you factor in the social event, the barbie, and the fun of doing it yourself it was a great deal. Let me know if you're interested in coming along next time.

Following on from that Catherine and I went and bought the road bike I have been eyeing off for the last week or so. Its a straight bar road bike, which makes it fast without having that bent over stance that I think looks so silly. Its a very fast bike, and I think my skill level is going to need to increase before I feel fully comfortable on it.

Then today was my birthday. I had a nice breakfast with half my family, checked out the ANU food coop, had a nice lunch at home with the rest of my family, and then got some chores done. I now have a fancy gray water tank in the yard, with an immersible pump. That was especially cool because it got it for a great price. Oh, and I got some really cool presents too, like new tools (I like tools), and three Clarkson books.

Overall, I had fun, got stuff done, and ended up with a great bike. I'm stoked.

Tags for this post: blog(S) Comment

July 19, 2009 09:46 AM

July 18, 2009

Ian Macdonald [ianmacd]

Island Life

Well, this is sleepy Kuressaare, a pleasant little town on the south coast of the Estonian island of Saaremaa.

We couldn't get onto the noon ferry crossing today, so we had to sit in the queue for the 13:00 sailing from Virtsu to Kuivastu. We might have done better to book in advance, which we'll now be certain to do for the return journey on Monday.

The drive over the small island of Muhu and then Saaremaa was lovely. Saaremaa is covered in thick pine and spruce forests, not to mention juniper groves. Lighthouses and windmills supposedly dot the landscape, although we've so far seen only one windmill. This is old Estonia, rustic charm at its very best.

Saaremaa is still gloriously unspoilt, the unwittingly fortuitous consequence of many decades of Soviet rule. During that era, all access to the island was strictly forbidden, thanks to the presence of an early radar system and rocket base. The encroaching tourism in the years since independence doesn't yet seem to have put much of a dent in the island. Long may it remain so.

We visited the Kuressaare's castle today, which was good fun. Unlike the previous ruins we've visited on this trip, this castle was still intact, so it was much more interesting to walk around.

One part of the castle that particularly appealed to the imagination was the courtroom, where many a poor sod was sentenced to death and summarily executed by being hurled into a shaft with ferocious lions at the foot. It sends a shiver down your spine, just thinking about it. These days, the roars of the lions from the shaft are mere recordings, but it's enough to get the idea.

Our hotel is a stone's throw from the castle, located right next to the moat. It's a beautifully charming Art Nouveau building with attractive period furnishings. Of all the settings of all the hotels we've stayed in over the years (and that's quite a few), this one ranks pretty highly in terms of picturesque appeal.

At this point, it's hard to know whether to feel sorry or happy for the Baltic countries and their relative obscurity as a travel destination. If more people knew what they were missing by not coming here, they surely would decide to come. Whilst that would provide a very welcome cash infusion for the economy, it would also bring with it the horrors of mass tourism we know and loathe from across the globe.

Estonia is a little bit bigger than the Netherlands, but has less than 10% of the population. No wonder it doesn't feel crowded here.

Full text

July 18, 2009 09:48 PM

Samuel Abels [knipknap]

Journey to Milano

I just got back from a bike trip from Stuttgart, Germany via the Alps to Milano. In the last five days I have ridden the bike in hail, storms, snow, the most extreme rain that you have ever seen, summer heat of 40°C in the shadow, and in the freezing cold. I had expected a hard trip, but I simply can not explain the intensity of what has happened. And on the fifth day, I quit, taking the train instead of completing the last two distances.

Day 1 - The Underestimated [map]

I am starting to Tübingen in the pouring rain, but only ten minutes later the sky clears up. I can comfortably make my way via known roads for now, so I yet ignore my navigational device (Oregon 400t). In Tübingen the Navigator does not know a good path towards Switzerland, so I navigate manually. For the first time in my trip, I head into villages that are unknown to me.
It starts off pretty hilly; a lot more so than I expected. I had intentionally planned the first day to be rather lazy to let my body get used to the work, but after a while I realize that this day is actually a hard part of work. There are almost no plains here, and by the time I arrive at my first hostel for the night I am more than glad to have made it.
During the trip I occasionally feel a slight pain in my right achilles tendon; this is well known to me and I know not to try and compensate by using my left foot. I make sure to ride extra carefully.
The hostel in Stein am Rhein is quite good, and I can lock my bike away in a room with only few other people. I take a walk into the city in the evening and after a meal that is rather low in calories, I get a good night of sleep.

Day 2 - The Overestimated [map]

My muscles feel pretty good, and shortly after starting the pain in my achilles is back. It still doesn’t affect my strength, but is significant enough to remind me to be careful. After a rather hilly start I cross the Obersee. In the middle of the dam it feels like the ocean, and it’s a great way to start into the Alps that are now towering in front of me. I had a lot of respect for the Alps - apparently too much, in fact. After climbing the first large mountain I remember thinking that this was *a lot* easier than I expected, and can enjoy a huge and slow decent. I end up at the Lauerzer Sea, which is an incredible sight. For the first time I stop to take a picture. Upon stopping I notice that my arms are burned from the sun, so I take the opportunity to apply some sun blocker as well.
The trail continues with some small climbs, until I end up at the Gotthard. This is an utterly exhausting way to end the day, and I could not have crammed much more into it. Today’s 165 kilometres are enough.
The hostel in Hospental is very friendly and nice, and the owners are trying to do everything to make it a warm and familiar place. There are three other people my age who are travelling the Swiss to go to a festival in Locarno. We have a nice evening and I am glad to have met them.

Day 3 - Can It Get Any Worse? [map]

My muscles are starting to feel used, but my achilles is now pain free. Today starts sunny, and after climbing the missing 500 vertical meters on the Gotthard I am in for at least 70km of decline. The first 10 or 15 km of this is cobblestones though, so it is not a fast or very pleasant ride. Still, this was no doubt the easiest part of the trip. I continue in the growing heat, and this is where things start to go ugly.
It is now at least 35°C in the shadow, and on a steep climb of 10% I am starting to get really grumpy. I can’t be in the shadow, so I am riding in at least 45°. The heat is too much to take, the traffic unbearable and the stink of molten asphalt in the air adds more; I see and feel the heat waves coming from the ground. I barely make it up the mountain. At least I get another decline in return, but on the next hill at km 135 I feel like falling off my bike. I take a 15 minute break, and then finally cross the border to Italy to make it to Como. I drop my luggage at the hostel and head on for Milano.
The ride to Milano and back adds another 80km on top of the 145 that I already did, and due to the still increasing heat this is almost more than I can take. I am going at 15km/h now, but in the end I do manage to make it back.
In the evening I go get some food at an excellent Italian restaurant and call it a day.

Day 4 - It Can Always Get Worse!

I did not sleep well, and I get up at 6:30 in the morning. Today’s distance is one of the shortest, but after having seen the Gotthard going in the other direction yesterday this one scares me the most. For the first time, my muscles already feel tired in the morning. Still, my achilles feels well.
Again, the sun is shining and I swear that if today turns out to be as hot as yesterday I am going to quit. Little did I know.
Only 30 minutes later, all hell breakes loose; clouds are coming, and what seems like a strong storm at the time starts. It is still warm, so I am actually glad to be able to start in the rain. It takes only a minute to soak my clothes, but remembering yesterday’s heat I don’t mind that at all.
After riding in the pouring rain for half an hour, things get worse. The rain is now so strong that all roads turn into rivers; this is difficult with the bike because you can’t see the potholes, of which there are plenty in Italy. Another hour later, I the rain stops for a short while - only to come back even stronger. I feel a sharp pang in my neck; this is the first of many hail balls that are now falling down. I take a short shelter, but after only 2 minutes the hail is gone and only water keeps rushing down all around me. The temperature is still an acceptable 15°C or so.
For the next couple of hours there is so much rain that there are almost no cars on the streets, and there is always 5 - 10cm deep water on the street in front of me. There are just unimaginable amounts of water rushing down. Nonetheless, I am making good progress sneaking closer to the Gotthard, and finally the ascend that scared me so begins.
There is an incredible surreal moment: Before me, there is the street that is now a river, left and right of me are green mountains towering above, and everywhere else are just clouds; there is nothing else. For a moment I feel like there is nothing else in the world. And then I remember feeling like Frodo on his endless journey.
For a few hours I climb up the Gotthard and at the top there is enough snow to build snow men. I remember that my muscles felt well; this was a lot easier than I thought it would be. I am not yet at my hostel, however.
All that’s left for today is letting it roll for 10km - I was looking forward to this, but now I am not so sure - I am completely soaked, and it is still raining, and it is at most 5°C up here. By the time I arrive at the hostel I am freezing so much that I shake all over my body, I can’t move my head because my neck stiffened, and I can barely get out of my clothing the get a warm shower.
After today, everything I own is completely soaked, and the lady at the reception is hanging up my money to dry.
Tonight I meet two brothers who are travelling from Belgium and back in a month; they almost had half of their trip done today.

Day 5 - It’s Over

I got only 2 - 3 hours of sleep at night because it was too cold. Also, my clothes are all still wet. At breakfast we are discussing the weather - it had cooled down even further, and snow has fallen only 100m above of us. It did not melt, too.
My muscles feel better than yesterday, so I decide to give today’s trip a go despite the cold. I get into my wet clothes and start the tour, but after only 2km I am again shaking from the cold - my summer’s clothing is all I got, and that is definitely not enough to make a 40km descend down the Gotthard - even in the valley, the climate is now too cold. So I head for the nearest railway station, and go back to Stuttgart by train.

July 18, 2009 08:09 PM

Thomas Thurman [marnanel]

The cap of maintenance

Cap of Maintenance

Does a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?


The Tao of Programming, 5.4
I like to make things. I like it a lot. It's one of my favourite things in the world. I also like to maintain things: not quite as much, but still a lot. It's fun as well as being a responsible thing to do.

The problem is this: the one leads inexorably to the other. If you spend thirty hours on a project, and you do it well enough that the project succeeds, you will spend three hundred hours maintaining it. Now, you only have so much time. If you spend a quarter of your time making things and the rest maintaining them, eventually you will have to stop making things in order to have enough time to maintain the things you have already made. You will have to take off the wizard's hat and spend the rest of your life wearing only the cap of maintenance. And that's a shame, because while maintaining things is fun, creating new things is more fun, and more like play; it would be a shame for it to vanish completely from your life. Note that I haven't said I'm talking about software here. I am, partly, but it applies to other endeavours as well: I'm also thinking of fiction and poetry.

This whole line of thinking started the other day because the users of four of my old projects (very reasonably) started asking for certain fixes, at the same time as I had some ideas for new projects: I always have ideas for new projects, probably more ideas than I have years left in my life. I began to realise that not only did I not have time to work on any new projects in themselves, I wouldn't have time to maintain them if I did.

This is also part of why I'm so excited both about gnome-shell and about the ideas which came up for Metacity at Gran Canaria; I've been only fixing bugs in Metacity, rather than adding new features, for over a year now. And perhaps that's necessary; I like the idea of projects asymptotically approaching perfection. But it doesn't solve the problem of decreasing creation opportunity over time.

So what are the solutions? There aren't any good ones.
  • Refuse to maintain old projects. This is silly and irresponsible.
  • Obsolete the project eventually. This is sometimes necessary, but it's irresponsible to do it because you don't have enough time to write fun code, rather than for technical reasons.
  • Spend your whole time working on new projects that nobody will use, either because you don't distribute them or because they are of interest only to a deliberately tiny group of people. I think this was my unconscious strategy in software for years before I got into GNOME and discovered that writing things which were useful to people was actually far more fun. It's still my strategy for poetry and fiction: I write things and perhaps put them up on my blog and then never even try to do anything with them to share them with the world.
  • Pay someone to look after it. This rather requires that your idea makes money and that you're willing to found a company to run it. However, you need business and leadership skills, which isn't true of me, and the thing you're making needs to be capable of making money, which isn't true of anything I've ever invented for myself.
  • Get someone else to maintain what you make. The first piece of free software I wrote which was actually useful to people was Gnusto, and that was a maintenance nightmare because it used lots of rarely-touched parts of the Mozilla API which kept changing at no notice. Fortunately someone else picked it up and turned it into Parchment, making it something more wonderful than it had ever been. I suppose there must be people out there who enjoy doing maintenance more than making things, but perhaps not: finding people who are willing to take on your stuff is not really a trivial task. Of course, someone else will have to take over maintenance of your projects one day anyway, unless you happen to be immortal.
Is there a sustainable way to balance the desire to make new things with the ongoing responsibility to maintain them?

Photo © Jeff/Godfrey, cc-by-nc.

July 18, 2009 07:40 PM

Steve Kemp [Stevey/skx]

I didn't make a statement. I asked a question. Would you like me to ask it again?

On my own personal machines I find the use of logfiles invaluable when installing new services but otherwise I generally ignore the bulk of the data. (I read one mail from each machine containing a summary of the days events.)

When you're looking after a large network having access to logfiles is very useful. It lets you see interesting things - if you take the time to look and if you have an idea of what you want to find out.

So, what do people do with their syslog data? How do you use it?

In many ways the problem of processing the data is that you have two conflicting goals:

  • You most likely want to have access to all logfiles recorded.
  • You want to pick out "unusual" and "important" data.

While it is the case you can easily find unique messages (given a history of all prior entries) it becomes a challenge to allow useful searches given the volume of data.

Consider a network of 100 machines. Syslog data for a single host can easily exceed 1,000,000 lines in a single day. (The total number of lines written beneath /var/log/ on the machine hosting www.debian-administration.org was 542,707 for the previous 24 hours. It is not a particularly busy machine, and the Apache logs were excluded.)

Right now I've got a couple of syslog-ng servers which simply accept all incoming messages from a large network and filter them briefly. The remaining messages are inserted into mysql via a FIFO. This approach is not very scalable and results in a table having millions of rows which is not pleasant to search.

I'm in the process of coming up with a replacement system - but at the same time I suspect that any real solution will depend a lot on what is useful to pull out.

On the one hand having unique messages only makes spotting new things easy. On the other hand if you start filtering out too much you lose detail. e.g. If you took 10 lines like this and removed all but one you lose important details about the number of attacks you've had:

  • Refused connect from 2001:0:53aa:64c:c9a:xx:xx:xx

Obviously you could come up with a database schema that had something like "count,message" and other host-tables which showed you where. The point I'm trying to make is that naive folding can mean you miss the fact that user admin@1.2.3.4 tried to login to host A, host B, and host C..

I'm rambling now, but I guess the point I'm trying to make is that depending on what you care about your optimisations will differ - and until you've done it you probably don't know what you want or need to keep, or how to organise it.

I hacked up a simple syslog server which accepts messages on port 514 via UDP and writes them to a FIFO /tmp/sys.log. I'm now using that pipe to read messages from a perl client and write them to local logfiles - so that I can see the kind of messages that I can filter, collapse, or ignore.

Its interesting the spread of severity. Things like NOTICE, INFO, and DEBUG can probably be ignored and just never examined .. but maybe, just maybe there is the odd deamon that writes interesting things with them..? Fun challenge.

Currently I'm producing files like this:

/var/log/skxlog/DEBUG.user.cron.log
/var/log/skxlog/ALERT.user.cron.log
/var/log/skxlog/INFO.authpriv.sshd.log

The intention is to get a reasonably good understanding of which facilities, priorities, and programs are the biggest loggers. After that I can actually decide how to proceed.

Remember I said you might just ignore INFO severities? If you do that you miss:

IP=127.0.0.1
Severity:INFO
Facility:authpriv
DATE:Jul 18 15:06:28
PROGRAM:sshd
PID:18770
MSG:Failed password for invalid user rootf from 127.0.0.1 port 53270 ssh2

ObFilm: From Dusk Til Dawn

July 18, 2009 03:10 PM

Orna Agmon [ladypine]

What Shall We Do with a Coughing Yael? Early in the morning.

Each morning during the last couple of days she would get up, cough a bit, then drink her milk, claim it makes her cough, cough some more. Today (Saturday, but of course) she already complained about a sore throat. I started going over her medicine cabinet in my head, but nothing is against a sore throat there.

What would I do to relieve my own pain? Suck something like Strepsils or Lemosin. Lemosine is not indicated for usage in children under 12 years. Strepsils is, but it is a hard candy, and she is not allowed that till the age of 5. Milk and honey might help, but she might be allergic to honey.

I started explaining to her how important it is not to swallow, but only to suck. Cold sweat ran over my back imagining me sitting next to her for long minutes, waiting for her to (not) choke on the medicine. Trying to do Heimlich maneuver on her with a fragile piece of lozenge, when it is close to the end, or is it worse to attempt it with a big, slippery new lozenge? I needed a way to always hold the lozenge in her mouth. I was not going to let her choke.

Solution: garlic. Garlic is sold in a Nylon net. I washed the net, inserted the lozenge in, and told Yael to hold the edges of the net in her hand, while keeping her mouth closed.

She enjoyed the taste, the feeling of being grown up, and ... the relief of throat ache.

July 18, 2009 04:58 AM

Thomas Thurman [marnanel]

My brother knows Karl Marx

Just because it's the freaking Sultans of Ping FC, here's THAT SONG.

July 18, 2009 03:33 AM

July 17, 2009

Ian Macdonald [ianmacd]

Washing, Ironing, Fucking, Etc.

That was the slogan I saw today on a T-shirt bearing the acronym W.I.F.E. Another sign, if any were needed, that we're in a beach town. Still, I haven't yet seen a T-shirt glorifying the pastime of excessive drinking, so the area must be better than most.

And it is. I've changed my mind about Pärnu. I like it. It's Saturday today and the town felt as if it had ratcheted down a gear or two. The oppressive humidity broke and the mercury in the thermometer sank a few degrees, resulting in nigh on perfect circumstances for a visit to the beach.

And a fabulous beach it is, too, living up to and surpassing our highest hopes: not too crowded; clean; a gently-receding and therefore shallow shoreline; good toilet facilities; powdery, golden sand; water a comfortable temperature. Who'd have thought a beach this good was lurking along an inlet from the Baltic Sea?

Of course, as I wrote yesterday, to the Estonians, Finns and Swedes, it's anything but a secret. Outside of those ethnic groups, however, it seems much less well known. I still haven't heard any other languages here, although many menus are also written in Russian and English, so there's a clue.

We spent the entire morning on the beach. The children enjoyed themselves no end, both in the water and on the sand. Surprisingly, we eventually left at Eloïse's behest, as she was getting very tired. Lucas was already fast asleep in the buggy by that point.

After lunch, we walked around town again, this time encountering wide, leafy green boulevards, quietly charming parks and the occasional prestigious mansion.

Café Picadilly provided a terrific cup of coffee and a reasonably good slice of cake, which was just what was needed to plug the post-lunch, pre-dinner gap.

After playing with the children in a nearby park, we went to pick up our laundry, now fresh and clean again. It's often tricky finding somewhere practical to do laundry when you're on the road. Hotels offer the service, of course, but you might as well buy new clothes for the prices most of those liberty-taking bastards charge.

Lucas is very close to walking now. He climbs to his feet, unassisted by us or any nearby objects. He then stands for a good twenty seconds or so, teeters on his toes, legs too far apart, before either flopping back onto his bum or diving forward, onto his hands, and crawling away. One day soon, he's going to put one foot in front of the other and his days of crawling will be behind him.

He's also developing a better understanding of language and an even more congenial sense of humour. If we ask him for kisses, he now purses his lips and cranes his head in our direction. When we lean forward to kiss him, he responds in kind, kisses in the manner of a goldfish and then giggles with glee.

In the last few days, he's also taken to babbling in a very consistent-sounding gobbledygook. It's an incredibly endearing sound when he does it and we're trying to capture its sound in a short video clip.

Dinner this evening was, as predicted, of very high quality, although not the best meal of the trip so far for me. Dinner in Nida the second evening and in Sigulda the first are still my favourite meals so far.

Breakfast, too, at this hotel, is delicious. I thought the pancakes, in particular, were perfectly cooked, with delicious apricot and bilberry jams to spread on them.

We leave Pärnu tomorrow and head west to Estonia's largest island, Saaremaa. We'll be staying in the town of Kuressaare for a couple of nights.

Saaremaa is about the size of Luxembourg, so we'll see only a small amount of it, but it's always nice to get out onto an island, as, so often, they're palpably different to the mainland, not just in terms of the geography, but also socially, giving a distinctly different impression of the country within whose political borders they lie.

To get to Saaremaa, we have to take a ferry from Virtsu on the mainland to the island of Muhu. Muhu is connected, in turn, to Saaremaa by a causeway, so we need only one ferry tomorrow.

We've now got the next ten or so nights firmly planned with accommodation already booked. Plotting out the days and weeks ahead, it appears that we will have time to make the anticipated excursion across the Gulf of Finland to Helsinki. I booked our round-trip ferry crossing this evening, plus the last available room in our hotel of choice, so I'm pleased to have secured that leg of the trip.

I hope the weather stays good tomorrow.

Full text

July 17, 2009 10:27 PM

Thomas Thurman [marnanel]

Strong geography

Feministe has put up a Google map called "Strong Geography" where they are inviting people to add little stories of where and how they felt most strong. It's fascinating to read.

July 17, 2009 05:33 PM

If I was a Wikipedia vandal

Most of what I do on Wikipedia is reverting vandalism, so I don't want to introduce any more of it. But sometimes I daydream:

July 17, 2009 04:18 PM

Shlomi Fish [shlomif]

What you can do with File-Find-Object (that you can't with File::Find)

I've written about File-Find-Object before, but I've intended to write an entry demonstrating its philosophical advantages over the core File::Find module. Today, I'd like to get to it.

As opposed to File::Find, File-Find-Object is:

  1. Has an iterative interface, and is capable of being interrupted in the middle.
  2. Can be instantiated and be used to traverse an arbitrary number of directory trees in one process.
  3. Can return result objects instead of just plain paths.

I'd like to demonstrate some of these advantages now.

Case Study #1: Looking for a Needle in a Haystack

Let's suppose you have a huge directory tree containing many directories and files, and you're looking for only one result (or a few ones). Once you found that result you wish to stop. This question was raised in this Stack Overflow post.

So how can you do it with File::Find? Not very easily. Either you can throw an exception:


sub processFile() {
   if ($_ =~ /target/) {
      die { type => "file-was-found", path => $File::Find::name };
   }
}

eval {
    find (\&processFile, $mydir);
};

if ( $@ ) {
    my $result = $@;
    if ( (ref($result) eq "HASH") && 
         ($result->{type} eq "file-found")
       )
    {
        my $path = $result->{path};
        # Do something with $path.
    }
    elsif ( $result ) {
        die $result;
    }
}
else {
   # be sad
}

This is incredibly inelegant, and abuses the Perl exception system for propagating values instead of errors. But there's even a worse way, using $File::Find::prune:

#! /usr/bin/perl -w

use strict;
use File::Find;

my @hits = ();
my $hit_lim = shift || 20;

find(
    sub {
        if( scalar @hits >= $hit_lim ) {
            $File::Find::prune = 1;
            return;
        }
        elsif( -d $_ ) {
            return;
        }
        push @hits, $File::Find::name;
    },
    shift || '.'
);

$, = "\n";
print @hits, "\n";

Here, we prune all the levels from the results up to the root to get out of the loop.

So how can you do it with File-Find-Object? In a very straightforward manner:

#!/usr/bin/perl

use strict;
use warnings;

use File::Find::Object;

sub find_needle
{
    my $base = shift;

    my $finder = File::Find::Object->new({}, $base);

    while (defined(my $r = $finder->next()))
    {
        if ($r =~ /target/)
        {
            return $r;
        }
    }

    return;
}

my $found = find_needle(shift(@ARGV));

if (defined($found))
{
    print "$found\n";
}
else
{
    die "Could not find target.";
}

The find_needle() function is the important thing here, and one can see it doesn't use any exceptions, excessive prunes or anything like that. It just harnesses the iterative interface of File-Find-Object. And it works too:

shlomi:~$ perl f-f-o-find-needle.pl ~/progs/
/home/shlomi/progs/Rpms/BUILD/ExtUtils-MakeMaker-6.52/t/dir_target.t
shlomi:~$

Case Study #2: Recursive Diff

Evil Djinni from Disney's Aladdin

Let's suppose an evil djinni has removed the -r flag from your diff program, making you unable to recursively find the differences between files in two directory tree. As a result, you now need to write a recursive-diff program in Perl that will run diff -u on the two copies of each equivalent path in the two directorie.

Since File::Find cannot be instantiated two times at once, then when using it, we will need to collect all the results from both directories, and then traverse them in memory. But with File-Find-Object there is a better way:

#!/usr/bin/perl

use strict;
use warnings;

use File::Find::Object;
use List::MoreUtils qw(all);

my @indexes = (0,1);
my @paths;
for my $idx (@indexes)
{
    push @paths, shift(@ARGV);
}

my @finders = map { File::Find::Object->new({}, $_ ) } @paths;

my @results;

my @fns;

sub fetch
{
    my $idx = shift;

    if ($results[$idx] = $finders[$idx]->next_obj())
    {
        $fns[$idx] = join("/", @{$results[$idx]->full_components()});
    }

    return;
}

sub only_in
{
    my $idx = shift;

    printf("Only in %s: %s\n", $paths[$idx], $fns[$idx]);
    fetch($idx);

    return;
}

for my $idx (@indexes)
{
    fetch($idx);
}

COMPARE:
while (all { $_ } @results)
{
    my $skip = 0;
    foreach my $idx (@indexes)
    {
        if (!$results[$idx]->is_file())
        {
            fetch($idx);
            $skip = 1;
        }
    }
    if ($skip)
    {
        next COMPARE;
    }

    if ($fns[0] lt $fns[1])
    {
        only_in(0);
    }
    elsif ($fns[1] lt $fns[0])
    {
        only_in(1);
    }
    else
    {
        system("diff", "-u", map {$_->path() } @results);
        foreach my $idx (@indexes)
        {
            fetch($idx);
        }
    }
}

foreach my $idx (@indexes)
{
    while($results[$idx])
    {
        only_in($idx);
    }
}

( As a bonus, we do not need to sort the results explicitly at any stage, because File-Find-Object sorts them for us. )

This program did not take me a long time to write, it works pretty well, and does populate a long list of results of one or both directories.

Conclusion

If you use File-Find-Object instead of File::Find, your code may be cleaner, your logic less convulted, and you may actually be able to achieve things that are not possible with the latter. I hope I whet your appetite here and convinced you to give File-Find-Object a try.

So what does the future holds? I recently ported File-Find-Rule to File-Find-Object and called the result File-Find-Object-Rule . As a result, "->start" and "->match" are now truly iterative, and I believe you can iterate with them on several objects at once. As I discovered by porting File-Find-Object-Rule-MMagic, I unfortunately cannot maintain full backwards compatibility with the plugin API of File-Find-Rule, because the latter exposes some of behaviour of File::Find (in a leaky abstraction fashion).

I'm planning on porting more File-Find-Rule plugins to File-Find-Object-Rule, and would appreciate any help. I also would like to look at the directory tree traversal APIs of other languages to see if they contain any interesting techniques.

July 17, 2009 01:00 PM

Michael Terry [mterry]

When Is ö Less than o?

I love the UCA (Unicode Collation Algorithm). It’s all about how to sort words in any given language. Some languages have intriguingly different rules (most of that page is pretty dry, but it does have interesting tidbits like: German dictionaries and German telephone directories have different sort orders).

July 17, 2009 12:47 PM

July 16, 2009

Ian Macdonald [ianmacd]

Rain And Shine

We left Sigulda in the pouring rain this morning, but reunited with the sun as we reached the coast and turned northwards towards Estonia.

The sun was a faithful companion all the way to our destination, as if a meteorological metaphor for the fact that Lucas also remained sound asleep until we were in our hotel's car-park.

The drive took about 2.25 hours and was very relaxing, carrying us through seemingly endless forests, a glimpse of the sea occasionally teasing us through the trees.

So, here we are in Pärnu. Estonia doesn't immediately strike me as a lot different to either Latvia or Lithuania, with the obvious exception of the language. Latvian and Lithuanian have some commonalities, even if speakers of the two languages are not mutually intelligible, but Estonian is an entirely different kettle of fish.

Still, my first stab at the language today went well, as I enquired what time a laundrette would open on Saturday.

Pärnu is not really my kind of place. It's quite pretty, but has given itself over entirely to tourism. The Finns and the Swedes are, indeed, here in droves, as are Estonians from all over this small country. I haven't yet heard any German or Dutch voices, but it must surely only be a matter of time.

We looked around town today and ate at a local pizza place. The food, whilst delicious, carved a path through me like a luge along an Olympic ice chute, but took just long enough for us to have left the restaurant and no longer be in its vicinity. As we walked through town, I had to charge like greased lightning into a nearby restaurant to avert an unthinkable calamity. It was a close shave, I can tell you.

With the day's excitement out of the way, we continued our walk around town. There's not much going on here, apart from what you usually find in a coastal beach resort. It's all got an Estonian twist, of course, but is otherwise unremarkable.

The beach, though, is still an unknown quantity at this point. We're saving that for tomorrow.

Dinner was Estonian Tex-Mex at Mõnus Margarita. Well, you've got to give these things a go, haven't you? The food was disappointingly (yes, a disappointment, which proves I'm an optimist) poor, but a terrific play corner, featuring a large pen filled with the kind of plastic balls that you can dive into and drift across, kept our two children out of our hair for at least some of the meal.

The weather was roasting hot today, or at least seemed it, with the awful humidity that accompanied the heat. I was hoping that evening thunderstorms would dispel the oppression, but they haven't materialised.

Our hotel is nice, but overpriced. It does, however, boast an award-winning chef, at whose restaurant we have made a reservation for tomorrow evening. We should therefore be in for a good meal, at least. I wouldn't be surprised if breakfast turns out to be something special, too.

Well, let's hope tomorrow's beach turns out to be something to write home about. There must be some reason all those people come here. Otherwise, it's as good a place as any to do some laundry.

Full text

July 16, 2009 10:14 PM

Thomas Thurman [marnanel]

A meta-post about blogging

Part one: There are several interesting discussions currently going on on the Metacity blog, including the development of optional and experimental subsystems for CSS theming and window matching, and whether applications should be able to extend the window menu (so if you have Istanbul installed, you could add Screencast this window to all windows.) Hop over and add your two penn'orth.

Part two: I don't know any good content management systems. "Good" here means:

  • easy for the end user to use (which is not usually me)
  • without continual security holes
  • not requiring MySQL
  • if possible, not requiring PHP; Perl or Python would be lovely.
Moveable Type goes some way towards being "good", but my complete blog is so large that it takes three quarters of an hour to publish it in static mode, and the dynamic mode appears to require weird and clunky PHPisms. I have worked around this to some extent by using MT's rather nice dashboard, but turning off dynamic publishing, and writing a simple but fairly powerful mod_perl system called Plough which produces dynamic content by reading out of the database of a MT installation and running the results through Template Toolkit. Several of the sites I look after now use this system. I rather like it, but it's not really ideal: MT requires me to keep the static files around anyway, and they waste space.  Maybe there are better answers out there.

Part three: This blog's syndication is in a bit of a mess. It currently exists in four places:
  • LiveJournal, here, where it started. Archives are here going back to 2001.
  • Dreamwidth, here-- but not everything has been imported from LJ.
  • GNOME Blogs, here-- generally the same content as LJ, but not entirely. This is what is syndicated to Planet GNOME.
  • marnanel.org, here-- again, not exactly the same content, but all public entries from LJ have been imported (although the comments haven't). This is what is syndicated to Planet Collabora.  It's powered by Plough, of course.
I update the blog by writing it on Dreamwidth, letting Dreamwidth syndicate the content to LJ, and then copying it manually to GNOME Blogs and marnanel.org.  I'm okay with this as syndication, but I think it would be good if I had fewer things to update.  I'd quite like everything to end up on marnanel.org, for the increased control over styling and the googlejuice; I might perhaps write a script which updates marnanel.org and GNOME Blogs according to what's new in Dreamwidth's RSS.

Part four: I am still planning to write up GCDS, but this is not that post.

Part five: It has been mentioned that I don't blog about GNOME much any more, and that this is possibly not ideal for Planet GNOME.  This happens because almost all my GNOME hacking involves Metacity, and of course that goes on the Metacity blog; I only mention here what I've already written there.  If you have suggestions to fix this, please let me know!  (Before you ask, the Metacity blog can't go on Planet GNOME; it's not allowed.)

In news unrelated to blogging, my temperature has reached 99.6°F (38°C) and I feel rather awful. I hope I feel better tomorrow.

July 16, 2009 10:11 PM

Jeff Waugh [jdub]

QotD: Brian Aker

Some companies lack “open source table manners”. Often they don’t know what is expected. Like my cat bringing dead mice to the dinner table.

– Brian Aker, with some tiny Twitter wisdom

July 16, 2009 07:28 PM

Hubert Figuière [hub]

Eleven

Today AbiWord is eleven year old according to this commit.

Over these 11 years, it has been ported to 5 different platforms/toolkits, 2 of these having been dropped (QNX and BeOS), 1 on life support (MacOS X). It has had 3 build systems. Plain Makefiles, autotools and then a rewrite of the autotools build system for better, not mentioning the "IDE" support. It has had 3 different servers, one at SourceGear, one at the University of Omaha, Nebraska and the current at the University of Twente in the Netherlands, running respectively Debian, FreeBSD and Fedora. Also 2 version control systems: CVS then Subversion.

According to ohloh, AbiWord have had 79 committers, including the 5 top with over 1400 commits, 405K Lines of C++ Code (and more with the other languages) 1929 source files in the tree. According to ohloh, again, AbiWord code base is worth close to 10M$ (I'm not convinced about that last statement from ohloh metrics, but why not).

And we forgot to celebrate the 10 years last year. :-(

July 16, 2009 05:48 AM

July 15, 2009

Ian Macdonald [ianmacd]

Bunkers, Castles And Cable-cars

This morning, we drove up the road to Līgatne in order to visit a former Soviet bunker located nine metres beneath a rehabilitation centre.

The bunker was designed to enable the orchestration of a nuclear war to continue underground in the event of life above ground having become untenable. It was such a closely guarded secret that knowledge of its existence only became public in 2003, twelve years after Latvia's becoming an independent nation once again.

The stench of the subterranean stale air was overpowering, but the tour was fascinating, nonetheless. Amongst other things, we were shown telephones that had once provided a hotline to the Kremlin, ancient Russian computers, a radioactivity decontamination room, and the kitchen where the staff ate. For kicks, I tried on a gas-mask for size.

No-one who worked in the rehabilitation centre upstairs knew of the existence of the bunker below their facility. How this secret was kept is anyone's guess.

Our guide told us that local residents, some of whom had been employed in the bunker (it was a civilian facility), are still afraid to talk about their experiences there. This means that, even now, many questions about the operation of the bunker remain unanswered. Hardly surprising, when you consider that these people lived in an era when fear that your neighbour or even your spouse might actually be a KGB agent struck terror into the hearts of many.

It was another chilling reminder of how recently Cold War activities were suspended.

Afterwards, we went to the nearby town of Cēsis, where we had a wander around. After watching Eloïse play in some fountains, we headed back towards the car, stopping off at a place called Aroma for a notably bad lunch. Medium rare pork: ugh!

Back in Sigulda, we went on a hike that took us past a couple of castle ruins, on a cable-car across a valley, and eventually down to the Gūtmaņa Cave.

A girl passing by on a golf-cart-style sightseeing buggy spotted us at the bus-stop and gave us a ride back to our hotel for a couple of lats.

We decided on the easy option of dining at our hotel's restaurant, which happily turned out to serve excellent food. A nice addition to the meal was that we got talking to a Dutch couple who are making a tour of the Baltics very similar to our own. I wouldn't be surprised if we ran into them again.

Tonight's our last night in Latvia for a while, because our destination for tomorrow is Pärnu on the west coast of Estonia. The drive will theoretically take us about two and a half hours.

Pärnu is supposedly a top summer beach destination for Finns and Swedes, who jostle with the Estonians for hotel rooms and a prime spot on the sand. I believe it, too, because we had plenty of trouble finding a hotel room in the town.

I'm looking forward to seeing how Estonia differs from Latvia and Lithuania. It's the only country we won't be leaving and re-entering (unless we decide later to make an excursion by boat to Helsinki) as we continue our clockwise tour of the Baltic region, because we'll enter along the west coast and drive in semi-circular fashion over to the east of the country, before re-entering Latvia.

It's hard to believe that we've already been on the road eleven days. It's all gone so quickly. At the same time, though, we've packed in quite a lot, making the first couple of days in Lithuania seem more like three weeks ago now.

Full text

July 15, 2009 10:30 PM

Orna Agmon [ladypine]

שפה חדשה


"החלב משעיל אותי" - גורם לי להשתעל

"את יכולה להחביר את הטלויזיה?" - להגביר, לעשות שיהיה חזק

"זה מסוכן לקפוץ באמבטיה, את עלולה לשבור את המפרקת."
"עכשיו היא חבּורה?"
את מתכוונת האם עכשיו היא שבורה?
לא, חבורה.
את מתכוונת מחוברת?
כן!

נשאלת השאלה, האם כשיעל תגדל היא תהיה מאיר שלו, או שמאיר שלו פשוט לא סיים לגדול? או שאולי רק רוני ונומי והדב יעקב לא גדלו?

July 15, 2009 07:08 PM

July 14, 2009

Ian Macdonald [ianmacd]

Sigulda

We clocked only about 75 km today on the way from Rīga to Sigulda. Sigulda's actually only about 53 km from Rīga; the rest was local driving in the vicinity of our destination.

The drive was still ample for Eloïse to enjoy three complete run-throughs of her recently acquired Pippeloentje CD. We didn't get to listen to anything but ithe umpteenth rendition of Eloïse singing along to this version of Annie M.G. Schmidt's work set to music.

Anyway, we finished off in Rīga with a trip to the top of the spire of St. Peter's Church for fantastic panoramic views over the city. This was an absolute must-see. We had wanted to do it yesterday, but the church is closed on Mondays.

With that taken care of, we drove out of Rīga through the newer districts to the north and arrived in Sigulda about an hour later.

Sigulda's a small town with about 10,000 inhabitants, so the pace of life feels nice and slow; just what we're looking for.

After checking in and eating lunch next door, we visited the castle just up the road in Turaida. To be honest, it was a bit of a disappointment, as I had envisaged a grand, intact castle in the Czech fashion. What we got instead was a bit disjointed, more of an exhibition/museum spread across several disparate, reconstructed towers. The emphasis was on the items that had been excavated in the area, with the castle itself being of only secondary importance.

Oh well. Sigulda's nice enough, anyway, and dinner was the best meal we've had in Latvia thus far.

We'll be staying here again tomorrow.

Full text

July 14, 2009 10:50 PM

Philip Van Hoof [pvanhoof]

Introduction to RDF and SPARQL

Let’s start with a relatively simple graph. The graph shows the relationships between John, Fred, Max and Picca. John and Fred are humans who we’ll refer to as contacts. Max and Picca are pets. Max is a dog and Picca is a parrot. Both Picca and Max are owned by John. Fred claims that John is his friend.

If we would want to represent this story semantically we would first need to make an dictionary that describes pets, contacts, dogs, parrots. The dictionary would also describe possible relationships like ownership of a pet and the friendship between two contacts. Don’t forget, making something semantic means that you want to give meaning to the things that interest you.

Giving meaning is exactly what we’ll start with. We will write the schema for making this story possible. We will call this an ontology.

We describe our ontology using the Turtle format. In Turtle you can have prefixes. The prefix test: for example is the same as using <http://test.org/ontologies/tracker#>.

In Turtle you describe statements by giving a subject, a predicate and then an object. The subject is what you are talking about. The predicate is what about the subject your are talking about. And finally the object is the value. This value can be a resource or a literal.

When you write a . (a dot) in Turtle it means that you end describing the subject. When you write a ; (semicolon) it means that you continue with the same subject, but will start describing a new predicate. When you write a , (comma) it means that you even continue with the same predicate. The same rules apply in the WHERE section of a SPARQL query. But first things first: the ontology.

Note that the “test” ontology is not officially registered at tracker-project.org. It serves merely as an example.

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
@prefix test: <http://www.tracker-project.org/ontologies/test#> .

test: a tracker:Namespace ;
	tracker:prefix "test" .

test:Entity a rdfs:Class .

test:Contact a rdfs:Class ;
	rdfs:subClassOf test:Entity .

test:Pet a rdfs:Class ;
	rdfs:subClassOf test:Entity .

test:Dog a rdfs:Class ;
	rdfs:subClassOf test:Entity .

test:Parrot a rdfs:Class ;
	rdfs:subClassOf test:Entity .

test:name a rdf:Property ;
	rdfs:domain test:Entity ;
	rdfs:range xsd:string .

test:owns a rdf:Property ;
	rdfs:domain test:Contact ;
	rdfs:range test:Pet .

test:hasFriend a rdf:Property ;
	rdfs:domain test:Contact ;
	rdfs:range test:Contact .

Now that we have meaning, we will introduce the actors: Picca, Max, John and Fred. Copy the @prefix lines of the ontology file from above, put the ontology file in the share/tracker/ontologies directory and run tracker-processes -r before restarting tracker-store in master. After doing all that you can actually store this as a /tmp/import.ttl file and then run tracker-import /tmp/import.ttl and it should import just fine. Ready for the queries below to be executed with the tracker-sparql -q ‘$query’ command.

Note that tracker-processes -r destroys all your RDF data in Tracker. We don’t yet support adding custom ontologies at runtime, so for doing this test you have to start everything from scratch.

<test:Picca> a test:Parrot, test:Pet ;
	test:name "Picca" .

<test:Max> a test:Dog, test:Pet ;
	test:name "Max" .

<test:John> a test:Contact ;
	test:owns <test:Max> ;
	test:owns <test:Picca> ;
	test:name "John" .

<test:Fred> a test:Contact ;
	test:hasFriend <test:John> ;
	test:name "Fred" .

Let’s do some simple SPARQL queries. You can execute these queries this way:

tracker-sparql -q "SELECT ?subject WHERE { ?subject a test:Parrot }"

In this query we ask for the subject of each entity that is a parrot. The query will yield test:Picca because Picca is the only parrot in our situation.

  test:Picca

Usually we aren’t interested in the subject, but in a real property of the parrot. We can ask for such a property this way:

SELECT ?subject ?name WHERE { ?subject a test:Parrot ; test:name ?name}
  test:Picca, Picca

Another simple example, give me all the contacts:

SELECT ?subject WHERE { ?subject a test:Contact }"
  test:John
  test:Fred

Just the contacts doesn’t illustrate much. Give me all contacts that have a friend. And display the contact and the friend’s names:

SELECT ?name ?friend
WHERE { ?subject test:hasFriend ?f ;
                 test:name ?name .
        ?f test:name ?friend }
  Fred, John

Let’s ask for all the pets that are owned:

SELECT ?subject WHERE { ?unknown test:owns ?subject }
  test:Max
  test:Picca

Oh, not the subject. The names. How did we do that again? Right:

SELECT ?name
WHERE { ?unknown test:owns ?subject .
        ?subject test:name ?name }
  Max
  Picca

This will of course yield the same results in our situation:

SELECT ?name
WHERE { <test:John> test:owns ?subject .
        ?subject test:name ?name }
  Max
  Picca

But this wont, Fred doesn’t own any pets. Only John owns pets.

SELECT ?name
WHERE { <test:Fred> test:owns ?subject .
        ?subject test:name ?name }

Let’s print the owner’s and the pet’s names:

SELECT ?owner ?name
 WHERE { ?unknown test:owns ?subject ;
                  test:name ?owner .
         ?subject test:name ?name }"
  John, Max
  John, Picca

Still with me? Let’s now conclude with requesting the names of the contacts who are a friend of the person who owns Picca:

SELECT ?name
WHERE { ?subject test:owns <test:Picca> .
        ?unknown test:hasFriend ?subject ;
                 test:name ?name }
  Fred

Invitation for Jürg and Rob: How about you guys writing a introduction to OPTIONAL, SUM, COUNT, GROUP-BY and FILTER, etc in SPARQL? :-) The more advanced stuff.

July 14, 2009 07:40 PM

Thomas Thurman [marnanel]

Tengwar in Firefox

I had an email from someone who wants me to help them add tengwar support to my Firefox transliteration addon. Rock.

July 14, 2009 06:03 PM

Dalibor Topic [robilad]

One more time

Over the course of the past year, there was a steady sequence of builds of OpenJDK 6 that passed the rigorous JCK and met other compatibility requirements.

It started with Rich Sharples' announcement of such a build of OpenJDK 6 on Fedora 9 on x86 and amd64 CPU architectures in June 2008. A few months later, that announcement was followed by Joe Darcy announcing such a build on Fedora 8 on the x86 CPU architecture. Then the pace picked up in time for the FOSDEM conference, first with Rich Sharples announcing such a build of OpenJDK 6 on Red Hat Enterprise Linux 5.3 in January 2009, and then with Gary Benson announcing such builds for Fedora 10 on 32 bit and 64 bit PowerPC CPU architecture in February using the Zero interpreter backend for HotSpot.

With Matthias Klose's announcement last weekend of such builds for Ubuntu 9.04 for x86 and amd64 CPU architectures, congratulations are in order to Canonical's OpenJDK team - may many more such builds follow!

July 14, 2009 12:46 PM

Michael Still [mikal]

Bolos 5: Old Guard




ISBN: 0671319574
Baen (2001), Mass Market Paperback, 336 pages
LibraryThing
This book is similar to the previous Bolo anthologies in that it is written by a number of different authors, but utilizes Laumer's Concordiat universe. Contrary to another LibraryThing review, all of the stories on this book don't occur on one planet. All but one of them occurs on Delas, and the final one is on another nearby Concordiat planet. However, all of these stories do revolve around engagements with one enemy, and follow on from each other. This is something which hasn't occurred in other Bolo anthologies. I enjoyed this book, although it took longer to read than I would like because of other things happen in my life.

Tags for this post: book(S) Keith_Laumer(S)
Comment

July 14, 2009 09:02 AM

Rachel Chalmers [rachel]

encounters with creatures

There was a gopher snake at the farm. Jamey saw that it had eaten a mouse; there was a mouse shape halfway down its slender body. Jamey lifted it! Where I come from you do not take liberties with snakes to whom you haven’t been introduced. This snake was very forbearing. Julia did not get to pet it, though, and she wept all the way back to the domes.

When we first arrived there was a little bird peeping in the cabin. She beat herself against the windows overlooking the river until she was exhausted. Then she let me pick her up in my hands and carry her quickly to the door. Her feathers thrummed. She leapt into the air, apparently unharmed, and soared across the river to the trees on the far ridge.

July 14, 2009 05:17 AM

ozified

We packed up the Jetta and hit the road on Friday. North over the GG Bridge to Santa Rosa, where we hit Trader Joe’s and stocked up on salad and filet mignon. North again to logging town Cloverdale then out on 128 to Boonville, funny little Anderson Valley enclave that used to have its own language. We grabbed a late lunch and I called my Dad to note that Boonville is Barraba’s Californian twin.

Up and over Mountain View Road, which predictably made Julia sick. Jeremy cleverly had her catch the product in his empty coffee cup, so clothes and car were unscathed. And then we were out in the coastal meadows, and we drove down the dirt road that leads through a redwood glen and down to Oz.

We parked on the gravel by the Garcia River and carried all our bags and groceries over the makeshift bridge and up through the oak glen. On the other side of the river, in a meadow ringed with redwoods, are two wooden geodesic domes. One dome has a kitchen and the other a bathtub, and there are five beds tucked into lofts and so on. The whole building is ringed with decks that look out on the river and meadow. There’s a hot shower out on the deck, under a tree.

We stayed there all weekend. Jamey and Carole and Rowan arrived late on Friday night, after seeing deer and a skunk and a bat and a wild boar on the drive up. We woke the next morning to hear all the children playing together happily. We made scrambled eggs with smoked salmon and a huge salad, and ate it out on the deck. We swam in the river. We made a fire in the potbellied stove and read library books. We napped. We made rack of lamb for dinner.

It was heaven. I feel really human again. I have lots to blog. Watch this space.

July 14, 2009 04:26 AM

July 13, 2009

Ian Macdonald [ianmacd]

Rīga Again

Today was our last day in Rīga. We'd considered staying another day, but we've essentially done what we came here to do and there's still so much to see on this trip. That said, we've scarcely been out of Vecrīga, the historical old town district.

The highlight today (for me, anyway) was a visit to the verbosely named Museum of the Occupation of Latvia 1940 - 1991. The ironic location for this museum is inside a hideous Soviet-era building (the only one still standing in the city, left as a deliberate, haunting reminder) that was once, in an all too recent past, home to the Museum of Latvian Red Rifleman.

The museum is a moving experience, featuring heart-rending of deportation to Siberia; torture, death and famine in the Gulags; perceived liberation from the Soviets when Nazi Germany invaded, followed by horrific disillusionment when they started to systematically execute Latvia's jews in the forests;the ousting of the Nazis by the second Soviet invasion; and last, but not least, the complicity of the West in allowing the Baltic nations to be annexed by the USSR at the end of WW II, when the rights of other European nations to self-govern were explicitly granted and protected.

Pretty much every nation has had a hand in the persecution of the Latvian people, but the USSR and Nazi Germany were the worst offenders by a considerable margin.

It's shocking to think how recent some of these events were. For example, after the death of Stalin, the programme of forced deportation and resettlement was relaxed somewhat, and deportees were allowed to return to their native republics. However, until the end of the eighties, it wasn't legal to even discuss the deportations. These people, whose were often separated from the rest of their families, with no knowledge of whether their loved ones were dead or alive, returned home after decades in exile and weren't even allowed to discuss the experience with another human-being. Stories like that put problems like leaking ceilings in the proper perspective.

The museum is packed with detail and it would take a day to see it all. I did my best with two small children in tow (and Sarah trying to entertain them), but I couldn't spend as much time on each exhibit as I would have liked.

Our other main activity today was a visit to Rīga's central market, where one can buy everything from pig snouts to strawberries, where counterfeit CDs and Russian-manufactured bootleg MP3 CD compilations are sold next to stands purveying kvass, a drink made from fermented rye bread. Eloïse and Sarah liked this drink, but I didn't think much of it. Still, at twenty santīms a beaker, who's complaining?

Tomorrow, it's a relatively short hop to Sigulda for a couple of nights.

Full text

July 13, 2009 08:23 PM

Philip Van Hoof [pvanhoof]

The subject of a resource, Nepomuk’s isStoredAs

After the many discussions the Tracker team did at the Desktop Summit in Gran Canaria I think a lot of people will start trying out Tracker’s master. We will indeed start making 0.7.x releases somewhere this or next month.

Meanwhile I’d like to point out that among the decisions that we made during the meetings and at the Ontology BOFs is that we wont use the URL of resources as the RDF’s subject field anymore. Instead we’ll use the nie:isStoredAs predicate for storing the URL.

Right now we already set nie:isStoredAs, but we still use the URL as subject. This will change, though. Just assume the subject to be something you should only use as an unique piece of data about the resource, pointing at it (in the RDF store). More details can be found here. If you want the thing itself (the file, the E-mail, the .desktop file, the website’s URL), ask for nie:isStoredAs.

For example:

<file:///tmp/myfile.png> a nfo:FileDataObject .
<urn:nepomuk:file:d7ea...> a nfo:Image ;
	nie:isStoredAs <file:///tmp/myfile.png> .

And to query:

tracker-sparql -q "SELECT ?url WHERE { ?subject a nfo:Image ; nie:isStoredAs ?url }

We know that many people want these 0.7.x releases to happen soon. I can only invite those people to just join coding. Awesome stuff is indeed taking place, but at the same time there is a lot of work and decision making to do.

Things like a user interface like the T-S-T (Tracker Search Tool) from Tracker 0.6, documentation with a lot of examples. SPARQL, SPARQL Update and Nepomuk all have quite a lot of documentation by themselves. But people are still asking for even more examples. Anybody interested in making that? Maybe if somebody who was at Rob Taylor’s BOF could write down his and Jürg’s lectures on RDF and SPARQL? I think they explained it all very well.

July 13, 2009 01:53 PM

July 12, 2009

Ian Macdonald [ianmacd]

Food Ration Queues And Concrete Bunkers

Reading between the lines, it seems that Sarah's folks still aren't convinced about Rīga (and the Baltics in general). She spoke to them on the phone today and told me afterwards that they sounded sceptical about her enthusiasm for the place, referring to our trip so far as "interesting", in the same way that your boss might call your brilliant proposal "interesting", before binning it the moment you leave the room.

I suspect that the country's former status as an unwilling member state of the USSR has something to do with the misconception that this might be a drab and dreary place to spend time. In reality, nothing could be further from the truth.

Rīga is a UNESCO World Heritage site. Why?

If look up UNESCO's advisory body evaluation, you'll read on page 4 that, "as an assemblage of Art Nouveau/Jugendstil buildings... it is impossible to cite any city to compare with Riga".

People tend to focus more on the recent past than on a location's history through the centuries. The misconception therefore arises that former Soviet states must be an endless array of blots on the landscape, a mind-numbing freak show of utilitarian concrete edifices, erected to make a deliberately anti-artistic statement, emphasising function over form.

That notion actually can and does apply to areas of the world that the Soviets actually built, but Rīga has a hugely rich pre-Soviet history. Before it became the USSR's third city (after Moscow and St. Petersburg), it had an illustrious past spanning hundreds of years. At one time, for example, it was the largest port under Swedish control, larger than Stockholm itself.

Many of the buildings here are hundreds of years old. After a long walk across the city today, I can confirm that the Art Nouveau architecture on display here is the finest of any city I've ever been to. I'm no expert, of course, but as UNESCO point out, whilst buildings of similar architectural stature can be found in Barcelona, Brussels, Glasgow, Helsinki, Moscow, Paris, and Prague, those are all individual structures. Rīga, in contrast, has whole streets adorned with stunning examples of the movement. Your camera never stops clicking as the gargoyles and beguiling sirens stare down at you from on high.

Architecture, though, is just one of Rīga's many facets. We've also been lapping up the food, kafejnīcas and parks today.

On the subject of food, I must put in a mention for Šefpavārs Vilhelms (on Šķūņu iela) and its dirt-cheap pancakes. Three plates, loaded up with pancakes and condiments (jam, sour cream, etc.), plus a round of drinks, set us back only Ls 4.20. That's just under €6!

The café culture here is obviously very appealing to us. A city where you can't find a good spot to sit outside and people-watch whilst nursing a delicious cappuccino hasn't earned its place on the map, as far as I'm concerned. Rīga scores well on this count.

And, whilst I'm very happy to live near the Vondelpark in Amsterdam, I'd be even happier if it its upkeep could compare with that of the parks in Rīga.

Fear not, I haven't lost my perspective. I like this place a lot, but I'm not about to move here. I'd have to consider Stockholm or Istanbul before I could even contemplate Rīga, but this city certainly does press all of the right buttons and send the meter needles flicking.

Another day in the Latvian capital awaits us tomorrow, and that means at least two good things are in store for us: another day without driving and another sumptuous breakfast, courtesy of the lovely Hotel Centra.

Full text

July 12, 2009 08:03 PM

104796