SlideShare a Scribd company logo
1 of 204
Download to read offline
MacRuby on Rails
Abstract
MacRuby is an implementation of Ruby 1.9 that is built directly on
top of Mac OS X core technologies. Recently, MacRuby has
become viable as a tool for developing useful desktop applications
for Mac OS X. However, as of March 2011, MacRuby is still
missing some functionality that is present in cRuby. Therefore,
MacRuby is not able to run Ruby on Rails. In my presentation, I
will explain how I modified MacRuby to make it a suitable
foundation for running Rails. I would also like to explain some of
the technical intricacies that I discovered along the way.



                       This presentation was made possible by
Kouji Takao
Work
• Network Applied Communication
 Laboratory Ltd.

• System design, programming, planning
 and meeting
Spare Time
• MacRuby committer
  ➡Core
• cRuby committer
  ➡Readline module
Contact
         Information
• kouji.takao@gmail.com
• @takaokouji_en
• http://facebook.com/takaokouji
 (mainly in Japanese)
My Company
My Company
• Network Applied Communication
  Laboratory Ltd.
My Company
• Network Applied Communication
  Laboratory Ltd.
• a.k.a NaCl
My Company
• Network Applied Communication
  Laboratory Ltd.
• a.k.a NaCl
  ➡ means salt
My Company
My Company
• http://www.netlab.jp/
My Company
• http://www.netlab.jp/
• Shimane, Japan
My Company
• http://www.netlab.jp/
• Shimane, Japan
• Since 2001
My Company
• http://www.netlab.jp/
• Shimane, Japan
• Since 2001
  ➡ 10th Anniversary!
My Company
• http://www.netlab.jp/
• Shimane, Japan
• Since 2001
  ➡ 10th Anniversary!
• 57 people
My Company
• http://www.netlab.jp/
• Shimane, Japan
• Since 2001
  ➡ 10th Anniversary!
• 57 people
  ➡ 6 people are cRuby committers
My Company
• http://www.netlab.jp/
• Shimane, Japan
• Since 2001
  ➡ 10th Anniversary!
• 57 people
  ➡ 6 people are cRuby committers
• SI, Training, etc...
The NaCl Way
The NaCl Way




  NaCl's President
The NaCl Way
The NaCl Way
 First, I want You to be happy.
The NaCl Way
 First, I want You to be happy.

 Next, I want you to make Your
 Family happy.
The NaCl Way
 First, I want You to be happy.

 Next, I want you to make Your
 Family happy.

 Finally, if you have more happiness
 left, then please share it with Our
 Company :)
The NaCl Way
   (as I see it)
The NaCl Way
               (as I see it)

Employee


• First: Employee
The NaCl Way
               (as I see it)
                Employee's
Employee
                  Family

• First: Employee
• Next: Employee's Family
The NaCl Way
               (as I see it)
                Employee's
Employee                       Company
                  Family

• First: Employee
• Next: Employee's Family
• Finally: Company
The NaCl Way
              (as I see it)
                Employee's
Employee                      Company
                  Family

• First: Employee
• Next: Employee Family
• Finally: Company
The NaCl Way
              (as I see it)
                           y
                          m !
                      e y!
                     v n
               Employee's

                 lo a
Employee                      Company
                 Family
               I        p
•
•
    First: Employee
                 c o m
    Next: Employee Family
•   Finally: Company
MacRuby on Rails
MacRuby on Rails
MacRuby on Rails
MacRuby on Rails

In my presentation,
I will explain how I modified MacRuby to
make it a suitable foundation for running Rails.
I would also like to explain some of the
    MacRuby on Rails
technical internals that I discovered along the
way.
MacRuby on Rails
MacRuby
Ruby customized for Mac OS X
MacRuby
MacRuby
• MacRuby is a unique blend of Ruby
 1.9 and Objective-C.
MacRuby
• MacRuby is a unique blend of Ruby
  1.9 and Objective-C.

• The goal of the MacRuby project is
  to be 100% compatible
  syntactically and behaviorally with
  Ruby 1.9.
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
Ruby 1.9
          Application

             Ruby 1.9

                        Built-in
  Ruby VM
                          GC


  Built-in              Standard
  Library                Library


       System libraries

             OS
(Linux,Windows,Mac OS X,etc...)
MacRuby
       Application

           MacRuby

                      Built-in
Ruby VM
                        GC


Built-in          Standard
Library            Library


     System libraries


           Mac OS X
MacRuby
       Application

           MacRuby

                      Built-in
Ruby VM
                        GC


Built-in          Standard
Library            Library


     System libraries


           Mac OS X
MacRuby
       Application

           MacRuby

                      Built-in
Ruby VM
                        GC


Built-in          Standard
Library            Library


     System libraries


           Mac OS X
MacRuby
       Application

           MacRuby

                      Built-in
Ruby VM
                        GC


Built-in          Standard
Library            Library


     System libraries


           Mac OS X
MacRuby
       Application

           MacRuby


Ruby VM           AutoZone
                      Built-in
                        GC


Built-in          Standard
Library            Library


     System libraries


           Mac OS X
MacRuby
             Application

                 MacRuby


      Ruby VM           AutoZone
                            Built-in
                              GC




Foundation
      Built-in          Standard
      Library            Library


           System libraries


                 Mac OS X
MacRuby
                   Application

                       MacRuby


           Ruby VM            AutoZone
                                  Built-in
                                    GC




Foundation
            Built-in          Standard
            Library            Library


"kouji".transform("latin-hiragana")
               System libraries
#=>
                       Mac OS X
MacRuby
             Application

                 MacRuby


      Ruby VM           AutoZone
                            Built-in
                              GC




Foundation
      Built-in          Standard
      Library            Library


           System libraries


                 Mac OS X
MacRuby
             Application

                 MacRuby


      Ruby VM           AutoZone
                            Built-in
                              GC




Foundation
      Built-in          Standard
      Library            Library


           System libraries


                 Mac OS X
MacRuby
             Application

                 MacRuby


      Ruby VM           AutoZone
                            Built-in
                              GC




Foundation
      Built-in          Standard
      Library            Library


           System libraries


                 Mac OS X
MacRuby
             Application

                 MacRuby


      Ruby VM           AutoZone
                            Built-in
                              GC




Foundation
      Built-in          Standard
      Library            Library


           System libraries


                 Mac OS X
MacRuby
               Application

                  MacRuby
                                AutoZone
                        Generational
        LLVM
                        Threaded GC


       Built-in          Standard
        Library           Library
Foundation

            System libraries


                  Mac OS X
MacRuby on Rails
Making Ruby on Rails work on MacRuby
Current Status
Current Status
$ rails new demo
Current Status
$ rails new demo

      $ rails generate scaffold ...
Current Status
$ rails new demo

      $ rails generate scaffold ...


             $ rails server
Current Status
$ rails new demo

      $ rails generate scaffold ...


             $ rails server
7 months ago...
7 months ago...
March 2011 in Japan
7 months ago...
March 2011 in Japan
• I thought, "Does Rails work on MacRuby?".
7 months ago...
March 2011 in Japan
• I thought, "Does Rails work on MacRuby?".
• I managed to install Rails.
$ sudo macgem install rails
7 gems installed

$ sudo macgem install sqlite3-ruby
2 gems installed
Perhaps...
Perhaps...
• I thought, "OK, it's installed, but surely
  the Rails generators won't work...".
Perhaps...
  • I thought, "OK, it's installed, but surely
     the Rails generators won't work...".
  • However, I managed to create a Rails project!?
$ macruby -S rails new demo
        create
        create README
  ...
        create vendor/plugins
        create vendor/plugins/.gitkeep
Are you kidding me?
Are you kidding me?
• I tried to generate a scaffold...
Are you kidding me?
• I tried to generate a scaffold...
• It failed. After all Rails didn't work on
   MacRuby.
$ macruby -S rails generate scaffold Bookmark
title:string description:text url:string
...
Assertion failed: ((size_t)pos <
current_exceptions.size()), function
pop_current_exception, file vm.cpp, line 3434.
zsh: abort      macruby -S rails generate scaffold
Bookmark title:string description:text
Are you kidding me?
• I tried to generate a scaffold...
• It failed. After all Rails didn't work on
   MacRuby.
$ macruby -S rails generate scaffold Bookmark
title:string description:text url:string
     $ macruby -S rails server
... ...
Assertion failed: ((size_t)pos < <
     Assertion failed: ((size_t)pos
current_exceptions.size()), function
     current_exceptions.size()), function
pop_current_exception, file file vm.cpp, line 3434.
     pop_current_exception, vm.cpp, line 3434.
zsh:zsh: abort macruby -S rails generate scaffold
      abort         macruby -S rails server
Bookmark title:string description:text
My approach
  Run Rails

SEGV or abort

  Research

   Coding

Run RubySpec

  Run Rails
My approach
  Run Rails

SEGV or abort

  Research

   Coding

Run RubySpec

  Run Rails
My approach
  Run Rails

SEGV or abort

  Research

   Coding

Run RubySpec

  Run Rails
My approach
  Run Rails

SEGV or abort

  Research

   Coding

Run RubySpec

  Run Rails
My approach
  Run Rails

SEGV or abort

  Research

   Coding

Run RubySpec

  Run Rails
My approach
  Run Rails

SEGV or abort

  Research

   Coding

Run RubySpec

  Run Rails
Coding
      My approach
Run RubySpec

  Run Rails

SEGV or abort

  Research

   Coding

Run RubySpec
Coding
      My approach
Run RubySpec

  Run Rails
                Required knowledge
SEGV or abort   and technology
                •   cRuby
  Research
                •   Objective-C
   Coding       •   C++
Run RubySpec    •   LLVM
A couple of examples of
what I have fixed so far
#860 catch/throw
                 (in "old" MacRuby)
➡ MacRuby aborts if you use catch and throw inside
  a rescue clause.
#860 catch/throw
                 (in "old" MacRuby)
➡ MacRuby aborts if you use catch and throw inside
  a rescue clause.
01: begin
02:   raise "A"
03: rescue
04:   catch(:foo) { throw :foo }
05: end
#860 catch/throw
                    (in "old" MacRuby)
  ➡ MacRuby aborts if you use catch and throw inside
     a rescue clause.
  01: begin
  02:   raise "A"
  03: rescue
  04:   catch(:foo) { throw :foo }
  05: end
:ok
Assertion failed: ((size_t)pos < current_exceptions.size()),
function pop_current_exception, file vm.cpp, line 3448.
Exception Handling
      (in MacRuby)
Exception Handling
            (in MacRuby)
01: begin
02:   raise "A"
03: rescue
04:   begin
05:     raise "B"
06:   rescue
07:   end
08: end
Exception Handling
            (in MacRuby)
01: begin
02:   raise "A"
03: rescue
04:   begin
05:     raise "B"
06:   rescue
07:   end
08: end
Exception Handling
            (in MacRuby)
01: begin
02:   raise "A"
03: rescue
04:   begin
05:     raise "B"
06:   rescue
07:   end
08: end
                           Exception Stack
