Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99408 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28904 invoked from network); 6 Jun 2017 16:58:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jun 2017 16:58:46 -0000 Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.82 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.82 mx101.easyname.com Received: from [77.244.243.82] ([77.244.243.82:33241] helo=mx101.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/A2-27119-44FD6395 for ; Tue, 06 Jun 2017 12:58:45 -0400 Received: from cable-81-173-132-37.netcologne.de ([81.173.132.37] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dIHoW-0000e5-2M; Tue, 06 Jun 2017 16:58:41 +0000 References: <5313411f-40b4-58c6-83a8-7e813526f2a7@tekwire.net> To: php-internals , pollita@php.net, Nikita Popov , francois@tekwire.net Message-ID: <758420b6-dee8-9daa-c9e5-68aa6b59e028@fleshgrinder.com> Date: Tue, 6 Jun 2017 18:58:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="94kqIcbcAWPrLHxTrIboFaOxldtvNV6Ij" X-DNSBL-PBLSPAMHAUS: YES Subject: Re: [PHP-DEV] Proposing inclusion of PCS in the 7.2 core distribution From: php@fleshgrinder.com (Fleshgrinder) --94kqIcbcAWPrLHxTrIboFaOxldtvNV6Ij Content-Type: multipart/mixed; boundary="uVaUAHEvWSRPOEfkoqqxH6fQJAEiSnESs"; protected-headers="v1" From: Fleshgrinder To: php-internals , pollita@php.net, Nikita Popov , francois@tekwire.net Message-ID: <758420b6-dee8-9daa-c9e5-68aa6b59e028@fleshgrinder.com> Subject: Re: [PHP-DEV] Proposing inclusion of PCS in the 7.2 core distribution References: <5313411f-40b4-58c6-83a8-7e813526f2a7@tekwire.net> In-Reply-To: --uVaUAHEvWSRPOEfkoqqxH6fQJAEiSnESs Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable I agree with Nikita and Sara here, interfacing between PHP and C however would be very important. My current UUID proposal for instance. Doing the bit shifting in PHP is a pain. Doing it in C is a breeze. However, doing the signatures and accessors in PHP would be MUCH simpler. On 6/6/2017 2:43 PM, Nikita Popov wrote: > There are essentially only two good reasons for implementing functional= ity > in C: One is performance, the other is FFI. Unfortunately, the requirem= ent > to use C for everything inside an extension means that we write a large= > amounts of C code that does not fall into either of those categories. T= he > resulting code is hard to maintain, often subtly buggy and usually not > consistent with ordinary userland PHP code. Typical issues we see all t= he > time are bad or completely absent serialization support, lack of circul= ar > garbage collection, crashes when the object is improperly initialized a= nd > bugs appearing when internal classes are extended. I think that one of the main reasons for this is that lots of the C code implements this stuff again, custom made. Instead of just using the default stuff. Regarding the maintainer problem. PHP internals is a very hard turf and literally has a very bad reputation out there. It is very hard to get in, and it is very hard to contribute. Other communities (Go, Rust, ...) are much more welcoming. I think that the move to GitHub already helped a little, but it needs to open up even more. Internals needs to encourage, support, guide, and not simply turn down every idea. The internals book goes in the right direction here. Going more community with stuff like the mailing list (maybe a forum that is easier to join) and a chat (maybe something like gitter) are only tiny things that can help a lot here. We can learn from the other communities. I think that there are more than enough people out there who would be able to write some C. On 6/6/2017 5:55 PM, Sara Golemon wrote: > 100% this, though PHP's version of HNI will suffer a few shortcomings > due to the lack of a type_traits equivalent in C99. I'm not > suggesting we go C++11 just to get a better bridge, but it's a real > constraint in getting the same advantages that HNI has. Upgrading to C99 is imho long overdue! No clue why we are not finally doing the switch. I'd rather invest in Rust than C++11, seriously. C++ (regardless of version) is as painful as C after all. Sure, RAII solves all problems, but than we could also do Python instead of PHP if conventions is all we ask for. ;) --=20 Richard "Fleshgrinder" Fussenegger --uVaUAHEvWSRPOEfkoqqxH6fQJAEiSnESs-- --94kqIcbcAWPrLHxTrIboFaOxldtvNV6Ij Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZNt87AAoJEOKkKcqFPVVrQqEP/iwK7KDHmBh7drvwneFS7gxK 5N1Hw/n6FYUsxZ72mJxk03PPHAsXhzsu8WzjxI8scifzL/4V2feZs/Y8Gr4gV1n/ 38V5FsSF6TR6gRwSQjvKOhO1OdBDr2vHWvG1mpqBa7fpZ7FR0Xxk6b157HKN3LWJ jd+Z5CxeMDl6EoOC+1cSZUMje+nSRbrhKW+P02G9YNU7HBv5kATmyBK4Mn9ApUk7 c7YpwXotJrCNhC1D+BZqavIsoeBX5Vt9gvmngEpbwzR3K9cFr5JLsS6MDmrTdkCg /utAECUWMW7S+YrMs880kVhXw/nhuBjPm5cbYcRhVJ8/9D9m9xtvLANqsbjPq3YM bHsTXAoqqpnWUWBPq/fI1s/hxCZZqxgE2pO3X/0Ri0qQFx0E6lznvape8gTn1PhH FvkV6rWvHJSiIgzRVi25JGokMDAkxakXn8+DGD3NNiehGWYqXPlztmWlWK5pWc2p NjRLXHY8NLGwMJ9F/KEhaRQu7noJRPemPH7sOluQ5r01tUfcw7B/2BSukGrCWVuf OIC6ZvQXTyDdvVWYmB8ERrZTXKXwJ6mdyL57R34wbMr5YpeGSQNvMs6J+qyL1nAj AwYF+yU7LpRDPjQroXmfPBDmgNF/l+Q8ITd2kLd0cRzQXmjfz0GQ7BJ0xqze4tCQ qvnT3hv9yLoIYBAGL87w =GpEX -----END PGP SIGNATURE----- --94kqIcbcAWPrLHxTrIboFaOxldtvNV6Ij--