Hi guys,
I'm the author of PHP.reboot and also one of the guys that worked on JSR 292 (invokedynamic in Java).
First, I don't know based2 and please don't be too serious, PHP.reboot was written as a small prototype to see what can be done on top of invokedynamic. It was also used to debug the hotspot implementation of JSR 292.
The language is tailored unlike any dynamic languages. Instead of adding features and wondering how to optimize them after, I have worked backward and carefully pick/design features only if I was able to optimize it to be at least as fast as Java.
The hidden jewel of PHP.reboot is its runtime which first interpret the script and then use a type inference/type checker algorithm to try to emit exactly the same bytecode as javac.
So some parts of the language are quite fast, but not the whole language because some parts still run in interpreted mode only.
As a demo, I've taken the mandelbrot benchmark from the Computer Language benchmark[1] and write it in PHP.reboot
(I hope with no mistake). Here is the result on my laptop:
[forax@localhost phpreboot]$ time bin/phpr.sh test/mandelbrot.phpr >/dev/null
real 0m34.189s
user 0m34.087s
sys 0m0.088s
You can compare with your favourite dynamic language :)
If you're serious about this moving forward, I very strongly suggest renaming it. PHP.reboot is a very hostile, aggressive name that is clearly trying to steal thunder. Call it a reboot of PHP informally, playfully base the name off of PHP somehow, but don't outright call your language "PHP.something that Google won't correctly parse as part of the same word so the search will still pull up nothing but PHP results". In addition to the hostile nature of the name, being effectively Google-blacklisted isn't a great way to start.
Also, admittedly off of just a glance, beware the specialized syntax sinkhole. Can I easily take two XML snippets and compose them together somehow? Can I easily take two SQL snippets and compose them together? A lot of times these specialized syntaxes make for cute-looking demos but in practice work out worse than just using language constructs because they are so highly specialized you can't do anything with them but exactly the one use case the author had in mind. I'd submit there's a reason that basically no large-scale successful language has this sort of specialized syntax built into it, and you may want to ponder on those reasons until you understand them. It isn't because it's hard to write the grammar or anything implementation-related like that. (And I'm not saying don't do it. Personally, I think it's a solvable problem. Look to LINQ for what is probably the closest to date. I'm suggesting you try to spend some time understanding why the obvious solutions haven't worked before you go too far down what can be a language-killing rathole.)
Here is why I've chosen the name the language PHP.reboot.
My father ask me to patch one of the page of his website written in PHP
so I've written one page of PHP. 3 days later, my younger brother (not 18 years old at that time) call me and ask me to never touch a PHP page again because I had introduced 3 security holes.
It was a painful day for me, I have a Phd in Computer Science, I study computer languages, compilers and runtimes but I'm not able to write a correct PHP script.
That's why I think I own the right to call this language PHP.reboot.
Don't get me wrong, I think the project is a neat one. I like the features, I like the goal, and honestly I just like new-language projects in general. So please don't think I'm hating on the project.
But your argument for the name is so utterly broken.
First of all, having a PhD in CS and introducing 3 security holes is no reason to blame the language. It's not even necessarily a reason to blame yourself. Since when is a PhD in CS supposed to make you a good software engineer? If it is, I know a lot of PhDs who got a raw deal.
Second, how does your language fix the three security bugs you introduced? The only security feature I see in your highlights list is "secure by default: no eval, no magic quotes/string interpolation". 99 out of 100 competent PHP programmers force magic quotes off (so if your brother didn't, he can shut up), and most bugs that can be introduced with string interpolation can be (and usually are) introduced with string concatenation (which I assume you can still do).
Third, the main thing you demonstrated with this story (as others have said) is that you aren't very good with PHP. That's no big shame, but it's also not a reason you "own the right to call this language PHP.reboot". This reasoning is crazyface.
Fourth, as others have said, calling it "PHP.reboot" just confines it to the ghetto. If it were to grow, people wouldn't be able to search for articles/blogs/forums/help/mail/etc about it without getting lost in the PHP (even admitting that for me googling "php reboot" does return your google-code repo). And right in the name it says "I'm the wanna-be little brother of the big successful language". Although I don't think this last criticism is a problem, because I assume the goal was not to actually replace PHP, because that's impossible for reasons others have mentioned. So, no big deal.
The GOOD argument for the name is "It's just a toy language, so it doesn't matter what it's called, and rebooting PHP was my motivator when I started this particular project."
Oh, and as an aside, if one page of PHP is your web programming experience, then you really should probably not be shipping an HTTP server.
I agree with you, I'm not a good PHP developer.
Before that bad experience, I was thinking that PHP was a kind of visual basic for the Web. Easy to write, fast to get something.
I was wrong, that why I've called my language PHP.reboot because I think that PHP in 2010 should be rebooted to be secure by default.
Now, the main point of this toy language as you call it is to demonstrate that a dynamic language can be fast if you don't design it with an interpreter in mind.
BTW, I really hope that this is what Dart is.
> Oh, and as an aside, if one page of PHP is your web programming experience, then you really should probably not be shipping an HTTP server.
I disagree. How are webprogramming skills applicable to writing a HTTP server? Seems to me the relevant skill would be network programming and my (admittedly limited) web developing experience leads me to believe the skills are mostly if not completely disjoint...
Yeah, that's absolutely true, so I overstated my case somewhat on that point (although in my defence I did say "probably"). So, in place of the mis-stated claim in my original comment, let me try that part again.
Writing robust high-load network servers is actually a little tougher than it seems, and the skillset has very little overlap with the "designing a nice language" skillset, or the "making an efficient compiler" skillset. And not only is robustness is important, but to be useful it probably needs a lot of auxiliary features like HTTPS and authentication and logging and FSM-knows-what-all (this point, on which features matter, is the only place that web-programming experience might actually be relevant). And so tacking a half-assed HTTP server onto your new-language project is, well, half-assed. And IMO, there are enough shitty toy web-servers out there already.
As much as I hate just citing a logical fallacy, that's a nonsequitor. You "own" the name because... you can't program in it after what must have been entire hours of effort? If we're going to go down that route at all, that's an argument that you don't have any right to the name, since you've put next to zero effort into it.
Of course, the real reason is that no, you don't own the right to the name, in any sense, but hey hoo, carry on, whatever.
What's with the attitude? Remi just explained the background for the name of his neato prototype PHP-like project. I don't see why that deserves these kinds of snarky replies.
That's the worse reason I've ever heard of to create a new language. If I was asked write ruby or .net or java it probably wouldnt be great code either. That doesn't mean they're language issues, that means I don't know those languages, plain and simple.
Php reboot has less to do with php being broken and more to do with your ego refusing to accept that you're not the worlds nest programmer.
No, unlike PHP, PHP.reboot is secure by default.
That's why PHP.reboot use DSLs, because it enables the runtime to know the context thus sanitize the inputs by itself.
As for "Secure by default". PHP can be perfectly secure. PDO supports parameterised queries, and was first available in PHP 5.1, which shipped just short of SIX YEARS AGO. Even mysqli supports parameterised queries, and that shipped more than SEVEN YEARS AGO.
If you're using the ancient mysql extension (i.e. the mysql* functions) that is YOUR FAULT, not the fault of the language.
but one advantage of having different syntaxes inside the language is that you don't rely on strings to do everything.
So your language is more secure and can have better performance because by example for the SQL syntax you can produce a tree instead of serializing your request as a string.
It's cool to do it as a prototype language, but I doubt someone would make use of it over php. Until someone ports drupal or wordpress to "the next php language", php in the current form probably isn't going anywhere.
The language is tailored unlike any dynamic languages. Instead of adding features and wondering how to optimize them after, I have worked backward and carefully pick/design features only if I was able to optimize it to be at least as fast as Java.
The hidden jewel of PHP.reboot is its runtime which first interpret the script and then use a type inference/type checker algorithm to try to emit exactly the same bytecode as javac. So some parts of the language are quite fast, but not the whole language because some parts still run in interpreted mode only.
As a demo, I've taken the mandelbrot benchmark from the Computer Language benchmark[1] and write it in PHP.reboot (I hope with no mistake). Here is the result on my laptop:
[forax@localhost phpreboot]$ time bin/phpr.sh test/mandelbrot.phpr >/dev/null
real 0m34.189s user 0m34.087s sys 0m0.088s
You can compare with your favourite dynamic language :)
cheers, Rémi
[1] http://shootout.alioth.debian.org/u64/performance.php?test=m...