home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psgrain!percy!data!kend
- From: kend@data.rain.com (Ken Dickey)
- Newsgroups: comp.lang.scheme
- Subject: Re^4: random rant on random files
- Message-ID: <703@data.rain.com>
- Date: 19 Aug 92 16:48:54 GMT
- References: <700@data.rain.com> <16ocv6INNl87@agate.berkeley.edu> <701@data.rain.com> <16r5n0INN4n2@agate.berkeley.edu>
- Organization: Microtek DSD, Hillsboro, OR
- Lines: 48
-
- bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:
-
-
- >Okay, so what do I do if I want to write a new file from scratch?
-
- The same old way. Open a file, write to it (as a stream), close it.
- The current store proposal does not address file extension.
-
- >The part about unsigned-integers-only seems a little user-unfriendly
- >to me.
-
- This is a systems programming level. An implementation can use it
- to build higher-level interfaces which do representation mapping
- (to/from binary) for you.
-
- >I mean, how does someone write a bignum into a store?
-
- Well you could do (number->string) and store the bytes. I don't think
- that there will be standard binary exchange representations soon
- (although MIT Scheme seems to do a pretty good job here). What I want
- is to be able to do representation mapping that **does not depend on
- the underlying Scheme's representations**. [I also do low-level
- systems programming, where fixed buffers are very useful (e.g. for an
- I/O interrupt).]
-
- >Alternatively, maybe every primitive type has to have an unambiguous
- >binary representation the same as it has a print form, and instead of
- >explicitly mentioning types you just leave that argument out and
- >Scheme figures it out. That would mean, though, tagging everything
- >in the store with its type.
-
- Again, the point is to have a baseline so that this can be done in a
- portable manner.
-
- >I'm feeling a little disorganized about this message, but it's because
- >I'm really struggling to make sense of the whole idea. I mean, files
- >just feel very different from memory to me. I know that at some level
- >of abstraction they're the same, but they perform quite differently.
- >I don't understand [I'm not being sarcastic] the principle of language
- >design whereby symbols and strings are treated separately but files
- >and memory are treated the same.
-
- Well, it is a abstraction. Its a bit like thinking of indexes of disk
- storage blocks and the blocks they reference as a continuous stream of
- characters called a "file", which is certainly a useful abstraction.
- After all, why treat disk storage blocks differently?
-
- -Ken
-