Re: RE: Prothon on CPython intrepreter? [PROTHON]
Mukhsein Johari <[email protected]> Wed, 11 Aug 2004 08:49:30 +0100 (BST)
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
--- Mark Hahn <[email protected]> wrote: > > In case I didn't make it clear in the previous > message, I'm talking about > implementing a C-based Prothon interpreter > (CProthon) by heavily modifying > the C-based Python interpreter (CPython). This Mark, could you give some reasons as to *why* you want to do this? IMHO, the cool ideas you were thinking about (stackless etc) wrt. the prothon interpreter are much more interesting. > > The Prothon language itself would not be compatible > with the Python language > so any part of the library written in Python would > need to be manually > ported. There would be a utility to textually > replace Python constructs > with Prothon constructs but this would only > accomplish 90% of the porting. This could still be done *without* utilizing the python interpreter. Textual replacement and manual greps...we don't need the python interpreter for that, do we? Considering that we *still* have to port the vast python libs anyway... what are hoping to gain? I'm thinking that as more people use prothon, many will port their favourite python modules anyway. > So this will not be exactly the same as Prothon on > .Net where multiple > languages can use the library with 100% > compatibility, but it will be quite > close, since the most interesting libraries are C > extensions and the Python > to Prothon porting will be easy. > Again, I don't understand why you need to use the python interpreter to achieve this. Right. So here are my not so humble opinions: 1. You can achieve something similar to .net via mozilla's XPCOM. It is cross-platform, and components can be written in any XPCOM-capable language so your potential for reusing existing libs is there. It is smaller than .net. It uses native components where necessary or prudent to do so. 2. Write a small and fast interpreter (like you planned to do before you got seduced by the .net) make it XPCOM-capable so you can use it in gecko for webpage scripting (prothon-DOM) as well as 'local' gecko-based apps (prothon-XUL). This will also take care of your GUI capability. (need to think about sandboxes, though) 3. Take a look at mozilla-firefox style Extensions "download, install and usage" mechanisms. 4. You mentioned interest in xml and internet libs, well...mozilla has this and more. (CSS, DOM, RDF) The mozilla community is quite large and backed by an aggressive open source non-profit (Mozilla Foundation). 5. Implement the interesting ideas you discussed wrt. garbage collection. 6. Design and implement psyco-like JIT to get "C-like" performance. I *did* say "not so humble"! Thing is, I think prothon with the above would be very compelling, not to mention bold and exciting. Imagine using a single language for client-side scripting as well as server-side programming (I'm thinking twisted here) as well as conventional GUI apps! And banking on w3c standards to boot. The only language fitting that bill right now is the crummy javascript. :-/ ________________________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html