[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ::scr Ramblings of a Classic Refugee or How I Learned To Stop Worrying and Love OS X
On Tue, Feb 05, 2002 at 10:17:27AM -0600, Chris Devers said:
> So what you're saying is that the binary format (ascii is binary, so this
> includes text based formats too) can be formatted arbitrarily, but files
> in these formats should be distributed with a universally machine readable
> format description document.
>
> Yeah right.
Oh, I know it'll never happen. I can dream though :)
> that the Office suite produces. I can't see much value in sending html
> document around if they need the overhead of being bundled with descriptor
> files that explain both ascii (surely an oo-inheritance scheme would cut
> down on repeating info like that over & over) and html itself (along with
> notes about common tolerated errors, like missing closing tags). I can
> only assume that having to check one of these DTDs before rendering every
> image file is going to slow things down unbearably.
You're confusing the two things I said (and yes, going back and
rereading I realise that I wasn't clear) :
You wouldn't pass the schema for every file, the schema would be used to
generate an accessor library once and only once for every
platform/language that you wanted to use it for [0]. So say, you
invented an entirely new programming language 'all' you'd need to do to
give it access to all those fileformats out there would be to write the
tool which took the schema and spat out an API. Of course it probably
wouldn't be a very nice API but it then you could wrap it in a nicer
API.
For comparisons to XML - every lanaguge that has an (decent) XML parser
can access SVG files. Because SVG is XML and has a DTD. OK? OTOH (yes,
I'm taking the piss now) you don't want to parse and create SVG using
pure XML tools because that would be labourious - you want an API that
lets you say
my $svg = new SVG ('myanim.svg');
$svg->set_no_frames(20);
$svg->set_frame_rate(1);
$svg->set_size(800,600);
for (my $i=0; $i<$svg->no_frames(); $i++)
{
my $frame = $svg->new_frame();
$frame->add_picture("mypicture"+$i+".jpg");
}
$svg->export();
which would create an animation with 20 frames, each lasting a second,
which would show 20 pictures of you in turn.
Yes you have to write the API but at least you don't have to write the
XML parser first.
The second point is that you'd also have to have schema for non-standard
folders such as the mail folders I mentioned earlier or ones that
organise your photos or your Mp3 collection. They would describe the
metadata otherwise it would be useless to the receiving machine.
Simon
[0] Theoretically this could be done automatically by the OS so that by
parsing the schema over the OS would automatically create new libraries
for all the languages on it. This would involve using HandWaving
techniques as described in ORA's "Handwaving and Bluffing in a Nutshell"