Re: [PHP-DEV] GSoC

2007-03-21 Thread Tijnema !

On 3/21/07, Richard Lynch [EMAIL PROTECTED] wrote:


I splice the ID3 tags onto the front of an MP3 stream in PHP on this
site:

http://uncommonground.com/

The id3 library in PHP is quite good at this, but needs a maintainer...



Well, it is a start, now only processing work needs to be done :)
To convert from MP3 to Wave for example, I think this will require the
LAME lib, and to use with OGG, it will require the OGGvorbis lib. But
about WMA, I never saw a Linux lib for it. So that would require
creating a new lib for WMA, or directly implementing it into the PHP
source. So the MP3 and OGG support shouldn't bee too hard to
implement, but other file formats might be harder. And now I'm only
talking about Audio, my first idea was to implement Video
(Audio+Video). Video is even more advanced, then we should work with
DivX and XviD codecs. (Thank god, they are Open Source). But having
this support for video, it would be possible to easily create a site
like youtube, where they even have a screenshot of the movie, which
is actually just a frame in the middle of the file. And of course it
would be possible to resize the video files.

Kind Regards,

Tijnema




On Tue, March 20, 2007 3:21 pm, Tijnema ! wrote:
 On 3/15/07, Marcus Boerger [EMAIL PROTECTED] wrote:
 Hello Tijnema,

  cool, have a look at the site then. If Ilia didn't update it just
 wait a
 bit - we are having network problems here during the conference.

 best regards
 marcus

 Hi,

 I read a lot of text, just for information and i like the idea of
 GSoC. There are some interesting things on the PHP Ideas list, and it
 looks like this idea is the simplest one. As the phpt file structure
 is quite easy and there's (AFAIK) no knowledge of C/C++ needed. Only a
 little bit PHP programming, and writing the expected result :)

 But i have also some ideas, but i have no idea if it is possible or
 useful in PHP. For example i'd like to see support for handling
 audio/video files in PHP, to do all kind of music processing in PHP,
 or create music streams directly from within a website. I haven't seen
 this on any other web based programming language yet.

 Kind Regards,

 Tijnema

 ps. Yes i know the oggvorbis PECL package, but this is only for OGG.

 Thursday, March 15, 2007, 10:09:11 PM, you wrote:

  On 3/15/07, Marcus Boerger [EMAIL PROTECTED] wrote:
  Hello Ilia,
 
   of course we can. The question is how do we find a student for
 ideas we
  have?
 
  best regards
  marcus

  I'm a student :)

  I'm not sure what the requirements for this are, but i've
 programmed a
  lot in PHP and C/C++.

  Tijnema
 
  Thursday, March 15, 2007, 4:21:01 PM, you wrote:
 
   Ca  we have a project designed to improve code coverage of PHP
 by
   creating .phpt tests? I may not seem like a complex project,
 but in
   terms of improving PHP as a language it would be exceptionally
   useful. Probably more so then any one extension that can come
 out of
   GSoC.
 
 
   On 15-Mar-07, at 10:50 AM, Marcus Boerger wrote:
 
   Hello guys,
  
 PHP has been chosen as a summer of code project. I suggets
 we put
   the
   following on php.net. Any comments?
  
   ---
   The PHP team is proud to once again participate in the Google
   Summer of Code.
   We are still looking for project ideas of interested students.
 In
   case you
   want to spend your summer with your favorite open source
 project,
   PHP, and get
   some money for adding an interesting project to it, you should
   contact us at
   [EMAIL PROTECTED] The deadline for submitting ideas is the
 24th of
   March 2007.
   The current list of ideas can be seen here
 http://php.net/ideas. If
   you have
   not heard of the Google Summer of Code, then have a look here
   http://code.google.com/soc.
   ---
  
   Best regards,
Marcus
  
   --
   PHP Internals - PHP Runtime Development Mailing List
   To unsubscribe, visit: http://www.php.net/unsub.php
  

 Best regards,
  Marcus



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




--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?




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



Re: [PHP-DEV] Re: PHP version and Zend API Number

2007-03-21 Thread Michael Wallner
Michael B Allen wrote:

 The get_zend_version function returns a string like 'Zend Engine v1.3.0,
 Copyright (c) 1998-2004 Zend Technologies\n'. It would be nice to be
 able to get the ZEND_MODULE_API_NO (e.g. 20060613) the standard module
 was compiled under.

basic_function_module.zend_api might be what you're looking for.

 I'm still confused about how many versions of extensions I need to provide
 with my product. Currently I just compile it against late versions of 4,
 5.0, 5.1 and 5.2 and hope for the best. But looking at ZEND_MODULE_API_NO
 changes in webcvs shows it changes more frequently than that.
 
 But so far I haven't ran into major problems with ZEND_MODULE_API_NO
 so maybe I'm just being paranoid. From looking at zend.c it looks like
 it will print diagnostic info if some tries to load an incompatible
 extension.

It looks like that:

[EMAIL PROTECTED]:~$ php -n 
-dextension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20050922/ 
-dextension=ffi.so -v
PHP Warning:  PHP Startup: ffi: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHPcompiled with module API=20060613, debug=0, thread-safety=1
These options need to match


-- 
Michael

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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Alexey Zakhlestin

you should look at ffmpeg and other multi-codec libraries (sdl?)

On 3/21/07, Tijnema ! [EMAIL PROTECTED] wrote:


On 3/21/07, Richard Lynch [EMAIL PROTECTED] wrote:

 I splice the ID3 tags onto the front of an MP3 stream in PHP on this
 site:

 http://uncommonground.com/

 The id3 library in PHP is quite good at this, but needs a maintainer...


Well, it is a start, now only processing work needs to be done :)
To convert from MP3 to Wave for example, I think this will require the
LAME lib, and to use with OGG, it will require the OGGvorbis lib. But
about WMA, I never saw a Linux lib for it. So that would require
creating a new lib for WMA, or directly implementing it into the PHP
source. So the MP3 and OGG support shouldn't bee too hard to
implement, but other file formats might be harder. And now I'm only
talking about Audio, my first idea was to implement Video
(Audio+Video). Video is even more advanced, then we should work with
DivX and XviD codecs. (Thank god, they are Open Source). But having
this support for video, it would be possible to easily create a site
like youtube, where they even have a screenshot of the movie, which
is actually just a frame in the middle of the file. And of course it
would be possible to resize the video files.

Kind Regards,

Tijnema



 On Tue, March 20, 2007 3:21 pm, Tijnema ! wrote:
  On 3/15/07, Marcus Boerger [EMAIL PROTECTED] wrote:
  Hello Tijnema,
 
   cool, have a look at the site then. If Ilia didn't update it just
  wait a
  bit - we are having network problems here during the conference.
 
  best regards
  marcus
 
  Hi,
 
  I read a lot of text, just for information and i like the idea of
  GSoC. There are some interesting things on the PHP Ideas list, and it
  looks like this idea is the simplest one. As the phpt file structure
  is quite easy and there's (AFAIK) no knowledge of C/C++ needed. Only a
  little bit PHP programming, and writing the expected result :)
 
  But i have also some ideas, but i have no idea if it is possible or
  useful in PHP. For example i'd like to see support for handling
  audio/video files in PHP, to do all kind of music processing in PHP,
  or create music streams directly from within a website. I haven't seen
  this on any other web based programming language yet.
 
  Kind Regards,
 
  Tijnema
 
  ps. Yes i know the oggvorbis PECL package, but this is only for OGG.
 
  Thursday, March 15, 2007, 10:09:11 PM, you wrote:
 
   On 3/15/07, Marcus Boerger [EMAIL PROTECTED] wrote:
   Hello Ilia,
  
of course we can. The question is how do we find a student for
  ideas we
   have?
  
   best regards
   marcus
 
   I'm a student :)
 
   I'm not sure what the requirements for this are, but i've
  programmed a
   lot in PHP and C/C++.
 
   Tijnema
  
   Thursday, March 15, 2007, 4:21:01 PM, you wrote:
  
Ca  we have a project designed to improve code coverage of PHP
  by
creating .phpt tests? I may not seem like a complex project,
  but in
terms of improving PHP as a language it would be exceptionally
useful. Probably more so then any one extension that can come
  out of
GSoC.
  
  
On 15-Mar-07, at 10:50 AM, Marcus Boerger wrote:
  
Hello guys,
   
  PHP has been chosen as a summer of code project. I suggets
  we put
the
following on php.net. Any comments?
   
---
The PHP team is proud to once again participate in the Google
Summer of Code.
We are still looking for project ideas of interested students.
  In
case you
want to spend your summer with your favorite open source
  project,
PHP, and get
some money for adding an interesting project to it, you should
contact us at
[EMAIL PROTECTED] The deadline for submitting ideas is the
  24th of
March 2007.
The current list of ideas can be seen here
  http://php.net/ideas. If
you have
not heard of the Google Summer of Code, then have a look here
http://code.google.com/soc.
---
   
Best regards,
 Marcus
   
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
   
 
  Best regards,
   Marcus
 
 
 
  --
  PHP Internals - PHP Runtime Development Mailing List
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 


 --
 Some people have a gift link here.
 Know what I want?
 I want you to buy a CD from some starving artist.
 http://cdbaby.com/browse/from/lynch
 Yeah, I get a buck. So?



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





--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/


Re: [PHP-DEV] GSoC

2007-03-21 Thread Tijnema !

On 3/21/07, Alexey Zakhlestin [EMAIL PROTECTED] wrote:

you should look at ffmpeg and other multi-codec libraries (sdl?)


ffmpeg is cool, and probably good for this, but I'm not sure what you
want to do with SDL library.

Tijnema



On 3/21/07, Tijnema ! [EMAIL PROTECTED] wrote:
 On 3/21/07, Richard Lynch [EMAIL PROTECTED] wrote:
 
  I splice the ID3 tags onto the front of an MP3 stream in PHP on this
  site:
 
  http://uncommonground.com/
 
  The id3 library in PHP is quite good at this, but needs a maintainer...
 

 Well, it is a start, now only processing work needs to be done :)
 To convert from MP3 to Wave for example, I think this will require the
 LAME lib, and to use with OGG, it will require the OGGvorbis lib. But
 about WMA, I never saw a Linux lib for it. So that would require
 creating a new lib for WMA, or directly implementing it into the PHP
 source. So the MP3 and OGG support shouldn't bee too hard to
 implement, but other file formats might be harder. And now I'm only
 talking about Audio, my first idea was to implement Video
 (Audio+Video). Video is even more advanced, then we should work with
 DivX and XviD codecs. (Thank god, they are Open Source). But having
 this support for video, it would be possible to easily create a site
 like youtube, where they even have a screenshot of the movie, which
 is actually just a frame in the middle of the file. And of course it
 would be possible to resize the video files.

 Kind Regards,

 Tijnema


 
  On Tue, March 20, 2007 3:21 pm, Tijnema ! wrote:
   On 3/15/07, Marcus Boerger  [EMAIL PROTECTED] wrote:
   Hello Tijnema,
  
cool, have a look at the site then. If Ilia didn't update it just
   wait a
   bit - we are having network problems here during the conference.
  
   best regards
   marcus
  
   Hi,
  
   I read a lot of text, just for information and i like the idea of
   GSoC. There are some interesting things on the PHP Ideas list, and it
   looks like this idea is the simplest one. As the phpt file structure
   is quite easy and there's (AFAIK) no knowledge of C/C++ needed. Only a
   little bit PHP programming, and writing the expected result :)
  
   But i have also some ideas, but i have no idea if it is possible or
   useful in PHP. For example i'd like to see support for handling
   audio/video files in PHP, to do all kind of music processing in PHP,
   or create music streams directly from within a website. I haven't seen
   this on any other web based programming language yet.
  
   Kind Regards,
  
   Tijnema
  
   ps. Yes i know the oggvorbis PECL package, but this is only for OGG.
  
   Thursday, March 15, 2007, 10:09:11 PM, you wrote:
  
On 3/15/07, Marcus Boerger  [EMAIL PROTECTED] wrote:
Hello Ilia,
   
 of course we can. The question is how do we find a student for
   ideas we
have?
   
best regards
marcus
  
I'm a student :)
  
I'm not sure what the requirements for this are, but i've
   programmed a
lot in PHP and C/C++.
  
Tijnema
   
Thursday, March 15, 2007, 4:21:01 PM, you wrote:
   
 Ca  we have a project designed to improve code coverage of PHP
   by
 creating .phpt tests? I may not seem like a complex project,
   but in
 terms of improving PHP as a language it would be exceptionally
 useful. Probably more so then any one extension that can come
   out of
 GSoC.
   
   
 On 15-Mar-07, at 10:50 AM, Marcus Boerger wrote:
   
 Hello guys,

   PHP has been chosen as a summer of code project. I suggets
   we put
 the
 following on php.net. Any comments?

 ---
 The PHP team is proud to once again participate in the Google
 Summer of Code.
 We are still looking for project ideas of interested students.
   In
 case you
 want to spend your summer with your favorite open source
   project,
 PHP, and get
 some money for adding an interesting project to it, you should
 contact us at
 [EMAIL PROTECTED] The deadline for submitting ideas is the
   24th of
 March 2007.
 The current list of ideas can be seen here
   http://php.net/ideas. If
 you have
 not heard of the Google Summer of Code, then have a look here
 http://code.google.com/soc.
 ---

 Best regards,
  Marcus

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

  
   Best regards,
Marcus
  
  
  
   --
   PHP Internals - PHP Runtime Development Mailing List
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
  --
  Some people have a gift link here.
  Know what I want?
  I want you to buy a CD from some starving artist.
  http://cdbaby.com/browse/from/lynch
  Yeah, I get a buck. So?
 
 

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





--
Alexey Zakhlestin
http://blog.milkfarmsoft.com/


--
PHP Internals - PHP Runtime 

Re: [PHP-DEV] GSoC

2007-03-21 Thread Antony Dovgal

On 03/21/2007 10:47 AM, Tijnema ! wrote:

On 3/21/07, Richard Lynch [EMAIL PROTECTED] wrote:


I splice the ID3 tags onto the front of an MP3 stream in PHP on this
site:

http://uncommonground.com/

The id3 library in PHP is quite good at this, but needs a maintainer...



Well, it is a start, now only processing work needs to be done :)
To convert from MP3 to Wave for example, I think this will require the
LAME lib, and to use with OGG, it will require the OGGvorbis lib. But
about WMA, I never saw a Linux lib for it. So that would require
creating a new lib for WMA, or directly implementing it into the PHP
source. So the MP3 and OGG support shouldn't bee too hard to
implement, but other file formats might be harder. And now I'm only
talking about Audio, my first idea was to implement Video
(Audio+Video). Video is even more advanced, then we should work with
DivX and XviD codecs. (Thank god, they are Open Source). But having
this support for video, it would be possible to easily create a site
like youtube, where they even have a screenshot of the movie, which
is actually just a frame in the middle of the file. And of course it
would be possible to resize the video files.


I don't think anybody sane is doing audio encoding and video resizing in PHP.
PHP is about interface, clients are not going to wait an hour or two for a page 
to load.

There is a bunch of mature opensource utilities (transcoder, lame, oggenc etc.) and you 
can always use them to convert WAV to MP3 and AVI to OGG, it's just a matter of implementation.


That said, I would be glad to see a PECL extension able to read video files and grab screenshots 
(that seems to be quite common requirement). 
The ffmpeg extension is GPLed, which is a no-no for PECL. 


Re sound files, we already do have something: 
http://cvs.php.net/viewvc.cgi/pecl/sndfile/
It just wasn't released.

--
Wbr, 
Antony Dovgal


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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Tijnema !

On 3/21/07, Antony Dovgal [EMAIL PROTECTED] wrote:

On 03/21/2007 10:47 AM, Tijnema ! wrote:
 On 3/21/07, Richard Lynch [EMAIL PROTECTED] wrote:

 I splice the ID3 tags onto the front of an MP3 stream in PHP on this
 site:

 http://uncommonground.com/

 The id3 library in PHP is quite good at this, but needs a maintainer...


 Well, it is a start, now only processing work needs to be done :)
 To convert from MP3 to Wave for example, I think this will require the
 LAME lib, and to use with OGG, it will require the OGGvorbis lib. But
 about WMA, I never saw a Linux lib for it. So that would require
 creating a new lib for WMA, or directly implementing it into the PHP
 source. So the MP3 and OGG support shouldn't bee too hard to
 implement, but other file formats might be harder. And now I'm only
 talking about Audio, my first idea was to implement Video
 (Audio+Video). Video is even more advanced, then we should work with
 DivX and XviD codecs. (Thank god, they are Open Source). But having
 this support for video, it would be possible to easily create a site
 like youtube, where they even have a screenshot of the movie, which
 is actually just a frame in the middle of the file. And of course it
 would be possible to resize the video files.

I don't think anybody sane is doing audio encoding and video resizing in PHP.
PHP is about interface, clients are not going to wait an hour or two for a page 
to load.


Like i said, video resizing might be useful for sites like youtube.
And what i'm trying to do with audio is more extending the limits of
PHP. Ever wanted to become a web DJ?


There is a bunch of mature opensource utilities (transcoder, lame, oggenc etc.) 
and you
can always use them to convert WAV to MP3 and AVI to OGG, it's just a matter of 
implementation.

What about WMA? do you know a library/encoder dat does convert from/to WMA?



That said, I would be glad to see a PECL extension able to read video files and 
grab screenshots
(that seems to be quite common requirement).
The ffmpeg extension is GPLed, which is a no-no for PECL.


Well, video files are just a set of frames, so if a PECL extension is
able to read video files, they already need to be decoded, and so, all
work is done already, it shoudl be very easy to also create other
formats then.



Re sound files, we already do have something: 
http://cvs.php.net/viewvc.cgi/pecl/sndfile/
It just wasn't released.


Ah, never checked the CVS for items. I will take a look at this PECL
extension, and see what's done already :)

Tijnema


--
Wbr,
Antony Dovgal



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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Antony Dovgal

On 03/21/2007 12:08 PM, Tijnema ! wrote:

Like i said, video resizing might be useful for sites like youtube.


I'm sure they don't do it each time the video is viewed.


And what i'm trying to do with audio is more extending the limits of
PHP. Ever wanted to become a web DJ?


Nope.


There is a bunch of mature opensource utilities (transcoder, lame, oggenc etc.) 
and you
can always use them to convert WAV to MP3 and AVI to OGG, it's just a matter of 
implementation.

What about WMA? do you know a library/encoder dat does convert from/to WMA?


That windows-only format? I've never seen anybody using it.


Well, video files are just a set of frames, so if a PECL extension is
able to read video files, they already need to be decoded, and so, all
work is done already, it shoudl be very easy to also create other
formats then.


Are you really going to create videos on the fly?

--
Wbr, 
Antony Dovgal


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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Tijnema !

On 3/21/07, Antony Dovgal [EMAIL PROTECTED] wrote:

On 03/21/2007 12:08 PM, Tijnema ! wrote:
 Like i said, video resizing might be useful for sites like youtube.

I'm sure they don't do it each time the video is viewed.


Nope, they do it when uploading the video.



 And what i'm trying to do with audio is more extending the limits of
 PHP. Ever wanted to become a web DJ?

Nope.

Some others might ;)
and there are of course a lot of ohter possibilities of usage.



 There is a bunch of mature opensource utilities (transcoder, lame, oggenc 
etc.) and you
 can always use them to convert WAV to MP3 and AVI to OGG, it's just a matter 
of implementation.
 What about WMA? do you know a library/encoder dat does convert from/to WMA?

That windows-only format? I've never seen anybody using it.

Well, i got huge music collection out here, just checking my main dir
with 3104 songs, it says 2674 MP3, 320 WMA and 110 other file formats.


 Well, video files are just a set of frames, so if a PECL extension is
 able to read video files, they already need to be decoded, and so, all
 work is done already, it shoudl be very easy to also create other
 formats then.

Are you really going to create videos on the fly?

Yeah why not? what about setting up a stream? Having an movie showed
at your homepage where you create that videos from your admin panel :)

Tijnema


--
Wbr,
Antony Dovgal



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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Antony Dovgal

On 03/21/2007 12:26 PM, Tijnema ! wrote:

That windows-only format? I've never seen anybody using it.

Well, i got huge music collection out here, just checking my main dir
with 3104 songs, it says 2674 MP3, 320 WMA and 110 other file formats.


 Well, video files are just a set of frames, so if a PECL extension is
 able to read video files, they already need to be decoded, and so, all
 work is done already, it shoudl be very easy to also create other
 formats then.

Are you really going to create videos on the fly?

Yeah why not? what about setting up a stream? Having an movie showed
at your homepage where you create that videos from your admin panel :)


Well, imagine your homepage became very popular and you have say 100 clients 
grabbing the video (created on the fly).
I'm afraid you'll have to buy a Cray cluster to handle that.

--
Wbr, 
Antony Dovgal


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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Lukas Kahwe Smith

Robin Ericsson wrote:

On 3/21/07, Bankó Ádám [EMAIL PROTECTED] wrote:

The project is existing, I'm doing it for about a year and a half, and
SoC is way I can spend more time on it in the summer.


If there is someone willing to something, and someone else is paying
for it, let him do it. Why should it bother whether it's C or PHP? The
community will benefit from it either way.


Its a question of maintainability. Stuff like reverse engineering 
schema's from a database is simply not sensible to be done by C code. It 
requires a low barrier to entry, the ability to quickly fix things if 
you encounter a newer or very old obscure RDBMS version etc.


regards,
Lukas

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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Bankó Ádám
 I believe that PHP should have a bundled feature that can even support
 OO approach for OO enthusiasts (like me) and also Structural. If not
 bundled, support the project like Smarty, something like
 http://orm.php.net
 ...
 I have to say that your idea is good enough to even be out of Google
 SoC. This could be a separate project, and should already exist for
 years. If the only needed starting point is SoC, that's ok. But you
 have to understand that this project should already exist in PHP land.
 Java already has a lot of ORM tools, and Hibernate is the most known.
 PHP should have a similar thing.

I like the idea of the bundled ORM support, I think it's getting so
common, that bundling it with PHP makes sense. However, in the C vs. PHP
question I agree with Jacob Santos, I think PHP land implementations are
good, but if we create a common API, it should be written in C. Why is
PDO implemented as a native extension?

The project is existing, I'm doing it for about a year and a half, and
SoC is way I can spend more time on it in the summer.

 I am not part of Core Team, but I'll deliver my proposal to everyone here.
 If we group ORM authors, generate a draft and implement it, I think we
 can reach a commom sense. As I already mentioned, this is out of SoC
 scope.
I don't see why any open source project should be out of SoC scope. It's
only a way for students to work on OS project in the summer instead of
flipping burgers in McDonald's.

 
 Please, do not ignore the idea. An answer that this does not belong to
 PHP land is going against your own principles, since you're trying to
 bring PHP more OO.

Yes, I like OO, and want create good object-oriented API, but I don't
see why can't that be achieved with a native extension. Maybe you are
thinking that C is not an OO language, so I can't build nicely object
oriented software with it? If you look at a source you can see that OO
and C can live together nicely.
http://sourceforge.net/project/showfiles.php?group_id=183889


 I am opened to start a dialog about this subject.
 If you want to add me to your MSN/GTalk/Yahoo!/Skype:
 MSN: [EMAIL PROTECTED]
 GTalk/Yahoo!/Skype: guilhermeblanco

I've added you to my contact list, but I think the main discussion
belongs to this list.

Adam

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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Robin Ericsson

On 3/21/07, Bankó Ádám [EMAIL PROTECTED] wrote:

The project is existing, I'm doing it for about a year and a half, and
SoC is way I can spend more time on it in the summer.


If there is someone willing to something, and someone else is paying
for it, let him do it. Why should it bother whether it's C or PHP? The
community will benefit from it either way.

--
   regards,
   Robin

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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Vlad Bosinceanu
You're talking about massive processing tasks here, which aren't really 
suited for PHP. The problem isn't just with clients waiting for a script 
to finish executing, but also with hammering the webservers. There's 
only so many MaxClients a webserver allows. It may be useful for CLI 
apps, but keep in mind that you're talking about highly complex and 
specialized tasks, and interfacing them from PHP can only be as complex, 
so what's the gain really when you can execute external programs?


Extracting movie snaps is interesting but it also could be resource 
intensive. You'd need to decode to raw video, then grab the frame (a 
frame at a random position isn't always complete in compressed video, 
thus the need for decoding). I have no thorough video knowledge, but 
this is what I ended up doing when I needed this and similar 
functionality (movie snaps and 10 second previews). Got the job done 
with mplayer and mencoder.


Resizing videos for online use isn't just *that*. You'd probably want to 
encode (to flv, or whatever you're using) the video and fiddle with 
different video aspects/properties while at that. You'd also need to 
reencode the audio part. So you'd need to expose a very complicated API 
- provided you find a library suited for all this.


I'd say leave this to specialized projects.

V

Tijnema ! wrote:

On 3/21/07, Antony Dovgal [EMAIL PROTECTED] wrote:

On 03/21/2007 12:08 PM, Tijnema ! wrote:
 Like i said, video resizing might be useful for sites like youtube.

I'm sure they don't do it each time the video is viewed.


Nope, they do it when uploading the video.



 And what i'm trying to do with audio is more extending the limits of
 PHP. Ever wanted to become a web DJ?

Nope.

Some others might ;)
and there are of course a lot of ohter possibilities of usage.



 There is a bunch of mature opensource utilities (transcoder, lame, 
oggenc etc.) and you
 can always use them to convert WAV to MP3 and AVI to OGG, it's 
just a matter of implementation.
 What about WMA? do you know a library/encoder dat does convert 
from/to WMA?


That windows-only format? I've never seen anybody using it.

Well, i got huge music collection out here, just checking my main dir
with 3104 songs, it says 2674 MP3, 320 WMA and 110 other file formats.


 Well, video files are just a set of frames, so if a PECL extension is
 able to read video files, they already need to be decoded, and so, all
 work is done already, it shoudl be very easy to also create other
 formats then.

Are you really going to create videos on the fly?

Yeah why not? what about setting up a stream? Having an movie showed
at your homepage where you create that videos from your admin panel :)

Tijnema


--
Wbr,
Antony Dovgal





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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Antony Dovgal

On 03/21/2007 03:48 PM, Robert Cummings wrote:

On Wed, 2007-03-21 at 11:57 +0300, Antony Dovgal wrote:


I don't think anybody sane is doing audio encoding and video resizing in PHP.
PHP is about interface, clients are not going to wait an hour or two for a page 
to load.


I think this is a limitation in your grasp of where and why PHP is being
used. I (and many others I've seen pass through php-general -- and
countless others I'm sure) use PHP as a general purpose scripting engine
for not just the web, but for shell scripts, and anything else that
comes to mind. 


I'm using PHP as a general purpose language either, but that doesn't mean I'm 
encoding video with it.
There are specialized tools for that and I don't think we should re-implement them just 
because we can (c).

Btw, if you read whole discussion (and not just the last email), you'd see that 
nobody even mentioned CLI.


I'm sure the PHP-GTK and other GUI binding extensions would argue with you also.


--
Wbr, 
Antony Dovgal


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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Richard Quadling

I agree. Because I can use 1 language to deal with web/cli/gui, I can
create classes which can be used in all 3 environments (though I'm not
GUI-ing at the moment). And from that single code base I can fix
multiple applications instantly without the need to recompile hundreds
of programs and libraries. I can potentially enhance all the
applications by adding new functionality. All sorts of good things.

Being interpreted and having multiple modes of operation is a
fantastic thing. I no longer write C/Delphi/BAT/sh scripts. I write
PHP classes and use them wherever I want/need. Testing via a CLI is a
lot easier sometimes than via a browser.

Though, I probably WOULDN'T to video encoding using userland PHP,
being able to do some things in userland PHP via an extension to a
library would be excellent.

The JEDI project for Delphi comes to mind
(http://www.delphi-jedi.org/). In its simplest form, the results of
the JEDI project is to allow Delphi to interact with any library.
Normally libraries have .h header files. But Delphi doesn't so the
JEDI project is a massive repository of code to allow you to interact
with these libraries.

JEDI extends the capabilities of Delphi considerably. And I doubt
everyone uses every new piece of functionality.

As a GSoC project idea, how about a mechanism to allow OS interaction
OUTSIDE of a PHP extension? I'm on windows, so that's what I know, but
not all things can be accessed from within PHP. But if there was a way
to bind to a particular library (like you would do in compilable
languages), then this could open PHP to a LOT more libraries a LOT
quicker and without the need to understand ALL the intricacies of
PHP's internals. Maybe.


On 21/03/07, Robert Cummings [EMAIL PROTECTED] wrote:

On Wed, 2007-03-21 at 11:57 +0300, Antony Dovgal wrote:

 I don't think anybody sane is doing audio encoding and video resizing in PHP.
 PHP is about interface, clients are not going to wait an hour or two for a 
page to load.

I think this is a limitation in your grasp of where and why PHP is being
used. I (and many others I've seen pass through php-general -- and
countless others I'm sure) use PHP as a general purpose scripting engine
for not just the web, but for shell scripts, and anything else that
comes to mind. I'm sure the PHP-GTK and other GUI binding extensions
would argue with you also.

Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'


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





--
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!

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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Robert Cummings
On Wed, 2007-03-21 at 16:09 +0300, Antony Dovgal wrote:
 On 03/21/2007 03:48 PM, Robert Cummings wrote:
  On Wed, 2007-03-21 at 11:57 +0300, Antony Dovgal wrote:
 
  I don't think anybody sane is doing audio encoding and video resizing in 
  PHP.
  PHP is about interface, clients are not going to wait an hour or two for a 
  page to load.
  
  I think this is a limitation in your grasp of where and why PHP is being
  used. I (and many others I've seen pass through php-general -- and
  countless others I'm sure) use PHP as a general purpose scripting engine
  for not just the web, but for shell scripts, and anything else that
  comes to mind. 
 
 I'm using PHP as a general purpose language either, but that doesn't mean I'm 
 encoding video with it.
 There are specialized tools for that and I don't think we should re-implement 
 them just because we can (c).

It's common in PHP to take specialized tools and create a PHP wrapper
layer. I would never suggest re-implementation when a great lib already
exists.

 Btw, if you read whole discussion (and not just the last email), you'd see 
 that nobody even mentioned CLI.

I did read the entire discussion... but that doesn't change the point of
the comment :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Lukas Kahwe Smith

Andrey Hristov wrote:

 Hi,
Lukas Kahwe Smith wrote:

Robin Ericsson wrote:

On 3/21/07, Bankó Ádám [EMAIL PROTECTED] wrote:

The project is existing, I'm doing it for about a year and a half, and
SoC is way I can spend more time on it in the summer.

If there is someone willing to something, and someone else is paying
for it, let him do it. Why should it bother whether it's C or PHP? The
community will benefit from it either way.

Its a question of maintainability. Stuff like reverse engineering
schema's from a database is simply not sensible to be done by C code. It
requires a low barrier to entry, the ability to quickly fix things if
you encounter a newer or very old obscure RDBMS version etc.


Then make a mix of PHP and C code. C call call PHP userland, so it
shouldn't be a problem. And as I see it, it is always good to have
reference implementation in PHP and port it to C. I think Marcus did it
while implementing SPL.


Yes .. so for the proposal .. step 1) would be defining interfaces and 
abstract classes to represent things. this could go into C


regards,
Lukas

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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Antony Dovgal

On 03/21/2007 04:15 PM, Richard Quadling wrote:

I agree. Because I can use 1 language to deal with web/cli/gui, I can
create classes which can be used in all 3 environments (though I'm not
GUI-ing at the moment). And from that single code base I can fix
multiple applications instantly without the need to recompile hundreds
of programs and libraries. I can potentially enhance all the
applications by adding new functionality. All sorts of good things.

Being interpreted and having multiple modes of operation is a
fantastic thing. I no longer write C/Delphi/BAT/sh scripts. I write
PHP classes and use them wherever I want/need. Testing via a CLI is a
lot easier sometimes than via a browser.

Though, I probably WOULDN'T to video encoding using userland PHP,
being able to do some things in userland PHP via an extension to a
library would be excellent.

The JEDI project for Delphi comes to mind
(http://www.delphi-jedi.org/). In its simplest form, the results of
the JEDI project is to allow Delphi to interact with any library.
Normally libraries have .h header files. But Delphi doesn't so the
JEDI project is a massive repository of code to allow you to interact
with these libraries.

JEDI extends the capabilities of Delphi considerably. And I doubt
everyone uses every new piece of functionality.

As a GSoC project idea, how about a mechanism to allow OS interaction
OUTSIDE of a PHP extension? I'm on windows, so that's what I know, but
not all things can be accessed from within PHP. But if there was a way
to bind to a particular library (like you would do in compilable
languages), then this could open PHP to a LOT more libraries a LOT
quicker and without the need to understand ALL the intricacies of
PHP's internals. Maybe.


You mean something like this?
http://pecl.php.net/package/ffi

--
Wbr, 
Antony Dovgal


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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Robert Cummings
On Wed, 2007-03-21 at 11:57 +0300, Antony Dovgal wrote:

 I don't think anybody sane is doing audio encoding and video resizing in PHP.
 PHP is about interface, clients are not going to wait an hour or two for a 
 page to load.

I think this is a limitation in your grasp of where and why PHP is being
used. I (and many others I've seen pass through php-general -- and
countless others I'm sure) use PHP as a general purpose scripting engine
for not just the web, but for shell scripts, and anything else that
comes to mind. I'm sure the PHP-GTK and other GUI binding extensions
would argue with you also.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'


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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Andrey Hristov
 Hi,
Lukas Kahwe Smith wrote:
 Robin Ericsson wrote:
 On 3/21/07, Bankó Ádám [EMAIL PROTECTED] wrote:
 The project is existing, I'm doing it for about a year and a half, and
 SoC is way I can spend more time on it in the summer.

 If there is someone willing to something, and someone else is paying
 for it, let him do it. Why should it bother whether it's C or PHP? The
 community will benefit from it either way.
 
 Its a question of maintainability. Stuff like reverse engineering
 schema's from a database is simply not sensible to be done by C code. It
 requires a low barrier to entry, the ability to quickly fix things if
 you encounter a newer or very old obscure RDBMS version etc.

Then make a mix of PHP and C code. C call call PHP userland, so it
shouldn't be a problem. And as I see it, it is always good to have
reference implementation in PHP and port it to C. I think Marcus did it
while implementing SPL.

 regards,
 Lukas
 

Ciao,
Andrey

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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Andrey Hristov
 Hi,
Bankó Ádám wrote:
 Then make a mix of PHP and C code. C call call PHP userland, so it
 shouldn't be a problem.
 
 I don't want to write a full ORM, only a common base, that others can
 extend .. for example with INI/XML file configuration, schema auto
 discovery etc.
 
 And as I see it, it is always good to have a reference implementation 
 in PHP and port it to C. I think Marcus did it while implementing SPL.
 
 If I'd be doing it Top-down, that clearly would be a good idea. But I'm
 doing it with a iterative, XP like method.

you can do the same with XP too. As in PHP so in C you will have to
establish a common ground on which the further development will stand
on. Then part by part implement in PHP and port to C. Having tests will
help a lot.

 First I do simple implementations for parts, and then I extend it to
 support more features. For example on the first run, the system was
 monolithic, now it has database drivers, database types and high-level
 types implemented as sub-modules (mostly as polymorphic classes).
 
 This is not the most effective approach, but it produces working code
 early.
 
 Adam
 
 

Andrey

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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Bankó Ádám
 you can do the same with XP too. As in PHP so in C you will have to
 establish a common ground on which the further development will stand
 on. Then part by part implement in PHP and port to C. Having tests will
 help a lot.

Maybe you are right, but I don't like the idea of doing everything
twice. Once for the PHP and once for the C version. I think for me this
would more disadvantages then advantages.

Adam

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



Re: [PHP-DEV] GSoC

2007-03-21 Thread Tijnema !

On 3/21/07, Antony Dovgal [EMAIL PROTECTED] wrote:

On 03/21/2007 03:48 PM, Robert Cummings wrote:
 On Wed, 2007-03-21 at 11:57 +0300, Antony Dovgal wrote:

 I don't think anybody sane is doing audio encoding and video resizing in PHP.
 PHP is about interface, clients are not going to wait an hour or two for a 
page to load.

 I think this is a limitation in your grasp of where and why PHP is being
 used. I (and many others I've seen pass through php-general -- and
 countless others I'm sure) use PHP as a general purpose scripting engine
 for not just the web, but for shell scripts, and anything else that
 comes to mind.

I'm using PHP as a general purpose language either, but that doesn't mean I'm 
encoding video with it.
There are specialized tools for that and I don't think we should re-implement them just 
because we can (c).

Btw, if you read whole discussion (and not just the last email), you'd see that 
nobody even mentioned CLI.

 I'm sure the PHP-GTK and other GUI binding extensions would argue with you 
also.

--
Wbr,
Antony Dovgal


Well, what I'm doing nowadays is using PHP for more then only creating
websites. As at this point a large amount of people is on broadband
and not caring about a big site. Also the server's are getting faster,
of course it still requires a good server to handle a lot of video
encoding/decoding tasks, but this could also be done with 1 at a time,
setting the others in wait list stored in a database for example. I
never care about speed, I want things be done easily. and that's one
of the biggest reasons i'm using PHP for about everything. if you
compare PHP with C/C++ then is PHP a lot simpler, for example PHP
variables are just defined when using them for the first time. And
then you don't need to define what it exactly is, is it an array?,
integer?, string? and just a little bit later i changed my mind and
use the same variable as something else. If a real PHP Compiler
existed I think I would even write programs in PHP. I'm just trying to
extend the limits of PHP what it is now. Currently it supports already
a lot of things, from databases to XML parsing :)
And of course the portability of PHP is very nice. Most scripts run on
browser and CLI, windows and linux.
But not everyone is using PHP like me, and that's why I'm talking here
with you guys about my ideas. And so if there's enough interest we
could start a new project. But it seems like that there's not enough
interest for this project.
I also noted a PHP Compiler, I saw some tools on the net about this,
but found that it was only for creating windows applications, anyone
saw a PHP compiler for linux?

Regards,

Tijnema


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




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



[PHP-DEV] Re: google SoC - dbobj

2007-03-21 Thread Bankó Ádám
Hi!

I've created a draft of what would be the Abstract of my application.

Please review it, if I'm mistaken in something or left out an important
point. This will be the public part of the application. There will be a
more detailed description, but it will be visible only to mentors.

BEGIN

Creating a native object persistence module for PHP

Object persistence is a form of Object-Relational Mapping, a technology
that has recently became very important for complex web applications.
For the PHP developer, ORM means a layer that abstracts the complexity
of the relational database, and presents a nicer, object-oriented
interface. So it simplifies data access.

There are many different implementations, most are written in PHP. I'm
proposing a native (compiled from c) extension that would only support
some basic features, but can be extended (with PHP) to have complex,
high-level features (like database schema auto-discovery).

The overall goal is to have an extension bundled with PHP, that could be
a common base for full ORM solutions. If the currently very diverse ORM
implementations would have a common base, it would ease the learning of
different implementations, and enable ORM developers to concentrate on
high-level features. Using ORM solutions based on a native module would
also mean a smaller overhead compared to pure-PHP implementations.

The project (in it's current form) is about 70% ready, and during the
summer my plan is to make it about 90% complete.
The most important goals for the summer are:
- Implementing a database driver module that uses PDO, so all PDO
supported databases will be supported.
- Implementing exception-based error handling.
- Rewriting the outer interface to what the community finds the best.
- Some testing, finding and eliminating bugs.

So the extension will be mostly usable. However it won't be complete. It
will still lack:
- A good documentation,
- a full code review to eliminate possible security holes,
- support for safe_mode and for cases where non-controlled PHP code is
used (for example web hosting).

For the current status of the project and more information consult the
project's wiki at http://dbobj.sourceforge.net/ .

END


Adam

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



[PHP-DEV] Re: google SoC - dbobj

2007-03-21 Thread Bankó Ádám
Hi!

I've created a draft of what would be the Abstract of my application.

Please review it, if I'm mistaken in something or left out an important
point. This will be the public part of the application. There will be a
more detailed description, but it will be visible only to mentors.

BEGIN

Creating a native object persistence module for PHP

Object persistence is a form of Object-Relational Mapping, a technology
that has recently became very important for complex web applications.
For the PHP developer, ORM means a layer that abstracts the complexity
of the relational database, and presents a nicer, object-oriented
interface. So it simplifies data access.

There are many different implementations, most are written in PHP. I'm
proposing a native (compiled from c) extension that would only support
some basic features, but can be extended (with PHP) to have complex,
high-level features (like database schema auto-discovery).

The overall goal is to have an extension bundled with PHP, that could be
a common base for full ORM solutions. If the currently very diverse ORM
implementations would have a common base, it would ease the learning of
different implementations, and enable ORM developers to concentrate on
high-level features. Using ORM solutions based on a native module would
also mean a smaller overhead compared to pure-PHP implementations.

The project (in it's current form) is about 70% ready, and during the
summer my plan is to make it about 90% complete.
The most important goals for the summer are:
- Implementing a database driver module that uses PDO, so all PDO
supported databases will be supported.
- Implementing exception-based error handling.
- Rewriting the outer interface to what the community finds the best.
- Some testing, finding and eliminating bugs.

So the extension will be mostly usable. However it won't be complete. It
will still lack:
- A good documentation,
- a full code review to eliminate possible security holes,
- support for safe_mode and for cases where non-controlled PHP code is
used (for example web hosting).

For the current status of the project and more information consult the
project's wiki at http://dbobj.sourceforge.net/ .

END


Adam

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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Jacob Santos
Developing the extension like SPL would allow for very quick development and 
maintainability for the extension. It is extremely easy to have interfaces, 
exceptions, and in some cases abstract classes written in C and easily updated 
when changes, if any, are made.


I was able to translate a great portion of one project library to a PHP 
extension over a short time period of three days (of course I had the Extending 
PHP book, PDO, and SPL as references... and luckily I didn't need to work with 
any of the C Standard Library).


The way the current project is handled is extremely good. It shouldn't be 
difficult to isolate where the changes need to be made and make them.


As for maintainability, if there are enough programmers, then it shouldn't be a 
hassle to maintain the extension. There are quite a number of features that 
should be implemented in C, even if they are extremely difficult, because it 
would take too long to process in PHP.


I think the ORM C PHP extension will be quicker than anything in PHP. It doesn't 
have to handle everything, just the most common ORM features and allow 
extending. Just need to decide what features that is and what features the 
project already has.


I do think it would be easier to come up with a standard for the project, if 
perhaps Banko didn't spend a whole year and a half on it. I do hope that the 
mailing list sorts out which features should be in the PHP extension to allow 
for interoperability between the ORM PHP libraries. It would probably take 
another year, but it would be nice if it was bundled in a later version of PHP 
5.x and PHP 6.


Jacob Santos

Lukas Kahwe Smith wrote:

Andrey Hristov wrote:

 Hi,
Lukas Kahwe Smith wrote:

Robin Ericsson wrote:

On 3/21/07, Bankó Ádám [EMAIL PROTECTED] wrote:

The project is existing, I'm doing it for about a year and a half, and
SoC is way I can spend more time on it in the summer.

If there is someone willing to something, and someone else is paying
for it, let him do it. Why should it bother whether it's C or PHP? The
community will benefit from it either way.

Its a question of maintainability. Stuff like reverse engineering
schema's from a database is simply not sensible to be done by C code. It
requires a low barrier to entry, the ability to quickly fix things if
you encounter a newer or very old obscure RDBMS version etc.


Then make a mix of PHP and C code. C call call PHP userland, so it
shouldn't be a problem. And as I see it, it is always good to have
reference implementation in PHP and port it to C. I think Marcus did it
while implementing SPL.


Yes .. so for the proposal .. step 1) would be defining interfaces and 
abstract classes to represent things. this could go into C


regards,
Lukas


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



Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-21 Thread Jacob Santos
So does this mean that the patch would be included even in its somewhat broken 
state? Just don't allow it in loops or warn when it is or access to outside 
scope variables.


I need to get VLD working on Windows to see what the fuss is all about. I 
thought everything is compiled to oplines, if that is so, then why not back up 
to the previous function space, keep the scope when you encounter an inside 
function, which should be assumed to be a closure.


If you compile and store the closure function in top level userspace, then it 
should be able to be accessed at runtime.


function test()
{

   $f = function () { return 0; }

   return $f;

}

$closure = test();

$closure();

Err, Pseudo-oplines, but since I don't exactly know anything about PHP opcodes, 
I'm just pulling this stuff out of my ass.


CREATE_FUNCTION test

CREATE_FUNCTION zend_anon_0

RET_VAL 0

END_FUNCTION

END_FUNCTION

CALL 'test'

ASSIGN $0, $valuefunction

(I have to admit that I'm not that far in Assembler for procedures (yes, I'm a 
kook, but I can change baby, just give me another chance) and I apologize, but 
thanks for reading this far!)


CALL $0

In which at run time the following can be replaced with:

CREATE_FUNCTION 'zend_anon_0'

RET_VAL 0

END_FUNCTION

CREATE_FUNCTION 'test'

RET_CLOSURE 'zend_anon_0'

END_FUNCTION

CALL 'test'

CALL 'zend_anon_0'

I do recall that parameters are passed somewhere. Eh. Aside from getting the 
Oplines, opcodes, as well as the instruction names wrong, and pretty much 
everything. What else is wrong with this?




But if that's the best that can be done with the resources available,
I think it would be a good compromise.

Especially as it leaves open the possiblity of someday nailing down a
complete clear definition of what the scoping rules turn out to be,
with room for experimentation in the meantime without violating BC.



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



Re: [PHP-DEV] google SoC - dbobj

2007-03-21 Thread Bankó Ádám
 I do think it would be easier to come up with a standard for the project, if 
 perhaps Banko didn't spend a whole year and a half on it. I do hope that the 
 mailing list sorts out which features should be in the PHP extension to allow 
 for interoperability between the ORM PHP libraries. It would probably take 
 another year, but it would be nice if it was bundled in a later version of 
 PHP 
 5.x and PHP 6.

Maybe true, it would be easier to create the standard from scratch. But
look at the good side. There's a current API that we can start talking
about. The current outer interface (what matters most for PHP
developers) is very flexible. And if the community can settle at a
standard API, I'm willing to implement it.

Please, everyone, have a look at one of the examples (dbobj.php or
forum.php in the source) and decide if the current API is a good
starting pont.

As for the SoC application, I'll try to write something not too specific
so the specification won't go against the community's future decisions.
I hope google will accept it this way...

Adam

 Lukas Kahwe Smith wrote:
  Andrey Hristov wrote:
   Hi,
  Lukas Kahwe Smith wrote:
  Robin Ericsson wrote:
  On 3/21/07, Bankó Ádám [EMAIL PROTECTED] wrote:
  The project is existing, I'm doing it for about a year and a half, and
  SoC is way I can spend more time on it in the summer.
  If there is someone willing to something, and someone else is paying
  for it, let him do it. Why should it bother whether it's C or PHP? The
  community will benefit from it either way.
  Its a question of maintainability. Stuff like reverse engineering
  schema's from a database is simply not sensible to be done by C code. It
  requires a low barrier to entry, the ability to quickly fix things if
  you encounter a newer or very old obscure RDBMS version etc.
 
  Then make a mix of PHP and C code. C call call PHP userland, so it
  shouldn't be a problem. And as I see it, it is always good to have
  reference implementation in PHP and port it to C. I think Marcus did it
  while implementing SPL.
  
  Yes .. so for the proposal .. step 1) would be defining interfaces and 
  abstract classes to represent things. this could go into C
  
  regards,
  Lukas
 

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



[PHP-DEV] php6CVS cannot be compiled

2007-03-21 Thread paul sohier
Trying to compile php6 with next configure line:

../configure \
--with-curl \
--enable-fastcgi \
--with-mysql \
--without-mysqli \
--with-mbstring \
--enable-force-cgi-redirect \
--with-xpm \
--with-jpeg \
--with-png \
--with-zlib \
--with-tiff \
--with-zip \
--with-gd \
--with-ttf \
--with-freetype=/usr/include/freetype2/freetype \
--enable-discard-path \
--enable-gd-native-ttf \
--enable-freetype

And I got the next compile error:

/bin/sh 
/root/php/cvs/php6/libtool --silent --preserve-dup-deps --mode=compile 
cc  -Iext/standard/ -I/root/php/cvs/php6/ext/standard/ -DPHP_ATOM_INC 
-I/root/php/cvs/php6/include 
 -I/root/php/cvs/php6/main -I/root/php/cvs/php6 -I/usr/include/libxml2 
-I/root/php/cvs/php6/pcrelib 
 -I/root/php/cvs/php6/ext/date/lib -I/usr/include/mysql 
-I/root/php/cvs/php6/TSRM 
 -I/root/php/cvs/php6/Zend-I/usr/include -g -O2  -c 
/root/php/cvs/php6/ext/standard/basic_functions.c -o 
ext/standard/basic_functions.lo
/root/php/cvs/php6/ext/standard/basic_functions.c:45:34: error: 
zend_language_parser.h: No such file or directory
make: *** [ext/standard/basic_functions.lo] Error 1

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



Re: [PHP-DEV] php6CVS cannot be compiled

2007-03-21 Thread Antony Dovgal

On 03/21/2007 07:30 PM, paul sohier wrote:
/root/php/cvs/php6/ext/standard/basic_functions.c:45:34: error: 
zend_language_parser.h: No such file or directory

make: *** [ext/standard/basic_functions.lo] Error 1


You need to install flex 2.5.4.

--
Wbr,
Antony Dovgal

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



Re: [PHP-DEV] PATCH: anonymous functions in PHP

2007-03-21 Thread Stanislav Malyshev
Err, Pseudo-oplines, but since I don't exactly know anything about PHP 
opcodes, I'm just pulling this stuff out of my ass.


CREATE_FUNCTION test

CREATE_FUNCTION zend_anon_0

RET_VAL 0

END_FUNCTION

END_FUNCTION

CALL 'test'

ASSIGN $0, $valuefunction


It looks like you misunderstand how the engine compiles functions. Each 
function has its own op array. Also, the code you brought is less 
interesting. More interesting is code such as:


function prefixer($p)
{
   $f = function ($name) { return $p. $name; }
   return $f;
}

$mr = prefixer(Mr);
$mrs = prefixer(Mrs);

echo $mr(Jones);
echo $mrs(Jones);

As you could have guessed, that should result in Mr. Jones and Mrs. 
Jones printed. Figuring out where the Mr. comes from when 
$mr(Jones) is called would help understand how closure works.

--
Stanislav Malyshev, Zend Products Engineer
[EMAIL PROTECTED]  http://www.zend.com/

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



Re: [PHP-DEV] Re: google SoC - dbobj

2007-03-21 Thread Alan Knowles

Sounds interesting.. - You may want to reference these on your docs:

http://pecl.php.net/package/DBDO
http://www.akbkhome.com/wiki.php/DBDO/index.html

http://www.akbkhome.com/svn/dbdo/
http://www.akbkhome.com/svn/dbdo_pdo/

While the project is pretty dead now, the API was pretty fully worked 
out by the time I gave up..


From my perspective the reality is that DB_DataObject works for every 
situation I've thrown at it, so the only motivation to fix it is 
external (occasional complaints about speed/overhead) rather than on a 
'need' basis...
I also got fed up digging through PHP's and PDO's macro hell... - If 
someone wanted to do a really cool SoC - creating a 
method/makefiles/base classes etc. of writing PHP extensions in D would 
make  a mindblowing toolkit... - I suspect something like dbobj/dbdo 
would be a few days work if that existed...


Anyway good luck.
Regards
Alan



Bankó Ádám wrote:

Hi!

I've created a draft of what would be the Abstract of my application.

Please review it, if I'm mistaken in something or left out an important
point. This will be the public part of the application. There will be a
more detailed description, but it will be visible only to mentors.

.

For the current status of the project and more information consult the
project's wiki at http://dbobj.sourceforge.net/ .

END


Adam

  


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