[EMAIL PROTECTED] wrote:

> Sterling wrote:
> > Hey, a great script idea that I've been wanting to do for some time
> is write the code to parse in and write out standard gzip headers so
> then REBOL could read and write standard gzip'd files.  I think you'd
> also have to write the particular checksum code that's in gzip but for
> a decompression first pass you could skip the checksum check.
> >
> > Next step after that: TAR
>
> REBOL Enhancement request:
>
>                 read/zip %MyZipFile.zip ; produces a block of data.
>                 read/tar %MyTarFile.tar
>         etc...
>
>                 write/zip %MyZipFile.zip [; Block of data]
>                 write/tar %MyTarFile.tar [; Block of data]
>         etc...
>
>                 write/tar %MyTarFile.tar read/zip %MyZipFile.zip
>         etc...

hmm, I am not sure it's good. I am not sure above solution is abstracted
enough. I wouldn't mess read/write functions with "proprietary"
refinements. Something like Amiga datatypes system is needed probably....

Have you looked at print mold system/schemes/pop? Have you looked at how
news protocol is done? It's an object. There is some kind of abstracted
behavior for protocols, stored in root-protocol (>> print mold
root-protocol). The same could be introduced for another not-yet-supported
datatypes. There could be some abstraction stored in some root-datatypes
containing datatype identifier function e.g. is-type? or something like
that. And then? Scale down to another kind of areas of usage - e.g.
images, sounds, anims, etc. .

gif!: make root-datatype [

read: func [....
write: func [....
raw: func [....  ; for conversion to some bitmap format

install system/datatypes/pics 'gif id-gif

]

now look at system/schemes/pop/handler for e.g. - all words for particular
protocol handling are there.


now imaginary piece of code:

if is-type? 'gif
%some-file-even-without-the-extensin-so-take-care-windows-users [

   my-picture: gif/read
%some-file-even-without-the-extensin-so-take-care-windows-users
   tiff/write %new-converted-tiff-format-image my-picture/raw

]

or something like that. .... I don't know how exactly Amiga datatypes
work, but imho, in real, if we are not going to see similar type of
unified abstraction, we will be dealing with tons of different aproaches
in the future .....

But - I am not also sure, how fast such datatype handling could be. But on
the other hand, we still don't know, if REBOL compiler of any kind (e.g.,
compiling just some portions of code which make sense to compile (or so
was said ...)) is going to be introduced in REBOL in some future ...


So - I don't know if creation of similar mechanism is possible, so don't
know if it's worth to send to suggestion feedback address, as it concerns
imho the basics of the language, and we still can't know, what REBOL/Media
is going to be about exactly ...

Anyone?

"One reason the Amiga was so popular for so long was that you could do
things fairly simply at the first layer, then dive in downward, deeper
into the abstraction. Rebol's the same way" - Carl Sassenrath ... So,
Carl, any comments? :-)

Regards,

-pekr-


> Andrew Martin
> It seemed an innocent enough request at the time...
> [EMAIL PROTECTED]
> http://members.xoom.com/AndrewMartin/
> Online @ 33,600 Baud!
> -><-

Reply via email to