Wednesday, 21 November 2007

motorbike switch

Motorbike hasn't ever liked starting when weather is cold. It's a bit oldish but also needs a service now I think but it won't get that for a few weeks. Last year I got some practice push-starting it before I got new battery. But have seen that even with everything off there is a small current being drawn to somewhere deep inside (not by lights or anything I could disconnect easily. Now hill-start in morning is no problem, push-start is okay, but tires one out very fast.

Charging battery while still connected in motorbike didn't seem to charge it very well. It's a trickle charger and maybe if bettery is in bike the little current being drawn from battery uses up much of the trickle current. Also sometimes ground connection wasn't great, lots of metal bits on bike actually don't conduct well or don't connect to ground I found. And there's no good grip for a crocodile clip to get hold of.

I push-started bike after donating blood one evening ... :-P urgh. And another evening there was almost zero power in battery, push-starting was hard.

I added a switcheroo to my motorbike between battery and everything else. It allows battery to be isolated completely from bike circuit so if bike is not being used for a weekend battery won't discharge. It also gives me a reliable place to connect battery charger clips to.

Switch was lovely for 3 weeks. (my battery lasting > 1 week is SO SO SO nice). Anyway now switch is stuck on (in off position) now since yesterday. oops. Presumably burnt out? Thankfully burnt out so that can still drive bike! >;) Not sure how long it will last! Have tools with me in case. Must open up and have a look. Presumably the fuse right there on bike is 15 amps for a reason!

I decided a 2 amp switch was worth a go as I've nothing else handy. The first thing connected to +ve terminal is THICK cable, 15A fuse and funny potty thing. I've an old kettle switch and toggle switch of unknown ampage and a spare but too large 20amp trip-switch at home. Don't have enough electrical junk :( don't seem to have switches on their website. OHHH ho ho! Maplin have 20A ILLUMINATED toggle switches >;) Hmmm, red, green, blue or amber, ... what do you think? :) Anything more than 10A often have leds in them. maybe. Switches

Update: (Dec 2) My 15Amp switch is COMING slowly I hope. In the meantime the switch on bike is actually still working out quite well. The switch mechanism goes through phases of not working and back to working. Weird but theory is that plastic is going soft inside.

Tuesday, 20 November 2007

bash redirection (what "duplication" of file descriptor really means and how to use it.

This has annoyed me for YEARS! Much reading of `man bash` and the internet didn't come up with a solution until yesterday.


# save stderr and stdout to seperate files AND show to user
bash$ ((ls gah source/ 2>&1 1>&3 | tee stderr.log) 3>&1 1>&2 | tee stdout.log) 2>&1

Anyway 2>&1 syntax is "duplicating" stderr to stdout. But this sense of "duplicate" has not made sense to be before because in doing 2>&1 then stderr is ONLY going to stdout and not to stderr anymore. BUT using the ()s => AHHH! that's where stderr and stdout are duplicated.


( (ls gah source/ 2>&1 1>&3 | tee stderr.log) 3>&1 1>&2 | tee stdout.log ) 2>&1
(dup stderr(2) to stdout(1) and stdout(1) to fd3 |tee stores what's on stdout (now stderr))
now outside inner ()s
stderr is on fd1, stdout is on fd3, nothing is on fd2
try this: (ls gah . 2>&1 1>&3 |tee stderr.log) 3>fd3 2>fd2 1>fd1
( dup fd3(original stdout) back to stdout(1), dup fd1(original stderr) back to stderr(2)
|tee stores what's on stdout (now original stdout))
now outside all ()s
stdout is on fd1, stderr is on fd2 as originally

All is clear as semi-translucent puddle-water ?

And I'd to look up how to acheive parameter expansion in bash parameter name AGAIN. Using ! is not intuitive.


bash redirect stderr stdout

Friday, 16 November 2007 has very nice DIY electronics.

->o Moo Moo Moo Moo

Nothing to do with cows.
M is a magnet.
o is a metal marble.
-------- is a ruler with a groove.
The whole is a gauss gun.

Make a REALLY BASIC motor:

Sunday, 11 November 2007

Snap Circuits by Elenco

I found Snap Circuits by Elenco while searching for a 15Amp switch for motorbike on maplin.
Looks lovely. Reviews on Amazon look good.
Only problem is maplin don't make credit card payments easy :(
To authorize credit card got email from maplin, phoned up credit card team.
Told to wait for access code sent via snail-mail.
It's two weeks now (Dec 3) have been so busy work/home haven't had a chance to phone them and find out what's up.

Wednesday, 7 November 2007

The problem with God-faith-religion[tm]

Executive summary:

The main problem as I see it is that God-faith-religious[tm] people can (and all the time do) abdicate responsibility (for all kinds of everything) to a "higher power". The instructions they receive are not from a "higher power" but from a group of humans.

I have been very respectful to any religion before. But I have also been growing more concerned about the danger of having huge groups of "faithful" people who believe they have a God-given right to push their particular rules anywhere. Stupid ideas might actually perhaps be deserving of some disrespect.

I found book "The God delusion" and started reading it last weekend.
wikipedia: Richard Dawkins

He's preaching to the converted (HA HA!) and I didn't think I'd be interested reading if I agreed. Two of Dawkins points I'm finding interesting follow, they're very complimentary but distinct enough that I'll seperate them.

1. That atheists should be more actively atheist and more vocal. Atheists are not organised as a group and the G-f-religions[tm] have the powerful political lobbys that run the countries we live in. So it is important for atheists not to be closet atheists. And it's important to evangalise atheism (Ho ho!). I've been concerned/thinking about problems the God-faith-religious[tm] mentality has mostly latent inside it but not sure what could be done about it. Even with our kids we're starting to see how they are now at a disadvantage (a small but pervasive disadvantage) when it comes to choice of schools.

2. All of society gives a huge respect to all G-f-religions[tm] (except for maybe the poor Pastafarians!). And the G-f-religions[tm] expect it. AND they're offended if this respect isn't enthusiastically and fully granted to every aspect of the funny G-f-religious[tm] rules that have been imagined and evolved over the years.

You know, he is DEAD right with point #2 there. I (and I think atheists in general) would be very respectful of other peoples beliefs and cultures and want to be very open-minded. G-f-religions[tm] themselves are probably the groups that are least respectful to each other. There are some (some? more than some maybe) bad things I can think of about any G-f-religion[tm]. I think I have been deluding myselfmy earlier religious indoctrination that a belief in God is good and right has deluded me into thinking it is harmless to allow some of these bad things to persist (and hence possibly to grow) because _most_ of the G-f-religion[tm] is pretty reasonable and good (and after all of course most of the people in the G-f-religion[tm] don't _REALLY_ believe every nuance of weird detail, ... do they?).

Essentially I'm thinking now that it is dangerous for society to be giving these G-f-religions[tm] too much respect. It's like looking the other way when first you see minor bad behaviour. Soon you're looking directly at abuse and torture and you can't do anything about it.

Heh Heh. This person does disrespect nicely :)
youtube: Pat Condell

What's this God-faith-religious[tm] stuff? Gah. Traitor (English) language! :)

English (and maybe every language?) doesn't have a good vocabulary for describing enthusiasticcomitted atheism. You can say you are religious about your food, about your operating system, about your favourite author/newspaper/politics, even about your philosophies and science. And people understand there is no God involved (more-or-less). But can you say you're a religious atheist? HAH. It doesn't quite work. You can see the argument G-f-religious people use often attacking atheism because the atheist is as "religious" about their atheism as they are about their delusion.

Dawkins also talks about the use of the word religion (or spirituality). I see these words as being so inherent in the language because of a few thousands of years of belief in Gods and religions that you can't express some ideas which have no God. There I go respecting God too much again and giving it a capital letter! :) e.g. atheists would describe themselves as having a spirituality consisting of a philosophy of beliefs in the human race - this sounds very religious but it is NOT it is a Godless spirituality.

For me (and others I think) the word "religious" is naturally a word devoid of God because of course there is no God. To me religion simply means the whole structure of a group of people that believe in this kind of God or Gods and follow these particular rules. It's completely natural for me to know there is no God. I'm very very certain of this (of course allowing for a minute (NEGLIGABLE! (hmfph, emphasis of negligable? is that an oxymoron?))) probability which must be allowed by scientific open-mindedness.

This meaning of religion is so obviously not so for God-faith-religious people. A bit scary if you think how different their mindset must be.

I wouldn't have been a closet atheist exactly, a very VERY quiet atheist though! :) It seems just to very rarely come up.

Maybe I'll start by getting a Pastafarian t-shirt! :)

Wednesday, 31 October 2007

Halloween day was interesting me = VERY-bad-public-enemy-#1-guy[tm]

Halloween morning was VERY interesting.
I got to be the VERY-bad-public-enemy-#1-guy[tm] trying to keep a group of 10 to 20 kids (maybe from 8 to 14) away from council people collecting bonfire rubbish.


I quite like Halloween and do think people should have their fun. I also like bonfires etc and wouldn't be against a bonfire by itself. Is FUATH liom (I HATE) the nanny-state mentality. Kids have to learn for themselves and do some naughty/dangerous things. BUT if they are caught at this by adults I think it is very healthy if they get a little bit of a telling off. People have to tell kids if they're doing wrong, if they can do wrong and see that adults look the other way then there can only be more trouble ahead. Part of parents job is to be boring/cross I suppose. And other adults please parents don't (YET :) ) have full 24/7 satellite monitoring of their kids so it's up to everyone in society.


This year I guess the critical mass of people against the bonfire was achieved so the residents were actively discouraging it. Lots of people I think are pro- the bonfire too but they didn't speak up this year.
Should be interesting to see what way it swings next year.

There was a more active advertising campaign against bonfires by the council this year too e.g. I'm not really persuaded by the environmental argument BUT I can see that the bonfire and fireworks become more and more and more every year.

It's great fun maybe but it's taken advantage of and happens to be a night where we see some of our social problems! :-P One thing is at the bonfire last year (and previous years but to a lesser extent maybe) was that there
were teenage-adult visitors by foot or car with alcohol and fireworks. Over by the bushes or near the bonfire was a very uncomfortable place to be if you were adult or for the younger/local kids. Some of the visitors were saying
they were from Tallaght, some were from Foxrock. Maybe they were coming to a bonfire which had least adult control/interference ?

What for me personally was the main reason for being against the bonfire this year and being willing to see what happened if we were more active against it was being told by the younger kids on this estate that last year when the council came to collect rubbish that THEY PICKED UP THE STICKS AND STARTED
that had come!!

Now our estate is very wussy-upper-middle-class[tm] and for a mini-riot[tm] (albeit a wussy-upper-middle-class-mini-riot[tm]) to happen so trivially is very dismaying to me.

So anyway that is why I'm willing to do something about it. I don't see any particularily effective or easy solution against the social problems but some discouragement of bad activity is appropriate. One thing the council do is collect the bonfire waste. This could I think never be 100% effective sbut it would make the
bonfire smaller. Unless you had lots of adults supervising the area the whole evening and night that you would never prevent a bonfire anyway.

The way the bonfire works: They're illegal but kindof traditional. Kids have the week off school (mid-term) which they
can spend in the very active and healthy (physically & socially) :-D manner of collecting rubbish (from skips, from businesses, ... whatever). Lots of hard work is put in.

The council always attempts to collect the rubbish where it is gathered and take it away. So it is stored in hiding places, in our case behind bushes and trees at side of green or in a derilict site/field nearby. Last year the council said they encountered child residents who asked them not to take it away (reading between the lines: picked up sticks and started hitting the vehicles).

So to support the council the idea is to have adult residents present when the waste is being collected. The council has a busy day and doesn't give exact times for collections so you need people available all day.


So early enough Halloween morning the vans & tractors appeared and got to work. Fionn phoned other people and I headed over. I said hello to council people and immediately a group of kids arrived over. They immediately were upset and went to grab wood which council was throwing out from behind bushes. I spent next 20 or more minutes robustly trying to explain and argue with voice all the time while also pushing (trying to be gentle) kids away from the work. Kids did manage to keep on getting wood but they were focussed on arguing with me and getting around me so I think the workers at the main pile of wood were mostly unhindered. Kids tried some different things, went to go for tractor/trailer and were very active vocally. Some lady residents came shortly after start and kids noticably became a bit less angry-violent but still very active. In fairness to kids not one of them threatened myself with injury and there were lots of sticks with nails sticking out around!!

Very confidence-inspiring-NOT to have 2 of the council workers telling me "I saw you pushing those kids", "that's assault" etc. Kids were saying they would phone gardai, child-line, etc. Please don't waste the services time who are trying to do something about REAL problems. And do go home and bring your parents over! Do teachers have to put-up with this the whole time? Sheesh.

After main pile was gone council did not wish to go into field and collect what was there. I was telling kids they could have hidden it better :-) :-E But that there was still loads left for a bonfire. Kids stood on wood they had collected (who thought of that). That was effective! I'm definately happy for them to have a nice peaceful protest. Council headed away and I stayed trying to explain to kids for another good while.

Kids were very upset and some had tears in their eyes but their arguments if anything made me more resolute. They were saying alot that it was tradition and it was their right to have a bonfire. It's hardly a right, um, they're illegal too! (in the Irish-acceptable-illegal kindof way) I ended up thinking we're a bit spoilt if we get very upset over PARTIAL-denial of a bonfire.

We got some video of bits of this. Nobody came to any harm anyway (maybe me mentally a bit!) It spoils Halloween, leaves a not-nice feeling but I think sometimes you have to stand ground (even if the immediate issue isn't quite the thing you're fighting against?)

Rest of day:

Well I was working. Got lots done actually. Running tests and checking memory use with libumem. Testing and merging to trunk. Adding debug and tracing sequencer lock-up problem. Fixing Retransmit-Manager avalanche when overloaded. Gemma made a release.


In afternoon residents had organised a Halloween party on Green. I saw the start. Gazebo up and two teenage facepainters mobbed by loads of kids. The kids I had arguments with in morning helped move Gazebo out of way of council cutting the grass. Halloween pinatas, candyfloss machine. Ghouls vs Vampire football. I went out at very end VERY briefly and there was a lovely atmosphere.

Halloween evening:

Our house was a bit decorated but not much - windows painted. Nice carved pumpkin and I carved two more while manning door.

Kids had great fun. Kate was a pink shoe. Maeve was a witch. Daire was a scary thing with no face. Maeve would not let me put on Frankensatein suit. Maeve was with me after a bit and quite liked answering door and distributing sweets.

Bonfire was lit early enough 17:30/18:00 ? But very soon after Garda car drove past. And after that nobody was over there! Why, if they so wanted a bonfire? And if the collecting the wood is the fun part :) ... then why not just collect the wood and leave the council take it away without hassle!? :) :D :-P Okay, I'm joking a bit. Fionn asked them again next day and it was partially that their parents didn't let them go over if there were no adults there and also that there were older people drinking in the bushes and at one stage throwing fireworks at people who came near. So the kids were scared to be over there anyway. Adult presence would have helped but adults were also scared to go over and adult on green shooting fireworks retired because of getting fireworks shot at them.





If people want it safer then we need an adult presence for the night in the area (to make things more boring). If kids really want a bonfire then I think get their own parents and more adults to support and run it. I'd help but NOT going to do anything without good support. Going all the way getting licence for legal one I think would be very difficult.

Close by in Sandyford-hall/Fernleigh they have an unofficial but adult-supervised one. This is much better I think but this year they had some problems with the crowd? Maybe kids from our area and people that came to our bonfire moved on to there moving the problem ? :-7 Humm. Or maybe these things just start small and always grow until it gets a bit problematic then ... well we're a biological system and if your graph these things they can grow, oscillate or stabilize somewhat for a time, but always eventually peter-out.

Looking forward to next year now! :) Will at least be interesting.

Monday, 15 October 2007

Another email to Dublin Bus. Bus went wrong way. Yikes. Kids got off near Renault garage,

Another email to Dublin Bus.

Subject: 44 bus (one missing Thur Oct 12, wrong route Fri Oct 13)


1. missing bus 12/10/2007

Could you find out what happened to the Enniskerry->City Centre 44 bus on 12/10/2007,
the bus that arrives at 8:10ish at Kilgobbin Road. It did not arrive.

2. wrong route 13/10/2007

The route for that bus has changed due to roadworks on the Sandyford road.
We have two children who take that bus to school. Ages 9 and 5.
The first mornings of the route changes we accompanied them on the bus to
make sure they were familiar with bus stops.
On Friday they were with another family, the eldest in the group was 12 years old, they
were not accompanied by an adult.

On Friday the 44 bus got lost and instead of turning down the Drummartin link road it
drove on into Sandyford Industrial Estate. The bus left the children off somewhere near the
Renault garage. Because they know the area they were able to make their way to school.

This is of great concern to us.
We are not sure what information the children and driver exchanged.
We know mistakes can happen but hope that if they do happen then
the safety of the children is not put at risk.

A different morning the driver did not stop at the normal school bus stop and was
unfriendly to the children. "That's not my problem!"
They were left off just down the road thankfully near a pedestrian crossing.

Many/most drivers I think do take very good care of their passengers but we are concerned
if some drivers, especially on school mornings, don't take some consideration for younger

Does driver training include care and consideration of passengers of different abilities
and is this can be reinforced by Dublin Bus on an ongoing basis?

What would be the minimum age of children that would be expected to be travelling
unaccompanied on the bus? (for short local trip)
- Note that if we encourage more use of the bus then it is more likely that there
would be a number of children from the same school on the same bus every morning and
every child in the group is safer as a result.

I would really appreciate it if you can investigate the incidents for us and find some
information on your policies with regards training and young passengers.



Wednesday, 3 October 2007

a couple or urls on C++, patterns and hybrid systems

In work we have some core dumps in big multithreaded C++ app that takes in tons of data and decodes and processes. Difficult to trace down. So whimsically we've had again some "Why are we using C++?" banter/trolling (Hello Mike :))

I found and flung a couple of interesting things on the web:
"Patterns are signs of weakness in programming languages."
Excellent and very simple layout of what is a design pattern anyway and nice summary/conclusion.
Blog of mjd perl guru.
Building Hybrid Systems with Boost.Python
It would be very cool to have a perl or python interface to our stuff - for testing & deployment.
Messy configuration and registration with links could be done in scripting and core in C++.
C00L! >;)

