On Sat, Jul 17, 2010 at 9:30 AM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote: > On Thu, Jul 15, 2010 at 15:09, Nicholas Clark <nick@ccl4.org> wrote: > >> Facebook on Hip Hop (can Media Wiki run on it yet?) > > PHP is a big language with a lot of built-in extensions. Hip Hop > implements a subset of PHP, so you need to massage any non-trivial PHP > codebase so that it can be compiled with it. E.g. eval() doesn't work, > and you can't use the /e flag to the preg_* functions, but you can use > preg_replace_callback as a workaround. > > PHP also has ~1400 core functions when I last looked. Facebook only > implemented the stuff they needed, so it's missing e.g. session_*() > support, and the binary diff functions. Both of which MediaWiki > needs. > > Facebook has an internal bug for making MediaWiki (and presumably, > other big PHP projects) work with it, but it's not a high priority for > them. > > Actually, Hip Hop is really interesting for another reason. It shows > that if you implement a faster but *incompatible* compiler it'll still > be very useful. Ruby's JRuby is exactly that. Ruby's Rubinius is similar but instead of being faster is a self-hosted Ruby so interested hackers can mutate the base language *in* the base language. I haven't noticed Rob Kinyon poking his head into this but he was at least rather caught up with getting an "80%" capable perl that he could run on a JVM. I don't recall what his actual needs were. JoshThread Previous | Thread Next