RE: [PHP-DEV] Moderate PHP-DEV

2003-03-12 Thread David Sklar
On Wednesday, March 12, 2003 12:41 PM, Derick Rethans wrote:

 On Wed, 12 Mar 2003, Sascha Schumann wrote:

 The list could be renamed so that it is less confusing for
 newbie PHP developers.

 What is confusing with this description?

 Internals list
 A medium volume list for those who want to help out with the
 development of PHP (from http://www.php.net/mailing-lists.php)

 if even that description doesn't work, then nothing would work, not
 even changing the name.

For people who are not great English speakers, there's not much difference
between help out with the development of PHP and help with development in
PHP. This may not be exactly the correct description, but what about
something like:

A medium volume list for those who are working on the PHP engine and
internals in C and C++.

FWIW, I think changing the name would help too. But I'm not the one
diligently replying to all the people who incorrectly post to php-dev. :)

-dave



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



[PHP-DEV] Doing something with an each opcode as zend_execute() handles it

2003-03-05 Thread David Sklar
Just before zend_execute()/execute() handles each opcode in its big switch()
statement, I'd like to be able to call a function and pass it the opcode (or
other information from the opline.

Is the best approach to reset zend_execute to a new function in the
PHP_MINIT_FUNCTION() (and restore the saved value in
PHP_MSHUTDOWN_FUNCTION)? This new function would mostly be a copy of
execute() in zend_execute.c with my addtional function call tossed in.

What's the difference between zend_execute() and zend_execute_internal()?

Thanks,
David


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



RE: [PHP-DEV] Doing something with an each opcode as zend_execute() handles it

2003-03-05 Thread David Sklar
On Wednesday, March 05, 2003 5:35 PM, Sterling Hughes wrote:

 Just before zend_execute()/execute() handles each opcode in its big
 switch() statement, I'd like to be able to call a function and pass
 it the opcode (or other information from the opline.

 Is the best approach to reset zend_execute to a new function in the
 PHP_MINIT_FUNCTION() (and restore the saved value in
 PHP_MSHUTDOWN_FUNCTION)? This new function would mostly be a copy of
 execute() in zend_execute.c with my addtional function call tossed
 in.

 What's the difference between zend_execute() and
 zend_execute_internal()?


 Well, I have a feeling what you are talking about is sub-optimal,
 what do you want to do?

Essentially, I want to be able to produce a sort of serialized
representation of the opcodes, but as they are executed, not all in one big
chunk after they are compiled.

This isn't for any actually useful production code, just some
debugging/messing around/exploring engine internals.

David


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



RE: [PHP-DEV] Doing something with an each opcode as zend_execute() handles it

2003-03-05 Thread David Sklar
On Wednesday, March 05, 2003 5:46 PM, Sterling Hughes wrote:

 Essentially, I want to be able to produce a sort of serialized
 representation of the opcodes, but as they are executed, not all in
 one big chunk after they are compiled.

 This isn't for any actually useful production code, just some
 debugging/messing around/exploring engine internals.

 I would suggest you take a look at Ze2's execution architecture, it
 should allow you to do this.

Such as overriding the opcode handlers for each opcode? I suppose I could
change what the handlers are initialized to in zend_init_opcodes_handler()
so that my new handler does the serialization and then calls the regular
handler. Does that make sense?


On Wednesday, March 05, 2003 6:10 PM, George Schlossnagle wrote:

 There's no good way to do this as a zend_extension in ZE1 (that I know
 of).  You need to patch the engine (which is trivial).

Yeah, so far I'm just using a different zend_execute.c with my added code, I
was just wondering if there's a better/more formal/etc way to do it...

Thanks,
David


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



[PHP-DEV] karma for pear/PECL/myphp

2003-02-11 Thread David Sklar
When I try to commit changes to pear/PECL/myphp, I get:

 Access denied: insufficient karma (sklar|pear/PECL/myphp)
 Contact [EMAIL PROTECTED] for access to pear/PECL/myphp
cvs server: Pre-commit check failed
cvs [server aborted]: correct above errors first!

E-mails to [EMAIL PROTECTED] produce no response. Could I have karma for this
please?

Alternatively, I can make a package and upload it to PEAR via the web
interface, but since myphp was added to the CVS repository directly, I'm not
sure which method is correct.

Thanks,
David


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




RE: [PHP-DEV] [PATCH] new idate() - sunrise() - sunset() functions

2003-02-06 Thread David Sklar
 From: David Gillies [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 06, 2003 11:18 AM
 
 In a similar itch-scratching moment I whipped up a
 trivial PHP module that groks tzfile timezone files to
 give you the offset from GMT at any time in the Unix
 epoch. I needed this to preflight a bunch of data
 which had been gathered with a lot of disparate time
 zones into a single UTC version, but I thought it
 might merit further dissemination.
 
 Anyone interested?

Yes. Well, at least I am.

-dave


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




RE: [PHP-DEV] Using CLI as a shell

2003-02-03 Thread David Sklar
   There is a difference between interactive mode and this idea. The
   idea was to execute every single line. So if you type 'echo Hello\n;
   and press enter Hello should be displayed.
 
  i like this idea, so i no longer have to type echo Hello on my bash
 prompt
  :)

 At least with this (presumably) Python style shell you could use
 readline to
 prevent you typing echo Hello twice (as opposed to current php -a). :)

The Command Shell program in Recipe 20.9 of the PHP Cookbook uses
readline() to implement a PHP shell-style prompt, where each line is
executed as you type it. It also uses readline_completion_function() to
provide tab-completion for function names.

You can download it in the archive of code from the book at:
-- http://examples.oreilly.com/phpckbk/


-dave


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




RE: [PHP-DEV] Re: #21659 [Com]: sprintf

2003-01-15 Thread David Sklar
 On January 15, 2003 10:27 am, Adam Wright wrote:
  Last ditch effort of NotAPHPBug? ;)

 This too may not be a correct solution all the time. Consider
 75th duplicate
 report of an invalid or even a resolved bug report. It may have
 been a bug at
 some point, but certainly is not anymore. It is bogus, because
 the user chose
 not to search in the bug database for similar reports before
 posting their
 report. Surely you can agree that such a report is bogus.
 I suppose we could introduce a dozen different more 'friendly'
 statuses to
 replace the existing bogus status, but why? Surely not for the purpose of
 making users who don't do the necessary research before posting their bug
 reports feel better about themselves.

The wording could be something like NotValidBug or something like that. I
think the issue that Adam is bringing up is that Bogus has a derogatory
connotation. Changing it doesn't necessarily make users who don't do
necessary research before posing feel better about themselves, but it may
make people more willing to report actual bugs in the future.

Look, I'm not on the QA team and ultimately, what makes it easiest and most
worthwhile for you guys to find and fix bugs is the best thing to do. But I
can easily see how a well-meaning person who might be new to PHP might
report what they think is a bug, have their bug report closed with This
isn't a bug. with the status changed to Bogus, and take that as a big fat
Go away. PHP doesn't welcome you.

Maybe their report was a bug in something else (like that XML bug that was
discussed recently) or maybe they didn't make themselves clear enough in
their report. Derick's suggestion of making sure that the reason why the bug
is Bogus is included in the discussion help with this. But it's pretty easy
for someone to get discouraged by a curt dismissal and then not offer help
in the future.

If you guys are inundated with bogus bugs, then perhaps this is all moot. I
can just see how easy it might be for someone who isn't an initiate to get a
bad taste in their mouth for PHP by an unfortunate interaction with the bug
system.

-dave


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




RE: [PHP-DEV] Re: #21659 [Com]: sprintf

2003-01-15 Thread David Sklar
 From: Ilia A. [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 15, 2003 11:19 AM

 Consider the following, there are a lot more PHP users then PHP
 developers and
 considering that not all PHP developers are actively involved in the bug
 solving process (many are involved with PEAR/PECL/Documentation
 and so on)
 there are very few people actively working on resolving bugs.
 This makes the
 time of these people very valuable, people who post invalid bug
 reports eat
 up that valuable time and by doing so not only cause a loss of bug fixing
 time but also disillusion developers and often make them move on to more
 exciting things like writing new code.

 Perhaps a slightly less then an absolutely polite approach, will
 make those
 people reconsider their bug posting technique and do a little
 research before
 deciding that their non-working script constitutes a valid bug report and
 start wasting everyone's time. Most of the time when a bug is
 marked bogus
 the developer will indicate why the bug is bogus, so that the user is not
 left in the dark.

Like I said, ultimately, whatever works best for the folks actively
resolving the best approach. My only point was that the people posting the
bugs often aren't aware of these dynamics beforehand, so the less then an
absolutely polite approach, which makes sense when you explain it here, can
be discouraging.

 All that said, I see nothing especially inflammatory about
 'bogus' and I do
 not believe it is the intent of the developers to insult or
 degrade the user
 who had posted a bogus report. The 'invalid' status that was
 proposed, in my
 opinion, just as 'unfriendly' as bogus.

I don't think that anyone thinks it's the intent of developers to insult or
degrade users.

-dave


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




RE: [PHP-DEV] MySQL UDF that runs PHP

2002-11-07 Thread David Sklar
Indeed, that would be cool. 

-dave

 -Original Message-
 From: Adam Voigt [mailto:adam;cryptocomm.com]
 Sent: Wednesday, November 06, 2002 1:05 PM
 To: David Sklar
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DEV] MySQL UDF that runs PHP
 
 
 I'm very intrigued, this looks pretty cool. I don't suppose there's
 anyway you could link in the connectivity to the MySQL engine so you
 didn't have to have the same connection overhead as external mysql
 connections from standard PHP pages? Cause that would just be sweet.
 
 Adam Voigt
 [EMAIL PROTECTED]
 
 On Tue, 2002-11-05 at 16:37, David Sklar wrote:
  Based on Edin Kadribasic's PHP embed SAPI module, I wrote a 
 MySQL UDF that
  interprets PHP. You can get it here:
  
  -- http://www.sklar.com/myphp-0.1.tar.gz
  
  I'd be curious for any comments or suggestions folks have.
  
  Thanks,
  
  David Sklar
  
  
  -- 
  PHP Development Mailing List http://www.php.net/
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

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




[PHP-DEV] MySQL UDF that runs PHP

2002-11-05 Thread David Sklar
Based on Edin Kadribasic's PHP embed SAPI module, I wrote a MySQL UDF that
interprets PHP. You can get it here:

-- http://www.sklar.com/myphp-0.1.tar.gz

I'd be curious for any comments or suggestions folks have.

Thanks,

David Sklar


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