Exception Handling
             (in MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   begin
05:     raise "B"
06:   rescue
07:   end
08: end                           "A"
                            Exception Stack
Exception Handling
             (in MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   begin
05:     raise "B"
06:   rescue
07:   end
08: end                           "A"
                            Exception Stack
Exception Handling
             (in MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   begin
05:     raise "B" push
06:   rescue                      "B"
07:   end
08: end                           "A"
                            Exception Stack
Exception Handling
             (in MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   begin
05:     raise "B" push
06:   rescue                      "B"
07:   end
08: end                           "A"
                            Exception Stack
Exception Handling
             (in MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   begin
05:     raise "B" push
06:   rescue
07:   end pop
08: end                           "A"
                            Exception Stack
Exception Handling
             (in MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   begin
05:     raise "B" push
06:   rescue
07:   end pop
08: end pop
                            Exception Stack
Exception Handling and catch / throw
             (in MacRuby)




                            Exception Stack
Exception Handling and catch / throw
             (in MacRuby)

01: catch(:foo) {
02:   begin
03:     raise "A"
04:   rescue
05:     throw :foo
06:   end
07: }


                            Exception Stack
Exception Handling and catch / throw
             (in MacRuby)

01: catch(:foo) {
02:   begin
03:     raise "A"
04:   rescue
05:     throw :foo
06:   end
07: }


                            Exception Stack
Exception Handling and catch / throw
             (in MacRuby)

01: catch(:foo) {
02:   begin
03:     raise "A" push
04:   rescue
05:     throw :foo
06:   end
07: }
                                  "A"
                            Exception Stack
Exception Handling and catch / throw
             (in MacRuby)

01: catch(:foo) {
02:   begin
03:     raise "A" push
04:   rescue
05:     throw :foo
06:   end
07: }
                                  "A"
                            Exception Stack
Exception Handling and catch / throw
             (in MacRuby)

01: catch(:foo) {
02:   begin
03:     raise "A" push
04:   rescue
05:     throw :foo
06:   end
07: }
                                  "A"
                            Exception Stack
Exception Handling and catch / throw
             (in MacRuby)

01: catch(:foo) {
02:   begin
03:     raise "A" push
04:   rescue
05:     throw :foo pop
06:   end
07: }


                            Exception Stack
throw
               (in "old " MacRuby)
Before being fixed(60723bf~), 'throw' always
popped the current Exception.
vm.cpp:4321:
VALUE
RoxorVM::ruby_throw(VALUE tag, VALUE value)
{
...
    if (current_exception() != Qnil) {
        pop_current_exception();
    }
...
throw
               (in "old " MacRuby)
Before being fixed(60723bf~), 'throw' always
popped the current Exception.
vm.cpp:4321:
VALUE
RoxorVM::ruby_throw(VALUE tag, VALUE value)
{
...
    if (current_exception() != Qnil) {
        pop_current_exception();
    }
...
throw
               (in "old " MacRuby)
Before being fixed(60723bf~), 'throw' always
popped the current Exception.
vm.cpp:4321:
VALUE
RoxorVM::ruby_throw(VALUE tag, VALUE value)
{
...
    if (current_exception() != Qnil) {
        pop_current_exception();
    }
...
#860 catch/throw
          (in "old" MacRuby)
01: begin
02:   raise "A"
03: rescue
04:   catch(:foo) { throw :foo }
05: end




                          Exception Stack
#860 catch/throw
          (in "old" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }
05: end


                                "A"
                          Exception Stack
#860 catch/throw
          (in "old" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }
05: end


                                "A"
                          Exception Stack
#860 catch/throw
          (in "old" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }        pop

05: end




                          Exception Stack
#860 catch/throw
          (in "old" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }        pop

05: end pop




                          Exception Stack
#860 catch/throw
          (in "old" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }        pop

05: end pop


                         t ! !
                o r
         A b              Exception Stack
How to fix
          (in "new" MacRuby)
01: begin
02:   raise "A"
03: rescue
04:   catch(:foo) { throw :foo }
05: end




                         Exception Stack
How to fix
          (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }
05: end


                               "A"
                         Exception Stack
How to fix
          (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }
                store
05: end


                               "A"
                         Exception Stack
How to fix
          (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }
                store
05: end


                               "A"
                         Exception Stack
How to fix
          (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { throw :foo }
                store
05: end pop




                         Exception Stack
How to fix
                (in "new" MacRuby)
In the new implementation, MacRuby only pops
exceptions when necessary (60723bf)
vm.cpp:4318:

VALUE
RoxorVM::ruby_throw(VALUE tag, VALUE value)
{
...
    while (catch_ptr->current_exception !=
           current_exception()) {
        pop_current_exception();
    }
...
How to fix
                (in "new" MacRuby)
In the new implementation, MacRuby only pops
exceptions when necessary (60723bf)
vm.cpp:4318:

VALUE
RoxorVM::ruby_throw(VALUE tag, VALUE value)
{
...
    while (catch_ptr->current_exception !=
           current_exception()) {
        pop_current_exception();
    }
...
How to fix
                (in "new" MacRuby)
In the new implementation, MacRuby only pops
exceptions when necessary (60723bf)
vm.cpp:4318:

VALUE
RoxorVM::ruby_throw(VALUE tag, VALUE value)
{
...
    while (catch_ptr->current_exception !=
           current_exception()) {
        pop_current_exception();
    }
...
#860 Fixed
            (in "new" MacRuby)
01: begin
02:   raise "A"
03: rescue
04:   catch(:foo) {
05:     begin
06:        raise "B"
07:     rescue
08:        throw :foo
09:     end
10:   }
11: end                    Exception Stack
#860 Fixed
            (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { store
05:     begin
06:        raise "B"
07:     rescue
08:        throw :foo
09:     end                   "A"
10:   }
11: end                  Exception Stack
#860 Fixed
            (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { store
05:     begin
06:        raise "B" push
07:     rescue                 "B"
08:        throw :foo
09:     end                    "A"
10:   }
11: end                   Exception Stack
#860 Fixed
            (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { store
05:     begin
06:        raise "B" push
07:     rescue                 "B"
08:        throw :foo
09:     end                    "A"
10:   }
11: end                   Exception Stack
#860 Fixed
            (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { store
05:     begin
06:        raise "B" push
07:     rescue
08:        throw :foo pop
09:     end                    "A"
10:   }
11: end                   Exception Stack
#860 Fixed
            (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { store
05:     begin
06:        raise "B" push
07:     rescue
08:        throw :foo pop
09:     end                    "A"
10:   }
11: end                   Exception Stack
#860 Fixed
            (in "new" MacRuby)
01: begin
02:   raise "A" push
03: rescue
04:   catch(:foo) { store
05:     begin
06:        raise "B" push
07:     rescue
08:        throw :foo pop
09:     end
10:   }
11: end pop               Exception Stack
#1192 Constant Lookup
➡ MacRuby failed to correctly look up
  constants in a number of situations when
  you used module_eval and class_eval.
#1192 Constant Lookup
➡ MacRuby failed to correctly look up
  constants in a number of situations when
  you used module_eval and class_eval.
 module A
   B = 10
   Object.class_eval { B }
 end
#1192 Constant Lookup
   ➡ MacRuby failed to correctly look up
     constants in a number of situations when
     you used module_eval and class_eval.
    module A
      B = 10
      Object.class_eval { B }
    end

reduction.rb:3:in `block': uninitialized constant
B (NameError)
#1192 Constant Lookup
   ➡ MacRuby failed to correctly look up
     constants in a number of situations when
     you used module_eval and class_eval.
    module A            cRuby
      B = 10
      Object.class_eval { B }
    end

reduction.rb:3:in `block': uninitialized constant
B (NameError)
#1192 Constant Lookup
   ➡ MacRuby failed to correctly look up
     constants in a number of situations when
     you used module_eval and class_eval.
    module A
      BMacRuby
         = 10
      Object.class_eval { B }
    end

reduction.rb:3:in `block': uninitialized constant
B (NameError)
Constant Lookup
     (in cRuby)
Constant Lookup
             (in cRuby)

1: module A
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
             (in cRuby)

1: module A
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
             (in cRuby)

1: module A
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
             (in cRuby)

1: module A
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
             (in cRuby)

1: module A
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
             (in cRuby)

1: module A
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
               (in cRuby)

1: module A       Lexical Scope
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
                  (in cRuby)

1: module A         Lexical Scope
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
                                 Lookup
7:   end
                      ons  tant
8: end      exi
              L cal C
Constant Lookup
           (in "old" MacRuby)
MacRuby had not implemented Lexical
Constant Lookup.
1: module A
2:   module B
3:     CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
           (in "old" MacRuby)
MacRuby had not implemented Lexical
Constant Lookup.
1: module A
2:   module B
3:        MacRuby
       CONST = "B’s Const"
4:     module ::A
5:       p CONST
6:     end
7:   end
8: end
Constant Lookup
                     (in "old" MacRuby)
      MacRuby had not implemented Lexical
      Constant Lookup.
      1: module A
      2:   module B
      3:        MacRuby
             CONST = "B’s Const"
      4:     module ::A
      5:       p CONST
      6:     end
      7:   end
      8: end

-e:5:in `block': uninitialized constant A::CONST (NameError)
Constant Lookup is complex
          (in cRuby)
Constant Lookup is complex
                            (in cRuby)
       class_eval(&Block)                 class_eval(String)
01:   module A                    01:    module A
02:     CONST = "A's CONST"       02:      CONST = "A's CONST"
03:     def f()                   03:      def f()
04:       class_eval {            04:        class_eval <<-EOS
05:         p CONST               05:          p CONST
06:       }                       06:        EOS
07:     end                       07:      end
08:   end                         08:    end
09:                               09:
10:   class K                     10:    class K
11:     CONST = "K's CONST"       11:      CONST = "K's CONST"
12:     extend A                  12:      extend A
13:     f()                       13:      f()
14:   end                         14:    end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A      Lexical Scope
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(&Block)
01:   module A       Lexical Scope
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval {
05:         p CONST
06:       }               ON    ST"
07:     end        "A's C
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(String)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval <<-EOS
05:         p CONST
06:       EOS
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(String)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval <<-EOS
05:         p CONST
06:       EOS
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(String)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval <<-EOS
05:         p CONST
06:       EOS
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(String)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval <<-EOS
05:         p CONST
06:       EOS
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(String)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval <<-EOS
05:         p CONST
06:       EOS
07:     end
08:   end
09:
10:   class K
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(String)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval <<-EOS
05:         p CONST
06:       EOS
07:     end
08:   end
09:
10:   class K       Dynamic Scope
11:     CONST = "K's CONST"
12:     extend A
13:     f()
14:   end
class_eval(String)
01:   module A
02:     CONST = "A's CONST"
03:     def f()
04:       class_eval <<-EOS
05:         p CONST
06:       EOS
07:     end
08:   end
09:
10:   class K       Dynamic Scope
11:     CONST = "K's CONST"
12:     extend A
13:     f()              ON   ST"
14:   end          "K's C
Constant Lookup is complex
                            (in cRuby)
       class_eval(&Block)                 class_eval(String)
01:   module A Lexical Scope      01:    module A
02:     CONST = "A's CONST"       02:      CONST = "A's CONST"
03:     def f()                   03:      def f()
04:       class_eval {            04:        class_eval <<-EOS
05:         p CONST               05:          p CONST
06:       }
                          ST"     06:        EOS
07:     end
              "A's CON            07:      end
08:   end                         08:    end
09:                               09:
10:   class K                     10:    class K    Dynamic Scope
11:     CONST = "K's CONST"       11:      CONST = "K's CONST"
12:     extend A                  12:      extend A
13:     f()                       13:      f()
                                                         ON   ST"
14:   end                         14:    end     " K's C
I somehow managed to fix this
          (in MacRuby)
I somehow managed to fix this
                      (in MacRuby)

• Three attempts to get it right.
I somehow managed to fix this
                    (in MacRuby)

• Three attempts to get it right.
• More than 3000 lines of code changed.
I somehow managed to fix this
                     (in MacRuby)

• Three attempts to get it right.
• More than 3000 lines of code changed.
                               21 Apr 2011 15:24 Laurent S.

     it's official,
     kouji is the hero of th e day/week/month/...?
     his patch seem  s to fix remaining lexical
      const lookup bugs :)
A very complex bug
     (in "new" MacRuby)
A very complex bug
            (in "new" MacRuby)

01:   module A
02:     B = 42
03:   end
04:
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
            (in "new" MacRuby)

01:   module A
02:     B = 42
03:   end
04:
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
            (in "new" MacRuby)

01:   module A
02:     B = 42
03:   end
04:
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
            (in "new" MacRuby)

01:   module A
02:     B = 42
03:   end
04:
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
            (in "new" MacRuby)

01:   module A
02:     B = 42
03:   end
04:
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
            (in "new" MacRuby)

01:   module A
02:     B = 42
03:   end
04:
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
            (in "new" MacRuby)

01:   module A
02:     B = 42
03:   end
04:
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
            (in "new" MacRuby)

01:   module A
02:     B = 42
03:   end
04:                       Lexical
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
               (in "new" MacRuby)
CAUTION
'class_eval' does not add it's own receiver
    01: module A
(A) 02: theBconstant lookup scope.
     to       = 42
   03:   end
   04:                       Lexical
   05:   A.class_eval do
   06:     def self.f
   07:       p B
   08:     end
   09:   end
   10:
   11:   A.f
A very complex bug
                 (in cRuby)

01:   module A
02:     B = 42
03:   end
04:
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
               (in cRuby)

01:   module A
02:     B = 42
      end uby 1.9
03:     R
04:      ➡42
05:   A.class_eval do
06:     def self.f
07:       p B
08:     end
09:   end
10:
11:   A.f
A very complex bug
                 (in cRuby)

   01: module A
   02:      B = 42
   03: end uby   1.9
            R
   04:       ➡ 42
   05: A.class_eval do
   06:      def self.f
   07:        p B                      eError)
                                 tB(Nam
                            nstan
   08:      end
   09: .8.7
       1  end     ialized co
R u10: `f': uninit
   by
   -e :8:in
➡11: A.f
A very complex bug
                 (in cRuby)

   01: module A
   02:      B = 42
   03: end uby   1.9
            R
   04:
      A cR   ➡ 42

          uby's
   05: A.class_eval do
   06:      def self.f
                                          ror)
   07:
   08:
   09: .8.7
            end Bug
              p B

                        d constantB(NameEr

R
       1  end
  u10: `f': uninit
   by             ialize
   -e :8:in
➡11: A.f
Demo
$ rails new demo

      $ rails generate scaffold ...


             $ rails server
#1390 rb_vm_prepare_block
➡ Abort if the "About your application’s
    environment" is link is clicked.


                                                 CLICK!


 Assertion failed: ((b->flags & flags) == flags), function
 rb_vm_prepare_block, file dispatcher.cpp, line 1406.
 zsh: abort     env VM_DISABLE_RBO=1 macruby -S rails server
The MacRuby train trip
     continues...
The MacRuby train trip
     continues...
http://ww
            w.macrub
                    y.org/
The MacRuby train trip
     continues...    u by
                         m acr
http://ww             @
          w.macrub
                  y.org/
The MacRuby train trip
     continues...    u by
                         m acr
http://ww             @
          w.macrub
                  y.org/

  GitHub:MacRuby/MacRuby
The MacRuby train trip
       continues...    u by
                           m acr
  http://ww             @
            w.macrub
                    y.org/

    GitHub:MacRuby/MacRuby

mac ruby-devel@lists.macosforge.org
Conclusion
Conclusion
• MacRuby
 ➡MacRuby is a unique blend of Ruby 1.9 and
     Objective-C.

  ➡The goal is to be 100% compatible with Ruby 1.9.
Conclusion
• MacRuby
 ➡MacRuby is a unique blend of Ruby 1.9 and
     Objective-C.

  ➡The goal is to be 100% compatible with Ruby 1.9.
• MacRuby on Rails
 ➡We're now able to show the default Rails welcome
     page.

  ➡But there is still a lot to do.
Acknowledgment
Acknowledgment
• The RubyConf hosts and organizers
Acknowledgment
• The RubyConf hosts and organizers
• Tor Yamamoto-Sorensen (@shakaijin)
Acknowledgment
• The RubyConf hosts and organizers
• Tor Yamamoto-Sorensen (@shakaijin)
• Everyone present today
Thank you
Q &A
• If you have a question, please ask me, but if
  possible please speak slowly.
• or contact @takaokouji_en by Twitter
• or send e-mail to MacRuby ML

More Related Content

What's hot

TorqueBox - Ultrapassando a fronteira entre Java e Ruby
TorqueBox - Ultrapassando a fronteira entre Java e RubyTorqueBox - Ultrapassando a fronteira entre Java e Ruby
TorqueBox - Ultrapassando a fronteira entre Java e RubyBruno Oliveira
 
TorqueBox for Rubyists
TorqueBox for RubyistsTorqueBox for Rubyists
TorqueBox for Rubyistsbobmcwhirter
 
JUDCon 2010 Boston : TorqueBox
JUDCon 2010 Boston : TorqueBoxJUDCon 2010 Boston : TorqueBox
JUDCon 2010 Boston : TorqueBoxmarekgoldmann
 
DataMapper on Infinispan
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on InfinispanLance Ball
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxbobmcwhirter
 
MyRocks in MariaDB: why and how
MyRocks in MariaDB: why and howMyRocks in MariaDB: why and how
MyRocks in MariaDB: why and howSergey Petrunya
 
TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011Lance Ball
 
Fast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browserFast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browserAndreas Bovens
 
Gemification plan of Standard Library on Ruby
Gemification plan of Standard Library on RubyGemification plan of Standard Library on Ruby
Gemification plan of Standard Library on RubyHiroshi SHIBATA
 

What's hot (12)

TorqueBox - Ultrapassando a fronteira entre Java e Ruby
TorqueBox - Ultrapassando a fronteira entre Java e RubyTorqueBox - Ultrapassando a fronteira entre Java e Ruby
TorqueBox - Ultrapassando a fronteira entre Java e Ruby
 
TorqueBox for Rubyists
TorqueBox for RubyistsTorqueBox for Rubyists
TorqueBox for Rubyists
 
JUDCon 2010 Boston : TorqueBox
JUDCon 2010 Boston : TorqueBoxJUDCon 2010 Boston : TorqueBox
JUDCon 2010 Boston : TorqueBox
 
DataMapper on Infinispan
DataMapper on InfinispanDataMapper on Infinispan
DataMapper on Infinispan
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBox
 
MyRocks in MariaDB
MyRocks in MariaDBMyRocks in MariaDB
MyRocks in MariaDB
 
MyRocks in MariaDB: why and how
MyRocks in MariaDB: why and howMyRocks in MariaDB: why and how
MyRocks in MariaDB: why and how
 
2 Basics
2 Basics2 Basics
2 Basics
 
TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011TorqueBox - Ruby Hoedown 2011
TorqueBox - Ruby Hoedown 2011
 
MariaDB - The Future of MySQL?
MariaDB - The Future of MySQL?MariaDB - The Future of MySQL?
MariaDB - The Future of MySQL?
 
Fast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browserFast & Furious: Speed in the Opera browser
Fast & Furious: Speed in the Opera browser
 
Gemification plan of Standard Library on Ruby
Gemification plan of Standard Library on RubyGemification plan of Standard Library on Ruby
Gemification plan of Standard Library on Ruby
 

Similar to MacRuby on Rails

Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS developmenttoamitkumar
 
Ruby for devops
Ruby for devopsRuby for devops
Ruby for devopsAdam Klein
 
Ruby and Rails short motivation
Ruby and Rails short motivationRuby and Rails short motivation
Ruby and Rails short motivationjistr
 
MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?Joshua Ballanco
 
An introduction to the ruby ecosystem
An introduction to the ruby ecosystemAn introduction to the ruby ecosystem
An introduction to the ruby ecosystemGeison Goes
 
Introduction To Rails
Introduction To RailsIntroduction To Rails
Introduction To RailsEric Gruber
 
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...rhatr
 
OSv: probably the best OS for cloud workloads you've never hear of
OSv: probably the best OS for cloud workloads you've never hear ofOSv: probably the best OS for cloud workloads you've never hear of
OSv: probably the best OS for cloud workloads you've never hear ofrhatr
 
MacRuby For Ruby Developers
MacRuby For Ruby DevelopersMacRuby For Ruby Developers
MacRuby For Ruby DevelopersRenzo Borgatti
 
Matt Franklin - Apache Software (Geekfest)
Matt Franklin - Apache Software (Geekfest)Matt Franklin - Apache Software (Geekfest)
Matt Franklin - Apache Software (Geekfest)W2O Group
 
Mac ruby deployment
Mac ruby deploymentMac ruby deployment
Mac ruby deploymentThilo Utke
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionHao Fan
 
Crate - ruby based standalone executables
Crate - ruby based standalone executablesCrate - ruby based standalone executables
Crate - ruby based standalone executablesJeremy Hinegardner
 
Unikernelize your Java Application
Unikernelize your Java ApplicationUnikernelize your Java Application
Unikernelize your Java ApplicationMario Žagar
 

Similar to MacRuby on Rails (20)

Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS development
 
Ruby for devops
Ruby for devopsRuby for devops
Ruby for devops
 
Ruby and Rails short motivation
Ruby and Rails short motivationRuby and Rails short motivation
Ruby and Rails short motivation
 
MacRuby
MacRubyMacRuby
MacRuby
 
MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?MacRuby: What is it? and why should you care?
MacRuby: What is it? and why should you care?
 
An introduction to the ruby ecosystem
An introduction to the ruby ecosystemAn introduction to the ruby ecosystem
An introduction to the ruby ecosystem
 
Introduction To Rails
Introduction To RailsIntroduction To Rails
Introduction To Rails
 
MacRuby on Rails
MacRuby on RailsMacRuby on Rails
MacRuby on Rails
 
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
You Call that Micro, Mr. Docker? How OSv and Unikernels Help Micro-services S...
 
OSv: probably the best OS for cloud workloads you've never hear of
OSv: probably the best OS for cloud workloads you've never hear ofOSv: probably the best OS for cloud workloads you've never hear of
OSv: probably the best OS for cloud workloads you've never hear of
 
MacRuby For Ruby Developers
MacRuby For Ruby DevelopersMacRuby For Ruby Developers
MacRuby For Ruby Developers
 
Matt Franklin - Apache Software (Geekfest)
Matt Franklin - Apache Software (Geekfest)Matt Franklin - Apache Software (Geekfest)
Matt Franklin - Apache Software (Geekfest)
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Mac ruby deployment
Mac ruby deploymentMac ruby deployment
Mac ruby deployment
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Crate - ruby based standalone executables
Crate - ruby based standalone executablesCrate - ruby based standalone executables
Crate - ruby based standalone executables
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
Unikernelize your Java Application
Unikernelize your Java ApplicationUnikernelize your Java Application
Unikernelize your Java Application
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
 

More from 宏治 高尾

Smalruby - The neat thing to connect Rubyists and Scratchers -
Smalruby - The neat thing to connect Rubyists and Scratchers -Smalruby - The neat thing to connect Rubyists and Scratchers -
Smalruby - The neat thing to connect Rubyists and Scratchers -宏治 高尾
 
小学生3年生から使えるRubyのビジュアルプログラミングエディタ「スモウルビー」と、それを活用した任意団体「Rubyプログラミング少年団」[第7回フクオカ...
小学生3年生から使えるRubyのビジュアルプログラミングエディタ「スモウルビー」と、それを活用した任意団体「Rubyプログラミング少年団」[第7回フクオカ...小学生3年生から使えるRubyのビジュアルプログラミングエディタ「スモウルビー」と、それを活用した任意団体「Rubyプログラミング少年団」[第7回フクオカ...
小学生3年生から使えるRubyのビジュアルプログラミングエディタ「スモウルビー」と、それを活用した任意団体「Rubyプログラミング少年団」[第7回フクオカ...宏治 高尾
 
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Pro...
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyPro...(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyPro...
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Pro...宏治 高尾
 
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Prog...
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyProg...(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyProg...
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Prog...宏治 高尾
 
Kids, Ruby, Fun! ぼくたち、 Rubyプログラミング少年団! 〜小学生からはじめる Ruby プログラミング〜
Kids,Ruby,Fun! ぼくたち、 Rubyプログラミング少年団! 〜小学生からはじめる Ruby プログラミング〜Kids,Ruby,Fun! ぼくたち、 Rubyプログラミング少年団! 〜小学生からはじめる Ruby プログラミング〜
Kids, Ruby, Fun! ぼくたち、 Rubyプログラミング少年団! 〜小学生からはじめる Ruby プログラミング〜宏治 高尾
 
Kids, Ruby, Run! - Introduction of the Smalruby and the Ruby Programming Shou...
Kids, Ruby, Run! - Introduction of the Smalruby and the Ruby Programming Shou...Kids, Ruby, Run! - Introduction of the Smalruby and the Ruby Programming Shou...
Kids, Ruby, Run! - Introduction of the Smalruby and the Ruby Programming Shou...宏治 高尾
 
ぼくたちRubyプログラミング少年団!~小・中学生向けプログラミング言語Rubyの学習塾の運営、学習教材の開発・販売事業~
ぼくたちRubyプログラミング少年団!~小・中学生向けプログラミング言語Rubyの学習塾の運営、学習教材の開発・販売事業~ぼくたちRubyプログラミング少年団!~小・中学生向けプログラミング言語Rubyの学習塾の運営、学習教材の開発・販売事業~
ぼくたちRubyプログラミング少年団!~小・中学生向けプログラミング言語Rubyの学習塾の運営、学習教材の開発・販売事業~宏治 高尾
 
勉強会をはじめよう
勉強会をはじめよう勉強会をはじめよう
勉強会をはじめよう宏治 高尾
 
Mac Rubyではじめる!Macアプリ開発入門
Mac Rubyではじめる!Macアプリ開発入門Mac Rubyではじめる!Macアプリ開発入門
Mac Rubyではじめる!Macアプリ開発入門宏治 高尾
 
やさしいMatzの作り方
やさしいMatzの作り方やさしいMatzの作り方
やさしいMatzの作り方宏治 高尾
 
RubyによるMac OS Xデスクトップアプリケーション開発入門--Snow Leopard対応版
RubyによるMac OS Xデスクトップアプリケーション開発入門--Snow Leopard対応版RubyによるMac OS Xデスクトップアプリケーション開発入門--Snow Leopard対応版
RubyによるMac OS Xデスクトップアプリケーション開発入門--Snow Leopard対応版宏治 高尾
 
RubyによるMac OS Xデスクトップアプリケーション開発入門
RubyによるMac OS Xデスクトップアプリケーション開発入門RubyによるMac OS Xデスクトップアプリケーション開発入門
RubyによるMac OS Xデスクトップアプリケーション開発入門宏治 高尾
 

More from 宏治 高尾 (12)

Smalruby - The neat thing to connect Rubyists and Scratchers -
Smalruby - The neat thing to connect Rubyists and Scratchers -Smalruby - The neat thing to connect Rubyists and Scratchers -
Smalruby - The neat thing to connect Rubyists and Scratchers -
 
小学生3年生から使えるRubyのビジュアルプログラミングエディタ「スモウルビー」と、それを活用した任意団体「Rubyプログラミング少年団」[第7回フクオカ...
小学生3年生から使えるRubyのビジュアルプログラミングエディタ「スモウルビー」と、それを活用した任意団体「Rubyプログラミング少年団」[第7回フクオカ...小学生3年生から使えるRubyのビジュアルプログラミングエディタ「スモウルビー」と、それを活用した任意団体「Rubyプログラミング少年団」[第7回フクオカ...
小学生3年生から使えるRubyのビジュアルプログラミングエディタ「スモウルビー」と、それを活用した任意団体「Rubyプログラミング少年団」[第7回フクオカ...
 
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Pro...
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyPro...(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyPro...
(final version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Pro...
 
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Prog...
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyProg...(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and RubyProg...
(beta version) KIDS, RUBY, FUN! - Introduction of the Smalruby and Ruby Prog...
 
Kids, Ruby, Fun! ぼくたち、 Rubyプログラミング少年団! 〜小学生からはじめる Ruby プログラミング〜
Kids,Ruby,Fun! ぼくたち、 Rubyプログラミング少年団! 〜小学生からはじめる Ruby プログラミング〜Kids,Ruby,Fun! ぼくたち、 Rubyプログラミング少年団! 〜小学生からはじめる Ruby プログラミング〜
Kids, Ruby, Fun! ぼくたち、 Rubyプログラミング少年団! 〜小学生からはじめる Ruby プログラミング〜
 
Kids, Ruby, Run! - Introduction of the Smalruby and the Ruby Programming Shou...
Kids, Ruby, Run! - Introduction of the Smalruby and the Ruby Programming Shou...Kids, Ruby, Run! - Introduction of the Smalruby and the Ruby Programming Shou...
Kids, Ruby, Run! - Introduction of the Smalruby and the Ruby Programming Shou...
 
ぼくたちRubyプログラミング少年団!~小・中学生向けプログラミング言語Rubyの学習塾の運営、学習教材の開発・販売事業~
ぼくたちRubyプログラミング少年団!~小・中学生向けプログラミング言語Rubyの学習塾の運営、学習教材の開発・販売事業~ぼくたちRubyプログラミング少年団!~小・中学生向けプログラミング言語Rubyの学習塾の運営、学習教材の開発・販売事業~
ぼくたちRubyプログラミング少年団!~小・中学生向けプログラミング言語Rubyの学習塾の運営、学習教材の開発・販売事業~
 
勉強会をはじめよう
勉強会をはじめよう勉強会をはじめよう
勉強会をはじめよう
 
Mac Rubyではじめる!Macアプリ開発入門
Mac Rubyではじめる!Macアプリ開発入門Mac Rubyではじめる!Macアプリ開発入門
Mac Rubyではじめる!Macアプリ開発入門
 
やさしいMatzの作り方
やさしいMatzの作り方やさしいMatzの作り方
やさしいMatzの作り方
 
RubyによるMac OS Xデスクトップアプリケーション開発入門--Snow Leopard対応版
RubyによるMac OS Xデスクトップアプリケーション開発入門--Snow Leopard対応版RubyによるMac OS Xデスクトップアプリケーション開発入門--Snow Leopard対応版
RubyによるMac OS Xデスクトップアプリケーション開発入門--Snow Leopard対応版
 
RubyによるMac OS Xデスクトップアプリケーション開発入門
RubyによるMac OS Xデスクトップアプリケーション開発入門RubyによるMac OS Xデスクトップアプリケーション開発入門
RubyによるMac OS Xデスクトップアプリケーション開発入門
 

Recently uploaded

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 

Recently uploaded (20)

Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 

MacRuby on Rails

  • 1. MacRuby on Rails Abstract MacRuby is an implementation of Ruby 1.9 that is built directly on top of Mac OS X core technologies. Recently, MacRuby has become viable as a tool for developing useful desktop applications for Mac OS X. However, as of March 2011, MacRuby is still missing some functionality that is present in cRuby. Therefore, MacRuby is not able to run Ruby on Rails. In my presentation, I will explain how I modified MacRuby to make it a suitable foundation for running Rails. I would also like to explain some of the technical intricacies that I discovered along the way. This presentation was made possible by
  • 3. Work • Network Applied Communication Laboratory Ltd. • System design, programming, planning and meeting
  • 4. Spare Time • MacRuby committer ➡Core • cRuby committer ➡Readline module
  • 5. Contact Information • kouji.takao@gmail.com • @takaokouji_en • http://facebook.com/takaokouji (mainly in Japanese)
  • 7. My Company • Network Applied Communication Laboratory Ltd.
  • 8. My Company • Network Applied Communication Laboratory Ltd. • a.k.a NaCl
  • 9. My Company • Network Applied Communication Laboratory Ltd. • a.k.a NaCl ➡ means salt
  • 13. My Company • http://www.netlab.jp/ • Shimane, Japan • Since 2001
  • 14. My Company • http://www.netlab.jp/ • Shimane, Japan • Since 2001 ➡ 10th Anniversary!
  • 15. My Company • http://www.netlab.jp/ • Shimane, Japan • Since 2001 ➡ 10th Anniversary! • 57 people
  • 16. My Company • http://www.netlab.jp/ • Shimane, Japan • Since 2001 ➡ 10th Anniversary! • 57 people ➡ 6 people are cRuby committers
  • 17. My Company • http://www.netlab.jp/ • Shimane, Japan • Since 2001 ➡ 10th Anniversary! • 57 people ➡ 6 people are cRuby committers • SI, Training, etc...
  • 19. The NaCl Way NaCl's President
  • 21. The NaCl Way First, I want You to be happy.
  • 22. The NaCl Way First, I want You to be happy. Next, I want you to make Your Family happy.
  • 23. The NaCl Way First, I want You to be happy. Next, I want you to make Your Family happy. Finally, if you have more happiness left, then please share it with Our Company :)
  • 24. The NaCl Way (as I see it)
  • 25. The NaCl Way (as I see it) Employee • First: Employee
  • 26. The NaCl Way (as I see it) Employee's Employee Family • First: Employee • Next: Employee's Family
  • 27. The NaCl Way (as I see it) Employee's Employee Company Family • First: Employee • Next: Employee's Family • Finally: Company
  • 28. The NaCl Way (as I see it) Employee's Employee Company Family • First: Employee • Next: Employee Family • Finally: Company
  • 29. The NaCl Way (as I see it) y m ! e y! v n Employee's lo a Employee Company Family I p • • First: Employee c o m Next: Employee Family • Finally: Company
  • 33. MacRuby on Rails In my presentation, I will explain how I modified MacRuby to make it a suitable foundation for running Rails. I would also like to explain some of the MacRuby on Rails technical internals that I discovered along the way.
  • 37. MacRuby • MacRuby is a unique blend of Ruby 1.9 and Objective-C.
  • 38. MacRuby • MacRuby is a unique blend of Ruby 1.9 and Objective-C. • The goal of the MacRuby project is to be 100% compatible syntactically and behaviorally with Ruby 1.9.
  • 39. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 40. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 41. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 42. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 43. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 44. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 45. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 46. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 47. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 48. Ruby 1.9 Application Ruby 1.9 Built-in Ruby VM GC Built-in Standard Library Library System libraries OS (Linux,Windows,Mac OS X,etc...)
  • 49. MacRuby Application MacRuby Built-in Ruby VM GC Built-in Standard Library Library System libraries Mac OS X
  • 50. MacRuby Application MacRuby Built-in Ruby VM GC Built-in Standard Library Library System libraries Mac OS X
  • 51. MacRuby Application MacRuby Built-in Ruby VM GC Built-in Standard Library Library System libraries Mac OS X
  • 52. MacRuby Application MacRuby Built-in Ruby VM GC Built-in Standard Library Library System libraries Mac OS X
  • 53. MacRuby Application MacRuby Ruby VM AutoZone Built-in GC Built-in Standard Library Library System libraries Mac OS X
  • 54. MacRuby Application MacRuby Ruby VM AutoZone Built-in GC Foundation Built-in Standard Library Library System libraries Mac OS X
  • 55. MacRuby Application MacRuby Ruby VM AutoZone Built-in GC Foundation Built-in Standard Library Library "kouji".transform("latin-hiragana") System libraries #=> Mac OS X
  • 56. MacRuby Application MacRuby Ruby VM AutoZone Built-in GC Foundation Built-in Standard Library Library System libraries Mac OS X
  • 57. MacRuby Application MacRuby Ruby VM AutoZone Built-in GC Foundation Built-in Standard Library Library System libraries Mac OS X
  • 58. MacRuby Application MacRuby Ruby VM AutoZone Built-in GC Foundation Built-in Standard Library Library System libraries Mac OS X
  • 59. MacRuby Application MacRuby Ruby VM AutoZone Built-in GC Foundation Built-in Standard Library Library System libraries Mac OS X
  • 60. MacRuby Application MacRuby AutoZone Generational LLVM Threaded GC Built-in Standard Library Library Foundation System libraries Mac OS X
  • 61. MacRuby on Rails Making Ruby on Rails work on MacRuby
  • 64. Current Status $ rails new demo $ rails generate scaffold ...
  • 65. Current Status $ rails new demo $ rails generate scaffold ... $ rails server
  • 66. Current Status $ rails new demo $ rails generate scaffold ... $ rails server
  • 68. 7 months ago... March 2011 in Japan
  • 69. 7 months ago... March 2011 in Japan • I thought, "Does Rails work on MacRuby?".
  • 70. 7 months ago... March 2011 in Japan • I thought, "Does Rails work on MacRuby?". • I managed to install Rails. $ sudo macgem install rails 7 gems installed $ sudo macgem install sqlite3-ruby 2 gems installed
  • 72. Perhaps... • I thought, "OK, it's installed, but surely the Rails generators won't work...".
  • 73. Perhaps... • I thought, "OK, it's installed, but surely the Rails generators won't work...". • However, I managed to create a Rails project!? $ macruby -S rails new demo create create README ... create vendor/plugins create vendor/plugins/.gitkeep
  • 75. Are you kidding me? • I tried to generate a scaffold...
  • 76. Are you kidding me? • I tried to generate a scaffold... • It failed. After all Rails didn't work on MacRuby. $ macruby -S rails generate scaffold Bookmark title:string description:text url:string ... Assertion failed: ((size_t)pos < current_exceptions.size()), function pop_current_exception, file vm.cpp, line 3434. zsh: abort macruby -S rails generate scaffold Bookmark title:string description:text
  • 77. Are you kidding me? • I tried to generate a scaffold... • It failed. After all Rails didn't work on MacRuby. $ macruby -S rails generate scaffold Bookmark title:string description:text url:string $ macruby -S rails server ... ... Assertion failed: ((size_t)pos < < Assertion failed: ((size_t)pos current_exceptions.size()), function current_exceptions.size()), function pop_current_exception, file file vm.cpp, line 3434. pop_current_exception, vm.cpp, line 3434. zsh:zsh: abort macruby -S rails generate scaffold abort macruby -S rails server Bookmark title:string description:text
  • 78. My approach Run Rails SEGV or abort Research Coding Run RubySpec Run Rails
  • 79. My approach Run Rails SEGV or abort Research Coding Run RubySpec Run Rails
  • 80. My approach Run Rails SEGV or abort Research Coding Run RubySpec Run Rails
  • 81. My approach Run Rails SEGV or abort Research Coding Run RubySpec Run Rails
  • 82. My approach Run Rails SEGV or abort Research Coding Run RubySpec Run Rails
  • 83. My approach Run Rails SEGV or abort Research Coding Run RubySpec Run Rails
  • 84. Coding My approach Run RubySpec Run Rails SEGV or abort Research Coding Run RubySpec
  • 85. Coding My approach Run RubySpec Run Rails Required knowledge SEGV or abort and technology • cRuby Research • Objective-C Coding • C++ Run RubySpec • LLVM
  • 86. A couple of examples of what I have fixed so far
  • 87. #860 catch/throw (in "old" MacRuby) ➡ MacRuby aborts if you use catch and throw inside a rescue clause.
  • 88. #860 catch/throw (in "old" MacRuby) ➡ MacRuby aborts if you use catch and throw inside a rescue clause. 01: begin 02: raise "A" 03: rescue 04: catch(:foo) { throw :foo } 05: end
  • 89. #860 catch/throw (in "old" MacRuby) ➡ MacRuby aborts if you use catch and throw inside a rescue clause. 01: begin 02: raise "A" 03: rescue 04: catch(:foo) { throw :foo } 05: end :ok Assertion failed: ((size_t)pos < current_exceptions.size()), function pop_current_exception, file vm.cpp, line 3448.
  • 90. Exception Handling (in MacRuby)
  • 91. Exception Handling (in MacRuby) 01: begin 02: raise "A" 03: rescue 04: begin 05: raise "B" 06: rescue 07: end 08: end
  • 92. Exception Handling (in MacRuby) 01: begin 02: raise "A" 03: rescue 04: begin 05: raise "B" 06: rescue 07: end 08: end
  • 93. Exception Handling (in MacRuby) 01: begin 02: raise "A" 03: rescue 04: begin 05: raise "B" 06: rescue 07: end 08: end Exception Stack
  • 94. Exception Handling (in MacRuby) 01: begin 02: raise "A" push 03: rescue 04: begin 05: raise "B" 06: rescue 07: end 08: end "A" Exception Stack
  • 95. Exception Handling (in MacRuby) 01: begin 02: raise "A" push 03: rescue 04: begin 05: raise "B" 06: rescue 07: end 08: end "A" Exception Stack
  • 96. Exception Handling (in MacRuby) 01: begin 02: raise "A" push 03: rescue 04: begin 05: raise "B" push 06: rescue "B" 07: end 08: end "A" Exception Stack
  • 97. Exception Handling (in MacRuby) 01: begin 02: raise "A" push 03: rescue 04: begin 05: raise "B" push 06: rescue "B" 07: end 08: end "A" Exception Stack
  • 98. Exception Handling (in MacRuby) 01: begin 02: raise "A" push 03: rescue 04: begin 05: raise "B" push 06: rescue 07: end pop 08: end "A" Exception Stack
  • 99. Exception Handling (in MacRuby) 01: begin 02: raise "A" push 03: rescue 04: begin 05: raise "B" push 06: rescue 07: end pop 08: end pop Exception Stack
  • 100. Exception Handling and catch / throw (in MacRuby) Exception Stack
  • 101. Exception Handling and catch / throw (in MacRuby) 01: catch(:foo) { 02: begin 03: raise "A" 04: rescue 05: throw :foo 06: end 07: } Exception Stack
  • 102. Exception Handling and catch / throw (in MacRuby) 01: catch(:foo) { 02: begin 03: raise "A" 04: rescue 05: throw :foo 06: end 07: } Exception Stack
  • 103. Exception Handling and catch / throw (in MacRuby) 01: catch(:foo) { 02: begin 03: raise "A" push 04: rescue 05: throw :foo 06: end 07: } "A" Exception Stack
  • 104. Exception Handling and catch / throw (in MacRuby) 01: catch(:foo) { 02: begin 03: raise "A" push 04: rescue 05: throw :foo 06: end 07: } "A" Exception Stack
  • 105. Exception Handling and catch / throw (in MacRuby) 01: catch(:foo) { 02: begin 03: raise "A" push 04: rescue 05: throw :foo 06: end 07: } "A" Exception Stack
  • 106. Exception Handling and catch / throw (in MacRuby) 01: catch(:foo) { 02: begin 03: raise "A" push 04: rescue 05: throw :foo pop 06: end 07: } Exception Stack
  • 107. throw (in "old " MacRuby) Before being fixed(60723bf~), 'throw' always popped the current Exception. vm.cpp:4321: VALUE RoxorVM::ruby_throw(VALUE tag, VALUE value) { ... if (current_exception() != Qnil) { pop_current_exception(); } ...
  • 108. throw (in "old " MacRuby) Before being fixed(60723bf~), 'throw' always popped the current Exception. vm.cpp:4321: VALUE RoxorVM::ruby_throw(VALUE tag, VALUE value) { ... if (current_exception() != Qnil) { pop_current_exception(); } ...
  • 109. throw (in "old " MacRuby) Before being fixed(60723bf~), 'throw' always popped the current Exception. vm.cpp:4321: VALUE RoxorVM::ruby_throw(VALUE tag, VALUE value) { ... if (current_exception() != Qnil) { pop_current_exception(); } ...
  • 110. #860 catch/throw (in "old" MacRuby) 01: begin 02: raise "A" 03: rescue 04: catch(:foo) { throw :foo } 05: end Exception Stack
  • 111. #860 catch/throw (in "old" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } 05: end "A" Exception Stack
  • 112. #860 catch/throw (in "old" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } 05: end "A" Exception Stack
  • 113. #860 catch/throw (in "old" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } pop 05: end Exception Stack
  • 114. #860 catch/throw (in "old" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } pop 05: end pop Exception Stack
  • 115. #860 catch/throw (in "old" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } pop 05: end pop t ! ! o r A b Exception Stack
  • 116. How to fix (in "new" MacRuby) 01: begin 02: raise "A" 03: rescue 04: catch(:foo) { throw :foo } 05: end Exception Stack
  • 117. How to fix (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } 05: end "A" Exception Stack
  • 118. How to fix (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } store 05: end "A" Exception Stack
  • 119. How to fix (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } store 05: end "A" Exception Stack
  • 120. How to fix (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { throw :foo } store 05: end pop Exception Stack
  • 121. How to fix (in "new" MacRuby) In the new implementation, MacRuby only pops exceptions when necessary (60723bf) vm.cpp:4318: VALUE RoxorVM::ruby_throw(VALUE tag, VALUE value) { ... while (catch_ptr->current_exception != current_exception()) { pop_current_exception(); } ...
  • 122. How to fix (in "new" MacRuby) In the new implementation, MacRuby only pops exceptions when necessary (60723bf) vm.cpp:4318: VALUE RoxorVM::ruby_throw(VALUE tag, VALUE value) { ... while (catch_ptr->current_exception != current_exception()) { pop_current_exception(); } ...
  • 123. How to fix (in "new" MacRuby) In the new implementation, MacRuby only pops exceptions when necessary (60723bf) vm.cpp:4318: VALUE RoxorVM::ruby_throw(VALUE tag, VALUE value) { ... while (catch_ptr->current_exception != current_exception()) { pop_current_exception(); } ...
  • 124. #860 Fixed (in "new" MacRuby) 01: begin 02: raise "A" 03: rescue 04: catch(:foo) { 05: begin 06: raise "B" 07: rescue 08: throw :foo 09: end 10: } 11: end Exception Stack
  • 125. #860 Fixed (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { store 05: begin 06: raise "B" 07: rescue 08: throw :foo 09: end "A" 10: } 11: end Exception Stack
  • 126. #860 Fixed (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { store 05: begin 06: raise "B" push 07: rescue "B" 08: throw :foo 09: end "A" 10: } 11: end Exception Stack
  • 127. #860 Fixed (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { store 05: begin 06: raise "B" push 07: rescue "B" 08: throw :foo 09: end "A" 10: } 11: end Exception Stack
  • 128. #860 Fixed (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { store 05: begin 06: raise "B" push 07: rescue 08: throw :foo pop 09: end "A" 10: } 11: end Exception Stack
  • 129. #860 Fixed (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { store 05: begin 06: raise "B" push 07: rescue 08: throw :foo pop 09: end "A" 10: } 11: end Exception Stack
  • 130. #860 Fixed (in "new" MacRuby) 01: begin 02: raise "A" push 03: rescue 04: catch(:foo) { store 05: begin 06: raise "B" push 07: rescue 08: throw :foo pop 09: end 10: } 11: end pop Exception Stack
  • 131. #1192 Constant Lookup ➡ MacRuby failed to correctly look up constants in a number of situations when you used module_eval and class_eval.
  • 132. #1192 Constant Lookup ➡ MacRuby failed to correctly look up constants in a number of situations when you used module_eval and class_eval. module A B = 10 Object.class_eval { B } end
  • 133. #1192 Constant Lookup ➡ MacRuby failed to correctly look up constants in a number of situations when you used module_eval and class_eval. module A B = 10 Object.class_eval { B } end reduction.rb:3:in `block': uninitialized constant B (NameError)
  • 134. #1192 Constant Lookup ➡ MacRuby failed to correctly look up constants in a number of situations when you used module_eval and class_eval. module A cRuby B = 10 Object.class_eval { B } end reduction.rb:3:in `block': uninitialized constant B (NameError)
  • 135. #1192 Constant Lookup ➡ MacRuby failed to correctly look up constants in a number of situations when you used module_eval and class_eval. module A BMacRuby = 10 Object.class_eval { B } end reduction.rb:3:in `block': uninitialized constant B (NameError)
  • 136. Constant Lookup (in cRuby)
  • 137. Constant Lookup (in cRuby) 1: module A 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 138. Constant Lookup (in cRuby) 1: module A 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 139. Constant Lookup (in cRuby) 1: module A 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 140. Constant Lookup (in cRuby) 1: module A 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 141. Constant Lookup (in cRuby) 1: module A 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 142. Constant Lookup (in cRuby) 1: module A 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 143. Constant Lookup (in cRuby) 1: module A Lexical Scope 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 144. Constant Lookup (in cRuby) 1: module A Lexical Scope 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end Lookup 7: end ons tant 8: end exi L cal C
  • 145. Constant Lookup (in "old" MacRuby) MacRuby had not implemented Lexical Constant Lookup. 1: module A 2: module B 3: CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 146. Constant Lookup (in "old" MacRuby) MacRuby had not implemented Lexical Constant Lookup. 1: module A 2: module B 3: MacRuby CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end
  • 147. Constant Lookup (in "old" MacRuby) MacRuby had not implemented Lexical Constant Lookup. 1: module A 2: module B 3: MacRuby CONST = "B’s Const" 4: module ::A 5: p CONST 6: end 7: end 8: end -e:5:in `block': uninitialized constant A::CONST (NameError)
  • 148. Constant Lookup is complex (in cRuby)
  • 149. Constant Lookup is complex (in cRuby) class_eval(&Block) class_eval(String) 01: module A 01: module A 02: CONST = "A's CONST" 02: CONST = "A's CONST" 03: def f() 03: def f() 04: class_eval { 04: class_eval <<-EOS 05: p CONST 05: p CONST 06: } 06: EOS 07: end 07: end 08: end 08: end 09: 09: 10: class K 10: class K 11: CONST = "K's CONST" 11: CONST = "K's CONST" 12: extend A 12: extend A 13: f() 13: f() 14: end 14: end
  • 150. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 151. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 152. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 153. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 154. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 155. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 156. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 157. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 158. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 159. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 160. class_eval(&Block) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 161. class_eval(&Block) 01: module A Lexical Scope 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 162. class_eval(&Block) 01: module A Lexical Scope 02: CONST = "A's CONST" 03: def f() 04: class_eval { 05: p CONST 06: } ON ST" 07: end "A's C 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 163. class_eval(String) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval <<-EOS 05: p CONST 06: EOS 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 164. class_eval(String) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval <<-EOS 05: p CONST 06: EOS 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 165. class_eval(String) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval <<-EOS 05: p CONST 06: EOS 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 166. class_eval(String) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval <<-EOS 05: p CONST 06: EOS 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 167. class_eval(String) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval <<-EOS 05: p CONST 06: EOS 07: end 08: end 09: 10: class K 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 168. class_eval(String) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval <<-EOS 05: p CONST 06: EOS 07: end 08: end 09: 10: class K Dynamic Scope 11: CONST = "K's CONST" 12: extend A 13: f() 14: end
  • 169. class_eval(String) 01: module A 02: CONST = "A's CONST" 03: def f() 04: class_eval <<-EOS 05: p CONST 06: EOS 07: end 08: end 09: 10: class K Dynamic Scope 11: CONST = "K's CONST" 12: extend A 13: f() ON ST" 14: end "K's C
  • 170. Constant Lookup is complex (in cRuby) class_eval(&Block) class_eval(String) 01: module A Lexical Scope 01: module A 02: CONST = "A's CONST" 02: CONST = "A's CONST" 03: def f() 03: def f() 04: class_eval { 04: class_eval <<-EOS 05: p CONST 05: p CONST 06: } ST" 06: EOS 07: end "A's CON 07: end 08: end 08: end 09: 09: 10: class K 10: class K Dynamic Scope 11: CONST = "K's CONST" 11: CONST = "K's CONST" 12: extend A 12: extend A 13: f() 13: f() ON ST" 14: end 14: end " K's C
  • 171. I somehow managed to fix this (in MacRuby)
  • 172. I somehow managed to fix this (in MacRuby) • Three attempts to get it right.
  • 173. I somehow managed to fix this (in MacRuby) • Three attempts to get it right. • More than 3000 lines of code changed.
  • 174. I somehow managed to fix this (in MacRuby) • Three attempts to get it right. • More than 3000 lines of code changed. 21 Apr 2011 15:24 Laurent S. it's official, kouji is the hero of th e day/week/month/...? his patch seem s to fix remaining lexical const lookup bugs :)
  • 175. A very complex bug (in "new" MacRuby)
  • 176. A very complex bug (in "new" MacRuby) 01: module A 02: B = 42 03: end 04: 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 177. A very complex bug (in "new" MacRuby) 01: module A 02: B = 42 03: end 04: 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 178. A very complex bug (in "new" MacRuby) 01: module A 02: B = 42 03: end 04: 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 179. A very complex bug (in "new" MacRuby) 01: module A 02: B = 42 03: end 04: 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 180. A very complex bug (in "new" MacRuby) 01: module A 02: B = 42 03: end 04: 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 181. A very complex bug (in "new" MacRuby) 01: module A 02: B = 42 03: end 04: 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 182. A very complex bug (in "new" MacRuby) 01: module A 02: B = 42 03: end 04: 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 183. A very complex bug (in "new" MacRuby) 01: module A 02: B = 42 03: end 04: Lexical 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 184. A very complex bug (in "new" MacRuby) CAUTION 'class_eval' does not add it's own receiver 01: module A (A) 02: theBconstant lookup scope. to = 42 03: end 04: Lexical 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 185. A very complex bug (in cRuby) 01: module A 02: B = 42 03: end 04: 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 186. A very complex bug (in cRuby) 01: module A 02: B = 42 end uby 1.9 03: R 04: ➡42 05: A.class_eval do 06: def self.f 07: p B 08: end 09: end 10: 11: A.f
  • 187. A very complex bug (in cRuby) 01: module A 02: B = 42 03: end uby 1.9 R 04: ➡ 42 05: A.class_eval do 06: def self.f 07: p B eError) tB(Nam nstan 08: end 09: .8.7 1 end ialized co R u10: `f': uninit by -e :8:in ➡11: A.f
  • 188. A very complex bug (in cRuby) 01: module A 02: B = 42 03: end uby 1.9 R 04: A cR ➡ 42 uby's 05: A.class_eval do 06: def self.f ror) 07: 08: 09: .8.7 end Bug p B d constantB(NameEr R 1 end u10: `f': uninit by ialize -e :8:in ➡11: A.f
  • 189. Demo $ rails new demo $ rails generate scaffold ... $ rails server
  • 190. #1390 rb_vm_prepare_block ➡ Abort if the "About your application’s environment" is link is clicked. CLICK! Assertion failed: ((b->flags & flags) == flags), function rb_vm_prepare_block, file dispatcher.cpp, line 1406. zsh: abort env VM_DISABLE_RBO=1 macruby -S rails server
  • 191. The MacRuby train trip continues...
  • 192. The MacRuby train trip continues... http://ww w.macrub y.org/
  • 193. The MacRuby train trip continues... u by m acr http://ww @ w.macrub y.org/
  • 194. The MacRuby train trip continues... u by m acr http://ww @ w.macrub y.org/ GitHub:MacRuby/MacRuby
  • 195. The MacRuby train trip continues... u by m acr http://ww @ w.macrub y.org/ GitHub:MacRuby/MacRuby mac ruby-devel@lists.macosforge.org
  • 197. Conclusion • MacRuby ➡MacRuby is a unique blend of Ruby 1.9 and Objective-C. ➡The goal is to be 100% compatible with Ruby 1.9.
  • 198. Conclusion • MacRuby ➡MacRuby is a unique blend of Ruby 1.9 and Objective-C. ➡The goal is to be 100% compatible with Ruby 1.9. • MacRuby on Rails ➡We're now able to show the default Rails welcome page. ➡But there is still a lot to do.
  • 200. Acknowledgment • The RubyConf hosts and organizers
  • 201. Acknowledgment • The RubyConf hosts and organizers • Tor Yamamoto-Sorensen (@shakaijin)
  • 202. Acknowledgment • The RubyConf hosts and organizers • Tor Yamamoto-Sorensen (@shakaijin) • Everyone present today
  • 204. Q &A • If you have a question, please ask me, but if possible please speak slowly. • or contact @takaokouji_en by Twitter • or send e-mail to MacRuby ML