[Rite] Byte-Code Compiler in Ruby

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default [Rite] Byte-Code Compiler in Ruby

    Hi,

    I am fascinated by the many new ideas presented by matz for Rite.

    Why not write the whole Ruby-to-Bytecode compiler in Ruby itself?

    As the compilation step is executed less frequently, due to having lots
    of precompiled bytecode binaries (one for each .rb file), this step is
    not very time-critial (it's only done once for each file). And
    applications using eval() are seldom evaluating very large parts of
    code, or are itself time-critical.

    This way, the Ruby-to-Bytecode compiler could be compiled itself into
    bytecode, and then run on top of the Bytecode interpreter.

    As one side-effect, the Bytecode interpreter would become relative easy
    to implement. The compiler, too. And some other cool effects could be
    done this way.

    Is this "old" idea realistic for Rite?

    Regards,

    Michael

    Michael Neumann Guest

  2. Similar Questions and Discussions

    1. Ruby Rite news live from Rubyconf 2003
      Chad Fowler has been reporting live from the Rubyconf 2003. A digest of new information regarding Ruby 2.0 (a.k.a. "Rite") can be found at:...
    2. ruby-talk: 80813 (Rite/Ruby2.0 & Ruby vs OCaml)
      Hope nobody finds this annoying. Somehow I missed this message when it was originally sent, but I thought my reply might be useful to sombody. ...
    3. Rite/Ruby2.0 & Ruby vs OCaml
      Hi All, I'm new here, and I hope I don't offend anyone by mentioning a different programming language here on Ruby-Talk. I have two questions...
    4. Ruby => Rite, AST => Bytecode?
      Matz and fellow Rubyists, On pragprog, we're sort-of discussing the creation of a new language ("Pragmatic") as an exercise in extending one's...
    5. Compiler Error Message: The compiler failed with error code 128.
      Hi. I am having trouble running my aspx code. I created two simple webforms, which i try to run from two different directories one is giving me...
  3. #2

    Default Re: [Rite] Byte-Code Compiler in Ruby

    Michael wrote:
    > Why not write the whole Ruby-to-Bytecode compiler in Ruby itself?
    > Is this "old" idea realistic for Rite?
    It better be! I think at this point doing must be a real show of force/proof of concept for Ruby. I like your suggestion. It can be done, and i think should be done this way. But other's may disagee on grounds of interfacing/embedding with c/c++.

    my 2,
    -t0

    T. Onoma Guest

  4. #3

    Default Re: [Rite] Byte-Code Compiler in Ruby

    il Mon, 17 Nov 2003 07:11:19 +0900, Michael Neumann
    <mneumann@ntecs.de> ha scritto::
    >Hi,
    >
    >I am fascinated by the many new ideas presented by matz for Rite.
    >
    >Why not write the whole Ruby-to-Bytecode compiler in Ruby itself?
    >
    google for 'metaruby'. You may discover something like this is being
    done and is not so easy..
    gabriele renzi Guest

  5. #4

    Default Re: [Rite] Byte-Code Compiler in Ruby

    > Is this "old" idea realistic for Rite?

    I would say yes. ByteCodeRuby's compiler is implemented in Ruby, which
    greatly simplifies things. I haven't looked at the speed of
    compilation, which will of course be slower than a C-based version,
    but I agree with you that this isn't likely to critically affect
    overal performance.

    Quick plug: ByteCodeRuby is a (as yet incomplete) bytecode compiler
    and interpreter for Ruby. For simplicity it reuses a lot of the
    current VM, sharing its parser, class model, standard library and GC.
    Version 0.2.0 has just been released on rubyforge:
    [url]http://rubyforge.org/projects/bytecoderuby/[/url]

    -- George
    George Marrows Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139