XRuby_Overview_20070831

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    XRuby_Overview_20070831 - Presentation Transcript

    1. XRuby Enjoy Ruby on JVM Ye Zheng http://dreamhead.blogbus.com
    2. Agenda
      • What is XRuby
      • XRuby Architecture
      • XRuby Jump Start
      • More on XRuby
    3. Agenda
      • What is XRuby
      • XRuby Architecture
      • XRuby Jump Start
      • More on XRuby
    4. What is XRuby
      • XRuby is the first Ruby to Java compiler which compiles Ruby source code (.rb) to Java bytecode (.class).
      XRuby .rb .class
    5. XRuby current status
      • The latest version is 0.3.0.
      • test::unit works.
      • XRuby debugger provided
      • Java to Ruby binding annotation.
      • Runs most benchmark faster than ruby 1.8.6.
    6. Two Ways to JVM(I)
      • Interpretation
        • current C Ruby way
        • easy to port
        • needs interpretation engine
        • slow
      Ruby Script Parser AST
    7. Two Ways to JVM(II)
      • Compilation
        • needs more explorations
        • uses JVM as execution engine
        • protects source code
        • fast
      Ruby Script Compiler .class
    8. Why Compilation is Faster
      • Compilation is faster than interpretation
      JVM JVM Interpretation Engine Ruby Script Ruby Script Interpretation Compilation
    9. Misunderstandings
      • It erases dynamic language features.
        • Dynamic structure written in Java is developed to support dynamic language features
      • It maps Ruby class to Java class directly.
        • Ruby class is a dynamic language structure, and it is different from Java class which is a static structure
    10. Agenda
      • What is XRuby
      • XRuby Architecture
      • XRuby Jump Start
      • More on XRuby
    11. XRuby Architecture (overview) XRuby Compiler Runtime Parser Codegen Codedom Lang Builtin Java Support
    12. XRuby Architecture (compiler) Parser .rb .class Tree Parser Code Gen AST Code Dom Antlr ASM XRuby Compiler
    13. XRuby Architecture (runtime) Dynamic Language Support Builtin Java Support XRuby Runtime
    14. Agenda
      • What is XRuby
      • XRuby Architecture
      • XRuby Jump Start
      • More on XRuby
    15. XRuby Jump Start (Ruby code)
      • class MyClass
      • def say_hello_three_times
      • 3.times { puts "hello"}
      • end
      • end
      • MyClass.new.say_hello_three_times
    16. XRuby Jump Start (compile and run)
      • Compile
        • java -jar xruby-0.3.0.jar -c demo.rb
      • Run
        • java -jar demo.jar
      • Output
        • hello
        • hello
        • hello
    17. XRuby Jump Start (builtin)
      • @RubyLevelClass(name="Array")
      • public class RubyArray … {
      • @RubyLevelMethod(name="length")
      • public RubyFixnum length() {
      • return ObjectFactory.createFixnum(this.array_.size());
      • }
      • }
    18. XRuby Jump Start (reference)
      • XRuby Hacking Guide is a good start to understand XRuby.
      • Ruby Hacking Guide is a good reference to Ruby implementation.
      • Builtin is a good start and reference to XRuby code.
    19. Agenda
      • What is XRuby
      • XRuby Architecture
      • XRuby Start-up
      • More on XRuby
    20. XRuby’s Future
      • XRuby 0.4.0
        • Pass all C Ruby tests (Milestone)
        • Compile multiple ruby scripts into one jar
        • Implement more builtin libraries
        • Improve performance
      • Long Term
        • Make Ruby on Rails work
        • Upgrade Antlr to 3.0
    21. Contribution to XRuby
      • Principles
        • Every contribution is welcome.
        • Every attempt is encouraged.
      • Approaches
        • Use XRuby
        • Report bugs
        • Commit patches.
        • Join mailing list to share ideas.
        • Become a XRuby project member.
    22. Enjoy XRuby
      • Enjoy development of a compiler.
      • Ruby is a elegant language.
      • Work with JVM.
      • Understand dynamic language internals.
      • Contribute to open source.
      • We can grow with XRuby since it’s new.
    23. For More Information
      • Homepage
        • http://www.xruby.com
      • Project Homepage
        • http://code.google.com/p/xruby/
      • Project Blog
        • http://xruby.blogspot.com
      • Project Group
        • http://groups.google.com/group/xruby-devel
    24. Welcome to XRuby

    + dreamheaddreamhead, 3 years ago

    custom

    517 views, 2 favs, 0 embeds more stats

    XRuby Overview

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 517
      • 517 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 35
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories