Hacker News new | comments | show | ask | jobs | submit login

> _why's unholy showed it's trivial to compile Ruby into Python (in many cases). It shouldn't be too hard (famous last words) to make a Ruby VM with PyPy.

Basic structures like if, else, while etc. is easy. The hard part is the object model (including constant lookup) and long jumps (exceptions, next/break). Let's not forget the big core library which you need to implement if you want it to be usable at all…

(Related: I started working on a Ruby version in JavaScript: https://github.com/judofyr/rubyscript)




> Let's not forget the big core library which you need to implement if you want it to be usable at all

Wouldn't one just point the translator/compiler to whatever Ruby's equivalent is of /usr/lib/python2.7 and let it be "turtles all the way down"?


Core != Stdlib. Core is implemented in C. There are 111 methods just on the String class in core…




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: