From JDiveLog to Subsurface

Linus Torvalds torvalds at linux-foundation.org
Sun Oct 30 13:42:38 EDT 2011


On Sun, Oct 30, 2011 at 12:03 AM, Miika Turkia <miika.turkia at gmail.com> wrote:
> and here is even that log...

Oh wow.

I think we have a new winner in the distinguished competition for
"most disgusting dive log XML file ever".

I was quite sure that UDDF had that particular competition all sewn
up, but I think JDiveLog is a very strong contender. The "everything
in one single 44kB line" thing is aestetically especially unpleasing,
and is a smart new way to enter that competition that I haven't seen
before. And it is a solid entry in all the traditional ways too:
complete lack of explicit units (with crazy choice of the implicit
ones), and some seriously crazy use of "improper prcision" is a new
thing.

I like the depth samples in particular, with their femto-meter
precision: depth samples like <D>16.154400000000003</D> are truly a
work of art, and being able to specify depth at the scale of roughly
an atomic nucleus radius is clearly a great feature. It's also a
wonderful way to encourage particle physicists to get involved in
scuba diving.

That same particle physicist approach to diving is also clear in
timekeeping: <Duration>3439.7999999999997</Duration> is nice too.

Motto:

  JDiveLog: for when 'seconds' is just too crude - use fractions of picoseconds!

I notice that JDivelog also seems to use Kelvin as the temperature
scale, which is a good choice (we do so too). But whereas subsurface
uses Kelvin *internally* (in order to make sure that we never forget
to do the proper conversions), JDiveLog actually uses it as the export
format. Nice.

There's just too much to love there. Pressures seem to be in Pascal
(Yay for scientific notation: "pstart: 2.05E7"), and tank volumes seem
to be in cubic meters (so a 12-liter tank has a volume of "0.012".

I'm impressed.

This would be easy to parse (it doesn't really do anything I haven't
seen before, it just has a new ugly bonus features), but I think I'd
like to see a few more cases of this horrible format. Your dive
computer (one of the simpler Suunto's - apparently the Stinger)
doesn't seem to sample temperature or cylinder pressure, so I don't
know how JDiveLog ends up expressing even that.

If you'll sign off on the xslt file in the meantime, I can at least
add it to subsurface for anybody else to use..

                                     Linus


More information about the subsurface mailing list