Page 2 of 4

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 4:15 am
by arjan.top
PCSpectra wrote: 'close' or 'almost' are so vague when comparing benchmark performance. It's widely accepted that a native C application will out perform a Java equivelant anytime. I think high use, daemon systems will remain developed in C for a long while.
I do not think that java is great for everything, I do not see it as a "system" language
Java and C both have advantages, but in different areas

Maybe, but all that that proves, is it's possible to build faster software using more abstraction, if the original software is poorly implemented.
you get access to all the java libraries too
I'm not a fan of Java, so I admit I'm being biased, but everything Java built seems really sluggish, buggy and slow to respond. Just look at Eclipse compared to a native Windows editor. :P
you should give eclipse more memory

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 5:55 am
by Jenk
arjan.top wrote:you should give eclipse more memory
Typical Java-fan reply :/ Why should I? If I have something equivalent, which doesn't need more memory, why should the Java-based app demand more?

Java is not as great as many think. In fact it is a benchmark for poor pattern implementation and don't even get me started on it's consistent flaw, and bodges, because of strict types. Programming in Java is like programming in a straight jacket, and is sluggish to boot. In a bid to make Java as flexible as possible, they have implemented far too much behaviour into too many of their core domain, meaning there is a *LOT* of bloat.

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 8:02 am
by arjan.top
php uses about the same amount of memory as java, so it sucks too?

I do not think java is great, some APIs are really "dumb" (same with PHP), you can still use groovy, scala, clojure (...) on the JVM

But java is not near slow, it was in the past but 1.6 is really fast, it would just get faster

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 8:07 am
by Jenk
We expect PHP to be slow, it is an interpreted language. Java is not, and even has C compilation behind it.. so it really has no excuse.

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 8:12 am
by arjan.top
the question was about memory

every JIT language would need more memory than the compiled version
so it really has no excuse.
no excuse for what?

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 8:44 am
by Jenk
Memory consumption is the primary cause for apps to be slow. PHP is interpreted, which uses more memory as it compiles/translates, which makes it slower. Java does not do this.

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 9:00 am
by arjan.top
java is interpreted, "hot code" is compiled

edit: i don't think 200MB for something as complex as eclipse (wrih some plugins) is a lot

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 9:09 am
by arjan.top

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 10:48 am
by Benjamin
Stay on topic folks.

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 12:10 pm
by Jenk
Ok, back on topic.. I'm slightly annoyed they've done this behind closed doors. It smells like something MS would do in a dirty takeover. I also wonder how "open" it will be, and if it's tailored for Facebook, or is in fact a generic improvement.

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 3:39 pm
by arjan.top

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 4:42 pm
by Christopher
Jenk wrote:... I'm slightly annoyed they've done this behind closed doors. It smells like something MS would do in a dirty takeover. I also wonder how "open" it will be, and if it's tailored for Facebook, or is in fact a generic improvement.
Well ... they spent their own money to develop it and will release it under the PHP license tonight. That doesn't sound like a "dirty takeover" to me. I think Facebook has long been a supporter of PHP.

It is called HipHop for PHP. What they are doing is converting PHP into C++ and then compiling it. It sounds like currently you loose some things, like eval(), and they have only converted some extensions. And it may not behave exactly like PHP for variable typing, etc. But you do get code that runs about twice as fast -- according to the article. it sounds like they have

Since it is release under the same license as PHP, then the community and PHP Group may choose to get involved in filling out the features. Maybe with more people thinking about solutions. For example, perhaps APC could compile to C++ as well as opcode?

There is a live streamed tech talk about at 7:30PST for those interested (at the link above).

Re: New PHP from Facebook?

Posted: Tue Feb 02, 2010 5:33 pm
by alex.barylski
you should give eclipse more memory
LOL

It's why I went out and bought a brand new cutting edge computer system i7 quad core with 12GB of DDR3?? Memory...If Eclipse is running like ahog on this machine I give up on Eclipse ever being a performant IDE. :P
It is called HipHop for PHP. What they are doing is converting PHP into C++ and then compiling it. It sounds like currently you loose some things, like eval(), and they have only converted some extensions. And it may not behave exactly like PHP for variable typing, etc. But you do get code that runs about twice as fast -- according to the article. it sounds like they have
Thats what I was afraid of...there are attempts at this already (phc, roadsend, etc). How does it handle with the most flexible technqiue employedd by professional PHP developers, such as class autoloading? Constructing class names on the fly then instantiating that class to support plug 'n play?

I would be wary about using such a thing...not as exciting as I had hoped. Ah well...PHP still rocks. 8)

Cheers,
Alex

Re: New PHP from Facebook?

Posted: Wed Feb 03, 2010 5:33 am
by Jenk
arborint wrote:
Jenk wrote:... I'm slightly annoyed they've done this behind closed doors. It smells like something MS would do in a dirty takeover. I also wonder how "open" it will be, and if it's tailored for Facebook, or is in fact a generic improvement.
Well ... they spent their own money to develop it and will release it under the PHP license tonight. That doesn't sound like a "dirty takeover" to me. I think Facebook has long been a supporter of PHP.

It is called HipHop for PHP. What they are doing is converting PHP into C++ and then compiling it. It sounds like currently you loose some things, like eval(), and they have only converted some extensions. And it may not behave exactly like PHP for variable typing, etc. But you do get code that runs about twice as fast -- according to the article. it sounds like they have

Since it is release under the same license as PHP, then the community and PHP Group may choose to get involved in filling out the features. Maybe with more people thinking about solutions. For example, perhaps APC could compile to C++ as well as opcode?

There is a live streamed tech talk about at 7:30PST for those interested (at the link above).
Why didn't they do it in the open? They've basically said "This is how we think PHP should be, so here it is." and are now plugging their speed increase in a "HEY GUYS, COME USE OUR PHP INSTEAD!" kind of way, by the looks of it.

What they should have done was make their intentions known, and then allow some form of input from the community. Not take from a community driven project, hide away, and then unleash a largely unknown and unfamiliar, yet "better" version onto the same community. At least for the beginning it will make anyone who uses this compiler dependent upon the FB devs for support/guidance/etc. Until someone finds a glaring hole, most probably.

That is the "dirty takeover". The spotlight has shifted from the PHP team to Facebook, who will no doubt be wearing the "I'm the PHP Daddy" T-shirt.

Re: PHP to C++ compiler from Facebook - HipHop

Posted: Wed Feb 03, 2010 6:11 am
by Eran
Why didn't they do it in the open?
It was internal development for their private use. Do you always develop your internal stuff in the open? now they decided to make it open. why all the negativity?