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.
HN user
remi_forax
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.
Rémi
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.
Rémi
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.
Rémi
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 :)
cheers, Rémi
[1] http://shootout.alioth.debian.org/u64/performance.php?test=m...