News for hackers. Stuff that matters.
Re:Facebook makes HipHop for PHP open source by mseebach on Tuesday February 02, 2010 @01:01PM (#1095512)
I think where most people chokes on Wasabi is the perception of compiling from an "insane" language to a sane language. No matter how cool it is to work at Fog Creek, it's very 1965 to work in a proprietary language, especially for web development. If Joel wasn't famous, anyone leaving Fog Creek would have serious problems finding a new job.

Facebook compiles from a "sane" language (PHP) to a less sane, but twice as fast language (C++). The alternative was to get their devs to work in C++, which they decided was an unattractive solution -- this seems reasonable.

Re:Facebook makes HipHop for PHP open source by tghw on Tuesday February 02, 2010 @01:07PM (#1095532)
PHP is somehow a more sane language than classic ASP? They are contemporaries of each other, and both were pretty popular in their day. PHP has continued, while ASP has been replaced by something significantly better than either.

P.S. If the company you're applying to is upset by you having worked in a proprietary language, they're hiring for the wrong things.

Re:Facebook makes HipHop for PHP open source by mseebach on Tuesday February 02, 2010 @01:22PM (#1095581)
> If the company you're applying to is upset by you having worked in a proprietary language, they're hiring for the wrong things.

In a perfect world, sure. But in the real world, the guy with actual experience in the language/framework used gets an interview first. Then the guy with experience in any language/framework the interviewer immediately recognizes as relevant. Then the guy with experience in something so obscure it's not even on Wikipedia (which Wasabi wouldn't be had Joel and Fog Creek not been famous).

Re:Facebook makes HipHop for PHP open source by johns on Tuesday February 02, 2010 @03:01PM (#1095904)
I don't think you quite understand how Wasabi works. Wasabi compiles VBScript (written mostly like normal VBScript with some conventions to ease the work on the compiler) to PHP. At least, that's how it originally worked. Now it compiles the same code to .NET IL which runs on Windows and Mono. They're not writing code in some obscure language.

If there's some company out there that doesn't want to hire people capable of writing their own compilers to more easily add cross-platform support to their software the guys at Fog Creek aren't going to want to work there anyway.

Re:Facebook makes HipHop for PHP open source by mseebach on Wednesday February 03, 2010 @07:07AM (#1097566)
According to Spolsky, Wasabi is backwards compatible with VBScript, but "we like closures, active records, lambdas, embedded SQL a la LINQ, etc. etc. and so those are the kinds of features we put into Wasabi."

If they'd been working in vanilla VBScript in 2010, it'd be even more insane, and also, I think Joel would have some serious problems holding on to employees.

http://www.joelonsoftware.com/items/2006/09/01b.html

Re:Facebook makes HipHop for PHP open source by acangiano on Tuesday February 02, 2010 @02:57PM (#1095891)
> from a "sane" language (PHP) to a less sane, but twice as fast language (C++)

C++ is much faster than PHP, not just twice as fast.

Re:Facebook makes HipHop for PHP open source by angelbob on Tuesday February 02, 2010 @03:59PM (#1096092)
Hand-coded C++ is much more than twice as fast, but 2x is what you get from machine-converted HipHop at this point.
Re:Facebook makes HipHop for PHP open source by Todd on Tuesday February 02, 2010 @06:38PM (#1096552)
Agreed. Scripted/interpreted languages are, in general, one to two orders of magnitude slower than a compiled language such as C/C++. It's damn difficult to go much better than 10x slower due to the nature of an interpreter--even fast opcode-based interpreters. There are some extensions to the GNU C/C++ compilers that can help here, though.
Re:Facebook makes HipHop for PHP open source by jwr on Tuesday February 02, 2010 @05:00PM (#1096293)
Languages aren't "fast" or "slow", it's programs that can be fast or slow.

If a higher-level language lets you implement a smarter algorithm, your program will run faster.

Re:Facebook makes HipHop for PHP open source by acangiano on Tuesday February 02, 2010 @06:51PM (#1096596)
> Languages aren't "fast" or "slow", it's programs that can be fast or slow.

We can say that "C++ is faster than PHP", because most, if not all, programs using the same algorithms will run faster when written in C++ and compiled to native code.

> If a higher-level language lets you implement a smarter algorithm, your program will run faster.

PHP is generally easier to master than C++, but both are high level enough to provide adequate tools to write efficient algorithms with comparable amount of effort, provided one is competent with the language at hand.

Re:Facebook makes HipHop for PHP open source by sker on Tuesday February 02, 2010 @01:06PM (#1095530)
PHP is sane?
Re:Facebook makes HipHop for PHP open source by mncaudill on Tuesday February 02, 2010 @02:17PM (#1095753)
I'd say PHP is more sane from a business and coding standpoint. Need to find a PHP developer? No problem. Want a PHP IDE? No problem. A large community to handle bugs and any future development? Yes.

It's obvious that wasabi has been good to Fog Creek, but that doesn't make it a sane decision, regardless of the quality of the syntax and semantics of the language itself.

Re:Facebook makes HipHop for PHP open source by david on Tuesday February 02, 2010 @03:39PM (#1096013)
What does "sane" mean in this thread? I can't figure it out other than "something that makes sense to the poster".

>> Need to find a PHP developer? No problem.

Not being able to hire just anyone to code for you is a good thing just as much as it is bad. It means you're going to have some pretty bright people working for you, which apparently is something Fog Creek values and can afford to do.

> Want a PHP IDE? No problem.

Most hackers have their own preferred editors anyways, and Emacs/vi/etc work well with any language if that's the editor you're experienced with.

>> A large community to handle bugs and any future development? Yes.

Again, that's a hindrance just as much as it is a benefit. If you need to make a change or fix a bug in the language, you're going to have much better luck if you know a bunch of people who are intimately familiar with how that language works, especially if their right down the hall from you.

Re:Facebook makes HipHop for PHP open source by sanswork on Tuesday February 02, 2010 @05:44PM (#1096426)
In response to your first comment I think the idea that developers that don't use PHP are better or brighter is absurd.

Not that it matters anyhow for most roles you neither need nor can afford to hire the best and brightest away from their current role which they probably love a lot(being the best gives you the ability to choose great places to work). So unless you're looking for a tech lead you're going to be looking for great, much better than average but not specifically the best and for those conditions PHP will give you a much larger developer base to choose from every day of the week.

As for the last point I think you're really reaching here to find a negative. A large community to handle bugs a hindrance? Seriously? And your alternative ideal solution is some people down the hall in your office that know how to use the language well?

Re:Facebook makes HipHop for PHP open source by lincolnq on Tuesday February 02, 2010 @06:02PM (#1096472)
Uhm, if the guy down the hall WROTE the language, that's gonna be a hell of a lot more useful than posting to a mailing list. Especially if you can't post your secret source code, so instead you have to spend a lot of time coming up with a simple test case you can post which demonstrates the problem -- whereas with the guy down the hall, he's allowed to see the code.
Re:Facebook makes HipHop for PHP open source by sanswork on Tuesday February 02, 2010 @06:25PM (#1096523)
That's great if you work down the hall from the guy that wrote the language but unless you're talking about a niche in house language when it comes to web development you're talking about what half a dozen people that you can claim that against? And how many of those work at Google and the like?

The vast majority of people will never have the opportunity to be down the hall from that guy and for the vast majority of people a large helpful community will be infinitely more valuable.

Re:Facebook makes HipHop for PHP open source by david on Wednesday February 03, 2010 @06:49PM (#1099289)
>> The vast majority of people will never have the opportunity to be down the hall from that guy and for the vast majority of people a large helpful community will be infinitely more valuable.

Which means what to Fog Creek?

Re:Facebook makes HipHop for PHP open source by jganetsk on Tuesday February 02, 2010 @11:33PM (#1097074)
And what happens when the guy down the hall leaves the company?
Re:Facebook makes HipHop for PHP open source by lincolnq on Wednesday February 03, 2010 @04:32PM (#1098935)
Ah, well, then you're fucked. My point is not that you should consider it a good idea to make your own proprietary language, just that that situation can sometimes be a really good, productive one.

(I'm dealing with this in my work -- we use a proprietary internal scripting language, and the guy who wrote it is not around. I'm slowly becoming the local expert on the language -- very slowly, though, because opportunities to work on it don't come up too often.)

Re:Facebook makes HipHop for PHP open source by mseebach on Wednesday February 03, 2010 @07:16AM (#1097575)
I think I introduced the word. I used it to describe the perceived relative merit of PHP vs. Wasabi/C++, where, in the example at hand, the sanity of PHP exceeds that of the alternatives for the given situation.
Re:Facebook makes HipHop for PHP open source by mseebach on Tuesday February 02, 2010 @01:11PM (#1095541)
More sane than any proprietary language, yeah. And more accessible than C++.
Re:Facebook makes HipHop for PHP open source by tghw on Tuesday February 02, 2010 @01:28PM (#1095605)
You're comparing apples an oranges. PHP is no more sane than classic ASP. They're both pretty awful.
Re:Facebook makes HipHop for PHP open source by brehaut on Tuesday February 02, 2010 @01:47PM (#1095674)
I think thats unfair. PHP sucks some hairy donkey's balls, but VBScript is significantly worse. Dim, Redim Preserve, ByRef, Arrays that are basicly C arrays (see also Redim), Ridiculous Object/Value dichotomy (for those that arent aware you need to use the Set keyword to assign an object to a variable, but not for a value. The distinction bleeds all over your code and makes things hurt) and friends are evil sons of bitches that don't belong in a scripting language.
Re:Facebook makes HipHop for PHP open source by voidpointer on Tuesday February 02, 2010 @06:33PM (#1096546)
Hello pot. This is kettle. You're black.
Re:Facebook makes HipHop for PHP open source by brehaut on Tuesday February 02, 2010 @07:10PM (#1096645)
Would you like to expand on your claim? Be quite clear that i dislike both languages. VBS is the worst of the two though.
Re:Facebook makes HipHop for PHP open source by wvenable on Tuesday February 02, 2010 @10:51PM (#1097011)
Classic ASP is whole class of awful all to itself. PHP has far more in common with other scripting languages than it does with Classic ASP. The fact that they both support embedding code into HTML is their only similarity.
Re:Facebook makes HipHop for PHP open source by mseebach on Wednesday February 03, 2010 @07:09AM (#1097569)
Wasabi >> Classic ASP, if that's what you're referring to. But it's a whole lot more, and on top of that it's proprietary. PHP isn't, and that alone makes it more sane.
Re:Facebook makes HipHop for PHP open source by statictype on Tuesday February 02, 2010 @10:54PM (#1097015)
> No matter how cool it is to work at Fog Creek, it's very 1965 to work in a proprietary language, especially for web development

So you're basically against the use of Domain Specific Languages on the whole? Or only those whose syntax you don't like?

Re:Facebook makes HipHop for PHP open source by mseebach on Wednesday February 03, 2010 @07:12AM (#1097574)
When the domain is general web development, I'm against it. It's an instance of the "right tool for the job"-problem.
Re:Facebook makes HipHop for PHP open source by encoderer on Wednesday February 03, 2010 @07:48AM (#1097612)
If you're hiring developers based on experience with a specific language, you're probably doing it wrong anyway.

Hire based on experience with a specific paradigm. OO. Functional. Etc. Or experience with a specific domain problem. Compilers. DSLs. Operating Systems. Etc.

Re:Facebook makes HipHop for PHP open source by runT1ME on Tuesday February 02, 2010 @02:57PM (#1095889)
I wish someone would invent some sort of C-like language that wasn't as complicated.

Maybe it could even compile itself on the fly to machine code to continually optimize itself!

Re:Facebook makes HipHop for PHP open source by didroe on Tuesday February 02, 2010 @04:53PM (#1096271)
Javascript? :)