Tuesday, 8 May 2012

NetSurf at a show

The wakefield RISC OS show is an event the NetSurf project has attended for a long time. in fact since 2005 when the "stand" was a name on an A4 sheet through 20062007, 2008, 20092010 to 2011 we have always been present.

The event has changed in that time from a large affair with many exhibitors to a small specialist interest event with a handful of stands. I took some pictures this year which give a fair impression of the event.

We were seriously considering not attending this year as 2011 had seen us barely break even on donations versus expenses to attend. However we decided that the projects annual Grey Ox Inn post event dinner was probably worth making the effort.

So we all met up in a hotel just off the M1 near Wakefield and set up our table. And although NetSurf as a project now has much more usage on other platforms we still represent the principle browser for the RISC OS platform!

We had a pleasant time, talked to a lot of users and made our expenses back in donations. Overall an amusing Saturday. Based on the size of the event and number and age of the attendees, I fear the RISC OS may be destined for the history books.

Repaying a debt

Some debts are merely financial and some easily repaid but some require repayment in kind . Few debts are more important to me personally than a favour earned by a good friend.

Several years ago, before I started this blog, I replaced the kitchen in my house. Finances were tight at the time and I had to do the entire refit with only limited professional help. Because of this I imposed upon Mark Hymers and Steve Gran to come and assist me. They worked tirelessly for three days over a bank holiday for no immediate reward.

Mark and Steve with a drill
This weekend I had the opportunity to assist Mark with his own kitchen refit and reply my debt.

Although the challenges have been different on this build they were, nonetheless present, including walls which were most definitely not square and affixing cabinets 10mm too high so the doors could not close.

We also got to make a hole for a 125mm extractor which was physically demanding and not a little tiring (Steve actually wielding the drill had a fabulous aim)

I took some photos to document the process which has resulted in an image which is positively threatening, though the two of them are nice people really!

All in all a pleasant weekend with friends, the whole favour thing was really moot, I would have done it for a friend anyway.

Thursday, 29 March 2012

Failing to avoid the spotlight

I am usually fortunate at conferences and aside from the obligatory "group photo" manage to completely avoid being in photos and videos of the event. However recently I attended the Linaro connect event in San Francisco and somehow got volunteered to be on a panel. 

Now usually such panels are fine and you get a bit of notice and can at least get some basic ideas and no-one bothers to film them. This time though I was not so fortunate and with no notice the overweight greying old fart has been captured on video.

 So here for your viewing pleasure is the panel discussion on "Is the GNU user space dying?". I should warn readers of a sensitive disposition that I appear fully dressed and awake(ish) in this video so viewer discretion is advised.

Monday, 26 March 2012

NetSurf Developer Workshop

NetSurf DevelopersOver the weekend we held the NetSurf developer workshop. The event was kindly hosted by Collabora at their Cambridge offices. The provided facilities were agreed to be excellent and contributed to the success of the event.

Five developers managed to attend from around the UK John-Mark Bell, Vincent Sanders, Michael Drake, Daniel Silverstone and Rob Kendrick. In addition James Shaw, one of the project founders, made a special appearance on Saturday.

Starting from Friday afternoon we each put in over 25 hours of actual useful work and made almost 170 commits changing over 350 files, added 10,000 new lines of code and altered another 18,000.

The main aim of the event was to make the transition from using libxml2 to our own libdom library for the browser DOM tree. This was done to improve the browsers performance and size when manipulating the DOM but also gives us the ability to extend the browsers features to include dynamic rendering and Javascript

We also took the opportunity to discuss and plan other issues including:
  • User interface message handling and translation.
  • User preference handling.
  • Toolchain support.
  • Disc caching.
  • Javascript binding
  • Electronic book content handler.
Rob tackled the first parts of the messages conversion from numerous separate files into a single easy to handle file which will in future allow for easier translation and reduce message proliferation.

We made decisions on the ongoing rework of user preference handling which will be implemented in future.

The decision on the toolchain was slightly changed to be that any core or library code (non frontend/toolkit specific parts) are required to conform to the C99 standard. Frontends are permitted to recommend and use whatever tools their maintainer selects but they cannot enforce those restrictions on core code. This issue is principly because the BeOS maintainer is compiling NetSurf with g++ 2.95 which is missing several important language features we wish to use.

Developers at workThe recurring issue of disc caching was raised again and we have come up with what we hope is a reasonably elegant solution to be implemented over the forthcoming months.

Now there is a suitable DOM to bind against, the existing Javascript engine support will be properly integrated and should result in basic script support before the 3.0 release. This support will remain a build time option so NetSurf can continue to be used on platforms where the interpreter is too resource intensive to be used.

A short discussion about the possibility of integrating a basic page based content handler for epub and mobi type documents was discussed and while the idea was well received no decisions on implementation were made.

Overall the event was a resounding success and we are left with only a small handful of regressions which appear straightforward to solve. We also have a clear set of decisions on what we need to do to improve the browser.

Monday, 12 March 2012

Time flies when you are having fun.

It has been months since I last put something here, so I think that requires a quick catchup.

The family Christmas was a brilliantly restful affair mostly spent doing nothing at home, just slightly tinged with anticipation of starting the new job.

I arranged to rent a room in Cambridge with just a moderate three mile walk to work. This has meant that after a decade of my daily commute being the steps downstairs to my desk I am now walking six miles a day!

Because of this unexpected physical exertion I seem to be slowly loosing weight instead of gaining it. Alas there is still a long way to go before I am my recommended weight (unless I gain three feet in height ;-)

Work has been fabulous, lots of great people doing interesting stuff. I was here only a month before I got sent to San Francisco for the Linaro connect event. Though getting on the outbound plane amidst the worst snowstorm in recent times was both tiring and not a little stressful.

The waking up at 03:00 to get the 04:00 coach from Cambridge to Heathrow would not have been too much of an issue If I had managed to travel down from Leeds and arrive before 02:00. The coach was so much fun that I arrived at 08:40 just as check in was closing for my 09:45 flight.

This was my first experience of San Francisco (although I have been to LA and Portland previously) and while most of the time was spent out in Redwood city at the conference venue Robert did take us for cocktails, comedy and cable cars which was a wonderful night out.

Since my return from the US I have also attended the Debian Bug Squashing Party in Cambridge and had a thoroughly amusing time with many of the usual suspects though I was encouraged to see a few new faces about too.

The commute up and down the country is getting tedious and seems to vary between taking two and four hours depending on traffic. This is encouraging me to consider moving the family as soon as I can. They are all doing great and seem to be thriving despite my absence during weekdays.

I hope to put finger to keyboard here a bit more regularly in the forthcoming weeks though a lot of my personal time is being swallowed with commuting and not being directed towards my open source pursuits.

Friday, 9 December 2011

And one man in his time plays many parts

Perhaps the immortal bard was making a more noble and deep reference to the stages of ones life but I feel no compunction lifting the line for my purpose.

And it is about changes in my own life I wish to speak. I have been employed by Simtec for more than a decade now. There have been great changes in the embedded electronics industry in that time, especially for those using open source software.

A decade ago we were considered cutting edge and strange for advocating and using NetBSD and Linux, especially for our committing of our changes back upstream, today that is considered normal behaviour.

Alas the last couple of years have shown that Simtec is not the best place for me to continue, so I have decided to move on to pastures new. From the new year I will be working with a great bunch of people at Collabora.

This should not have any great detrimental impact on my open source activities but as with any big life change, it may take a while to settle down and I apologize in advance if I am not as responsive as usual.

Thursday, 27 October 2011

Software that adds another dimension to things

I think that it will come as no surprise to my fellow software engineers if I note that I almost never write new software any more. I maintain, I augment, I refactor, I debug but very, very rarely do I start something new.

This probably has something to do with my maturity as a code monkey, my immediate reaction is to seek out a solution to a problem that already exists and perhaps extend it to fulfil my requirements.

Partially this comes from my innate laziness but also over time I have discovered that I am a "finisher" the role I invariably end up in involves doing all the final bits to make the client accept a project. Because I know my reaction is to always finish something I start, I avoid starting things.

Anyhow, enough introspection, a couple of months ago I was talking on IRC about my 3D printer and was asked "can you print the Debian logo?". So I hunted around for software that would let me convert a bitmap into a suitable 3d format. The result was rather disappointing, the few tools I could find were generally python scripts which simply generated a matrix of cuboids, one for each pixel their heights corresponding to the pixel value.

I used one such script to generate a file for the Debian swirl and imported it into the OpenScad 3d modelling application. I got an inkling of the issues involved after the scene render took over half an hour. The resulting print was blocky and overall I was not terribly happy with the outcome.

So I decided I would write a program to convert images into a 3D representation. I asked myself, how hard can it be?

Sometimes starting from an utterly naive approach with no knowledge of a problem can lead to new insights. In this case I have spent all my free coding time for a month producing a program which I am now convinced has barely even scratched the surface of the possible solutions.

Having said that I have started from a blank editor window and a manual gcc command line compilation and progressed to an actually useful tool and, arguably, of more import to me I have learned and implemented a load of new algorithms which has actually been mentally stimulating and fun!

The basic premise of the tool is to take a PNG image, quantise it into a discrete number of levels , convert that as a height map into a triangle mesh, index that mesh (actually a very hard problem to solve efficiently), simplify the indexed mesh and output the result in a selection of 3D file formats.

The mesh generation alone is a complex field which it appears often devolves into the marching cubes algorithm simply out of despair of anything better ;-) I have failed to implement marching cubes so far (though I have partially implemented marching squares, an altogether simpler algorithm)

The mesh indexing creates an indexed list of vertices from the generated mesh and back annotates it with which faces are connected to which vertices. This effectively generates a useful representation of the meshes topology which can then be used to reduce the complexity of the mesh, or at least describe it. To gain efficiency I implemented my first ever bloom filter as part of my solution. I also learned that generating a plausible hash for said filter is a lot harder than it would seem. In the end I simply used the FNV hash which produces excellent results for very little computation cost.

The mesh simplification area is awash with academic research, most of which I ended up skipping and simply went for the absolute simplest edge removal algorithm. Implementing even this and maintaining a valid mesh topology was challenging.

By comparison the output of the various formats was positively trivial, mainly littered with head scratching over the bizzare de-facto "extensible" formats where only one trivial corner is ever actually implemented.

All in all I have had fun creating the PNG23D project and have actually used it to generate some useful output. I have even printed some of it to generate a lithophane of Turing. I now look forward to several years of maintaining and debugging it and doing all the other things I do instead of writing new software ;-)