And :D BUZZ-word for today: EXPRESSIVENESS (as in writing clear/understandable code)

There's a theme song for that too!

Sunday, 30 September 2007

origami haga

Fionn and my weedding anniversary. We went into Dublin castle and visited gardens and library with kids.
Kids complimented on being very good in library. :)
And then we had food in the Schoolhouse (after throwing sticks into the canal).
Fionn had gotten me some small origami paper.
I had some paper and an origami book on my bed-side locker pile a few months ago but it has been put way again.
Anyway I got out oftc (Origami For the Connoisseur - a lovely origami-fest).
And almost the first thing in it is Haga's theorem which I had passed over everytime before.
I looked at it this time and the diagram in oftc is not great.
It mentiones a third triangle and isn't very clear. Hmf!
So I filled up and A4 sheet with algebra and found by applying pythagoras about 5 times that yes it divides the side
in a third. Yay me.
So tomorrow I look it up and find of course with one application of pythagoras you can prove the same. :D
Still puzzled over the three triangles oftc talks about?

Simple Haga Theorem
Let a be length of side of square.
Crease square in half NOT along diagonal (vertically here) (so that one has a rectangle a x a/2) and unfold.
Fold corner of square (bottom right corner here) so that it touches the midpoint of an opposite side (top side here).
The intersection of the two edges which overlap is a third of the way up (the left side here).

This paper by Robert Lang goes into more detail
Origami and Geometric Constructions
Starting with binary division (i.e. folding in half!) and going on to general case of dividing paper into any integral fraction (look for Haga's construction).
Lang Origami Constructions paper

Geometry origami

Math on the Street, a magic pinwheel, very nice, remind me to try make it sometime:
magic pinwheel

Thursday, 20 September 2007

filter gps data and drop bad points

so hdop >= 1.3 isn't great? Or negative values.

#!/usr/bin/perl -w

use strict;
use GPS::Babel;

my $file = shift or die "no file specified";

use Palm::PDB;
use Data::Dumper;

my $pdb = new Palm::PDB;

# register Palm::Raw as handler for all pdb loaded
use Palm::Raw;

#                "cGPS", "coGP"
#                );

$pdb->Load( $file ) or die "Load $file: $!";
# e.g. pdb processing.
# "No handler defined for creator "cGPS", type "strm""

#print Dumper($pdb);

print "Creator:".$pdb->{'creator'}."\n";

my $fmt;
for ($pdb->{'creator'}) {
    if    (/cGPS/)  { $fmt="cetus"; }
    elsif (/coGP/)  { $fmt = "coto"; }     # do something else
    #elsif (/TZGP/)  { }
    #elsif (/Gps4/)  { }
    else            { print "Not sure what file format\n."; }     # default

my $babel = GPS::Babel->new();

#my $babel = GPS::Babel->new({
#        exename => 'gpsbabel'
#    });

# auto detect format (doesn't auto-detect pdb:
# "Multiple formats (cetus, copilot, coto, gcdb, geoniche, gpilots, gpspilot, mag_pdb, magnav, palmdoc, pathaway and quovadis) handle extension .pdb at /home/jamesc/bin/ line 20")
#my $gpxdata = $babel->read($file);
my $gpxdata = $babel->read($file, { in_format => 'cetus' } );

print "GPXName:".$gpxdata->name()."\n";
#print Dumper($gpxdata);
#print Dumper($gpxdata->{'tracks'}->[0]);
#print Dumper($gpxdata->{'tracks'}->[0]->{'segments'}->[0]->{'points'});
#print Dumper($gpxdata->{'tracks'}->[0]->{'segments'}->[0]->{'points'}->[0]);
#print Dumper($gpxdata->{'tracks'}->[0]->{'segments'}->[0]->{'points'}->[1]);
#print Dumper($gpxdata->{'tracks'}->[0]->{'segments'}->[0]->{'points'}->[2]);

my $count_rejectL=0;
my $count_rejectH=0;
my $count_ok=0;
my $gpxokay = Geo::Gpx->new();

foreach my $point (@{$gpxdata->{'tracks'}->[0]->{'segments'}->[0]->{'points'}}) {
    #print "point: " . Dumper($point) ;
    #if ($point->{'hdop'} >=4 ) {
    #if ($point->{'hdop'} >=1.4 ) {
    if ($point->{'hdop'} >=1.3 ) {
    } elsif ($point->{'hdop'} <0 ) {
    #} elsif ($point->{'sat'} <6 ) {
    } else {

$gpxokay->author({ name => "James", link => { text => "dspsrv", href => ""}});
$gpxokay->link({ text => "dspsrv", href => ""});

print "Okay:".$count_ok." RejectH:".$count_rejectH." RejectL:".$count_rejectL."\n";
#'course' => '0.000000',
#'ele' => '-8.800000',
#'lat' => '53.356366700',
#'time' => 1190304846,
#'speed' => '0.720222',
#'fix' => '3d',
#'sat' => '3',
#'lon' => '-6.227361700',
#'hdop' => '3.600000'-18

# use Geo::gpx
# "If you will only be dealing with GPX files use Geo::Gpx directly."
$babel->write($file.'.gpx', $gpxdata, { out_format => 'gpx' });
print "File:".$file.'.gpx'." written.\n";
#my $xml = $gpxokay->xml();
$babel->write($file.'okayok.gpx', $gpxokay, { out_format => 'gpx' });
print "File:".$file.'okayok.gpx'." written.\n";
$babel->write($file.'.text', $gpxdata, { out_format => 'text' });

Saturday, 15 September 2007

new GPS toy

Got a lovely blinky (blue) bluetooth GPS from ebay.
First play with it. Talking to palm with Cetus GPS (and coto GPS).
Works very nicely with palm.

blinky Bluetooth GPS -> PalmOS Cetus GPS -> pilot-link -> GPS

We drove to Dundalk Sat afternoon and visited Fionn's Grandad and her Mum & Dad.
We brought Kate's bike and Daire's ball.
I mostly played outside. We had a football goal game with me carrying Maeve half the time around .75 of the house.
Daire won! 5-4.  Girls and me vs Daire. Kate on bike.
Kate has been doing Gaelic pick-ups (from ground) and then kick in air.
She does drop-kicks.   
Initially was balancing on one leg and taking long slow time drawing other leg back before kicking.
Fionn helps to cook fry for tea. Kids Uncle Hugh visits too.
Kate still playing outside on bike in dark until we leave.

Manual is a bit light. And funny windows interface software is weird (& doesn't work easily USB-bluetooth funny connection interface?)
It says GPS technology NemeriX GPS Chipset. Hmmm.
I wonder can it record any points itself. Or ...

Friday, 14 September 2007

sufferin' back thyres

Since start of school I cycled following bus to school a bit, also collected Kate by bike first two weeks.
Back tyre at end of two weeks had puncture (but also rip in tyre). That repaired but after cycle home from work
yesterday now have puncture again (tyre repair with rubber + duct tape but it wears on tube). Need new tyre and tube (26x1.5).
Weight of Kate on back combined with rough road surface and bumps up/down onto bike lanes and footpaths is
quite wearing. Back tyre is a 1.25 streetrunner (as couldn't get a 1.5 last time).

Jumping off bike (when back tyre soft so jumping off to pump it) I didn't notice but caught left index finger on something (between brake and gear lever?). Noticed it after a little bit. Yeow all swollen and stiff and a little bit ow.  Arnica applied at home.

I've just discovered pirates vs ninjas and I think talk-like-a-pirate day is coming up. Sep 19th. Gahrrr!
(sorry about that, writing subject line in pirate Yosemite-Sam style makes for distraction)
How to kiss like a ninja:

Thursday, 13 September 2007

commuting to school/work (missing 44 bus this morning)

I'm was back to work this Monday 10th.
Motorbiked to work Mon/Tue. Worked from home Wed.
Cycled today.

We were in plenty of time for the bus this morning (yesterday we were a bit slow and I shouted at kids in house :( sorry guys :( and then ran to get bus. Kate in bike seat. Daire running. Saw it pass by! Gave up, but ran more and it was stuck in traffic. chased after it and nice bus driver opened doors and left kids on. Whew! Back to bring Maeve to creche on my bike.)
Anyway, _this_ morning the usual 44 didn't come! arg!
At 8:30 I took Maeve to creche and kids were still waiting when I came back.
Got the later bus.
Traffic had cleared up our place but I beat the bus down :-P :)
(traffic was bad on Sandyford road).  I said hello to lollipop lady. She said there was no
44 bus that morning, she was there since 8:00 I think.
 Kids got to school just after 9:00.

From - Thu Sep 13 11:15:11 2007
Date: Thu, 13 Sep 2007 11:11:29 +0100
Subject: 44 bus didn't come? (8:10ish at Kilgobbin Road 13/9/2007 direction
from Enniskerry->City Centre)


Your customer service charter on web says this email address may be used to contact your
Customer Comment Desk.

Is there any way to find out what might have happened a particular bus this morning?
The Enniskerry->City Centre 44 bus didn't come at 8:10ish at Kilgobbin Road 13/9/2007.
Everyone that usually gets that bus had to wait for the next one so we're pretty sure it
didn't come early (unless it was much MUCH earlier than usual?)
Is there any provision for replacing a bus if something happens it?

Kids are using the bus to go to school so we are concerned about the reliability of the service.
It is annoying but okay if the weather is fine and if it doesn't happen often.
But it is not a pleasant wait for the next bus in winter-time.

Also that bus is very full in the mornings with schoolkids from before Kilgobbin to Balally
so it would possibly make sense if there was an additional bus during school term?

Okay, well thank-you for reading.
I hope the comment on the possible extra capacity for school runs on that route can be passed on?
I would really appreciate it if you can find out what happened the missing bus and send me a reply
as well.


No reply yet and it's end of day. So Hmmm. We shall see.

Friday, 24 August 2007

Summer - some days mostly at home with kids

This could be very bad and miscellaneous.
I'm home minding kids/[ch]a[rc][pk]enting/motorbike learning/stuff this summer.
So what do I do now ... blog everything since last entry ?
Ah. /me discovers the date can be edited.
I might do this week daily here, then next entry weekly, .... as memory fades out.
20 mins later: I just told Fionn "I'm hungry - and tired - and I want to goto bed. But I want to finish this first."

From writing (especially appropriate for blogging!):
"We write when we have an idea and want to share it with the rest of the world. The human thirst for knowledge is only matched by the human desire to tell everyone else our knowledge."


Went ebay mad today (and komplett).
  Stuff for home PC (video editing (DVD writer, more memory and disk space) and  wireless router.
  Palm Tungsten for FIonn.
  GPS thingy for me.
Kate did jump ahead (edumicational prog for 4-5year olds) on my laptop this morning.
Took a break and zoomed about on bike.
Family cycled to Marlay park in afternoon.
Back wheel of my bike rip in tyre and puncture.
Pumped a few times on way back.

Twiddled bike bits at home. Daire's saddle and gears.
Fixed puncture while eating tea and Kate & Maeve also eating and helping.
Amazingly fix seemed to work! Supported tyre with bit of rubbery plastic.
Daire's gears a bit mysterious.
Wasn't getting top or lower gears I think.
Took whole thing apart. Hmmm. Nothing to adjust there?
Seems now to be going higher & lower but not all the way.
Maybe springs have gone tired so doesn't have range anymore ... ?
James isn't at all shy now of cycling ridiculously small bike up & down footpath.

Yesterday (Thur) brought Mary and Simon to train via Ballsbridge (and bad traffic).
With all kids. Then went to zoo.
Lots of humans as well as the other animals.
Zoo was okay. Nice. But high ratio of "Mnyehhh I [don't] want xxx".
Elephant's seem now to have a mad bigger/interesting enclosure.
Feeling pelts and bones in last little house and 3 kids of buggy to car was best bit.
Then to Temple bar (bad traffic again) and eat in Italian.
Aiming for Italian QUarter on North side but note to self: there isn't any option to turn off and park AFTER you pass it going East. Couldn't bring myself to pay for terrible chips/food (and Q) in zoo (even if they seem to have changed the eating buildings).
Finally home (bad traffic city centre but actually okay the rest of the way) just before rush hour.

Did more sawing and screwing. Attic shelves and camping box. Kate's bed boards. Kitchen little soup packet holder.
Maeve in creche. Daire visiting or visited, Kate again playing loads on bike. She makes a "rainy day" book with paints.
She drives the book and gets me to add the writing when she has 4 pages.  A front cover and more pages are added with Daire's help as morning progresses.
I moved dry clothes round house and made more wet clothes as well.

Paints come out repeatedly these days.
Girls love them. I generally say yes. Spread newspaper. Splork new paint in pots, get water, clear pages.
Then leave them off.
Maeve paints a bit at first.
 Then paint hands.
  Then paint hands and arms all the way up to clothes.

Tue I'm tired and sleep in and we're not all set till 10. A bit late to  bring Maeve to creche so she stays home.
We do lots of stuff. If  there is a third girl (Emma)  there's no trouble between Kate & Maeve.
Moving clothes around house.
I tidied a little prep for Mary visiting.
Maeve very funny paints arms up over elbows black (again! (well actually it was blue last time)).
Mary out this evening (after meeting Pauline who is off to the UK).
Fionn cooks salmon for dinner and roast veg. I'm STILL out back finishing off woodwork.
Before Mary arrived was phoning Pauline and  Mary.
No I do not want to drive into say bye. I picked up from Pauline on phone that they were busy. Actually they got ferry this very night. Couldn't pass this onto Fionn. But phew after rest we were good again and dinner was lovely AND yummy too.
I feed girls salmon + tagliatelli + beans before Mary comes.
Maeve and I collect Mary from Luas.
So girls get to meet Mary and stay up late.

Myself and Daire & Kate go first to Chadwicks with car.
We get wood, screws with decent sized wall plugs, a rasp, a mallet (Daire likes mallet!), tub of plaster stuff, ... bits.
Some 2x1 wood.  Blackberries outside. Then to Bizmart to see. Epic visit. Daire is boss in big desk. Kate is Boss 2? Or assistant or secretary or something. Anyway. Nice desks and chairs. Stationary is work oriented. No school stuff. They have apple macs. On internet. Unprotected (watch popups!). We see photo kiosk machine. Grab digital camera. Kate & Daire & I take pics of my head. Print out passport photos. 5 euros. Not great value but handy I guess. Daire does "Which is your Star-Wars character?" personality test. Shop shuts 5. Whew! Where did the day go!?

In evening visit Doreen and cut grass front & back and weed/tidy front.  (I think Sunday).

Ruth and Gordon and Maureen and John and Colm arrive after 11 Sat.
Talk and games and cook food. Music, DVD quiz, scrabble. Sat is raining so we don't venture anywhere.
Nice visit. On Sunday we go up three rock hill.
Maeve in 3 wheeler buggy. I push. We go right earlier (new gravel track) for curiosity and up steep through
wood but 3 wheeler buggy is okay at end of that.
Last bit others go through woods.
Daire & Colm get to top first.
On way down Kate & Maeve go on buggy.
We pass FIonn & John just emerging from short-cut.
We pass Ruth and Gordon and Maureen on road.
We nearly catch Colm and Daire (whe haven't gone on any road on way down).

Motorbike test 11:30. Arrive over early. Drive a few roads before park and wait.
Tester not chatty. Questions smoothly enough. Driving goes reasonably well I think.
Out of car park, left and left. Down that road a bit and left ... left again and right (before back at
driving test centre).  Up road with left bend then right to Nutgrove shopping centre.
I had noticed new roadworks with twisty Stop/Go signs driving this in other direction just earlier.
Stop for us.
And when it goes Go we start but worker starts jumping and waving, so flap slowey/stoppy hand and wait for
the Stop signal jumper lady to get past.  Tum. Tee Tum. Right and quick left (then right and left and stop).
Then do slow stuff.
I do terrible TERRIBLE U turn.  Radio a bit in way.
Observe and leave van pass okay. Quite safe but shaky when start and don't have enough space. Look and bump up on shallow footpath. Gah! :( Och. The slow straight forward a little shaky at start but gets better fast and persuade clutch hand to control speed so well in control.  Rest of test good bit more driving.
Back to centre and tester signs cert before asking me to sign and telling me I've passed.
YAY!  I express happiness with a "Thank-you".

Fri afternoon. Fionn goes back to work.
Daire and I cycle. Kate on back of my bike with video camera.
We cycle down to Sandyford Ind. Est. to new Dunnes stores.
Not sure where it was.
We ooh and aah first at the fancy curvy bike park.
Then at the buildings and  garden areas inside.
We go exploring - trees and teletubby hillocks and water around imaginarium are nice.
Then in Dunnes we get drinks for kids, some fruit, bread, dishwasher tablets and a salmon.
Later we freeze poor salmon as teatime rushes past us.
Maeve sees the salmon (vacum packed in clear plastic) when we're at home and she loves it!
And looks very funny holding it!
Everyone who visits on the weekend sees Kate's video.
Lots of my arse and the moving ground.
She doesn't lift it up much until we pass a crane.
Very nice hearing her commentary though (most of which is missed when cycling).
"It's all green now. It's all grass." should have been a clue that camera was pointing at ground!

Friday, 17 August 2007

Motorbike test

To: jonathan coburn @


 Just a note to say thank-you for the day of training I did with you.
 I got alot from the lesson and I'm still practicing/absorbing the information.
 Especially on position & control with cornering, observation and slow speed.

 One thing I realised after the training that with slow speeds my clutch hand was instinctively
 following throttle hand. If I wanted to speed up my clutch hand was actually squeezing
 and the opposite for slowing down.  Is this common?  I'm aware of it now and it is
 getting better. Keeping the throttle constant and controlling speed with clutch works much better.

 I had the test 11:30 on Friday and passed.

 The test went pretty well though I made a mess of the U-turn.
 I got 5 grade 2 faults: position turning right, observation turning left,
   clearance stationary vehicles, motorcycles safety glance and u-turn.
 One grade 1 fault position on the straight.
 The U-turn was done on the concrete roads in the estate opposite Nutgrove shopping centre.
 There was plenty of room only I was shaky at start and didn't turn tightly enough.
 Observed and bumped up off of the road even onto shallow driveway exit.
 Not dangerous but a really terrible U-turn!
 Other slow manouveres were done well though.

 That's it. Thank-you! :)


Monday, 16 July 2007

svn switch in svn FAQ (and posting patch without attatchment - DOH!)

Yay! :) The svn people go fast.

FAQ into svn svn and onto web while we were away visiting Cobh for the weekend.

I investigated the svn switch thing and make a FAQ entry but then
started to understand the problem so had to investigate more and
revise emails and the FAQ entry I had made. A few late nights last week.

Anyway eventually got everything together and posted to the svn dev list.
WITHOUT the patch for the FAQ entry!!! :( DOH.
But clever svn person Karl Fogel got it from the copy I put up for review.
And everyone is very nice on the dev and users list.

For Thunderbird I have found this: Check and Send extension:
YouI have to configure it and add list of attach keywords "attach|patch|attached|attachment"
it works! Warning dialog and lots of lovely yellow highlighting.

My internal paranoid over-shoulder watcher has not been good last week.
With root too :(
It's very twitchy now though.

  user@develop$ cd
  user@develop$ ls -al
   [ lots of stuff owned as root ]
  user@develop$  su -
  root@develop$ chown -r user:user .

  telnet was method of connecting to machine and telnet in broken after that  spectacularily unspectacular method of making a huge mess. :(

Wednesday, 11 July 2007

svn switch problem - cannot switch from ''unclean'' checkout

Is this true? svn switch will only work if switching from a clean checkout i.e. no unversioned files and no changes of any type. (I would guess a very new and simple repository might not have this problem.)

Let's see if we can find out if people know about the "svn switch problem"
Post to svn users list and also logged comment in svn bug 2505.

Subject: svn switch problem - cannot switch from ''unclean'' checkout


We had a bit of a problem with using svn switch.
If doing a switch and there are unversioned (maybe ignored) items in the checkout
then you can get errors and end up with an unusable repository.
We now keep a ''pristine'' clean checkout of any trunk or branch that is worked off of
and update it then copy and switch when we need to checkout.

I think this is this issue:

The bugs there last had activity July 2006 so I don't think they're in line to be

Do many large projects with lots of parallel development and branches use svn?
I wonder are people seeing this issue and giving up on using svn switch?
I was surprised this isn't better known? Or is it?

I think any project that made use of branches could benefit from having this
documented. A "bugfix" and better error would be nice also in time :)
It would be very nice if there was a note in FAQ or manual on svn switch.
If people agree this is an issue we could submit some content for that.
For now I'd like to hear what you think.

The switch is used at sites remote to the svn server to avoid doing a checkout
every time a developer moves to working in another branch.
Move to another branch is done frequently enough as all work is done on branches
using Trac tickets.

I think the switch problem is a puzzling one as to me it seems natural that if
an svn status reported that there were no changes to versioned files then a
svn switch would do the right thing and warn and move unversioned files out
of the way. The need to do switch only from pristine checkout is also not
mentioned in svn manual.



=== Using svn switch instead of svn checkout to save time ===

A full checkout of a large repository branch may take a long time >15 mins :(
This is a problem for users who are not in same site as svn repository.
Instead of doing a checkout every time a user may checkout the trunk (or SDB) of the
project they are working on initially. They take a copy of that clean trunk and
use ''svn switch'' to change it to the branch ticket instead of checking out the
branch ticket.

Setup (initial checkout of pristine copy):
  mkdir /pristine
  cd /pristine
  svn co $SVNROOT/${project}/trunk ${project}_trunk
  gtar -zcvf ${project}_trunk.tgz ${project}_trunk

Switch (user updates pristine copy from svn, then copies it and does the switch):
  # '''Note: It is very important that the pristine copy is kept absolutely clean'''
  cd /pristine/${project}_trunk
  svn up
  cd ..
  gtar -zcvf ${project}_trunk.tgz ${project}_trunk
  cd /checkedout
  gtar -zxvf /pristine/${project}_trunk.tgz ${project}-xxx
  svn switch $SVNROOT/${project}/branches/ticket-xxx

==== support scripts and Pristine server ====

A server can be set up in each site which will keep
''pristine'' clean copies of project trunks and SDBs. The copies would be
checked out afresh once and updated nightly. (by script setup as a service)

Users on a site would use those ''pristine'' clean copies to switch from and
this would be supported by a script. A script to clear out and make ''pristine'' a checkout  is left
as an exercise to the student :-P :)

Switch from pristine: (recordings share must be mounted)
  cd /checkedout
  gtar -zxvf $SVNPRISTINE/${project}_trunk.tgz ${project}-xxx
  svn switch $SVNROOT/${project}/branches/ticket-xxx

Thursday, 5 July 2007

Gödel, Fermat and

GEB == a book by Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid

The GEB page on doesn't say much on the self-reference and layers of self-reference that build complex system (such as human intelligence). This for me was a puzzling thing. How come we have this "feeling" of  being/thinking?   Is there a God? :-P I wondered about that for years before I read bits in EGB again on recursive self reference. And then read the intro again. He says everything in the intro :). I had that mind opening inspiration feeling.
Godel's theorem applied to God on

Fionn thinks I'm a bit weird I think and doesn't get the self-referential jokes. Oh well. has some self-referential jokes. :)

The explaination of how we have this feeling of "I" is cool.
It could lead us into discussion of atheism.  Hmm, maybe not now. 
Belief of God as such isn't a problem as such. Wrong maybe :).
The problem is that people seem very inclined to turn over their thinking/actions to their religious leaders and also happy to obey random thoughts inside their heads if they have a belief in some higher power.
Sentient beings have to take full responsibility for themselves. (we're doomed! :) )
"This is my simple religion. There is no need for temples; no need for complicated philosophy. Our own brain, our own heart is our temple; the philosophy is kindness." -- Dalai Lama

other cute stuff from

Godel: any sufficiently strong axiomatic system is either inconsistent or incomplete
it can be proved that if it can be proved that it can't be proved that two plus two is five, then it can be proved that two plus two is five
(from Godel's Second Incompleteness Theorem explained in words of one syllable)
Haiku: Gödel's theorem. Complete? Then inconsistent!

"1 + 1 = 2" - Principia Mathematica

"Any sufficiently advanced technology is indistinguishable from magic." -'s_three_laws (3rd law)

if n is an integer larger than 2, then the equation an + bn = cn has no solution for which a, b, and c are integers larger than zero - Fermat
Demonstrationem mirabilem hanc marginis exigiutas non caperet  - Fermat
Occam's Razor ... and checking is it plugged in.

The "i" in "slithy" is long, as in "writhe"; and "toves" is pronounced so as to rhyme with "groves." Again, the first "o" in "borogoves" is pronounced like the "o" in "borrow." I have heard people try to give it the sound of the "o" in "worry. Such is Human Perversity. -- Lewis Carroll

Kitten principle: any amount more of kittens are not capable of creating more chaos than one kitten is capable of creating, but are in fact capable of being cuter.

notepad quote 0xa1 not 0x22 ? php

Fionn has a php problem and I notice in email her quotes don't look the same.
She is editing in windows notepad.

but you have bad quotes!!

  good: ">",
  bad:  ”>”,

0000130: 2e22 3e22 2c0a 0a20 2067 6f6f 643a 2022  .">",..  good: "
0000140: 3e22 2c0a 2020 6261 643a 2020 a13e a12c  >",.  bad:  .>.,
0000150: 0a0a 0a                                  ...

good quotes are 0x22  your bad quotes are 0xa1  some extended ascii character

HTH  == hopefully this helps  (or appropriately scary Hand-To-Hand ascii-jujitsu),

Thursday, 28 June 2007

graphviz bug 1042 (right-click mouse menus not selectable) is probably 524 (numlock)

Yesterday I discovered that NumLock being on made mouse menus in graphviz tools not work.
Stupid silly thing but actually not intuitively solved.
Poking around (on nternet with google) further I think this could be a more general X programming problem.
My problem is with cygwin and solaris X clients (and cygwin X server[you know about that weird X server-client switcheroo don't you?]).

Further poking:

  Use 'xev' to trace X events
  Only difference is with NumLock on event state is 0x10 and 0x410, with off state is 0 and 0x400.

  On solaris truss dotty process (lefty) truss -u a.out and truss -u lib,libX* -t '!all'
  Interesting to note that with NumLock on then there are no events when scrolling or selecting
  mouse menu item.  So it is as if the application just has not registered for those events.
  So it is a problem at X setup/initialise time.

  checkout cvs source, update cygwin dependancies (autoconf, gd, libtool, more!),
   # augh! autoconf fails because it thinks gettext is not there :(

 download latest stable graphviz source
  ./configure; make; make install
  # That works now, hurmmm. Yikers, Okay there is windows, gtk and X gui interface.  (in  cmd/lefty/ws/)

 take a simple X  application.
 That works and isn't bothered by numlock.
 Has very different X initialisation though, leaves much more to default X stuff.
 Humm. If could find a very simple example which had the numlock bad behaviour it would make finding the
 solution easier.
 Humm :-7 push me!

Oh, By the way. For graphviz on cygwin (and a couple of other things) add this to  your  cygwin download sites (in Setup):

graphviz bug 1042 description isn't great, "right-click mouse menus not selectable" would be better.
A right click raises menu but nothing may be selected.

I saw bug 524 (old and closed) to do with num-lock.
It looks to me that 524 is duplicate of 1042.

I also of course see this bug (solaris and cygwin).
I toggled num-lock and hey presto the menus work.
This behaviour is very puzzling and most new users would not find the very simple solution!

It should not matter about numlock.

dot version 2.2 (Wed Mar 23 14:44:07 UTC 2005)
 on cygwin

dot version 1.10 (Wed Jan  5 16:56:31 GMT 2005)
 on solaris 10(sparc)
from package:
/usr/sbin/pkgchk -l -p `which dot`

both using cygwin as X server

subversion move/rename and branch merge problem

Fionn is reading writing books at the moment and I find myself trying to  express and craft a warning about svn. "We want to give instructions to people on how to avoid problems I think. (and not confuse them too much with details - keep the details for our reference) It's difficult to write something simple and yet cover the problem entirely! :)" - me

WARNING: Everyone should be cautious renaming or moving things in svn.

If someone is moving(or renaming)(or deleting) directories/files then all people working off of the same branch should be notified.  It would actually be best if all work was finished up and the move/rename done while there were as few other branches off of the same branch as possible. (as few as possible = zero! - :) ) If anyone has changes to files that are renamed or moved they should be aware that their changes will be lost by any merge.


Subversion rename/move is implemented as seperate Delete and Add and this means it is as if a new entity is added at the point the rename/move is comitted. Any changes to moved entities done in parallel (and comitted after move) will be merged out and lost.

A simplest example (not with branches/merge), but results in the same problem.
Essentially a directory move was committed.
Another user had edited the files in that directory.
When that user updated from trunk the file changes were "lost".

# mary edits file
"fudir/new-fu-file.c" 3 lines, 36 characters

mary$ svn status
M      fudir/new-fu-file.c

# Meanwhile Tom is reorganising stuff. (move dir and COMMIT)

tom$ svn mv fudir/ fu-moved/
A         fu-moved
D         fudir/new-fu-file.c
D         fudir

tom$ svn ci -m"mv fudir to fu-moved"
Deleting       fudir
Adding         fu-moved

Committed revision 12.

# Mary can see there are updates and she cannot commit until after update.

mary$ svn status
M      fudir/new-fu-file.c

mary$ svn status -u
       *            fu-moved/new-fu-file.c
       *            fu-moved
M              11   fudir/new-fu-file.c
       *       11   fudir
Status against revision:     12

mary$ svn ci -m"commit to file moved away by other checkout"
Sending        trunk
svn: Commit failed (details follow):
svn: Out of date: '/trunk' in transaction '12-1'

mary$ svn up
D    fudir
A    fu-moved
A    fu-moved/new-fu-file.c
Updated to revision 12.

# hey!  Mary's changes are not lost,
# but they are now unversioned and not in svn (still in fudir)
# and the fu-moved dir contains the new-fu-file.c version that was last seen by tom
# SO if they were part of many changes it would be easy to miss them
# the only clue to this problem is the "? fudir"

mary$ svn status -u
?                   fudir
Status against revision:     12

# The correct thing to do is for Mary to restore each of her changes by hand.
# Her svn status should as a general rule have the same number of Modified/Added/... files
#  before her checkin.
# She can copy in this case as there were no modifications to the file by Tom BUT
#  copying might be the wrong thing to do if there were changes.
#  (see svn manual Branching and Merging: Resurrecting Deleted Items)

mary$ cp fudir/new-fu-file.c fu-moved/

mary$ svn status -u
?                   fudir
M              12   fu-moved/new-fu-file.c
Status against revision:     13

mary$ svn ci -m"redo change to file after dir was moved"
Sending        trunk/fu-moved/new-fu-file.c
Transmitting file data .
Committed revision 14.

I'm very surprised this move problem is not in the manual or FAQ (or is it?)
svn manual: svn.c.move  svn.c.merge svn.branchmerge
I think it is covered in the manual:
 svn manual Branching and Merging: Resurrecting Deleted Items

This issue is documented in the wikipedia: (Current issues)
And in svn roadmap:
I guess this problem isn't an issue really unless a lot of parallel development and
branch/merging is being done as we are doing.
Anyway, I'm surprised it isn't highlighted more.

Friday, 22 June 2007

Script to see svn branch log,
 and follow on from the log if earliest entry was a "rebranch",
 and keep on doing that until branch was really created.

Trac and mergebot very very useful for managing svn branches.
Manages making of branches and essentially  branch merges or rebranch very nicely.
 (works with branches with a parent branch too instead of trunk)

We seem to have been burnt by a big merge out on a branch.
Many revisions and a good few rebranches and merges back to parent.
So need to follow log revisions.

On command line svn log --stop-on-copy reports how to get "Previous log" revision. And now that I know what to look for I see a "Previous log" link in the trac log of any changeset which is a rebranch merge.


if [[ "$1" == "" ]] ; then
  echo "usage: xt <ticket-nnn>"


touch ${TICKET}follow.log

while [[ $BRANCHREV != "" ]] ; do
#echo go go go;
svn log  ${SVNROOT}/${BRANCHREV} --stop-on-copy >> ${TICKET}follow.log
BRANCHREV=`tail -2 ${TICKET}follow.log |grep "Previous log" | sed "s/.*log:\(.*\) Previous.*/\1/"`

Tuesday, 19 June 2007

gnu compiler has things inside it

Coming to you from the land of gmake, ggrep, gegrep, gsed, gpwd, gcd, gcat, gdf, guname, ... gar, gld, gobjdump, (watch out gprof is often solaris gprof (in /usr/ccs/bin) ggprof is gnu gprof) ...  :)   i.e. solaris.

Watch out on solaris what linker is being used. And also watch out gcc libs may have internal library paths which can affect linking.

1. linker
gcc may be configured (at gcc compile time) to use gnu binutils or to use solaris linker/assembler. I would guess that the binutils might be more of a challenge to get working on solaris? Many (all?) sunfreeware packages of gcc use solaris linker/assembler. One difference noted is that solaris linker passes over libs just once by default. So library order is important and duplicates may have to be used (or else put "-Wl,-z,rescan" in LDFLAGS to pass to linker).  Another difference is different flags used to add to rpath at link time (-rpath for gnu ld, -R for solaris ld).

2. rpath in 64bit libs

/usr/sfw/lib contains 32bit libs, /usr/sfw/lib/64 contains 64bit libs.

But often the 64bit or 64bit contain /usr/sfw/lib (32bit) in rpath.

This must be overridden using rpath in your own 64bit binary or using LD_LIBRARY_PATH in environment.

machine 1 (solaris 10, sparc):

gcc 4.1.1 configured with gnu binutils and gcc 3.4.3 from sunfreeware configured with solaris linker/assembler

$ /opt/GCC-SunOS-10-4.1.1/bin/g++ -print-prog-name=ld

$ /usr/sfw/bin/g++ -print-prog-name=ld

$ /usr/sbin/pkgchk -l -p /usr/sfw/bin/g++

machine 2 (solaris 10, amd/x86):

both gcc 4.1.1 and gcc 3.4.3 from sunfreeware configured with solaris linker/assembler
$ /usr/sfw/bin/g++ -print-prog-name=ld

$ /opt/GCC-SunOS-10-4.1.1/bin/g++ -print-prog-name=ld

$ /usr/sbin/pkgchk -l -p /usr/sfw/bin/g++

wacky:  64bit gcc libraries often have bad rpath in them  (see this 32bit lib rpath in the 64bit lib)
The runtime dynamic linker is happy to go with 32bit libs but of course it then has a problem loading them.
Interesting to note that the ld or gcc found in path affects the ldd -s output.

$ ldd -s /usr/sfw/lib/64/

   find; required by /usr/sfw/lib/64/
    search path=/usr/sfw/lib  (RPATH from file /usr/sfw/lib/64/
    trying path=/usr/sfw/lib/
    search path=/lib/64:/usr/lib/64:/opt/GCC-SunOS-10-4.1.1/lib/sparcv9  (configuration default - /var/ld/64/ld.config)
    trying path=/lib/64/ =>     /lib/64/

   find; required by /usr/sfw/lib/64/
    search path=/usr/sfw/lib  (RPATH from file /usr/sfw/lib/64/
    trying path=/usr/sfw/lib/
    search path=/lib/64:/usr/lib/64:/opt/GCC-SunOS-10-4.1.1/lib/sparcv9  (configuration default - /var/ld/64/ld.config)
    trying path=/lib/64/
    trying path=/usr/lib/64/
    trying path=/opt/GCC-SunOS-10-4.1.1/lib/sparcv9/ =>         /opt/GCC-SunOS-10-4.1.1/lib/sparcv9/

   find; required by /usr/sfw/lib/64/
    search path=/usr/sfw/lib  (RPATH from file /usr/sfw/lib/64/
    trying path=/usr/sfw/lib/
    search path=/lib/64:/usr/lib/64:/opt/GCC-SunOS-10-4.1.1/lib/sparcv9  (configuration default - /var/ld/64/ld.config)
    trying path=/lib/64/ =>     /lib/64/

   find; required by /lib/64/
    search path=/lib/64:/usr/lib/64:/opt/GCC-SunOS-10-4.1.1/lib/sparcv9  (configuration default - /var/ld/64/ld.config)
    trying path=/lib/64/

   find; required by /opt/GCC-SunOS-10-4.1.1/lib/sparcv9/
    search path=/lib/64:/usr/lib/64:/opt/GCC-SunOS-10-4.1.1/lib/sparcv9  (configuration default - /var/ld/64/ld.config)
    trying path=/lib/64/

   object=/lib/64/; filter for /usr/lib/sparcv9/

   object=/lib/64/; filter for

   find; required by /lib/64/
    search path=/lib/64:/usr/lib/64:/opt/GCC-SunOS-10-4.1.1/lib/sparcv9  (configuration default - /var/ld/64/ld.config)
    trying path=/lib/64/

   object=/lib/64/; filter for /platform/$PLATFORM/lib/sparcv9/

   find object=/platform/SUNW,Sun-Fire-T200/lib/sparcv9/; required by /lib/64/

Thursday, 14 June 2007

C++ using templatised params in typedef and general struggling

Trying to do something completely perfectly in C++ but it's becoming an epic struggle. Templatised things must be kept in a list, processed by template class (invoked two different threads). But the templatisation must be exposed to interface in and out of class.

Just one of numerous problems seem to be with a typedef of a hash map of templatised types ...  The kind of typedef used here works if the HashMap params aren't templatised params. I might be missing some relatively basic C++ template knowledge or, well the why doesn't it just do what I mean! :'(

template<typename QIdType, typename SeqType>
class CRetxLink

   typedef struct retx_data
      SeqType                    m_retx_seq_no;
   } retx_data_t;

typedef dts::HashMap<QIdType, retx_data_t*> HashTypeData;
boost::shared_ptr<HashTypeData> p_retx_list;

// compiler doesn't like this:
HashTypeData::iterator iterData = p_retx_list->begin();

// e.g. this is okay outside of class
typedef struct retx_data
      unsigned int                    m_retx_seq_no;
   } retx_data_t;

typedef dts::HashMap<unsigned int, retx_data_t*> HashTypeData;

Need to go back and start with the basics again .....

// essentially a generic interface to the templatized classes would be a start.

#include <string>
#include <iostream>

//g++ ~/c/templateInterface.cpp -o ~/c/templateInterface

class CTempInterface


virtual void Method()
printf("Method %s\n", __FUNCTION__);


template<typename T>
class TTemp : public CTempInterface


void Method()
printf("Method %s\n", __FUNCTION__);
std::cout << "two: " << thingywotsit << "\n";

T thingywotsit;


int main()
TTemp<int> tt_i;
TTemp<std::string> tt_s;

//TTemp &p;
CTempInterface *p;

p = &tt_i;

p = &tt_s;

Thursday, 7 June 2007

geek soul forfeit?

/me forfeits geek soul
messaging while slightly drunk
ohhh! svn ci while slightly drunk! >;)
editing /etc/sysconfig/ stuff too

it wasn't me by the way. it was the piano
and slightly is < a can of guinness
but it seems to be working very well.
so I said what else can I do ... ahh yes. blog while slightly drunk.

oh great. my amazing powers of software breaking manifest themselves.  can't post ... ???
Hmmm. methinks livejournal doesn't like being kindof logged in in multiple tabs?
Anyone else find the same?

Friday, 1 June 2007

use libumem to make a memory use profile

Solaris 9/10 though we note libumem is being ported to linux.

1. run binary with libumem debug

   UMEM_DEBUG=default UMEM_LOGGING=transaction <binary file and params>

2. gcore and run mdb on it

   gcore -o myumemcore -p <pid>

3. run mdb commands on core file (step can take a while depending on core size)

   mdb <binary file> myumemcore <umem-test.mdb

less umem-test.mdb    
 $c !tee>>umem.log
 ::walk thread |::findstack !tee>>umem.log

 ::umastat !tee>>umem.log
 ::umem_status !tee>>umem.log
 ::umem_verify !tee>>umem.log
 ::umalog !tee>>umem-umalog.log
 ::findleaks !tee>>umem-leaks.log

 ::umausers !tee>umem-umausers.log
 *umem_oversize_arena::walk vmem_alloc | ::vmem_seg -v !tee>umem-oversize.log


4. Generate simple list of:

bytes  allocation-count  block-size   stack-reference(1st line that is not libumem malloc or libstdc++ new)

# allow over-ride from environment
[[ $UMEMOVER == "" ]] && export UMEMOVER=umem-oversize.log;
[[ $UMEMUSER == "" ]] && export UMEMUSER=umem-umausers.log


egrep -v "(ADDR TYPE|THREAD *TIMESTAMP)" $UMEMOVER | perl -00 -pe '$foo = $_; ($ptr,$size,$thread_and_ts,$rest) = m/^\s*(\w+)\s+\w+\s+\w+\s+\w+\s+(\w+)\s*\n(.*)\n([\w\W]*)$/m; print "ptr: $ptr size: $size "; $rest =~ s/libumem.*/URK/g; $rest =~ s/libstd.*_Zn[wa]m.*/CURK/g; $_ = $rest; ($stackref) = m/\s*[CURK\s\W]+\s+(\S+)\s+/m; print "stackref: $stackref\n"; $_="";'  |sed "s/.*size: \(.*\) stackref: /\1 /" |sort |uniq -c |sed "s/  */ /g; s/^ *//" |perl -pe '$foo = $_; ($allocs,$blocksize,$rest) = m/^\s*(\w+)\s+(\w+)\s+(.*)$/; print ($allocs*$blocksize); print " ";' >$UMEMPROFILE

cat $UMEMUSER |gegrep -v "^ *(libumem|libstdc++)" |ggrep -A1 "bytes for" |sed  "s/\-\-//" |perl -00 -pe '$foo = $_; ($bytes,$allocs,$block,$rest) = m/^\s*(\w+)\s+bytes for\s+(\w+)\s+allocations with data size (\w+):\s*\n(.*)$/m; print "$bytes $allocs $block "; $rest =~ s/libumem.*/URK/g; $rest =~ s/libstd.*_Zn[wa]m.*/CURK/g; $_ = $rest; ($stackref) = m/\s*[CURK\s\W]+\s+(\S+)\s+/m; print "$rest\n"; $_="";' >> $UMEMPROFILE1

sort -n $UMEMPROFILE1 |perl -pe 'BEGIN{$tot=0; print "Bytes Allocations Block-size Stackref";} $foo = $_; ($bytes,$allocs,$blocksize,$rest) = m/^\s*(\w+)\s+(\w+)\s+(\w+)\s+(.*)$/; $tot+=$bytes; END{print "Total bytes: $tot\n";}' |tee $UMEMPROFILE

Hmmm. Maybe I should have just done it in perl.

more bash and subversion ignores

# allow over-ride NORMAL_EXTNS in environment if script being called by a robot.
if [[ $NORMAL_EXTNS == "" ]] ; then

IGNORES=`svn status |grep ^? |egrep -v "\.($NORMAL_EXTNS)$" |sed "s/\?  *//;
  " |sort |uniq`

# get list of extensions under source control
EXTNS=`svn status -v |grep -v ^? |grep "\.[^\s]" |sed "s/.*\.\([^.][^.]*\)$/\1/" |sort |uniq `
# This line is quite useful making content for the NORMAL_EXTNS line above

for ext in $EXTNS ; do
   NOT_IN_NORMAL="$NOT_IN_NORMAL `echo ".$ext" |egrep -v "\.($NORMAL_EXTNS)$"`" ;
# remove whitespace
if [[ $NOT_IN_NORMAL != "" ]] ; then
   echo \# extensions with ignore, but not \"normal\" ignore:
   echo \# consider update of NORMAL_EXTNS= line in `basename $0`
   echo $NOT_IN_NORMAL

Pirate costume

After cubs last night and after collecting rest of gear needed for Daire's camping trip we started on pirate costume.

Bandana for head (stripey silk hanky)
Two of my shirts :- white one underneath with cloth belt around waist and sleeves rolled up and blue shirt over that looks like a coat.
Sports socks with trousers tucked in and pushed up to knee.
Sword with hand guard: bamboo stick sprayed with silver paint and cardboard/duct-tape guard.

Daire has good sword technique gleaned from the Princess Bride (and not Pirates of the Caribbean he says).

Julie's French Apple Cake

Last ditch effort late last night recipes for dspsrv cookbook.

Julie's French Apple Cake

Annabel Karmel's Quick Children's Meals


   rubber baking "tin"
   mixing bowl


   5 small eating apples (or less bigger ones in quarters)
   1 lemon
   butter - 7oz (200g) *warm it up*
   brown sugar - 8oz (225g) (see note)
   4 eggses
   plain flour  - 7oz (200g)
   baking powder - 1 tsp
   dessicated coconut - 4oz (100g)

   note: actually caster sugar in book but Cranks' is right.
       Less refined ingredients do taste better.

   Peel & core apples, cut in half (or quarters) and squeese lemon juice over.
   Score the round side of the apples.

   Beat butter and sugar then add eggs one by one.
   Mix in flour, baking powder and 70g of the coconut.

   Grease cake tin. If it is not of the non-stick rubber type then grease it
   very well and line with greaseproof paper. Cake is very sticky.

   Pour mix into tin.
   Arrange apples in circle or regular design, curved side up and press
   down until just about covered.
   Sprinkle rest of coconut over top.

   Bake in oven at 170C/325F/Fas 3 for 50 minutes.


Home made burgers (or meatballs)

A little messy but easy and yummy. Very nice with a sauce.

If you make spheres instead of burger shapes you can call them meatballs.
Putting jar of tomato stuff over them and baking works very well.


   mixing bowl
   knife & chopping board


   mince - beef/lamb
   Some slices of bread (for breadcrumbs - stale is arguably better)
   garlic (optional)
   chopped herbs
   flour (for dusting - optional)

   You can buzz up bread in a buzzer to make breadcrumbs.
   Or tear it into small bits by hand into a mixing bowl and then pick up
   the bits and roll them between your fingers/hands.
   Cold toast smashes up easily.

   Chop up onion and garlic very small.

   Get tray ready for holding burgers.

   Roll up sleeves. Your hands are going to get messy.

   Mix everything together in bowl (except flour).
   Use your hands to mix.
   Now take a small fist of the mix and squash it and pass from
   hand to hand and form into a UFO shape.

   Fry or grill burgers.

   Serve with some sauce and maybe veg and carbohydrate.

Cranks' nut loaf

Very yummy with grated cheese and a tomato sauce. And fried onions.
See tomato sauce recipe below but we use jars of bought sauce most often.


   buzzer capable of chopping nuts
   baking tin - loaf type.


   onion - 1 medium, I prefer more and some garlic.
   butter or margarine - 1 knob
   mixed nuts (peanuts, walnuts, cashews, ...) - 8oz (225g)
   wholemeal bread - 4oz (100g)
   vegetable stock or water .5 pt (300ml)
   yeast extract - 2 tsp (10ml)  ! yes I know. see note.
   mixed herbs
   salt & pepper

note: yeast extract = marmite!
It took me a few years to figure that out.

   Chop onions small.
   Saute onions gently in butter.

   Chop nuts & bread in buzzer. Until quite fine.

   Heat stock and yeast extract to boiling point.

   Grease baking tin.

   Mix everything together and put into the tin.
   Sprinkle some breadcrumbs on top.

   Bake in oven at 180C/350F/mark 4 for 30 minutes.

Cranks' tomato sauce

Goes great with lots of things.
Like stew/soup tastes better the next day.


   onion - 1 medium
   tomatoes - 12oz (350g)   (maybe tinned tomatoes okay)
   butter or margarine - 1 knob
   vegetable stock or water .5 pt (300ml)
   tomato puree
   basil (or other herbs)
   salt & pepper

   Maybe a little sugar or actually carrot chopped up very small adds
   natural sweetness which the tomatoes need.

   Chop onion and tomatoes. (and carrot very small if using)
   Saute onions (and maybe carrot) gently in butter.
   Add everything else, bring to boil then simmer uncovered for 20 mins.

Irish weather

On the best days we get bright sunshine alternating with dark clouds and rain from light drizzle to heavy showers. The wind will do funny things. Rainbows and hail/snow if it's being especially exciting.

Friday, 25 May 2007

motorbike robbers!

 When I got home Wed my neighbour had had his bike stolen from work (city-west IBM).

 4 lads arrived in car
 Made short work of locks with concrete disk cutter
 All on video, security challenged them but they threatened them with the disk cutter at them
  and drove off. 2 on bike.

 Then no news till later on.
 He called a friend in traffic gardai, dunno did that influence it.
 But a guy on a bike burning up his back tyre in Finglas attracted attention.
 And they caught him with unmarked car.

 Apparently the same lads had stolen car in morning.
 Back tyre has a big flat patch - wouldn't have helped them if they were going to use it in another
 robbery!  Ignition broken, scrapes along side where bike fell over, various small things
 broke & bent, generally abused a bit but okay. :(    Cut in the mudgard from the disk cutter.

 They probably caught the stupidest robber but at least they got one!

Wednesday, 23 May 2007

Fun late last night, script to add subversion ign...

Fun late last night, script to add subversion ignores
 (incrementally and using wildcards for dotted extensions).
Script should be run on clean repository after build e.g. by a automated buildbot.
Note the bash propadd function. Would be nice if subversion provided that.


# e.g. propadd svn:ignore . "*.a"
# e.g. (multiline) propadd svn:ignore . "*.a
# *.o"
propadd () {
  OLDVAL=`svn propget $PROP $FILE`
  echo svn propset $PROP \""$NEWVAL"\" $FILE
  svn propset $PROP "$NEWVAL" $FILE

# get plain list of files
svn status -u |grep ^? |sed "s/\?  *//" >svn_ignore_files.log

##### Anything with a dotted extension insert wildcard * in place of rest of file name
# sort | uniq to rm duplicates for wildcards
IGNORES=`cat svn_ignore_files.log |sed "s/\([^\/][^\/]*\)\.\([^\.\/]*\)$/\*\.\2/" |sed s/^/BBB/ |sort |uniq`

### for or echo in shell expand <dir>/*.ext to full list of matches
### so add BBB
### meh

##### for each dir/file call propadd svn:ignore
# watch out $fNAME can have wildcard
for f in $IGNORES ; do
    #echo "f=$f" ;
    if [[ "$fPATH" == "" ]] ; then fPATH=.; fi
    #echo fNAME=$fNAME fPATH=$fPATH
    #ls $fPATH/$fNAME
    propadd svn:ignore $fPATH "$fNAME"

echo "Now commit ignores: 'svn ci -m\"updated svn:ignore values\"'"
echo "Or remove unwanted ignores 'svn revert [-R] <dir>'"
echo "'svn status' will show

Fun late last night, script to add subversion ign...

Fun late last night, script to add subversion ignores
 (incrementally and using wildcards for dotted extensions).
Script should be run on clean repository after build e.g. by a automated buildbot.
Note the bash propadd function. Would be nice if subversion provided that.


# e.g. propadd svn:ignore . "*.a"
# e.g. (multiline) propadd svn:ignore . "*.a
# *.o"
propadd () {
  OLDVAL=`svn propget $PROP $FILE`
  echo svn propset $PROP \""$NEWVAL"\" $FILE
  svn propset $PROP "$NEWVAL" $FILE

# get plain list of files
svn status -u |grep ^? |sed "s/\?  *//" >svn_ignore_files.log

##### Anything with a dotted extension insert wildcard * in place of rest of file name
# sort | uniq to rm duplicates for wildcards
IGNORES=`cat svn_ignore_files.log |sed "s/\([^\/][^\/]*\)\.\([^\.\/]*\)$/\*\.\2/" |sed s/^/BBB/ |sort |uniq`

### for or echo in shell expand <dir>/*.ext to full list of matches
### so add BBB
### meh

##### for each dir/file call propadd svn:ignore
# watch out $fNAME can have wildcard
for f in $IGNORES ; do
    #echo "f=$f" ;
    if [[ "$fPATH" == "" ]] ; then fPATH=.; fi
    #echo fNAME=$fNAME fPATH=$fPATH
    #ls $fPATH/$fNAME
    propadd svn:ignore $fPATH "$fNAME"

echo "Now commit ignores: 'svn ci -m\"updated svn:ignore values\"'"
echo "Or remove unwanted ignores 'svn revert [-R] <dir>'"
echo "'svn status' will show

Tuesday, 22 May 2007

brazil nuts, garden stones and avalanches

Isn't it annoying that garden/fields seem to grow stones.
I wonder is it maybe
Cool. I want a jar of beetles, sand and pebbles on my desk too!

"Avalanches are gravitational granular flows,"

"When the avalanche flows over a terrain feature (steeper slope or surface irregularities), the flow can become turbulent (mixing) causing the victim to be pushed down. As the flow smoothes out, it is the particles segregating (de-mixing) that force the person back to surface."

"When an avalanche slows (but before it stops), the snow fragments interlock, resulting in a
change in state from a fluid-like flow to that of a sliding block (everything moves as a single unit or block)."

So. Esentially. Keep arms near face somehow.

brazil nuts, garden stones and avalanches

Isn't it annoying that garden/fields seem to grow stones.
I wonder is it maybe
Cool. I want a jar of beetles, sand and pebbles on my desk too!

"Avalanches are gravitational granular flows,"

"When the avalanche flows over a terrain feature (steeper slope or surface irregularities), the flow can become turbulent (mixing) causing the victim to be pushed down. As the flow smoothes out, it is the particles segregating (de-mixing) that force the person back to surface."

"When an avalanche slows (but before it stops), the snow fragments interlock, resulting in a
change in state from a fluid-like flow to that of a sliding block (everything moves as a single unit or block)."

So. Esentially. Keep arms near face somehow.