Questions tagged [rubinius]

Rubinius is an implementation of the Ruby programming language using LLVM.

Rubinius is an implementation of the Ruby programming language.The Rubinius bytecode virtual machine is written in C++, incorporating LLVM to compile bytecode to machine code at runtime. The bytecode compiler and vast majority of the core classes are written in pure Ruby

76 questions
17
votes
2 answers

Rubinus or MRI 1.9.3 (YARV)?

So, I have a few questions that I have to ask, I did browse the internet, but there weren't too many reliable answers. Mostly blog posts that would cancel each-other out because they both praised different things and had benchmarks to "prove their…
omninonsense
  • 6,644
  • 9
  • 45
  • 66
12
votes
2 answers

What values for RUBY_ENGINE correspond to which Ruby implementations?

The method I know of to detect the Ruby implementation (e.g., MRI, JRuby, Rubinius, etc.) at run time is to check the global constant RUBY_ENGINE: $ ruby -e 'puts RUBY_ENGINE' ruby What's a reasonably comprehensive list of known Ruby…
jwfearn
  • 28,781
  • 28
  • 95
  • 122
11
votes
7 answers

How do you write a compiler for a language in that language?

Possible Duplicates: How can a language's compiler be written in that language? implementing a compiler in “itself” I was looking at Rubinius, a Ruby implementation that compiles to bytecode using a compiler written in Ruby. I cannot get my head…
Jamison Dance
  • 19,896
  • 25
  • 97
  • 99
9
votes
2 answers

How can I redefine Fixnum's + (plus) method in Ruby and keep original + functionality?

This throws me a SystemStackError in 1.9.2 Ruby (but works in Rubinius): class Fixnum def +(other) self + other * 2 end end but there is no super for + (based on other errors). How can I access the original + functionality?
karatedog
  • 2,508
  • 19
  • 29
9
votes
1 answer

What are the advantages of using rubinius

Could you give me some examples were is worth it use rubinius, like in this post: http://yehudakatz.com/2009/08/31/simplifying-rails-block-helpers-with-a-side-of-rubinius/
Sławosz
  • 11,187
  • 15
  • 73
  • 106
7
votes
5 answers

Which ruby interpreter are you looking forward to?

There are multiple Ruby implementations in the works right now. Which are you looking forward to and why? Do you actively use a non-MRI implementation in production? Some of the options include: Ruby MRI (original 1.8 branch) YARV (official…
Chris Cherry
  • 28,118
  • 6
  • 68
  • 71
6
votes
1 answer

why tail recursive gcd is faster than while loop with rubinius

I have these two implementations of gcd function : def gcd1(a,b) if a==b a elsif a>b if (a%b)==0 b else gcd1(a%b,b) end else if (b%a)==0 a else gcd1(a,b%a) end end end def gcd2(a,b) …
niceman
  • 2,653
  • 29
  • 57
5
votes
2 answers

How do I tell which Ruby interpreter I'm using?

I've seen this thread, but my question is maybe more basic: Given that the response from the accepted answer in that thread[1] is for me, "/Users/username/.rvm/rubies/ruby-2.3.0/bin/ruby", how do I know if that's MRI, JRuby, etc? What would it look…
Arepo
  • 825
  • 1
  • 9
  • 23
5
votes
2 answers

Performance difference between MRI Ruby and jRuby

While doing some benchmarking to answer this question about the fastest way to concatenate arrays I was surprised that when I did the same benchmarks in with jRuby the tests were a lot slower. Does this mean that the old adagio about jRuby being…
peter
  • 41,770
  • 5
  • 64
  • 108
5
votes
5 answers

How can a language be interpreted by itself (like Rubinius)?

I've been programming in Ruby for a while now with just the standard MRI implementation of Ruby, but I've always been curious about the other implementations I hear so much about. I was reading about Rubinius the other day, a Ruby interpreter…
5
votes
1 answer

"\xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8

I have a rails project that runs fine with MRI 1.9.3. When I try to run with Rubinius I get this error in app/views/layouts/application.html.haml: "\xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8
alf
  • 18,372
  • 10
  • 61
  • 92
4
votes
1 answer

How do I cleanly remove rubinius?

I used http://railsinstaller.org/ to install a bunch of packages. Then I created a rails app by calling rails new myApp and then rails serverbut unfortunately I got this error: Click Here So I think I would just rather remove rubinius or do some…
t p
  • 71
  • 1
  • 6
3
votes
1 answer

Where are mixins implemented in Rubinius?

Where in the Rubinius source is the code that is responsible for including modules?(Specifically, to place module as super class of object class.)
Sławosz
  • 11,187
  • 15
  • 73
  • 106
3
votes
2 answers

Creating a language on the Rubinius VM

I'm looking to play around with the Rubinius VM to create a langauage, but just reading the documentation, I'm still quite lost on how to get started. Even looking at the projects, I still can't seem to figure out where the parsing and using the vm…
3
votes
3 answers

High performance calculations with Ruby?

My colleagues normally use C or Fortran for high performance calculations (math on large arrays of data). I wonder if there is any possibility for Ruby code to be compiled/converted and come close to optimized C code in terms of performance? There…
Andrei
  • 10,918
  • 12
  • 76
  • 110
1
2 3 4 5 6