blog.headius.com/2012/09/an-experiment-in-static-compilation-of.html

Preview meta tags from the blog.headius.com website.

Linked Hostnames

9

Search Engine Appearance

Google

https://blog.headius.com/2012/09/an-experiment-in-static-compilation-of.html

An experiment in static compilation of Ruby: FASTRUBY!

While at GoGaRuCo this weekend, I finally made good on an experiment I had been thinking about for a while: a static compiler for Ruby. I thought I'd share it with you good people today.First we have a simple Ruby script with a class in it:We compile it with fastruby, and it produces two .java source files: Hello.java and RObject.java.Hello.java implements the methods the Ruby class does in the script, and calls the same methods (with some mangling for invalid Java method names like _plus_ and _lt_).RObject.java implements stubs for all method names seen in the script. As a result, all dynamic calls can just be virtual invocations against RObject. Classes that implement one of the methods will just work and the call is direct. Classes that don't implement the called method will raise an error.RKernel comes with fastruby, and provides Kernel-level methods like



Bing

An experiment in static compilation of Ruby: FASTRUBY!

https://blog.headius.com/2012/09/an-experiment-in-static-compilation-of.html

While at GoGaRuCo this weekend, I finally made good on an experiment I had been thinking about for a while: a static compiler for Ruby. I thought I'd share it with you good people today.First we have a simple Ruby script with a class in it:We compile it with fastruby, and it produces two .java source files: Hello.java and RObject.java.Hello.java implements the methods the Ruby class does in the script, and calls the same methods (with some mangling for invalid Java method names like _plus_ and _lt_).RObject.java implements stubs for all method names seen in the script. As a result, all dynamic calls can just be virtual invocations against RObject. Classes that implement one of the methods will just work and the call is direct. Classes that don't implement the called method will raise an error.RKernel comes with fastruby, and provides Kernel-level methods like



DuckDuckGo

https://blog.headius.com/2012/09/an-experiment-in-static-compilation-of.html

An experiment in static compilation of Ruby: FASTRUBY!

While at GoGaRuCo this weekend, I finally made good on an experiment I had been thinking about for a while: a static compiler for Ruby. I thought I'd share it with you good people today.First we have a simple Ruby script with a class in it:We compile it with fastruby, and it produces two .java source files: Hello.java and RObject.java.Hello.java implements the methods the Ruby class does in the script, and calls the same methods (with some mangling for invalid Java method names like _plus_ and _lt_).RObject.java implements stubs for all method names seen in the script. As a result, all dynamic calls can just be virtual invocations against RObject. Classes that implement one of the methods will just work and the call is direct. Classes that don't implement the called method will raise an error.RKernel comes with fastruby, and provides Kernel-level methods like

  • General Meta Tags

    8
    • title
      An experiment in static compilation of Ruby: FASTRUBY! – Charles Oliver Nutter – Java, Ruby, and JVM guy trying to make sense of it all
    • charset
      utf-8
    • Content-Type
      text/html; charset=utf-8
    • X-UA-Compatible
      IE=edge
    • viewport
      width=device-width, initial-scale=1.0, maximum-scale=1.0
  • Open Graph Meta Tags

    2
    • og:description
      While at GoGaRuCo this weekend, I finally made good on an experiment I had been thinking about for a while: a static compiler for Ruby. I thought I'd share it with you good people today.First we have a simple Ruby script with a class in it:We compile it with fastruby, and it produces two .java source files: Hello.java and RObject.java.Hello.java implements the methods the Ruby class does in the script, and calls the same methods (with some mangling for invalid Java method names like _plus_ and _lt_).RObject.java implements stubs for all method names seen in the script. As a result, all dynamic calls can just be virtual invocations against RObject. Classes that implement one of the methods will just work and the call is direct. Classes that don't implement the called method will raise an error.RKernel comes with fastruby, and provides Kernel-level methods like
    • og:title
      An experiment in static compilation of Ruby: FASTRUBY!
  • Link Tags

    2
    • alternate
      /feed.xml
    • stylesheet
      /style.css

Emails

1
  • headius@headius,com

Links

13