tj / luna

luna programming language - a small, elegant VM implemented in C
2.45k stars 147 forks source link

this isn't an issue just a note. #14

Closed yields closed 11 years ago

yields commented 12 years ago

you should really investigate pypy and rpython they implemented php with it and it's a lot faster than hiphop for php, they also implemented python with rpython wich is a lot faster than cpython.

pypy

you might want to look at it, that way more programmers can contribute to luna.

cheers :)

tj commented 12 years ago

nice :D very cool. I've started prototyping a new direction for luna, there are some new things I'd like to investigate first before altering anything I have in here

tj commented 12 years ago

so it's sort of a LLVM but in python? (i'm not too familiar with the py world)

yields commented 12 years ago

you basically write your interpreter in RPython and you get JIT for free :).

Facebook sponsored them to write a PHP interpreter and it is a lot faster and effecient than HipHop wich compiles php to c++. I don't know about you but for me it looks like magic. they basically wrote the python interpreter in python and it's faster than CPython. here is a talk on youtube, there are a lot of resources.

tj commented 12 years ago

slick :D

rauchg commented 12 years ago

@yields I believe Facebook is working on a full-blown VM now https://www.facebook.com/note.php?note_id=10150415177928920

yields commented 12 years ago

cool, but i never understood why they invest so much in PHP, anyway i don't really care for PHP i'm just really interested in Luna and hopefully RPython will speed up it's development process.

rauchg commented 12 years ago

Maybe this interview to one of their research engineers will help you understand why. Relevant quote from the article:

Facebook’s outlook of PHP is largely passionless; yes, engineers understand it is far from perfect, and people occasionally rant or show some WTF code sample. At the same time, at Facebook we love doing cool things, and PHP is simply a means to an end. With our extensive framework and libraries, it’s also often the simplest means to an end.

yields commented 12 years ago

@guille i looked at it, it was a long time ago, and frankly i think they already completed it, because according to pypy they sponsored them to do a VM it's called HippyVM and on a simple fibonacci it's 23x times faster than HipHopVM.

tj commented 12 years ago

one of my main goals is just to learn with luna so i'd definitely like to stay away from LLVM and friends, but they're definitely really cool projects. Plus LLVM is a brutal dependency IMO, I'm a lot more attracted to light codebases like lua, even if it means it's not uber-fast, uber-fast can be for a fork

yields commented 11 years ago

@visionmedia i agree, after comparing between Pypy and Lua, Lua source is readable and small.