Re: [PHP-DEV] PHP 6 TODO list

2009-03-13 Thread Hannes Magnusson
(looping in gsoc@)

On Sat, Mar 14, 2009 at 00:39, David Coallier  wrote:
>> Scott did.
>> I have asked _multiple_ times about the status of the project, all I
>> got was "he passed".
>>
>> Quote from Scott (from few months ago):
>> "he was to implement unicode support in more modules and convert an 
>> application.
>>
>> He's in the process of writing a conversion guide and I believe he did
>> openssl, imap and updated date."
>>
>> I am still looking forward to see the results, even though its almost
>> a year behind schedule.
>
> Ah yeah I remember now. Well, in a way, good to know the student has
> passed. Did we get more % one the completion? I'd say that 69% is
> merely a change from the last 2 years.

IIRC, noone failed last year. One guy dropped out (the llvm guy).
>From my perspective, he is the onlyone (with one exception) who
_really_ put work into his project - and do you remember his
application? WOW!
If he is still interested, I am willing to do my own personal "summer
of code" sponsoring his project (it'd be great if couple of guys would
join me on that one though.. :P).

The rest of the folks just got a "free pass" because their mentors
either didn't care or were to busy to review their "work".

Well, except for my student, obviously :) - He did everything he was
supposed to do (and even more then that), he participated on IRC and
sent out mails to the relevant mailingsts regularly.
Unfortunately, I didn't manage to convince him to devote his "free
time" after the "gsoc project" ended (which really is an shame - he
really did a good job and *our* project, and we really could use a guy
like him to continue working with us.


As a side note:
I was a "gsoc student" 2 years ago. I passed - even though "my mentor"
was totally unavailable. I didn't have any "secondary mentor".
Fortunately, I knew my way around php.net (as I had been a php.net
contributor for several years) so I "found myself" a new mentor
(Philip), and the project turned out to workout quite alright.


> Anyways, issues with students and progress should be somewhat resolved
> this year with the new approach to student mentoring and student
> reporting tasks I'd say.

I really hope so.
But I still would like stricter rules, both for acceptance (to the
project) and for project delivery.
Keep in mind, the students are expect to treat the project as a
near-full-time projects. Not a 2hours-a-week OSS work.

-Hannes

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] PHP 6 TODO list

2009-03-13 Thread David Coallier
> Scott did.
> I have asked _multiple_ times about the status of the project, all I
> got was "he passed".
>
> Quote from Scott (from few months ago):
> "he was to implement unicode support in more modules and convert an 
> application.
>
> He's in the process of writing a conversion guide and I believe he did
> openssl, imap and updated date."
>
> I am still looking forward to see the results, even though its almost
> a year behind schedule.

Ah yeah I remember now. Well, in a way, good to know the student has
passed. Did we get more % one the completion? I'd say that 69% is
merely a change from the last 2 years.

Anyways, issues with students and progress should be somewhat resolved
this year with the new approach to student mentoring and student
reporting tasks I'd say.


-- 
Slan,
David

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] PHP 6 TODO list

2009-03-13 Thread Hannes Magnusson
On Fri, Mar 13, 2009 at 23:46, David Coallier  wrote:
> 2009/3/13 Andrei Zmievski :
>> Hannes Magnusson wrote:
>>>
>>> Regarding the migration item...
>>> Wasn't there a gsoc project last year that did exactly that?
>>
>> I think there was, but I don't know if they actually did anything.
>>
>
> Actually there was one which I was proposing to mentor since you
> weren't there Andrei, but it basically got no attention whatsoever and
> not proposal from the students, thus no project :)

Scott did.
I have asked _multiple_ times about the status of the project, all I
got was "he passed".

Quote from Scott (from few months ago):
"he was to implement unicode support in more modules and convert an application.

He's in the process of writing a conversion guide and I believe he did
openssl, imap and updated date."

I am still looking forward to see the results, even though its almost
a year behind schedule.

-Hannes

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] PHP 6 TODO list

2009-03-13 Thread David Coallier
2009/3/13 Andrei Zmievski :
> Hannes Magnusson wrote:
>>
>> Regarding the migration item...
>> Wasn't there a gsoc project last year that did exactly that?
>
> I think there was, but I don't know if they actually did anything.
>

Actually there was one which I was proposing to mentor since you
weren't there Andrei, but it basically got no attention whatsoever and
not proposal from the students, thus no project :)

Hope this helps a bit.

-- 
Slan,
David

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] PHP 6 TODO list

2009-03-13 Thread Andrei Zmievski

Hannes Magnusson wrote:

Regarding the migration item...
Wasn't there a gsoc project last year that did exactly that?


I think there was, but I don't know if they actually did anything.

-Andrei

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Cloning of objects passed as parameters

2009-03-13 Thread Frankie Dintino
Sorry to spam the list with a reply to my own thread again, but there 
were some errors in the example I posted, which would defeat the whole 
idea of it being useful for somebody with the same question. Corrected 
example:


ZEND_METHOD(xydelta, setStartDocument) {
   zval *id, *doc = NULL;
   xydelta_object *intern;

   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
 getThis(), "Oo", &id, xydelta_ce, &doc) == FAILURE) {
   RETURN_FALSE;
   }

   intern = (xydelta_object *)zend_object_store_get_object(id TSRMLS_CC);
   // Error checking removed for brevity...
   // ...

   // Clone zval* doc

   zend_object_handlers *handlers = doc->value.obj.handlers;

   zval *doc_clone;
   MAKE_STD_ZVAL(doc_clone);
   Z_TYPE_P(doc_clone) = IS_OBJECT;
   doc_clone->value.obj = handlers->clone_obj(doc);

   // Get cloned object
   intern->libxml_start_doc = (php_libxml_node_object *)
   zend_object_store_get_object(doc_clone TSRMLS_CC);
}

- Frankie Dintino

On 2009-03-12 00:21:49 -0400, fdint...@nflc.org (Frankie Dintino) said:



...

On 2009-03-10 16:03:19 -0400, he...@php.net (Marcus Boerger) said:


Hello Frankie,

DOMDocuments are reference counted, hence zou can simplz increase their
refcount when storing the connection and delete the ref when dropping the
connection, probably in your destructor.

Best regards,
 Marcus

Tuesday, March 10, 2009, 5:19:32 PM, you wrote:


I'm writing a PHP class with a method that has to be passed a
DOMDocument object, and it needs to retain that object throughout the
life of its instantiation. However, the (dom_object *) returned from
zend_parse_method_parameters is just a pointer to the passed object,
and so it disappears when the original document is unset or goes out of
scope. How would one go about cloning the DOMDocument to save in the
class's struct?



example:
ZEND_METHOD(xydelta, setStartDocument) {
zval *id, *doc = NULL;
xydelta_object *intern;



if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
"Oo", &id, xydelta_ce, &doc) == FAILURE) {
RETURN_FALSE;
}



intern = (xydelta_object *)zend_object_store_get_object(id TSRMLS_CC);
if (intern != NULL) {
// Error checking removed for brevity...
// ...



// This pointer cannot be accessed once the object that was used as
the first parameter goes out of scope
intern->libxml_start_doc = (php_libxml_node_object *)
zend_object_store_get_object(doc TSRMLS_CC);
}
}




--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [APC-DEV] Re: [PHP-DEV] [RFC] APC/PHP Lazy Loading

2009-03-13 Thread Kalle Sommer Nielsen
Hi

2009/3/13 Pierre Joye :
> hi,
>
> Then I would rather have a beta2 and not a RC. This change while being
> great may require more tweaks, and as Marcus suggested, we could push
> APC in too while being at it. I'm all for it (both :).

I must admit that I think it would be bad to delay 5.3 more and have
another beta because of this, however if possible I would be all for
having APC in RC1 next week :)

>
> Cheers,
>



-- 
Kalle Sommer Nielsen
ka...@php.net

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Re: [APC-DEV] Re: [PHP-DEV] [RFC] APC/PHP Lazy Loading

2009-03-13 Thread Pierre Joye
hi,

Then I would rather have a beta2 and not a RC. This change while being
great may require more tweaks, and as Marcus suggested, we could push
APC in too while being at it. I'm all for it (both :).

Cheers,

On Wed, Mar 11, 2009 at 5:13 PM, Lukas Kahwe Smith  wrote:
>
> On 11.03.2009, at 17:10, Rasmus Lerdorf wrote:
>>>
>>> Anyway, it's very good job and 20-30% speedup on some real-life
>>> applications makes sense to include it into 5.3 (from my point of view).
>>
>> Makes sense to me as well, especially since I don't see any drawbacks
>> for non-accelerated scripts.
>>
>> I also think some of those applications that didn't show any gains could
>> be trivially modified to make use of it.  Moving from conditionally
>> loaded stuff to lazy-loaded is likely to speed things up.  Depending of
>> course on how granular the conditional loading is.
>
>
> Can we get this patch to release quality by this weekend?
> So that people can test it on Monday/Tuesday ahead of RC1?
>
> regards,
> Lukas Kahwe Smith
> m...@pooteeweet.org
>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Re: [APC-DEV] Re: [PHP-DEV] [RFC] APC/PHP Lazy Loading

2009-03-13 Thread Dmitry Stogov

Hi,

I've fixed all the issues I found in the original patch (attached).

However then I realized that speed-up was caused by bugs that leaded to 
render pages in improper way. After fix the speed-up disappear. :(


So now I don't see any reason to include it into 5.3.

Thanks. Dmitry.

Lukas Kahwe Smith wrote:


On 11.03.2009, at 17:10, Rasmus Lerdorf wrote:

Anyway, it's very good job and 20-30% speedup on some real-life
applications makes sense to include it into 5.3 (from my point of view).


Makes sense to me as well, especially since I don't see any drawbacks
for non-accelerated scripts.

I also think some of those applications that didn't show any gains could
be trivially modified to make use of it.  Moving from conditionally
loaded stuff to lazy-loaded is likely to speed things up.  Depending of
course on how granular the conditional loading is.



Can we get this patch to release quality by this weekend?
So that people can test it on Monday/Tuesday ahead of RC1?

regards,
Lukas Kahwe Smith
m...@pooteeweet.org



Index: Zend/zend.c
===
RCS file: /repository/ZendEngine2/zend.c,v
retrieving revision 1.308.2.12.2.35.2.29
diff -u -p -d -r1.308.2.12.2.35.2.29 zend.c
--- Zend/zend.c 18 Feb 2009 10:55:08 -  1.308.2.12.2.35.2.29
+++ Zend/zend.c 13 Mar 2009 13:46:07 -
@@ -550,6 +550,10 @@ static void executor_globals_ctor(zend_e
EG(current_module) = NULL;
EG(exit_status) = 0;
EG(active) = 0;
+   EG(lookup_function_hook) = NULL;
+   EG(lookup_class_hook) = NULL;
+   EG(defined_function_hook) = NULL;
+   EG(declared_class_hook) = NULL;
 }
 /* }}} */
 
Index: Zend/zend_API.c
===
RCS file: /repository/ZendEngine2/zend_API.c,v
retrieving revision 1.296.2.27.2.34.2.60
diff -u -p -d -r1.296.2.27.2.34.2.60 zend_API.c
--- Zend/zend_API.c 14 Jan 2009 11:56:08 -  1.296.2.27.2.34.2.60
+++ Zend/zend_API.c 13 Mar 2009 13:46:07 -
@@ -2180,7 +2180,7 @@ ZEND_API zend_class_entry *zend_register
 
if (!parent_ce && parent_name) {
zend_class_entry **pce;
-   if (zend_hash_find(CG(class_table), parent_name, 
strlen(parent_name)+1, (void **) &pce)==FAILURE) {
+   if (zend_find_class(CG(class_table), parent_name, 
strlen(parent_name)+1, &pce TSRMLS_CC)==FAILURE) {
return NULL;
} else {
parent_ce = *pce;
@@ -2228,14 +2228,20 @@ ZEND_API zend_class_entry *zend_register
 ZEND_API int zend_register_class_alias_ex(const char *name, int name_len, 
zend_class_entry *ce TSRMLS_DC) /* {{{ */
 {
char *lcname = zend_str_tolower_dup(name, name_len);
-   int ret;
+   ulong hash = zend_inline_hash_func(lcname, name_len+1);
+   zend_class_entry **pce;
 
-   ret = zend_hash_add(CG(class_table), lcname, name_len+1, &ce, 
sizeof(zend_class_entry *), NULL);
-   efree(lcname);
-   if (ret == SUCCESS) {
-   ce->refcount++;
+   if((EG(lookup_class_hook) &&
+   /* Check if we have a same-name class already exsiting in our 
hook, then fail as we would normally below.
+* This could happen if we have two classes with the same name, 
and one of them is being bound at run-time */
+   EG(lookup_class_hook)(lcname, name_len+1, hash, &pce) == SUCCESS) ||
+  zend_hash_quick_add(CG(class_table), lcname, name_len+1, hash, &ce, 
sizeof(zend_class_entry *), NULL) == FAILURE) {
+   efree(lcname);
+   return FAILURE;
}
-   return ret;
+   efree(lcname);
+   ce->refcount++;
+   return SUCCESS;
 }
 /* }}} */
 
@@ -2412,7 +2418,7 @@ static int zend_is_callable_check_func(i
}
/* Check if function with given name exists.
 * This may be a compound name that includes namespace name */
-   if (zend_hash_find(EG(function_table), lmname, mlen+1, 
(void**)&fcc->function_handler) == SUCCESS) {
+   if (zend_find_function(EG(function_table), lmname, mlen+1, 
&fcc->function_handler TSRMLS_CC) == SUCCESS) {
efree(lmname);
return 1;
}
@@ -3552,6 +3558,86 @@ ZEND_API void zend_restore_error_handlin
 }
 /* }}} */
 
+ZEND_API int zend_quick_find_function(HashTable *function_table, const char 
*name, int len, zend_uint h, zend_function **fe TSRMLS_DC) /* {{{ */
+{
+   if (zend_hash_quick_find(function_table, name, len, h, (void**)fe) == 
SUCCESS) {
+   return SUCCESS;
+   } else if (EG(lookup_function_hook)) {
+   return EG(lookup_function_hook)(name, len, h, fe);
+   }
+   return FAILURE;
+}
+/* }}} */
+
+ZEND_API int zend_find_function(HashTable *function_table, const char *name, 
int len, zend_function **fe TSRMLS_DC) /* {{{ */
+{
+   ulong h = zend_inline_hash_fu

Re: [PHP-DEV] PHP 6 TODO list

2009-03-13 Thread Hannes Magnusson
On Wed, Mar 11, 2009 at 23:15, Andrei Zmievski  wrote:
> Also, please go through PHP 6 section [http://wiki.php.net/todo/php60] and
> remove or update any items that have been done or the scope of which has
> changed.

Regarding the migration item...
Wasn't there a gsoc project last year that did exactly that?

-Hannes

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Reserved namespaces

2009-03-13 Thread Lukas Kahwe Smith


On 13.03.2009, at 00:39, Andrei Zmievski wrote:


Christian Schneider wrote:
Things gettings reserved at a later stage (like originally  
keywords, now
namespaces) can lead to a big deal of frustration. Therefore I  
think it

is crucial to have a clear naming guide now.
And these guidelines have to be noticed by everybody who starts to  
use

namespaces so they have to be placed prominently.
Personally I'd even prefer them to be enforced in code so they  
can't be

missed.
Removing restrictions later on causes less trouble so I wouldn't mind
too much if a couple of namespaces (or namespace prefixes) are  
reserved

but never used.


Just a gentle reminder to make sure we don't miss this..



Well cant we just use the class naming guide? As in put a prefix in  
your namespace names, do not use an extension name (or something that  
could likely become an extension name) as your prefix.


Then again for classes we say that the prefix should be prepended with  
an underscore as the separator as the ultimate protection. That of  
course does not seem feasible for namespaces.


regards,
Lukas Kahwe Smith
m...@pooteeweet.org




--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php