Login   Register  
PHP Classes
elePHPant
Icontem

Will PHP 6 feature a JIT compiler? Lately in PHP podcast episode 30 - PHP Classes blog

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Will PHP 6 feature a ...   Post a comment Post a comment   See comments See comments (2)   Trackbacks (0)  
<< Previous: Becoming a PHP Master...>> Next: PHP Zeitgeist 2012 ev...

Author: Manuel Lemos

Posted on:

Categories: PHP Performance, Lately in PHP Podcast, PHP opinions

Now that Facebook made some progress with their PHP HipHop VM JIT compiler engine, some PHP core developers are considering having also a JIT compiler implementation of the official implementation based on LLVM, eventually in PHP 6.

That was one of the main topics discussed by Manuel Lemos and César Rodas in the episode 30 of the Lately in PHP podcast.

They also commented on the first alpha release of PHP 5.5.0, proposals for having pure interfaces in the PHP core, the Facebook PHP JIT compiler enhancements, and the new system of levels and missions of the PHPClasses and JSClasses sites.

Listen the podcast, or watch the podcast video, or read the transcript to learn about these and interesting discussion of PHP matters.





Contents

Listen or download the podcast, RSS feed and subscribe in iTunes

Watch the podcast video, subscribe to the podcast YouTube channel

Read the podcast transcript


Click on the Play button to listen now.


Download Size: 28MB Listeners: 3002

Introduction music Harbour used with explicit permission from the author Danilo Ercole, from Curitiba, Brazil

View Podcast in iTunes

RSS 2.0 feed compliant with iTunes:

http://www.phpclasses.org/blog/category/podcast/post/latest.rss

In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.

Watch the podcast video

Note that the timestamps below in the transcript may not match the same positions in the video because they were based on the audio timestamps and the audio was compacted to truncate silence periods.

See the Lately in PHP podcast play list on YouTube and Subscribe to this channel there.

Show notes

Introduction (0:21)

The first PHP 5.5.0 alpha version release (1:20)

The Logger Interface Proposal (7:55)

Facebook HipHop JIT compiler versus the Official PHP JIT compiler (16:02)

The new system of missions and levels of the PHPClasses site (29:56)

Latest JavaScript Objects published on the JSClasses site (41:53)

PHP Programming Innovation Award winners of September 2012 (51:09)

Conclusion (58:32)

Introduction (0:21)

[Music]

Manuel Lemos: Hello. Welcome to the Lately in PHP podcast. This is episode number 30 and this time I have here with me, Cesar Rodas, a long time contributor of the PHP Classes site.

Hello, Cesar. How are you doing?

Cesar Rodas: Hello. I'm doing fine.

Manuel Lemos: Yeah, well, I assume you are talking from Paraguay, your home country, right?

Cesar Rodas: Yes, indeed.

Manuel Lemos: Well, this time I invited you here, actually you are sort of filling in for Ernani Joppert. Once again, he was not able to join the podcast because he's moving to a new house and he didn't get internet connection in the new house yet. So I'm sure you'll be able to fill in and comment  on many interesting PHP topics that we have this month to talk about.

The first PHP 5.5.0 alpha version release (1:20)

Manuel Lemos: And from all the topics, I think we can start from the recent announcement of the first PHP 5.5 Alpha version.

Actually, I wanted to share a screen here about the announcement made by... Well, let me... Well, this is the right message. I'm not sure if the... Is it large enough for you to read?

Cesar Rodas: Yes, I can read it fine.

Manuel Lemos: Yeah, I can always increase the font. Well, never mind.

This is when a message in the PHP Internals list on which they are announcing... I think it's David Soria Parra that is announcing this new version, this new Alpha release. But from what I understood, the maintainer of the new version will be Julien, a new maintainer. David used to be one of the maintainers of the 5.4 version.

Well, anyway, this is just the initial alpha version. It's still a bit early to be ready for a final release. I think there is nothing really new in this alpha release in  comparison with the previous announcements of features that were being introduced.

Anyway, Cesar, did you try this version of this PHP 5.5 Alpha version?

Cesar Rodas: Yes, I did the usual thing which is to fetch it, to compile it and to test it. And beside that, I've tested it with a couple of projects that I have. It seems to run fast, like much faster than the 5.2 and 5.3.

Manuel Lemos: Yeah.

Cesar Rodas: At least, a little bit faster and there is a new feature which is the generators, which basically is a new way for writing iterators using the keyword yield, which I saw in other programming languages like in Python that it is heavily used to simulate the asynchronous I/O because it works like co-routines, you can do co-routines at given point and then resume it back. I played just a little with it. I like it so far. It's useful.

Manuel Lemos: All right, yes. Well, we actually have talked a bit about it.  Although, I think, for the majority of the users of PHP, it's still a bit confusing thing to understand, how it works.

But as you said, I think, it's probably inspired by the implementations of other languages, as you mentioned like Python.

Would you have any use case for that feature that sort of gets you excited about this being introduced now in PHP 5.5?

Cesar Rodas: I don't have a real need. I mean, I've been living with it for ... I'm programming in PHP for more than ten years now. So I don't need it now, but it is cool and I might find something where to use it.

But to simulate threads and things like that, it could be useful. I didn't see the full picture yet, but as far as I play with it, it was a little bit confusing in the beginning because of the lack of documentation, I believe. It is because it is an Alpha release or development release, I'm not sure. But yes. Yes.

Manuel Lemos: Right. Well, I also got the similar impression that we have commented about it in the previous episodes as I mentioned.

Well,  looking at it, the RFC is not exactly clear how of the flow of the programs go when you use the generators and the yield keyword. But well, maybe it's just a matter of putting there good examples that show it in practice.

Well, other than that. One thing I want you to comment. You've mentioned the speed of the PHP 5.5 is faster than 5.2 and 5.3 but I don't think 5.5 has anything new that it increases the speed.

I supposed the speed comes from the enhancements introduced in 5.4, namely, something that we also mentioned, regarding the way class variables are accessed. There was an optimization that allowed accessing variables faster as long as you declare all variables in your classes.

Well, that's something that we commented in the previous podcast and anybody that is interested and was not aware about this can check the previous podcast. We are just going to move on...

Cesar Rodas: One last thing that...

Manuel Lemos: Yes.

Cesar Rodas:  ... I'd like to say. That probably it was a little bit faster because this 5.5 in my local environment was a clean compilation, like no extension. That's probably why it was a little bit faster. I'm just guessing here.

Manuel Lemos: Well, I don't know. Maybe it's something specific to your environment that could make it faster. But well, never mind, as I was saying, we are going to move on to the next topic.

The Logger Interface Proposal (7:55)

Manuel Lemos: One thing that I want you to comment and I would like to share on the screen another article. Let me put it right in the window. Basically, somebody suggested in the PHP Internals list to have implemented a logger interface. Let me open the right window.

OK, Florin Razvan Patan, I supposed he's developer or enthusiast of the Symfony framework and he actually comments about some discussions going on regarding some packages of the Symfony framework.

And after some discussion, they are suggesting to have a common interface defined for logging. And they are suggesting that interface be defined in the next PHP version, PHP 5.5.

Well, this was just a suggestion. It was not exactly something that was well received. We see reactions from several developers, some of which are core developers and for instance, Pierre-Alain Joye mentioned that they have already discussed this idea of having pure interfaces in PHP as standard. And as he mentioned, the idea was rejected in the past. He actually mentioned that it should be the role of the PSR Group.

For those not familiar with the meaning, PSR means PHP Standards. They joined several people, many of them developers of different frameworks to define a common standard for writing code in PHP, coding styles and other conventions.

And as Pierre was suggesting, that's probably better, more appropriate to have the PSR Group to define such thing as interfaces.

Cesar, did you look into this? What was your opinion about this topic, the whole idea of having stuff like this in the core or maybe outside the core as defining maybe as conventions by the Standards Group?

Cesar Rodas: I have strong opinions about these things and I believe they should be...

Manuel Lemos: Oh, really?

Cesar Rodas: They should be outside of the core. The core must be as thin as possible just having PHP and letting you  as a developer to do whatever you want, following any standard.

Manuel Lemos: Right.

Cesar Rodas: I try to follow most of these standards of the PSR 0, I believe, which defines the autoloader things. I find them useful. However, if another developer doesn't want to follow or if I don't follow in one project, it's not the end of the world.

Manuel Lemos: Right.

Cesar Rodas: So I believe in freedom, like those things are nice but trying to force everyone to follow one standard because that is more "enterprise", I don't think that's the right thing. 

