clr, dlr, wtf?? all ur rubyz are now belongs to us ruby why should i care? using rspec for bdd ...

30
Ruby <3 .NET Ivan Porto Carrero http://flanders.co.nz

Upload: clyde-hampton

Post on 18-Jan-2018

218 views

Category:

Documents


0 download

DESCRIPTION

Common Type system Class Loader, GC, JIT, Execution Support SecuritySecurity Base Class Libraries Common Language Runtime C#C#VB.NETVB.NET……

TRANSCRIPT

Page 1: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Ruby <3 .NETIvan Porto Carrero

http://flanders.co.nz

Page 2: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

The plan CLR, DLR, WTF?? All ur Rubyz are now belongs to us Ruby why should I care? Using RSpec for BDD Ruby + WPF => RAD but pretty Ruby + Silverlight == Ruby in the

browser

Page 3: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

CLR as we knew it

Common Type system

Class Loader, GC, JIT, Execution Support

Security

Base Class Libraries

Common Language Runtime

C# VB.NET …

Page 4: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

A better CLR

Common Type system

Class Loader, GC, JIT, Execution Support

Security

Base Class Libraries

Common Language Runtime

C# VB.NET IronPython

DLR Runtime

Page 5: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight
Page 6: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

All ur Rubyz are now… MRI ‐ “The Normal” Ruby JRuby ‐ Sun MacRuby ‐ Apple IronRuby ‐ Microsoft Rubinius ‐ EngineYard MagLev ‐ Gemstone HotRuby

Page 7: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

For me the purpose of life is partly to have joy. Programmers often feel joy when they can concentrate

on the creative side of programming, so Ruby is designed to make programmers happy.

- Yukihiro “Matz” Matsumoto

Why should I care?

Page 8: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Why should I care?

Actually, I'm trying to make Ruby natural, not simple. - Yukihiro “Matz” Matsumoto

Page 9: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight
Page 10: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Best of breed

If Python was the result of Lisp and C++ having a baby,Ruby is the result of Perl and Smalltalk having a baby.--MeowMeow Jones, 11/8/2001 on slashdot.

Page 11: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight
Page 12: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Duck typing

If it looks like a duck and acts like a duck it might as well be a duck

Page 13: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight
Page 14: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Metaprogramming

The computer should be doing the hard work. That's what it's paid to do, after all.-- Larry Wall

Page 15: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Metaprogramming

I don’t think the idea here is to save memory or speed. The idea behind metaprogramming is

to teach Ruby your conventions and let it do some guessing,

in order to save you some code. – Why, author of why’s poignant guide to Ruby

Page 16: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

STOP!!!! Demo time

Page 17: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

REPL

Read Eval Print Loop

Read Eval Print Loop

Read Eval Print Loop

Read Eval Print

Page 18: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

STOP!!!! Demo time

Page 19: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Everything is an object

I invented the term Object-Oriented, and I can tell you I did not have C++ in mind.

-- Alan Kay

Page 20: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

STOP!!!! Demo time

Page 21: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Classes are open

Page 22: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

STOP!!!! Demo time

Page 23: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

CLR classes open for business

Isn't this dangerous? What if someone changes the logic of + for math expressions?

No, because if one of your programmers overrides methods that break things –

you take them out in the parking lotand beat them with a rubber hose!

The language shouldn't prohibit us from doing powerful things.-- http://raibledesigns.com/rd/entry/oscon_monday_morning

Page 24: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

STOP!!!! Demo time

Page 25: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Adding Iron to Ruby

I have always imagined that Paradise will be a kind of library.-- Jorge Luis Borges

Page 26: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

STOP!!!! Demo time

Page 27: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

Kweshiunz?

Page 28: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

“A language that doesn't affect the way you think about programming is not worth knowing.”

-- Alan Perlis

Page 29: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

References http://flanders.co.nz http://ironruby.net http://iunknown.com http://manning.com/carrero http://rubydoes.net http://blog.prokrams.com/ http://nightlybuilds.cloudapp.net/Projec

t.aspx?project=dlr

Page 30: CLR, DLR, WTF??  All ur Rubyz are now belongs to us  Ruby why should I care?  Using RSpec for BDD  Ruby + WPF = RAD but pretty  Ruby + Silverlight

go_to(http://ironruby.net).play.create.have_fun