Upload
ben-hall
View
2.159
Download
0
Tags:
Embed Size (px)
DESCRIPTION
IronRuby presentation for VistaSquad on 15th July 2009.Video of presentation can be found on my blog @ blog.benhall.me.uk
Citation preview
IronRuby
Twitter - @[email protected]
TELL YOU WHY YOU SHOULD CARE
WPFPowershellC#Ruby
REASON #1
Dynamic Language Runtime
http://www.flickr.com/photos/lastrounds/3199561205/sizes/o/
IronPython
IronRuby
DLR
CLR
IronPython ?
IronSmallTalkGary Short
REASON #2
http://www.flickr.com/photos/mag3737/1914076277/
MS-PL
http://www.flickr.com/photos/25501212@N05/2934269081/
REASON #3
RUBY, RUBY, RUBY, Ruby...
Optional Syntax
puts ‘Hello World’
puts(‘Hello World’)puts(‘Hello World’);
Simple declarations
x = 1
Natural Programming
x = [1,2,3]y = [4,5,6]
x + y == [1,2,3,4,5,6]
Everything is an object
“Hello World”.upcase
[5,3,4,1,6].sort
10.times { }
Blocks
10.times do |i| puts iend
10.times { |i| puts i }
Duck Typing
def print_name(obj) puts obj.get_nameend
http://www.flickr.com/photos/normis/337183421/
Duck Typing
class A def get_name “My name is A” endend
Duck Typing
class Q def get_name “My name is Q” endend
Duck Typing
print_name A.newprint_name(Q.new)
Libraries
require ‘rake’
RubyGems
gem install rake
Successfully installed rake-0.8.41 gem installedInstalling ri documentation for rake-0.8.4...Installing RDoc documentation for rake-0.8.4...
REASON #4
http://www.flickr.com/photos/mendhak/2117622450/sizes/o/
.Net Interop
REASON #5
REASON #6
1. String code = “puts ‘Hello World’”2. Engine = IronRuby.Ruby.CreateEngine();3. Scope = Engine.CreateScope();4. ScriptSource source =
Engine.CreateScriptSourceFromString(code, SourceCodeKind.Statements);
5. object result = source.Execute(Scope);
Data Gen Screenshot
Reflector Screenshot
Resolver Systems
change
How will IronRuby
your world?
Links
• http://www.codeplex.com/dlr• http://www.codeplex.com/Ironruby• http://www.codeplex.com/ironpython• http://blog.benhall.me.uk/2009/04/embedding-ironruby-and-
dlr-into-red.html• http://msdn.microsoft.com/en-us/magazine/dd434651.aspx• http://msdn.microsoft.com/en-us/magazine/dd453038.aspx• http://www.resolversystems.com• http://www.manning.com/foord/