Re: To get things started...
Dan Sugalski wrote: You're not wrong, but I don't think this is a huge problem. Lots of systems do it like this at the moment--GCC comes to mind as a first one, but there are lots of others. Granted it does mean that we'll need to ship a bytecode-compiled version of the parser as part of the perl distribution, but that's not a big deal. (Besides, that's what Larry wants, and he's got a point) It's also possible we'll do the parser mainly in C with perl hooks, but that's not the direction I've been pointed in. Write it entirely in perl, but have native C implementations of all the time-critical subroutines. Use the C stuff by default, but have an invalidation bit in case the perl version changes. And when everything's working, allow compiling the perl subroutines individually into machine code for medium-speed variants that can also be invalidated. Just an idea. May not work out in practice, because it's often the plumbing between the subroutines that sucks up all the time.
Re: To get things started...
At 08:51 PM 11/21/00 -0500, Sam Tregar wrote: On Wed, 22 Nov 2000, Nicholas Clark wrote: Are we hoping that we can mmap() most scripts, so read isn't hugely a problem? And slrp the rest in one? [doesn't feel good] Are we going to have "lazy scalars" which collude with the regexp engine so that if the regexp engine hits the current end more is read from the file handle? Something else? Perhaps we could add a mode to the regex engine like: $filehandle =~ /.../; Where the engine itself would do the reading and buffering. Ok, that might not be such a good idea... This probably never returns, eh: $filehandle =~ /(.*)/; However we solve the problem I hope we can allow Perl programmers access to the solution. This is a very common problem with regex parsers. Probably the easiest thing is to implement some sort of file-tied scalar or something that can provide bytes to the regex engine until it stops asking for them. Some magic or other, though, will get us what we need. Dan --"it's like this"--- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk