Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Rubinius @ RubyAndRails2010

1.361 Aufrufe

Veröffentlicht am

Veröffentlicht in: Technologie, Bildung
  • Als Erste(r) kommentieren

Rubinius @ RubyAndRails2010

  1. 1. Rubinius Use Ruby
  2. 2. Dirkjan Bussink http://github.com/dbussink @dbussink
  3. 3. 1.1 is out!
  4. 4. Let’s have fun and write a new interpreter! 2006
  5. 5. 1.0 by end 2007! 2006
  6. 6. Ok, maybe not... 2007
  7. 7. 1.0! 2010
  8. 8. 2 virtual machines
  9. 9. 2 virtual machines 1.75 garbage collectors
  10. 10. 2 virtual machines 1.75 garbage collectors 3 bytecode compilers
  11. 11. 2 virtual machines 1.75 garbage collectors 3 bytecode compilers 1 Ruby core library
  12. 12. 2 virtual machines 1.75 garbage collectors 3 bytecode compilers 1 Ruby core library 2 primitives systems
  13. 13. 2 virtual machines 1.75 garbage collectors 3 bytecode compilers 1 Ruby core library 2 primitives systems 2 JIT compilers
  14. 14. Rubyspec
  15. 15. Ruby in Ruby
  16. 16. module Enumerable def collect if block_given? ary = [] each { |o| ary << yield(o) } ary else to_a end end alias_method :map, :collect end
  17. 17. What is Rubinius these days?
  18. 18. Compacting generational garbage collector
  19. 19. http://www.flickr.com/photos/ell-r-brown
  20. 20. class Address attr_reader :street attr_reader :number attr_reader :city end Address.instance_variable_get("@seen_ivars") => [:@street, :@number, :@city]
  21. 21. a = Address.new a.street = "Street" a.number = "1" a.city = "Enschede" Rubinius.memory_size(a) => 56 VS Rubinius.memory_size(a) => 160
  22. 22. JIT
  23. 23. InlineCache
  24. 24. module CoolModule def method1 1 + 1 end end class CoolObject include CoolModule end CoolObject.new.method1
  25. 25. Call counting
  26. 26. def method1 1 + 1 end def method2 method1 end 100.times do method2 end
  27. 27. members of rubinius::VMMethod: total_args = 0, call_count = 21, llvm_function_ = 0x0, name_ = 0x6306,
  28. 28. Go JIT! RBX LLVM thread(s) thread Here it is!
  29. 29. Debugging
  30. 30. DEMO
  31. 31. Profiling
  32. 32. DEMO
  33. 33. Contributing
  34. 34. 3 legged dog turtles space shuttle rubinius Performance 26
  35. 35. commit 5386d9299360b5f1ede14392b97da6dc7163ed00 Author: Dirkjan Bussink <d.bussink@gmail.com> Date: Tue Jan 8 20:29:01 2008 +0100 Added Process::POSIX safety checks diff --git a/kernel/core/process.rb b/kernel/core/process.rb index fec15b6..ff50b49 100644 --- a/kernel/core/process.rb +++ b/kernel/core/process.rb @@ -103,11 +103,15 @@ module Process end def self.getpgid(pid) - Platform::POSIX.getpgid(pid) + ret = Platform::POSIX.getpgid(pid) + Errno.handle if ret == -1 + ret end def self.setpgid(pid, int) - Platform::POSIX.setpgid(pid, int) + ret = Platform::POSIX.setpgid(pid, int) + Errno.handle if ret == -1 + ret end @maxgroups = 32
  36. 36. 1 patch == commit access
  37. 37. rbx my_awesome_code.rb
  38. 38. Future
  39. 39. 1.9
  40. 40. DEMO
  41. 41. So when will you be a contributor?

×