At 5:28 PM +0200 10/24/02, Juergen Boemmels wrote:
I'm thinking something else, actually. Names made perfect sense except for encoding info and duplication. We can put limits on the name encoding if we want, but... really, who cares? It's only useful for introspection purposes and while that's certainly important, I'm not sure it's worth much hassle.Dan Sugalski <[EMAIL PROTECTED]> writes:>The ability to embed arbitrary data in a pbc file under a >named section. This data needs to be readable by the program >when it runs, but is otherwise ignored by the rest of Parrot. Right, good call. This'll make perl's named embedded filehandles (__DATA__ and suchlike things--I'm pretty sure Larry and Damian have Evil Things in mind for this at some point in perl 6) a lot easier as well.My proposed extension of the packfile format is going in this direction. But I'm not sure at the moment not sure about string encodings in the segment directory. I was thinking about limiting to ASCII because its an internal. Allowing diffrent encodings opens a can of worms. UTF-8 only may also be a possiblity. Furthermore a part of the namespace should be reserved for internal use only. ATM I use all-caps names, but think also about dot-prefix.
Instead, lets just give an entry number. We can have arbitrary data chunk #1, #2, #3, and so on. I'm not sure it'll buy us much having names attached.
> A binary data chunk section with named directory for it (per bytecodesegment, I think) would work pretty well for this.I'm not sure if I understand you correctly: You talk about more than one bytecode segment in a packfile and each of them has its own associated directory with independed namespace. Trickey. But it should be possible. Having a root directory segment and sub directories.
Yep, but only a little.
Writing a new packfile is definitely a different beast than altering an existing one.But it would be nice if you could write a new packfile. This would be very handy for writing compilers.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk