Ruby 的 Java 實現,JRuby 9.0.0.0-pre1 發布

jopen 9年前發布 | 12K 次閱讀 JRuby

JRuby是面向Ruby、基于Java虛擬機(JVM)的一種解釋程序,它結合了Ruby語言的簡易性和功能強大的JVM的執行機制,包括與Java庫 全面集成。Rails徹底加快及簡化了Web應用的開發,不過它讓人覺得不夠成熟,特別是在高端企業級功能方面。另一方面,Java平臺及其虛擬機、庫和 應用服務器的速度、穩定性和功能方面卻一直在提升,現在已被公認為是開發高端服務器應用的領先平臺。不過如果Java平臺不與Ruby等新興語言聯系在一 起,就有可能落后于流行趨勢。

JRuby 9.0.0.0-pre1 發布,主要改進內容:

  • 兼容 Ruby 2.2

  • 基于傳統編譯器設計的全新優化的運行時

  • 新的 POSIX 友好的 IO 和 進程處理

  • 來自 MRI 的完全可移植的編碼和轉碼

目前這還是預覽版,詳細介紹:

JRuby 9.0.0.0-pre1 Released

Tuesday, January 20 2015

The JRuby community is pleased to announce the release of JRuby 9.0.0.0-pre1

JRuby 9000 is the new version of JRuby, representing years of effort and large-scale reboots of several JRuby subsystems.

Major features of JRuby 9000:

  • Ruby 2.2 compatibility, minus features listed below
  • A new optimizing runtime based on a traditional compiler design
  • New POSIX-friendly IO and Process
  • Fully ported encoding/transcoding logic from MRI

This is a preview release, and we know there’s work to do. We are releasing now to get user feedback on Ruby 2.2 functionality and overall stability.

We hope all Ruby users will try out this release and report issues on our issue tracker at http://bugs.jruby.org. We also encourage users to join our IRC channel (#jruby on Freenode) and mailing lists. You may also follow @jruby on 推ter for updates.

Ruby 2.2 features yet to be implemented:

  • Refinements #1062
  • Enumerator#feed
  • Kernel#spawn close-on-exec support
  • ObjectSpace::WeakMap#each and Enumerable inclusion
  • ObjectSpace::count_objects
  • Thread#handle_interrupt is not yet fully functional
  • POSIX-friendly IO, TTY, and Process logic is not used on Windows

We also have additional work to do on the new runtime:

  • Startup time is a bit slower.
  • Memory usage is higher.
  • Straight-line performance is a little bit slower.

The new runtime gathers more information about Ruby code and performs more analysis and optimization than our old runtime. There’s great potential here to bring Ruby performance to native Java or C, but we are just starting the optimization phase of that work. We will do our best to get startup time, memory use, and performance on par with 1.7.x (or better) before the final release of JRuby 9000.

Truffle

JRuby 9000 includes an in-development version of support for the Truffle language implementation framework and Graal VM from Oracle Labs. In future releases, Truffle will provide an extremely high performance and compatible backend for JRuby. The Truffle backend supports all Ruby language features, but so far only some of the core and standard libraries. It has no support for RubyGems or Rails, does not work on Windows, and is not ready to be tested with applications at this stage. More information on Truffle and Graal can be found in the JRuby Wiki.

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!