Hacker News new | past | comments | ask | show | jobs | submit login
A crazy Ruby quine: a spinning globe. (hatena.ne.jp)
95 points by steveklabnik on Dec 19, 2010 | hide | past | favorite | 18 comments



Equally impressive: http://d.hatena.ne.jp/ku-ma-me/20090916

A Ruby -> Python -> Perl -> Lua -> OCaml -> Haskell -> C -> Java -> Brainfuck -> Whitespace -> Unlambda -> Ruby quine!


A polyglot quine! There should be special obfuscated contest just for that.


1. Copy one of the above as a.rb.

2. Run

while true; do clear; ruby a.rb | tee b.rb; sleep 1; mv -f b.rb a.rb; done


Smoothing the animation:

   while true; do clear; ruby a.rb 3 | tee b.rb; sleep 0.1; mv -f b.rb a.rb; done



That is pretty cool, but the ultimate work of this type that I've seen is this mandelbrot fly-through in perl:

http://www.perlmonks.org/?node_id=329492

Seriously -- try it.


Awesome. Works perfectly on OS X.


Does anyone know what kind of process was used to create this?


Port from the original Perl version.


Where is the original Perl version?



I don't think that's the same thing: the perl code is a spinning world visualization, the ruby code is code producing other code that in the end produces the original one, where the different programs _also_ are visualization of the world, which is a tad cooler :)


With this kind of thing, I think there is a strong case for the idea that you really do need to be born with the right kind of brain.


At least the Japanese rubyists remember how to have fun :)


His translated version of the article http://mamememo.blogspot.com/2010/09/qlobe.html (not that there is much to read :-) )

It's really impressive :-)


Here is his presentation video about quine at RubyKaigi2010: http://vimeo.com/14817369 (Japanese)


This is certainly an amazing piece of work.


That is truly impressive.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: