Not So Foreign Functions

404 views

Published on

ESUG 2011, Edinburgh

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
404
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Not So Foreign Functions

  1. 1. Not-So-Foreign Functions Calling Ruby from SmalltalkMartin McClure2011 ESUG
  2. 2. Why ForeignFunctions?
  3. 3. Shared library call
  4. 4. Distributed object system Shared library call
  5. 5. Distributed object system Is there an in-between way? Shared library call
  6. 6. Distributed object systemMulti-language VM Shared library call
  7. 7. Multi-language VMMagLev: Ruby and Smalltalk in the same VM
  8. 8. How does that work?
  9. 9. How does that work? An object...
  10. 10. How does that work? An object... ...is an object...
  11. 11. How does that work? An object... ...is an object... ...is an object...
  12. 12. How does that work? A class...
  13. 13. How does that work? A class... ...is a class...
  14. 14. How does that work? A class... ...is a class... ...is a class...
  15. 15. How does that work? BUT...
  16. 16. How does that work? A message...
  17. 17. How does that work? A message... ...is Smalltalk...
  18. 18. How does that work? A message... ...is Smalltalk... ...or is Ruby.
  19. 19. How does that work? A class...
  20. 20. How does that work? A class......may define different Ruby and Smalltalk methods...
  21. 21. How does that work? A class...
  22. 22. How does that work? A class......may have different Ruby and Smalltalk names...
  23. 23. How does that work? A class...
  24. 24. How does that work? A class......may have different Ruby and Smalltalk superclasses.
  25. 25. Selector Supplements● Environment ID● Number/type of sent arguments
  26. 26. Selector Supplements● Default send environment = compile environment● Must override this default
  27. 27. Onward to the Demo
  28. 28. Thanks to: Peter McLainTim Felgentreff
  29. 29. rubygems.org>25000 gems
  30. 30. maglev-gem install mailfactory
  31. 31. Whats Next?● Name “RubyService”?● You tell us...
  32. 32. ?Martin McClure2011 ESUG

×