At 04:02 PM 10/16/2001 -0400, James Mastros wrote: >On Tue, 16 Oct 2001, Dan Sugalski wrote: > > That's one way to do it, sure. You can always look at a string as a bounded > > byte buffer. One of the core 'string' types is "series of 8-bit bytes". We > > couldn't manage JPEG images too well without that. ;) >Hm. How do you convert the bytes into integers so you can do arithmetic >with them? (In other words, how do you write unpack('c') and friends.)
You access the bytes individually the same way you do now. If a string is of type "8-bit byte" then a character is a byte, and vice versa. > > Seriously, though, what are you trying to accomplish with providing generic > > access to memory? Perhaps if you had a solid application in mind it'd make > > working out what would be needed to support it easier. >I'm thinking of porting GCC, of course <G>. However, I'm thinking that >pretty much any c-like language is going to want somthing like this. Well, then the runtime for C-ish languages can provide PMCs that get you this sort of access. Parrot's really a lousy target for C. You'd be much better off targetting the CPU directly, and C-like languages would probably be better served targetting GCC's back end rather than ours. Not that I mind people trying--that's fine. But it's not a primary target for us. (We'd be far better served targetting GCC's back end than we would getting GCC to target ours...) Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk