Re: Re: Python parser
Mark Hahn <[email protected]> Sun, 8 Aug 2004 20:04:55 -0700
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Organization | Hahn Creative Applications |
| Message-ID | <[email protected]> |
On Sun, 8 Aug 2004 19:24:37 -0700 (Pacific Daylight Time), Lenard Lindstrom wrote: >> When I looked at running CPython's libraries with Prothon earlier this year >> it didn't look good. The Python libraries were too tightly wrapped around >> the Python language. The CPython VM was not written to support multiple >> languages as the CLR is. Python extensions expect to be able to have any >> and all of Python available at all times. >> >> The best I could do would be to have the CPython interpreter running >> embedded inside my Prothon interpreter and bridging calls from Prothon over >> to Python. This would not be efficient as it would require both VMs to run >> side by side. There would also be the overhead of translating between the >> two. Threads would not be supported. I pretty much gave up on the idea. >> > Just some speculation. Does not the Stackless Python interpreter come close > to the CProthon implementation? Stackless has an interpreter? Is it just CPython with the stackless patch installed? > Add some extra byte code instructions to > handle Prothon's distinct scoping rules and implement prototypes using > PyType_Type. Could object locking be done by the object itself? All attribute > accesses would be through a special attribute handler method. And Prothon's > one pass compiler could still be used. So now you have a virtual machine > that handles both languages, no dual interpreters. You know more about this than me. Answer a few questions: 1) Does stackles offer preemptive threading? 2) Would this scheme allow me to use totally different object templates? 3) Wouldn't the C extensions expect all the normal Python objects to be there?