Manuel Lemos: Right. Well, that's probably... that idea of having these conventions defined and imposed well after PHP's like 17 years old, and after all these years, only recently, these standards are attempted to be defined among the community. Probably a bit too late to define them and we already have discussed this topic about it.

Regarding your enterprise mentality comment, I think I agree. When somebody talks about enterprise, it reminds me a lot of Java and .NET. Well, basically. NET  is Microsoft Java, and so basically, everything is the same.

And we also commented in the past, the Java world tends to be more complicated, more bureaucratic and things that probably will take a lot less time to do end up taking sorts of an eternity.

Well, I don't know if in the case what is being suggested of this logger interface will make things more complicated. But I agree with Pierre and with the idea that we should avoid complicating the core of the PHP, and let the developers decide whatever standard they want to follow.

If they want to follow the PSR 0, 1, 2, whatever is the number of the standard that is being applied, that is fine. But if they don't,  I agree with you, it's totally not the end of the world. Not now, not in December 21, not probably in a very long time.

Cesar Rodas: Yeah.  

Manuel Lemos: But I don't have any problem with defining conventions as long as people are comfortable with adopting them. But imposing them, well, I'm sort of repeating myself.

Cesar Rodas: Yeah, if I may say something else. The enterprise thing might be fine in Java because it's a different world.

And even in Java, I've been working a little bit with Java in the last month, and the compiler is one thing. And then, you add a bunch of libraries but not you could choose. There is no one imposing, "You should use this and you should use that." And the most important thing that people don't seem to understand is that PHP is different because it was designed to run inside Apache which has a very short time of execution, like you...

Manuel Lemos: Right. 

Cesar Rodas: So it's completely different. You cannot add a million things to make it enterprise without paying the price in performance. That's my point.

Manuel Lemos: Yes, exactly. That's a good point. PHP requests do not live in application server well.

Cesar Rodas: Exactly.

Manuel Lemos: Usually. So a PHP script runs and after usually less than a few seconds. And there's no need to maybe apply certain things that make more sense in the way the Java world does using application servers and things like that.

Well, that's probably yet another topic that is not consensual and we would have a lot to talk about that. We would dedicate a whole show to it. Somehow, we already did in previous shows, talk about those things, defining standards and adopting standards of the other languages, namely, Java.

Well, I'm sure that's not a consensual topic and there's not much point in insisting on it.

Facebook HipHop JIT compiler versus the Official PHP JIT compiler (16:02)

Manuel Lemos: So we are going to move on to another topic. This time, about commenting about an important release of the Facebook HipHop Compiler Virtual Machine.

There is an article that was just posted a few days ago. The article talks about some of the important developments that may improve the performance of the code, generated by the JIT compiler.

For those not familiar what is a JIT compiler, JIT means Just In Time. Which means that when a portion of PHP code is being executed at runtime, it dynamically translate it to assembly code, machine code that runs on the HipHop Virtual Machine.

And this is a sort of a pivot from the previous approach that Hiphop PHP compiler had that was used to be a PHP to C++ compiler. This new approach is no longer the PHP to C++ compiler. It's a virtual machine that runs on sort of low level code that it's compiled dynamically. It's different from the way the current PHP version, base on Zend engine works that basically first translate the PHP code into a Zend OP codes and then executes it.

And this HipHop VM compiler has been maturing and the important developments were implemented and they show here a graph on which they demonstrate that the performance of the dynamic translation based compilation is now matching, practically surpassing the compilation that they used to implement before. They call here it HHPC.

Well, this probably is very abstract to the majority of the people that are listening to this podcast because this is very low level stuff and probably some more mature developers will understand it. What matters here  in practice is that they are maturing their Just In Time compiler environment and this is interesting.

Cesar, have you tried any of the versions of the HipHop compiler?

Cesar Rodas: Yes. Actually, yes. I tried the first version that came out that was a translator, like your PHP code, your entire PHP code that was converted into a C++ project and then, compiled down into a server. I've tried that couple of days after it was out. I guess it was a year and a half ago or two years maybe.

Manuel Lemos: Yeah.

Cesar Rodas: Compiler was a horrible experience like you'd need to download three or four libraries, patch them yourself and then compile it into a custom path.

Then, this morning, I tried to give it a try to HHVM, it was the same experience. I tried to compile. It was not possible. Anyway,  for my special use case where in daily basis, I need either Redis or MongoDB, it wouldn't be used.

Manuel Lemos: Oh, yeah.

Cesar Rodas: Right, because...

Manuel Lemos: Yes, oh well. Basically, what they did is enough to suit their needs. The needs of Facebook. They don't use those extensions, they probably do not have support for them. Well, I don't know if they will have that support in the future. Because...

Cesar Rodas: Exactly.

Manuel Lemos: that is not their priority.

Cesar Rodas: Yeah. But if I could find some documentation that explains how to migrate extensions from Zend or from the standard PHP, I might give it a look because I have written some extensions in C and it wasn't  that difficult.

Manuel Lemos: No.

Cesar Rodas: It was, but not that difficult. But I don’t know.

Manuel Lemos: Yeah. Well, basically, I think that the documentation of this, I'm just not sure. But anyway, I think the main difference there is that the code must thread-safe because when you compile the code...

Cesar Rodas: The use of...

Manuel Lemos: Yeah. Well, it runs... It basically generated a multi-threaded Web server. And that Web server, the code though of the Web server needs to be thread-safe.  Well, this is a very low-level matter, I'm not going there. I think by the time that they announced it a  couple of years ago, we have covered it a bit.

Anyway, another thing that I want to bring up. It's that there was a discussion in the PHP Internals list regarding this. I'm going to share this screen here. There is a guy named Raymond Irving. He mentions that he has been reading about the HHVM and realized that the performance is getting great. And he was  wondering if the PHP core developers would be interested in using a similar implementation in the PHP core.

There are several reactions. For instance, one from Rasmus that basically said, "No, not likely." Meaning, they were not very inclined to adopt the HHVM code in PHP. Basically, I think it's more of the fact that it's a totally different approach and it would be like switching the whole code of the PHP core.

But he was thinking about LLVM based JIT approach when they... does not say when, but I think it just depends on whether there will be enough developers interested in implementing such thing in PHP. Because there is a great advantage on using the JIT  compilation, because the code will eventually run much faster.

That's at least my expectation. We also covered a bit about it in the past. There are also comments about it by Sarah Golemon. I'm trying to figure out what exactly was the message here.

Anyway, Cesar, you have also looked into this thread, right?  What were your impressions about the comments they have exchanged about this idea of having a JIT implementation in the PHP core? I mean, the official PHP implementation?

Cesar Rodas: Yes. The good thing is that Sarah Golemon, she mentioned something about it and as far as I could read it, it sounds like she might be even thinking about the possibility of implementing a Just In Time compilation for standard PHP, the Zend's PHP but as a plugin. That might be interesting even to play about it and if it performs well to why not merge it to the core base.

And basically, she explained in one those emails how she would do it. She says that it is difficult, but she is interested into doing that someday and soon. That's how I understood it. And it's great news.

Manuel Lemos: Yes, well, actually there's already an extension, which basically is the beginning, an eventual support of JIT compilation in the PECL Repository of Extensions. But it's very early material, maybe the eventual work on JIT compilation supporting PHP 6, maybe, could depart from that extension.

From what I understood it, if the JIT engine is enabled it would replace the execution of op codes done by the Zend engine as it happens today.

Well, this is not a trivial job because you need to know a lot about JIT compilation. But we had here in a previous episode Nuno Lopes and we talked about this stuff. Well, I don't know if this is something that we can expect for the near future.

Cesar, do you have any experience about this JIT compilation? Would it be something that maybe yourself that you ever worked with some low-level stuff in PHP right?

Cesar Rodas: Yes...

Manuel Lemos: You could be interested on something like this.

Cesar Rodas: I could be interested. However, it would require too much time and too much effort. I cannot afford it right now, but maybe in the future.

About the compilers, I've been reading a lot about it. I know that implementing a Just In Time compiler is not something trivial. You'll need to know a lot about CPUs in very low level. Like you need to know how the CPU works, like in the lowest level possible.

Manuel Lemos: Yeah.

Cesar Rodas: And it's something that very few people does. And often, those people, they have jobs and they have to pay bills. However, I've seen some PHP implementation over the Perl's Virtual Machine over the Parrot that aims to do something like that. I played a little bit with it but not much.

Manuel Lemos: Right. Well, using for instance LLVM which is the intended, let's say, JIT compilation approach to be adopted, it wouldn't have to work on such a lower level as the native CPU assembly language. It would be one level above and that would make things easier in case you need to adapt things to make them work on different CPUs.

But I agree with you, this is not a trivial matter and probably the people listening to this podcast are not even following everything that we are talking about because you need to have good knowledge about this low level stuff. And also as you said, it probably would require some people dedicated to it. Maybe some people from Zend could be interested on this idea, of course, being paid as developers at Zend. 

What I would like to conclude and tell about this topic is that, at least, Rasmus suggest there is some interest from people on the core in having it implemented. But he just did not say when, because probably, he's not expecting to work on that himself. He's expecting some core developer to do it, some other people with proper knowledge.

The new system of missions and levels of the PHPClasses site (29:56)

Manuel Lemos: Well, OK, I'm now moving on to next topic. We would usually talk about some classes nominated  to the Innovation Award. But first, I would like to comment a bit about a new feature implemented in PHP Classes site, which is basically a system of levels and missions that the authors and other types of users can engage and start accomplishing and moving on to different levels.

And the idea of this is not exactly to make it a game. But it's more like to make it more fun to participate in the site by engaging on missions, in which you learn how to participate in the site knowing aspects that are not very well-known by every author that has submitted work to the site.

I published an article, a blog post, to explain how this works in practice. And let me just screenshare it here.

Basically, there is a system of levels and missions. I call this sort of a quest to become a PHP Master. And these missions that the authors may engage, each of the missions have a briefing that tells them what they need to do. And as they accomplish the missions, they move on to different levels.

There is even a set of badges that you may earn as a symbol that you have accomplished a level that consists of several missions. And as I'm showing here on the screen, this is an example of a badge.

This is a large badge. It's quite nice. It shows the title of the level that you reached, also your name below. So these are personalized badges. And these are just symbols of the level that you have completed.

In the first levels there, all the missions are very simple. And the first one, actually, only has one mission which is to learn some rules. And you have to read the rules and when you read the rules, you'll complete the mission and the level and you move on. You earn a badge like this.

And this is a very simple badge. It is made of material here that is also very unsophisticated. In this case, this is wood. And as you move to the next level, you wear badges that are made of more prestigious materials.

Well, I would not like to disclose much more than this because I think it'd be more interesting for people that would like to join and engage in these missions to discover what you are up to or as you move on to next levels.

Anyway, as I mentioned, the first level missions are very simple but as you move on to the next levels, they start becoming more difficult. The first levels, you're just required to submit some packages, reach a small number of users that somehow demonstrate the popularity of your work.

But then, as you move on to missions that are more difficult like, for instance, being nominated to the Innovation Award, which means you have to submit packages that are innovative and often that is not as simple as any other package that you may have submitted.

Well, for those that are interested to learn more about this and are not yet aware of it can take a look at this article. There is even a video here that you can watch. A short video that gives an idea of all the details.

And also, it mentions about some plans for the future which are basically enhancements.  I'm not detailing much about them but this idea of PHP mastery, as I call it, it can be seen from different perspective. One is being a class author.

And there are other types of PHP Masters, people that may not submit classes but they demonstrate some knowledge and they can share that knowledge with other people.  Yeah, in the future, the site will recognize... provide means to recognize, the work or the contributions also done by those people that are not class authors.

Cesar, did you  try this new system of missions? What were your impressions and how did you like it?

Cesar Rodas: Yes, of course. I've tried the moment it went out. So far I have earned a couple of badges and prizes. I'm happy with it. And I like the whole idea of giving some sort of reward to people who contribute in a sense, even people who doesn't write classes or people who replies in the forums or any kind of help. That is a system that I was expecting for quite a long time and I'm really happy with it.

Manuel Lemos: Right. Yeah, right. Actually, I remember we've discussed this... when was it? It was probably 2008 or something, it was several years ago, to somehow have a sort of karma system...

Cesar Rodas: Exactly.

Manuel Lemos: ... on which the people will earn some privileges based on how far they've gone in the site. Well, that's somehow, the whole idea. That's not a trivial thing to implement and we have seen sites that tried to implement it and did not go very, very well. Others did very well, the sites became very popular.

But you also know for some sites, as I may remember, for instance, Digg. Digg  also have this system that people would vote on news articles. At a certain point there is even a ranking of people. Then, they took it out and that sort of... It's probably was the death of the project because Digg sort of became less popular after that. It sort of took out the motivation that used to be there.

Cesar Rodas: Exactly.

Manuel Lemos: Yeah, and...

Cesar Rodas: Exactly.

Manuel Lemos: And it was a shame, right?

Cesar Rodas: Yeah, also I believed that, that believe it or not, that'll even help you to get a better job eventually. When people know about this entire karma system, so I will be pleased to put it into my CV - at least a link. And I'm sure that people will appreciate like "This guy knows about that and here are the proofs."

Manuel Lemos: Yeah.

Cesar Rodas:  And this...

Manuel Lemos: That approach, I think it's StackOverflow that somehow does that. Well, the idea is not exactly to copy what StackOverflow does although  there'll probably be some overlap.

But for now, I would not like disclose much about this because between now and then, plans may change. But the idea is to provide several ways, several paths to mastery.

People can do different things. They can choose depending on their vocation, their skills and be recognized somehow for that. And as you mentioned, I think it's quite a good idea to provide something that they could use on their resumes and eventually get better jobs with it.

Cesar Rodas: Exactly.

Manuel Lemos: Actually, the Innovation Award, although this is not a very well... It's not an obvious thing, when you are nominated to the Innovation Award, which is something that existed in the site since 2004, you can earn, have access to special privileges that are granted to premium subscribers except that you get a lifetime premium subscription. And one of the privileges is exactly is early access to the jobs that are posted in the site.

So if you are qualified enough to be nominated to the Innovation Award, you'll be able to have an advantage over other people that were not nominated or did not buy the premium subscription that gets you faster access to the job. That's one other way to benefit you in your career.

But, well, I think the future is bright. And all these things take a lot of time, a lot of code to implement. But I think the site is on the right track.

Other than that, I also would like to mention that just now the version of this system of levels and missions implemented in PHPClasses is also being released in JSClasses site. And JS Classes site is a site that's still in early days, it's not so popular. But I'm sure this new system will give it a boost and people will start enjoying the site more. 

I don't know if it was a coincidence but just the fact that it was announced a week before this initiative of the levels and missions and the fact that it is going to open also on JSClasses, the JSClasses site had a boost in the number of contributions which is quite nice.

Latest JavaScript Objects published on the JSClasses site (41:53)

Manuel Lemos: And this is also a segue to the next section, on which we are going to comment on the latest classes, objects published on JSClasses.

Let me just screenshare some of the...

Cesar Rodas: Before I forget, I... On the previous topic, I don't know if I ever said this, but my last two previous jobs –not this one, but the two previous jobs– I got thanks to the PHP Classes.

Manuel Lemos: Oh, yeah.

Cesar Rodas: Actually, I could some... The first job, they found me through the web site and they contacted me. And the second one, they hired me because I have earned a couple of nominations.

Manuel Lemos: Right.

Cesar Rodas: Believe it or not, I believe that this system, this karma system, as I used to call it, this will just make developers' lives better by helping them, at least, lead up to get better jobs. I can't complain about it.

Manuel Lemos: Right. That's true because it's a sort of way that makes it more obvious that you are qualified and the market is demanding qualified developers. And being nominated to the Innovation Award is one of the many ways that you can stand out from the crowd.

Cesar Rodas: Exactly.

Manuel Lemos: And it's a system that is fair because you do something that is recognized and you get some benefit for that, just like what happened with yourself. Your career starts taking off.

Well, let me tell you, I'm glad that it has been working well for you and probably others that were nominated also to the Innovation Award. I think so far about 500 developers had been nominated to the Innovation Award since 2004. And every month, we have a few more being nominated as we are going to talk right after this.

Now, we are going to first comment about a couple of classes each that were published on the JSClasses site. While I'm looking here, Cesar, which ones would you like to comment on this month?

Cesar Rodas: OK, so I picked up two JavaScript  classes. First one is named RoCanvas. I hope that I pronounced it right.

Manuel Lemos: Yeah. Can you screenshare the...

 Cesar Rodas: Yeah, sure. Just  a second. Screenshare, OK.

Manuel Lemos: If you select just the window of your browser it will not bounce to other windows.

Cesar Rodas: OK. There.

Manuel Lemos: Yeah.

Cesar Rodas: Can you see now my browser?

Manuel Lemos: Yes.

Cesar Rodas: OK. So here is ...

Manuel Lemos: Well, I think you are sharing the whole screen. You can pick just one window.

Cesar Rodas: Screenshare. I selected the Google Hangout option.

Manuel Lemos: Yeah. Usually... You need to select just the browser window.

Cesar Rodas: Yes, I did that and the things that I'm running this Google Hangout is a pop-up window and into several other windows. This is ...

Manuel Lemos: Well, anyway, I think we can see, read it, if you increase the font.

Cesar Rodas: OK, I'm increasing the font now. Any better there?

Manuel Lemos: No, you stopped screen sharing.

Cesar Rodas: OK, screenshare. Can you see it now?

Manuel Lemos: Yes, just try to increase the font more.

Cesar Rodas: Even more or that's fine?

Manuel Lemos: Well, it's very slow. Sorry, it's very small.

Cesar Rodas: And that's weird OK, let me start the desktop. Any better now?

Manuel Lemos: Oh, now, that's fine.

Cesar Rodas: OK, so I picked out this class which is named the ... Let me see the name. It's the RoCanvas.js which basically helps you to define an area from your browser when you draw something.

Hopefully, I guess, you could save it somewhere and do an image with it. I think that is nice because I don't like doing this sort of things. So it's nice to have a library that will do that for me which works.

Manuel Lemos: Right.

Cesar Rodas: And here's the demo page. And it works even on Linux, so can't complain about it.

Manuel Lemos: Yeah, well, that's done with the canvas objects. Now, it's well  supported in most browsers that support HTML 5. And this one, that class is from Bob. I don’t know which Bob but it's Bob from Bulgaria, right?

Cesar Rodas: Let me see the name. I'm not sure.

Manuel Lemos: Yes, that's it.

Cesar Rodas: Yeah. It's Bob from Bulgaria.

And the other class that I selected is the jQuery Mask Plugin that basically, it lets you define sums of patterns to use into your forums.  So, for instance here, in the example page, I can type a date. So I can type anything and it would just complete it. I can put an hour and it would just auto-complete it.

Manuel Lemos: Right.

Cesar Rodas: I think those are my selected classes.

Manuel Lemos: Right. That's useful. That one, the jQuery Mask Plugins from Igor Escobar from Brazil.

Well, on my part, I also would like to pick a couple of classes. Let me just screen share them here. Well, one of them is Sea Battle. Let me try to increase the font here. If we can... Well, that's too much.

Well, this is basically a component that could be the beginning of the Battleships game. You know, that board game that you... board or pen and paper game that you have a square in which lay some ships and they are in certain positions. And your opponent has to guess the positions of the ships.

This one was developed by Mark Rolich from Armenia. He's already been submitting quite a few good classes and I hope he continues to do so.

What this class does is, for now, it's just  the placement of the ships, avoiding them to be overlapping on the board. So he has implemented an algorithm to avoid that. So this was interesting.

And the other class that I would like to mention. This one from MarPlo from Romania. He has submitting several interesting classes. And this one allows to make certain calculations with geometric shape like circles, ellipses, triangles, hexagons and so on.

And basically, it can make the calculations to determine the parameter,  the radius and the other dimensions of those shapes.

Well, for people that needs to make this some measures of graphics that use the shapes, it may be interesting. So kudos to MarPlo for his contribution. I hope he continues to send more interesting JavaScript objects like this.

PHP Programming Innovation Award winners of September 2012 (51:09)

Manuel Lemos: And now, we are going to move on to one final section in which we comment about the latest Innovation Award winners of the PHPClasses site. Actually, we are commenting on the nominees of September that were voted on October. And then, in November, the results were announced.

Cesar, which ones would you like to mention this time?

Cesar Rodas: OK, let me share my screen. Can I ... Here it is.

So, first class that I want to share is the Analytics API that basically lets you use the Google Analytics API to fetch your data through backends. So you can do something programmatically with your trackings. That is really useful. I've been asking to do that with a couple of people, so that is definitely something.

Manuel Lemos: Yes, Google Analytics is very popular and free site analytics tool that provides very nice user interface. But I also found out that it has some certain limitations that are on the charts and reports that it presents. It does not always do exactly what you want.

And using the API, you can work around those limitations of user interface. You might be able to implement your enhancements, your applications based on the Google Analytics API. So kudos to Hillebrand Fernando from Argentina for this nice contribution.

And other than that, which class would you also like to mention?

Cesar Rodas: Actually, I found another interesting class which is the Matcher Class, which we're looking at here. It lets you feed an object with certain patterns as examples and then, you can validate them with other inputs. I find this to be very really, really useful as this is basically the principle how simple artificial intelligence problems are solved. So this is a very useful package class.

Manuel Lemos: Yeah, that class in particular is quite clever because it just looks at some samples of your input and it tries to guess the format based on the position of the punctuation and other characters.

So it tries to guess what would be the regular expression that would match valid inputs as you may see there. So I think this is a great contribution by Pashkov Denis Igorevich from Ukraine. I hope I'm spelling his name right.

Other than that, I also would like to mention a couple of classes. I would like to start by one from... Let me screenshare it first. Well, didn't go well. Let  me... OK, I'm selecting the right window.

This one comes from Alpesh Khumar Penchal from India. He also develop a class that does something unusual and that's why it was nominated. Because there are plenty of classes to search values in arrays.

Actually, PHP provides some functions already to search for values in arrays. But in this case, Alpesh Khumar implemented something that is not usual, which is to search for values using wildcards. You can use asterisk as a wildcard and it will search for any form, combination, characters and wildcards to find the values that you are interested in, in your arrays.

So kudos to Alpesh for his awesome contribution and I hope he continues to send more contributions like this. It was his first package he sent on the site and he was already nominated. I hope he continues to send more promising packages.

And other than that, I also would like to comment on another one. This one is from Alexsandro Souza from Brazil. This one does something that seems to be very similar to what many other classes do except for an important difference.

Basically, it can synchronize a MySQL database between local and a remote server. So if you have two databases, one, for instance, in development environment and another in production, you can synchronize the contents of those databases. And there are plenty of other class that do that.

The part that this class does more is that it can also synchronize files that are referenced in the database. For instance, if you have large files, large pictures, large archives for downloads in your application, eventually you will not store them in the database.

In the database, you'll probably just store the file name and some ID. And this class implements some logic that allows you to synchronize the databases and also, any external files that are referenced in the database.

So kudos to Alexsandro for this great idea. Again, it was a nomination that he got just after his first contribution. And this is great to see developers that send packages and are already nominated right at first contribution. Which just reflects the fact that developers are recognizing more and more that making good contributions is not a matter of–... how do I say–? sending classes for the same purpose that have been submitted more and more times in the past.

Conclusion (58:32)

Manuel Lemos: Well, with this, I basically conclude on this podcast. And I like to thank you, Cesar, for coming also commenting on this interesting topics. And I hope to have you back on future episodes.

Let me just tell you that, initially, I said that you are just filling in for Ernani but this was not a coincidence. I want you to comment on the new system of levels and missions also because you have been a beta tester and somehow suggested this similar enhancements to the site many years ago.

And it's finally time to celebrate that there was time to implement these features and I hope to also continue to have your feedback in the future enhancements.

And for other people that are interested in also participating on beta testing, it's all accessible. It's not just for Cesar and others that we're picking individually. Everybody was invited. Every author that participated in beta testing was invited and there were only a few volunteer to participate.

But the next phase, more people will be invited but they somehow have to demonstrate they are really interested in giving feedback, not just test features earlier just to know about them. They are expected to give some feedback. That's how people will be picked.

So if you want to participate of the beta testing of the next features on this line of rewards and encouragements that will be provided to all users, one way to increase your chance to be invited is to engage on the current system levels and missions. And eventually, you will be invited to join.

So, on that, I'll just, again, I would like to thank you, Cesar. I don't know if you want to just give your final remarks.

Cesar Rodas: Thank you for this invitation. Anytime you want, I'll be here. Nothing, thank you. At any time and keep these new features coming. They are excellent. [Chuckles]

Manuel Lemos: OK. Thank you, again, for the support. On my behalf, I think that's all for now. Bye.

[Music]


You need to be a registered user or login to post a comment

Login Immediately with your account on:

Facebook ConnectGmail or other Google Account
Hotmail or Microsoft Windows LiveStackOverflow
GitHubYahoo


Comments:

1. HipHop clarifications - Sara Golemon (2012-12-11 05:22)
A few notes on HipHop and JIT in both systems... - 1 reply
Read the whole comment and replies


<< Previous: Becoming a PHP Master...>> Next: PHP Zeitgeist 2012 ev...

  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Will PHP 6 feature a ...   Post a comment Post a comment   See comments See comments (2)   Trackbacks (0)