Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43574 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5358 invoked from network); 1 Apr 2009 13:24:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2009 13:24:42 -0000 Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.178 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: paul.biggar@gmail.com X-Host-Fingerprint: 209.85.217.178 mail-gx0-f178.google.com Received: from [209.85.217.178] ([209.85.217.178:45867] helo=mail-gx0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/46-05266-A1B63D94 for ; Wed, 01 Apr 2009 08:24:42 -0500 Received: by gxk26 with SMTP id 26so67146gxk.23 for ; Wed, 01 Apr 2009 06:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5Xv45cflWE1XVBNA6dJF+EfSCqDe+t0lXuwzWaLeR1c=; b=kSQGGT2UX7HqQIMIrvmFtfZ0zZgWfNFN1OdnLibPQrWXPQ9J/kRTO0aQw0c9bPgXFj 6AK65lWPJmGnSSiO5iAPN7yeim0bCYPvmDpJdB1x29xeTbszDEQmaceDB44Ixvt3OLIl OfRPJ62xp4ABfyhmspC1sh1gQgxcklgpxojmc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=fgE7eW3U0LbRXXvOgif7WeHeoW4dDB1WAJesSZ8ev84vkxQ7OWJ1FgMb6ja1IDy2z2 dfu+HeyRQCCJ3HIVvg5YakY/J+gAfFt1h0zRIQO77JEy6NNjLps9d834mEfmPmwcyR+m JWFuevIPwiTUInhYkWQ6wVUTMhDqp99SMAQh4= MIME-Version: 1.0 In-Reply-To: <29CF2C07F9044405AF6332BE2F3A373F@PC3EE1F19287> References: <29CF2C07F9044405AF6332BE2F3A373F@PC3EE1F19287> Date: Wed, 1 Apr 2009 14:24:19 +0100 Received: by 10.231.20.65 with SMTP id e1mr1661410ibb.1.1238592279571; Wed, 01 Apr 2009 06:24:39 -0700 (PDT) Message-ID: To: Nuno Lopes Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: Removing the Zend API From: paul.biggar@gmail.com (Paul Biggar) On Tue, Mar 31, 2009 at 9:23 PM, Nuno Lopes wrote: > Hi Paul et all, > > I fully understand (and even share) your motivations and goals. However i= t > seems to me that describing an extension in PHP will lead to loss of > performance, as you cannot capture certain C features in PHP. For example= , > there are some internal functions that rely on pointer arithmetic to get > decent performance. This is not about capturing every C feature. Instead, it is about strictly separating the C and PHP code. If someone wants to C pointer arithmetic, it is simple to code it on the C side of the line. Its not necessary to expose the exact C function from the library. Sometime, you may wish to to have a C function wrapping it, to do some "dirty tricks". > Then you may extend to PHP to better capture these "dirty tricks", and th= en > you'll end up with some DSL for building PHP extensions. It's not > necessarily bad, it's just a lot of work.. :) This - which I'll call the Pyrex model - is one way to go, but its not my preference. While I think it beats the current model, I hope that it won't be required with whatI propose in the RFC. > Moreover, in your example in the wiki you don't include how you would do > parameter parsing. Or do you rely on the code generator to look at the C > functions signatures and figure out by itself what to do? (actually there= is > some ambiguity, AFAIR, and thus guessing cannot be done reliably) That is exactly right. (I'll make this clearer in the RFC). I can't think of any cases where guess cannot be done reliably. If you can give me an example, I'll try and address it. > To summarize my e-mail, I believe this is a very interesting idea, but ne= eds > a lot more thinking :) =C2=A0It's a nice SoC project nethertheless. It certainly does need more thinking, and I'm hoping that people can pick holes in it, so that I can fill them. A SoC project would be ideal, as it would probably expose - and hopefully solve - a great deal of flaws. Thanks for your comments, I'll try and update the RFC in response. Paul > ----- Original Message ----- >> >> Hi, >> >> I've added a new RFC to the wiki >> (http://wiki.php.net/rfc/remove_zend_api). It details a plan to try >> and decouple the Zend engine from the libraries, in order to allow >> large scale changes to the Zend engine in the future. The RFC >> describes a prototype phase of the project, which could reasonably be >> done within a GSOC project, so I have added it to the GSOC 09 page >> (http://wiki.php.net/gsoc/2009#prototyping_removal_of_the_zend_api). >> >> If anybody has any comments, I'd be delighted to hear them. If anybody >> knows (or is) a good student looking for a GSOC project (and I've left >> it late, there are only 3 days left to apply), please encourage the >> student to look at this. Finally, if anybody is interested in helping >> mentor this as part of the GSOC, I'd be grateful for the help (I have >> to start writing my thesis soon). >> >> Thanks, >> Paul > > --=20 Paul Biggar paul.biggar@gmail.com