`
alang
  • 浏览: 136529 次
  • 性别: Icon_minigender_1
  • 来自: 地球
文章分类
社区版块
存档分类
最新评论

关于Rubinius的一些有趣的地方

阅读更多
svn的代码库中,看了readme文件,发现了一些非常有趣的事情,如果都实现的话,那这个版本的虚拟机,可是非常地好玩啊。

现罗列如下:
从Smallltalk-80 'Blue book'设计规范获得了灵感,要提供一个功能丰富的、高性能的Ruby代码运行VM;
使用Ansi C 和 Ruby混合编写,所以目前的代码如果要编译的话,必须要有gcc4.X和Ruby 1.8.x,使用Rake来自动编译。Ruby还必须安装ParseTree/Rake/Sydparse这几个gems;
Rubinius目前使用C来自举(bootstrap the system)。在将来,会使用一个Ruby的方言版本“cuby”来生成C代码。这是一种历史悠久的技术,被Squeak/Smalltalk,还有Burronghs系统中的Algol语言(在电影《Tron》中看到过:-)广泛使用;
目前的编译器/汇编器/bytecode生成器,都是用Ruby写的;
线程安全(Thread safety);
简洁、易读的代码,容易理解和扩充;
引入一些最新的技术到虚拟机里,比如把垃圾收集(GC)和代码优化(code optimizers)都做成插件的形式提供


Tron是1982年迪士尼拍的一部科幻电影,中文介绍英文介绍。延伸阅读《幻想世界中的 Top 10 电脑》
分享到:
评论
3 楼 alang 2006-12-11  
昨天在家里也是没有试成功。近期的代码变动会非常大,出现异常也是可能的。保持关注。
2 楼 qiezi 2006-12-11  
下载编译没通过。你测试成功了吗?

我的环境是ruby 1.8.5, gcc 4.1.1

引用

$ rake build --trace
(in /home/lijie/rubyspace/rubinius)
** Invoke build (first_time)
** Invoke clean (first_time)
** Execute clean
make[1]: ./config.status:命令未找到
make[1]: *** [config.status] 错误 127
make[1]: *** 没有规则可以创建目标“clean”。 停止。
make: *** [clean] 错误 2
** Invoke shotgun (first_time)
** Invoke setup (first_time)
** Execute setup
ruby bin/rcc
/home/lijie/.ruby_inline/Inline_Platform_aaec.so: /home/lijie/.ruby_inline/Inline_Platform_aaec.so: undefined symbol: main_om - /home/lijie/.ruby_inline/Inline_Platform_aaec.so (LoadError)
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        from /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.2/./inline.rb:306:in `load'
        from /usr/lib/ruby/gems/1.8/gems/RubyInline-3.6.2/./inline.rb:629:in `inline'
        from ./lib/platform.rb:5
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        from ./lib/cpu/primitives.rb:3
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'
         ... 13 levels...
        from ./lib/bytecode/constructor.rb:6
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'
        from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
        from bin/rcc:5
rake aborted!
Command failed with status (1): [ruby bin/rcc]
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:722:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:729:in `sh'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:812:in `sh'
/home/lijie/rubyspace/rubinius/Rakefile:20
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `send'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `send'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke'
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
/usr/bin/rake:18:in `load'
/usr/bin/rake:18
1 楼 dongbin 2006-12-11  
Sounds good. 关注一下

相关推荐

Global site tag (gtag.js) - Google Analytics