Stuff Michael Meeks is doing
|
|
This is my (in)activity log. You might like to visit
Collabora
Productivity a subsidiary of Collabora focusing on LibreOffice support and
services for whom I work.
Also if you have the time to read this sort of stuff you could enlighten
yourself by going to Unraveling Wittgenstein's net or if
you are feeling objectionable perhaps here.
Failing that, there are all manner of interesting things to read on
the LibreOffice Planet news
feed.
Older items:
2023: (
J
F
M
A
M
J
),
2022: (
J
F
M
A
M
J
J
A
S
O
N
D
),
2021,
2019,
2018,
2017,
2016,
2015,
2014,
2013,
2012,
2011,
2010,
2009,
2009,
2008,
2007,
2006,
2005,
2004,
2003,
2002,
2001,
2000,
1999,
legacy html
-
Up early, dealt with the babes while J. slept. Off to NCC,
Tony spoke. Home for a fine roast lunch with R & I.
-
Slugged around the house, then out for an Alleluja party
(the antidote to Halloween) at All Saints - lots of small people,
dressing up as animals, doing all manner of simple games. Out to
the pub with DT & Robert.
-
DT, Zoe & Patrick over in the evening, crumpets and
tea by the fire; talked until late with I&R - sorry to see them
so infrequently; bed late.
-
Breakfast; off to Sizewell beach to play with the babes -
lovely sunny day. Spent lots of time moving gravel into banks to
funnel the incoming waves into a deep channel up the beach - fun
but exhausting.
-
Back via Aldeburgh for a very pleasant fish & chip
lunch. Packed, and drove home - unpacked machines. Painted the
external doors with a second coat of superdeck - they still don't
look an even color (most odd), but at least somewhat better.
Perhaps my rolling is too aggressive.
-
Robert & Ilona arrived late, helped put babes to
bed, and had dinner with them. Up late talking over the world
and its troubles.
-
Up early, dug through Oracle's amended complaint vs. Google,
sad; wrote a bit about it. Very encouraged to see Kay's nice eight
second full-boot chart using systemd.
-
Dug into a strange dependency problem - that magically
compiles files not mentioned in the makefile in some cases. Lunch.
Started prodding at the migration code, some most interesting code
It is amazing what we do in the SEGV
handler - taking locks, writing the document out etc. sadly of course
a SEGV can happen at an inconvenient place - such that even calling
pthread_cond_signal
or somesuch can cause deadlock if the
condition
is locked - as used to happen to Mono sometimes before it was fixed some years ago.
-
Dug through the wife's mind wrt. charity law, good to have
an on-hand expert.
2010-10-28: Thursday.
-
Boiled eggs and soldiers for breakfast with the babes. To
work, plugged away at the E-mail and patches much of the morning.
Avoiding expense reports. Lunch.
-
Got 'experimental' option patch done, and set-off a new
compile to test it; several hours even with the cluster. One of the
most curious things about Novell is that they pay their most junior
clerical administrators a programmer's salary; or - put another way,
they encourage us to spend a solid three hour block of time every
now a few times per year simply sorting, collating, and entering
expenses into a lameish web tool. Of course, the ideal is to
dis-aggregate that so it is not noticed, but somehow - on arriving
back from travel, the pressure to work through not only the mail
backlog from the journey, but also the exciting / new tasks from
the trip is too intense, and the tiresome admin inevitably gets
dropped.
-
Build finally completed, pushed the new option, more mail,
knocked off for dinner. Prodded at UK law in the evening a little,
whole schedule knocked off track by administration.
2010-10-27: Wednesday.
-
Up lateish, prodded the mail mound; got my icecream
USB bootable build-slaves building (improved studio image to follow),
boggled at Twitter's (huge, graphical) "Twitter is over capacity."
whale artwork; not that I ever use the thing, so its no loss.
-
Another really nice presentation in the openSUSE
conference / LibreOffice track was from Jonas - who has done some
great work making the OO.o formula editor properly interactive.
We are merging this into LibreOffice 3.3 as the first 'Experimental'
feature: ie. features you can enable at your own risk, to try out
cool new things:
The great news about this experimental feature is that, (of course)
while insanely cool, it is not perfect yet. There are a number of easy hacks
available just for this piece: starmath is quite a nice, self contained
piece to get started in. Other sexy things in Jonas' work (apart from the code)
was a keybinding
to dump the scene graph to a file, combined with a watcher that throws
up a GraphVis graph of the
structures: very sweet. I wonder if there is scope for integrating GraphVis
into LibreOffice in some useful / WYSIWYG way.
-
Dug into some evil visibility annotation problem relating to
multiply defined abstract derived class type information afflicting the
split out MS word filters.
-
Drove to Bruce & Anne's, and re-assembled the compile cluster
quickly - cheap netbooks make quite nice, small network-attached CPUs.
Discovered that Gnome
Shell has a reall nice set of tagged easy hack tasks.
-
Finally noticed that Florian's LibreOffice slides
are up. Reviewed and merged some more patches, listened in for part of
the Project Harmony call.
-
First public LibreOffice steering call in the evening, worked
late on this and that.
2010-10-26: Tuesday.
-
Out for breakfast at Faith's home - great to see her, Jill, Laura
and the collective menagerie of children; home to work.
-
Amused to see the Canonical noise around their new desktop shell.
As Dave says
writing a functional shell, particularly with a team with a steep technical
curve to climb, and few spare resources.
Perhaps it will succeed in the long run (where by 'succeed' I mean create
a really viable duplication of Gnome Shell which can run and run, dividing
developers and users), and perhaps not. Intel also initially made a ton of mistakes
in Moblin around copyright assignment and closed development which breed duplication
etc. though they seem to be past much of that now. Arguably Novell's development of
compiz itself was extremely retarded wrt. open-ness, inclusion and community nous.
Making the same silly mistakes left and right is nothing new. The sad thing in the
bigger picture, is to see the community of companies grow (and fail) faster than
the lessons / experience of past failures percolate through to their leadership.
In my experience most
people totally miss the most difficult piece of software engineering: which
sounds like it should be software - but is really about people - and
more importantly - them working together collaboratively in a constructive, friendly,
and incremental fashion. Obviously collaboration is not always possible, but in the
long run - there is simply no other viable approach than to work well with others,
(in my not so humble experience).
-
Prodded mail, really encouraged to see VOS (a library deprecated
for a ~decade) finally expunged
from LibreOffice by a volunteer - Norbert Thiebaud - a hero of our time; lots of
code review, chunks of testing, and a cleaner, smaller, more consistent code-base.
Reviewed and merged a nice patch to use zenity during the build for systray /
progress feedback.
-
Amused to see Oracle's Community Council show its true colors; with
everyone except Oracle guys leaving - apparently this non-entity (the council),
with no actual legal existence needs change. Sadly its bylaws don't allow for
Oracle unilaterally deciding that it doesn't want to hear the elected community
representatives say - which is no doubt a bug. To try to portray this as a
conflict of interest of the community representatives, there being no conflict
of interest for the Oracle guys is a joke. Why should a divergence from Oracle's
view be a conflict of interest with the community ? I guess the tactic here is to
push the lunacy one level up, and claim that because Oracle owns
the trademark (and refuses to donate it to the community) that per-se the
'OpenOffice.org Community' is owned by them - but this seems horribly circular.
Some people have not resigned formally until 3.3 is out, since that was their
stated intention I think.
-
Meanwhile Miklos posted his slides from the LibreOffice track at the
openSUSE conference. His talk "GSoC project: Improving RTF Export..." is
available as PDF.
goes over the merger of the RTF export filter into the new combined MS export
filter code. This saved lots of lines of code, removed tons of duplication, and
resolved a lot of bugs; a couple of larger scale links here:
I am always amused to hear the insinuations of how 'un-professional' and
'low-quality' our code contributions are, but this "Anything in a document
after a formula is lost when saving as RTF" bug, present in OpenOffice.org
(and fixed in Miklos' work - as well as making these formulae editable by the
way) takes the biscuit, though there are a large number of other great fixes
included:
See the talk for another dozen examples of key improvements.
-
More mail, Clarity, Lunch, fixed make_installer breakage caused by
including
Digest::MD5
in solenv by reverting it; hmm. Debugged
an f-spot problem for Stephen. Worked on mail queue, added some more easy
hacks.
-
Lydia and Andy over in the evening for dinner, sat by the
fire for a while talking, bed late.
2010-10-25: Monday.
-
Up late, plugged away at mail, call with JP, then Charles,
back to JP. Prodded at patches.
-
Great to see Cedric's write-up
on the LibreOffice
contribution statistics for the first weeks. Here is his graph of contributors:
-
Clearly lots of these contributors are pushing fixes and cleanups, not
huge features (yet), indeed some of the changes are quite small, but then, of
course - you would be mad to work on a huge
feature without knowing if you can first get a small fix included; so this is
expected. Also by cleaning the code up, we enable yet more contributors in a
virtuous circle. Though the Oracle contribution seems to shrink, this is most
likely just an artifact of weekly reporting, and the place in the stabilisation
cycle - I don't believe they have reduced their investment here.
-
Week 38 is when LibreOffice was created - what changed then ? two similar
things: Vendor neutrality, and dropping the requirement for a Copyright Assignment
- otherwise that is about it. This combination adds up to true open-ness.
-
The graph does not show that we had sixty-five 'new' contributors (ie. not
including existing RedHat Novell, Debian, Oracle etc. hackers), but that number
becomes stale daily as new people get stuck in.
-
Really exciting times in LibreOffice, see if there is an Easy Hack
you can get your teeth into today.
-
It is just so wonderful to be home with the lovely wife after
a week away, complete again. Reviewed and merged a nice pam removal patch,
build server PSU died taking out the whole house' power momentarily - lovely
smell of vaporised electrolyte; thank God for metal PSU enclosures.
-
Discovered ace_dent - oh he of the LibreOffice icon compression work -
is in fact supervising a PhD student on the reprap project - which is
awesomeness in a nutshell. Failed to get all my administration and E-mailing
pieces under control, but (mostly) dealt with the urgent patch reviewing task.
2010-10-24: Sunday.
-
Up lateish, met Egbert - good to catch up with him; breakfast
with Fridrich and Thorsten - bid 'bye to them. Off to the office,
prayed, enjoyed a rather excellent sermon from Park Street: Don't
be afraid: just believe. Met a nice chap: Doc Hodges in passing.
-
Out to a cafe for the afternoon with Garret - great to
catch up - a pleasure sadly deferred for some years. Off to the
airport. Flight; tried to get through the Economist after a frantic
week. Decided (finally) to post my reprap pictures
Repstrap gear construction
Reprap ?
The reprap project provides
the designs and drawings necessary to make a self replicating, plastic
extrusion 3D printer. There is only one hitch: self replication; you
need a plastic printer in order to make one. Failing that you need to
bootstrap your printing world by building a 'repstrap' - something
that can (just about) print the pieces.
An ad-hoc repstrap
I have knocked together such a thing from spare bits of floating
timber (mostly MDF and ply-wood), which has some unpleasant calibration
problems: related to thermal issues, and a lack of an adjustable,
(or even better heated) bed. Nevertheless it can be persuaded to print
useful things. Indeed - arguably it is easier to cut a nice, rigid sheet
of MDF, than to create isometric triangles made of studding with complicated
plastic verticees.
Anyhow - the beastie re-uses almost all the parts: steppers, controllers,
belts etc. from an existing reprap - so you can re-use them in the final
product (in theory). It also requires only simple hand-tools (except for
the extrusion nozzle, and knurled driver which is a pain generally). It looks
a little bit like this:
Notice the horrific warping problems that come from poor
print head - bed spacing calibration, and the lack of a heated bed.
Still, this is one of the largest, and most problematic prints
necessary to bootstrap.
I have the vague intention to create useful drawings, and
instructions to replicate/iterate it for others with low-precision
tooling - but the joys of LibreOffice are ship-wrecking this
aspiration currently. Please also note that the all-important safety
goggles are just out of frame somewhere.
Making large z axis gears
One of the most fun problems of repstrap construction are the
gears. After several attempts - to whittle gears from acrylic rod, to
make them from MDF, and so on I hit on a near perfect solution,
reproduced here for your gear-constructing pleasure.
It turns out that simple 30mm panel-pins fit rather snugly into the
required timing belt, creating a nice firm fixing. So - this makes the
construction of the large gears a matter of rough cutting vague disk shapes,
(or better using a nice large circular cutter) four disks from thin ply-wood,
then using the stencil linked below - marking out the pin locations, drilling
them through (as vertically as possible) with a 0.5mm drill, and then simply
pressing the pins through. This and a pair of nuts in the centre yields a
beautiful, functional z drive, as modelled by my youngest, as she
concentrates on reprap assembly thus:
Stencils for gears
It turns out to be remarkably hard to draw gears, or lay
them out manually by measurement. Luckily most people have a
phenomenally accurate ink-jet printer. Thus simply print out this file:
gears.odg -
clearly using LibreOffice if
you don't have it. Then use a bradawl to make holes to enlarge with a
drill in the right positions.
Making stepper gears
These smaller gears present a real problem for ply-wood -
which would just crack and split, and not provide enough purchase on
the shaft of the stepper. After some initial semi-functional attempts
with some aluminium, I discovered that the perfect material for small
pin gears is near to hand, and luckily is stocked in your kitchen, it
looks like this:
Naturally, it is only a matter of explaining to a suitably
patient wife, her desparate need of a new chopping board, and the
invaluable nylon is procured. To satisfy yourself that it is indeed a
wonder material, try driving a panel pin into it 5mm from the edge,
and then breaking it out.
Attack the chopping block with a junior hack-saw or some such
device, to make an octagonal piece of suitable diameter. Again use the
bradawl, stencil, and 0.5mm drill as above. Drill a larger central
hole, which should be of a slightly smaller diameter to the drill
shaft (which should have flats filed onto it).
Simply 'drift' (ie. wallop with a hammer) the nylon onto the shaft
for a fool-proof fix. Eventually you end up with something beautiful
like this:
Why bother ?
Hopefully, after much more wood hackery, adjustment,
suffering, remedial medical treatment and so-on you can finally
produce a working 3D printer, and hence something actually
worthwhile. While this is only a prototype - and died on the
first attempt of a lawyer to bend it, the full (more solid)
version has resisted the attempts of a long line of hackers
in their eagerness to break the end off; enjoy:
Of course, you really need to use RepSnapper
on openSUSE for controlling that sort of thing.
2010-10-23: Saturday.
-
Woken by a text message, having somehow missed the alarm.
Rapid dressing, off on a walking tour of Nurnberg - lead by Stefan
Behlert - who turned out to be an expert tour-meister. Enjoyed the
sights of this beautiful inner city.
-
Sausages in a bun, then off to find some steak. Most
impressed to discover Miklos had hacked up a German comment
detector
overnight, using the OO.o built-in language-guessing code. Hopefully
it is not be generally useful for other projects, but invaluable if
you have an in-code language problem.
-
Off to the office to hack with the lads; worked over some
Calc issues with Kohei again, merged some code; dragged from the
hacking for dinner (Japanese) with the remaining team members, and
back for drinks before sleep.
2010-10-22: Friday.
-
Off to the conference venue in a taxi with Mathias
& Alan. Enjoyed Gerald's talk, then on to Florian's opening
LibreOffice talk, brainstorming / BOF on features with Thorsten.
-
Fridrich's (well attended) Win32 / build-service talk,
back to the excellent talks from Miklos & Jonas - most
impressed with their progress, and (reading the code later) the
quality of the work.
-
Caught up with journalist friends before heading back to
the office, by bus with the lads - out to eat - at the same
restaurant with the team, stayed up rather late talking of this
& that.
2010-10-21: Thursday.
-
Up, breakfast with the lads; out to the office, chewed
mail a bit, chat with Dave. Off to the conference centre, spent
lots of time talking to people, with a snatched lunch in between.
-
On to Lennart & Kay's systemd BOF - exciting to see
so many interested people, new features in action; and the calibre
of the attendees.
-
Back for the evening party; sadly missed the food, but
spent lots of time talking to the great people we have around the
place. Back to some typing very late in the evening, while
people hacked at slide-ware for the next day.
2010-10-20: Wednesday.
-
Up, breakfast with the lads; off to the conference with
Lubos. Caught up with Andrew, gave him the stage for the Smeegol
talk ( since he does all the work it seems only fair ), nice talk.
-
Interview with a pair of friendly journalists, quested for
Lubos, back to the office, and out for Thai food with the team.
Much discussion, charts, movie clips, discussion & fun. Pizza
and spreadsheet internals with Kohei (to aid digestion).
-
Lennart, Kay, Alex & Federica arrived, caught up with
them, and the latest, sexiest bits in systemd. Bed late.
2010-10-19: Tuesday.
-
Up truly early - 4am, staggered to the coach, wandered
through check-in and security; used beautiful Android ethernet
/ 3G tethering to be productive at the airport, reviewing
patches, setup another couple of git accounts, and mail.
-
Finally saw that the great honour of a Plumbers Conf closing keynote
got announced: "The wonderful world of LibreOffice" - with
particular reference to plumbers: ie. a bus-load of low-level grot,
tooling and fun. Of course, what with the Plumbers conf being insanely
cool, it is sold
out - so prepare to sell your home, to be able to afford your
tickets on the blackmarket in Boston.
-
Caught the plane, seated next to a friendly journalist; met
yet another as I got off - great guys going to the openSUSE conference,
shared a Taxi to the hotel.
-
Off to the office, wandered the halls harassing the innocent
who failed to escape in time; we have some great guys. Plugged away at
some numerical tasks, and then out for lunch with the Czech lads.
-
Back, roadmap plotting, misc. meetings, more and more Novell
LibreOffice team people arrived, out for dinner in a very cosy place
for a fine German meal, bed late after a re-assuring call with Andrew.
2010-10-18: Monday.
-
Prodded mail, interested to read Bradley's heated piece on Open
Core, also known as 'The valuable[sic] MySQL model'. In my
view this model leads, almost inevitably, to community dysfunction, and
total corporate dominance of whatever piece it is applied to; perhaps I
am wrong, time will tell.
-
Booked coach for 4:40am tomorrow - ouch, still really looking
forward to the OpenSUSE conference, meeting up with the attendees, and
the LibreOffice guys to plan the future.
-
Lunch with Lottie, Claire popped over after that. Back to a call
with Kendy. Spent a good while reviewing another huge patch set removing
bus-loads of non-compiled code from LibreOffice - heavy reading indeed.
Chat with Dave Neary to brighten the tedium.
-
Annoyed by this somewhat false dichotomy being presented
routinely these days on the lists, to try to drive a difference
between the LibreOffice community and OpenOffice.org. Now, it seems,
there is (sadly) a big barrier of rejection between Oracle and
LibreOffice - they seemingly don't want to join yet; but
OpenOffice.org should not equal Oracle, and the charge of conflicts of
interest cuts two ways. To distort Simon Phipps' quote a little:
"If the company sponsor stands still and the community moves
on, who has the conflict of interest ?". It is amazing (to
me) that some people know the will of the community better than
every single elected representative from outside Oracle that is
on the council.
-
Booked my flight to the MeeGo conference and
remembered to register on-line as well. Packed everything into one
small bag, and bed earlyish.
2010-10-17: Sunday.
-
Up earlyish, off to NCC - visiting speaker spoke on
troubles, peace, and joy. Home to prep for lunch.
-
Chris, Joy & daughters over for lunch from Oak
Hill - lovely to see them, fantastic to have sorted relatives.
Enjoyed their company for some hours, first fire of the
year - starting to get rid of the huge stack of wood left
over from the building work.
-
Sogged in front of some children's DVD with the
babes, light tea to make up for the mammouth lunch; bed
early.
2010-10-16: Saturday.
-
Up early, dropped remarkably reasonable babes off with
the Brighty's, and off for another day session again with
Steve Hall.
-
Studied the Five Circle theory: Physical, Emotional,
Volitional, Rational, Spiritual - at some length, most
interesting. Ellis' A-B-C-(D-E-F) theory, Did a little
self-awareness work - scary enough.
-
Back to collect babes, read stories, dinner, bath,
bed, lay around talking until late.
2010-10-15: Friday.
-
Up early, prodded mail, ran tests builds, did some product
analysis. Knocked out my Mannah House homework: "List some of the
key elements / concepts of, and differences between Psychoanalytical
counselling, Person Centred counselling, and Rational Emotive
Therapy." and mailed it off. Lunch.
-
Fixed lpsolve dependency problem;
$(IFEXIST)
doesn't work on directories (it turns out). Analysed the output from
another of Julian's wizard valgrind tools run on LibreOffice. Added
another easy hack or two. Tried to dig through the torrent of good
mail & patches flowing into the inbox.
-
Dinner with Mary, out with J. to counselling evening with a
new lady - Lynn; amusing evening about pratical counselling,
communication, etc.
2010-10-14: Thursday.
-
Prodded at mail; attacked the build again, made the
LibreOffice build script give helpful messages on build failure,
and configure warn about expected problems with non-default
--with-distro flags, binned obsolete patches.
-
Lunch, team meeting. Prodded at systemd a little in
the openSUSE 11.4 milestone
two into the boot sequence, with a nice wiki page explaining any
openSUSE issues. Eventually
gave up, and installed it in KVM to avoid lots of re-booting - sadly to save
space had to remove my opensolaris image: RIP.
-
Conf call, dinner during it; put babes to bed while J.
counselled, more work, call with the parents - just got home.
Worked late merging patches & fixing associated bits.
2010-10-13: Wednesday.
-
Up early, off into Cambridge with Mike; TEAM training, all
day - lots of interesting people, lots of good talks on Galatians,
Evangelicalism, and then small-group practice in creating and
leading a short Bible study; fun.
-
Back for dinner with the babes, played with them, stories,
put them to bed, out to Cell group.
-
Interested to read Matthew Garret's take on Unicode
6.0, which is of course an encouraging release. What would seems sad
to me though, is an outcome where a picture of men, or women holding
hands was to come to mean a symbol of a homosexual relationship; straight
men are often isolated enough without sterilising a sphere of legitimate
and in many cultures (Arab, African etc.) normal form of innocent intimacy.
2010-10-12: Tuesday.
-
Up early; mail poking, interested by the news of IBM joining OpenJDK
the real un-answered question is: what sweetheart license terms have
IBM extracted from Oracle, or will they be distributing the code under
the GPLv2/classpath like everyone else ?
-
Prodded at dependency errors in the build; made the unix
quick-starter use libpng - since we require it anyway, and made it
conditional (only for distro builds: where we have a known libpng we
can link to). Made broffice branding disabled by default for
non-LibreOffice distros, to avoid surprises.
-
Fiddled with the website, spaetz moved the LibreOffice
Easy
Hacks page to the nicer DocumentFoundation (media) wiki.
Prodded the scp2 dependency problems.
-
Dinner, put babes to bed, chat with Patrick & Tor.
Chat with Mike. Pushed a fix to make scp2 (the installation magic)
re-compile if you re-configure LibreOffice with different options.
Merged a couple of community patches.
2010-10-11: Monday.
-
Up, read mail, re-factored splash, about and shell branding
in LibreOffice to allow a single build including BrOffice branding in
Brazil; dunged out lots of old / odd code and artwork, and eventually
pushed it.
-
Misc weekly status admin, reviewed LXF column, more patch
review and bug chasing.
2010-10-10: Sunday.
-
Up early; dealt with babes while J. slept - dropped them at
All Saints for the harvest festival. Went on to NCC for Christine's
daughter Hannah's dedication - fine service. Back to All Saints to
crash the rather fine shared lunch with the family.
-
Home, moved shelving up-stairs, and J. got stuck into
tidying my office - always a nerve-wracking time. Good to finally
get all those useful reference books back into view, and on some
shelving.
-
Read a fascinating article on Tablet Computing - entitled
Tomorrow's Laptops - Pen, Voice, Touch Input, New Displays,
New Chips, New Storage Devices, New Visions: ... using the system
and its controls is difficult to describe, perhaps because it is
so natural ... this is where Slate is headed ... Ease of Use is
Key ... - on and on in a 'State of the Art' section. All from
BYTE Feburary 1991 - go Go ! (as it were).
-
Poked the reprap idly, hmm - where did all the time go that
I used to have, to play with it: LibreOffice ? Sermon from Park Street in
the evening on Judges - and the calling of Gideon.
2010-10-09: Saturday.
-
Lie in, set too with the superdeck paint on the (already
mouldering) new front side gate. Looks a lot better now. Lunch.
Onto paint chipping on the stairs, putting another coat onto the
stair-well (finally looking quite pleasant), and then painting the
back of the workshop.
-
Sat around reading in the afternoon, while the babed
played, trampolined a little; read stories, popped everyone
to bed. Hacked on this and that in bed - got the broffice splash
re-work finally done and working.
2010-10-08: Friday.
-
To work, quick mail skim, dipped into fixing a silly in the
code, polished LXF column. Plugged through Norbert's nice FASTBOOL
patches doing spot sanity checks; looking good, fixed a real nasty
in the editeng using a 'FASTBOOL' as an integer loop iterator.
-
Added a SAL_N_ELEMENTS macro to sal (long overdue), and added
a new easy
hack to use it widely. Also added a minutes.
Dug at some code with Caolan, merged patches, fun.
2010-10-07: Thursday.
-
Up late, prodded mail, really pleased to see that Gianugo
has been hired by Microsoft - they couldn't hope for better advice
on Free Software.
-
Write notes, pondered Linux Format column, prodded bugs,
chat with Chen. Added a tweak to remind people to source ooenv having
done a linkoo - to avoid unexpected startup failures.
2010-10-06: Wednesday.
-
Up early, off to school with the babes, and to Burger King for
a pick-up from Nicola to TEAM. Lots of interesting study, started the
Bible Overview proper in Genesis, studied tools and techniques for
understanding Epistles, with reference to Galations (with Eden Baptists'
pastor).
-
Home, conference call with the lads; off into Cambridge for
Rob's twenty-seventh' birthday party; fun - good to meet his crowd of
friends, bus back rather late - a fatality on the train line.
-
Pleased to see the LibreOffice Planet
spring into being, and looking pretty.
2010-10-05: Tuesday.
-
Prodded mail, and more patches. Call with fcrozat.
Plugged away at some admin pieces. Sad to see Ari
leave Nokia.
-
Chased an e-d-s bug, filed a trace and comments; JP's
staff meeting. Call with Pete & a partner, then with Jared.
-
Created a couple of LibreOffice accounts, and dug through
the admin backlog looking for low hanging fruit to fix. Bed late.
2010-10-04: Monday.
-
Up early, dropped babes at school, wandered through E-mail.
Admired the large patches Norbert Thiebaud is creating, and set too
writing a vtable enumeration tool for OpenOffice. But why ?
Re-factoring C++ and the vtable problem
The opportunity
Consider that you have large piece of C++, over many years, for
reasons unknown, it has accumulated (at least) four boolean types:
FASTBOOL
, BOOL
, sal_Bool
and of course
the native boolean type bool
. Now consider a class with a virtual
method in it:
class Base { ... virtual void setValue (BOOL b); /* A */ }
class Sub : Base { ... virtual void setValue (BOOL b); /* B */ }
Please notice that these two classes are highly unlikely to be in the
same header file, and may even be separated by many leagues of code,
so you might never notice.
A small cleanup
Now imagine that we want to cleanup this obsolete 'BOOL' to a 'bool' -
that would be nice and pretty; so - since we are hacking on 'Sub' - we
change it there, and we change all the callers in Sub's implementation:
class Base { ... virtual void setValue (BOOL b); /* A */ }
class Sub : Base { ... virtual void setValue (bool b); /* B2 */ }
At this point we have a problem - we suddenly broke the functionality
of the Base class, and anyone calling the virtual method A. This is
because without realising it we introduced an entirely new method with
the same name and a different signature - by the miracle of polymorphism.
ie. now we have two virtual 'setValue' methods, and B2 does not
override A. That is not good.
Of course, because this is a feature, the compile will just love it,
and suddenly, magically compile a completely different piece of code, and
better - since the change is almost invisible to the casual reader this
will be a nightmare to debug. Interestingly changes such as the above may
seem rare, but are only the top of the iceberg - a more common incidence
of these crops up in 64bit porting, where there is some mix of different
types down the virtual function chain - someone overrides with a different
typedef - all of which previously resolved to 'int'.
How to avoid some grief
The (rather dumb) tool I hacked up today tries to avoid this sort of
problem. It does this by noticing that when we make this sort of slip, we
add a new virtual method to Sub
's v-table. Thus - if we simply
print-out all the vtables sizes (in slots) before, and then after a change,
we can rapidly check if they match. If there is a disparity - we can find
the class that changed size, wind back to (all of) its parents, and work
out which one is missing a suitable change. This technique was remarkably
succcessful in finding 64bit portability problems (by comparing 64bit vs.
32bit builds) when Kendy was working on the original OpenOffice.org port to
64bit architectures. The tool is here
How to re-introduce grief
One final deep joy about C++ is that there is no real need to mark an
overriding method as virtual (though most people, most of the time tend to).
So we can write the original problem just as well as:
class Base { ... virtual void setValue (BOOL b); /* A */ }
class Sub : Base { ... void setValue (BOOL b); /* B3 */ }
It is worth noting at this point, C#'s much better, and more readable
syntax, mandating an 'override
' for B3. Then lets re-add
the great change we made before:
class Base { ... virtual void setValue (BOOL b); /* A */ }
class Sub : Base { ... void setValue (bool b); /* B4 */ }
So - now we have an even nastier beastie - in this case by changing
the type, we suddenly stop overriding A, but instead of creating a
new virtual method, we create a normal method B4. Worse - this
doesn't change the size of the vtable - so it is even harder to notice.
At this point, at the moment - you loose.
All is not lost (in future)
Fortunately, this shouldn't be entirely the end of the story; in
subsequent iterations, it should be easy to add a 'method count' that
can be calculated for each class - and compared before and after, this
would allow B4 to be detected rather easily. Perhaps tomorrow
I'll expand the tool to do that too. Probably I am missing some other
obvious gotchas, but getting this wrong - particularly in deeply
inherited hierarchies, with complex interactions can create some
particularly nasty problems to debug.
- Up late, sync, with JP, prodded mail, patches and blog entries.
- Update1: Mikael Olenfalk points out that the Mozilla guys have some
magic keyword
they use for this, along with Dehydra - probably
libreoffice should be doing the same; we could add an
override
keyword that could be enforced by Dehydra, and #define
it
to virtual + some attribute (I guess).
- Update2: A friendly hacker advised me that the Sun Studio
compiler warns about virtual functions being hidden by non-virtual ones,
it seems g++ has an equivalent
-Woverloaded-virtual -Werror=overloaded-virtual
that
should be used to detect this case. There is also a nice wikipedia
page with the latest C++
standards thinking
2010-10-03: Sunday.
-
Up earlyish, screwed the finished articles to the ceiling.
Father left for Wales, read stories to H. until lunch.
-
Light lunch, took three smaller babes off to Sarah's
baptism at Isleham a jolly time. Back, tea for babes, packed them
to bed, and slept ourselves.
2010-10-02: Saturday.
-
Up earlyish, dealt with babes while J. slept. Poked idly
at the reprap - still not printing gears anything like as good as
it used to (possibly the fault of the gears ?).
-
Off to Ridgeons with Father to buy fixings and paint; I
hate haggling for goods - the Quakers introduced
honest pricing in the 17th century - but it still hasn't reached
UK builders merchants; despite getting a ~50% discount, I still
got over-charged, annoying.
-
Back home, set too cleaning the chimney - lots and lots of
soot, straining with the brushes; he who has clean hands and a
pure heart ? - after removing the soot to the bin, extensive
showering and cleaning of the front room: fires possible once more.
-
Late lunch, J. returned with H. and M. from a party. Set
too with putting up some second-hand blinds, unfortunately too
large, cutting down possible, but required metal-work, re-stringing
etc. Became somewhat expert (over the next hours), in the
(re-)construction of cheap wooden venetian blinds. H. sick; cleaned
that up. Bed late.
2010-10-01: Friday.
-
A new month; walked the babes to school in new shoes;
some not inconsiderable pain in the heels - a little reminiscent
of suddenly having to make libreoffice /actually/ build for lots
of people, on different systems rather suddenly - and without
any excuses.
-
Plugged away at
the binfilter - unfortunately, corrupting memory in destructors
called at exit. Dis-satisfied with intermittent brokenness around
heap corruption, fixed (and deferred) the svx part also trivially
accelerating startup, Caolan has some similar mutex / thread related
crash fixes to go in too. Re-started the build.
-
Lunch, came back to a build - the joys of a 6 CPU icecream cluster. Fixed python sillies
for installation using system-python (so gdb works), and got a
nice working, debuggable build; great. Updated the website to
build like that, and without the (now fixed) binfilter. Tested
equivalent svx crash-on-exit fix, and pushed it.
-
Tweaked the LibreOffice
easy hacks page, and added a few more useful pieces. Plugged
through a 'self review' in some infernal internal personel
management web tool.
My content in this blog and associated images / data under
images/
and data/
directories are (usually)
created by me and (unless obviously labelled otherwise) are licensed under
the public domain, and/or if that doesn't float your boat a CC0
license. I encourage linking back (of course) to help people decide for
themselves, in context, in the battle for ideas, and I love fixes /
improvements / corrections by private mail.
In case it's not painfully obvious: the reflections reflected here are my
own; mine, all mine ! and don't reflect the views of Collabora, SUSE,
Novell, The Document Foundation, Spaghetti Hurlers (International),
or anyone else.
It's also important to realise that I'm not in on the Swedish Conspiracy.
Occasionally people ask for formal photos for conferences
or fun.
Michael Meeks (michael.meeks@collabora.com)