Or at least, I doubt it. You're free to predict whatever you like.
At the very least, I don't think any amb implementations are making their way to jruby any time soon. Although that's not an issue with any real-world code.
amb is a nondeterministic operator. It's a fun toy, although not terribly practical. It's usually implemented in terms of call/cc, a rare (and, as commonly implemented, expensive) function. CRuby implements it, JRuby doesn't.
It's not revelant to my main point, but I thought I'd have a bit of fun.
Actually, JRuby+Truffle can already install gems using Bundler, although it uses some hacks to work around issues like currently-missing OpenSSL.
Realistic Rails apps will not work yet, but there is fast progress in this area, we started this year with a minimal webserver and now got a simple blog app working with a PostgreSQL adapter.
Truffle uses Graal, a new JIT compiler for the JVM written in Java. As it's written in Java, it can be used like a library - directly calling methods to compile exactly what you want, exactly how you want. Truffle uses this to compile your Ruby program using partial evaluation, a technique which is really good at removing the kind of overhead that the JVM usually adds, like costs for allocation.
This blog post and video explain where a lot of the big speedups come from.
I wish it could be summarised in a comment, but it's actually not "that simple," so I recommend you read Chris Seaton's posts about GraalVM and JRuby+Truffle which has some excellent high-level explanations [of why Graal is amazing]. :)
On the other hand, I am confident it's written in a much nicer way than most NES emulators (look at cpu.rb/ppu.rb).
The goal of optcarrot is explicitly not to be the "practical"or "the fastest NES emulator".
From https://github.com/mame/optcarrot
> NOTE: We do not aim to create a practical NES emulator. There have been already many great emulators available. We recommend you use another emulator if you just want to play a game.
12 comments
[ 2.9 ms ] story [ 57.7 ms ] threadOr at least, I doubt it. You're free to predict whatever you like.
At the very least, I don't think any amb implementations are making their way to jruby any time soon. Although that's not an issue with any real-world code.
It's not revelant to my main point, but I thought I'd have a bit of fun.
Realistic Rails apps will not work yet, but there is fast progress in this area, we started this year with a minimal webserver and now got a simple blog app working with a PostgreSQL adapter.
This blog post and video explain where a lot of the big speedups come from.
http://chrisseaton.com/rubytruffle/deoptimizing/
I wrote my PhD about this topic, so there is even a whole thesis if you really want to get the details on how it works.
http://chrisseaton.com/phd/
I wish it could be summarised in a comment, but it's actually not "that simple," so I recommend you read Chris Seaton's posts about GraalVM and JRuby+Truffle which has some excellent high-level explanations [of why Graal is amazing]. :)
http://chrisseaton.com/rubytruffle/
It makes use of this video format, which seems almost like a video equivalent of the PNM image format: https://wiki.multimedia.cx/index.php?title=YUV4MPEG2
I wish there was something similar that used RGB though.
It kinda shows how bad Ruby's performance is compared to most other languages.
The goal of optcarrot is explicitly not to be the "practical"or "the fastest NES emulator".
From https://github.com/mame/optcarrot > NOTE: We do not aim to create a practical NES emulator. There have been already many great emulators available. We recommend you use another emulator if you just want to play a game.
JRuby+Truffle's performance is not bad compared to other languages: https://github.com/smarr/are-we-fast-yet#current-status