Netsoc Ruby Tutorial
134 pages
English

Netsoc Ruby Tutorial

-

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
134 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

Netsoc Ruby Tutorial
Shane hduairc@netsoc.tcd.iei
January 13, 2009
Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 1 / 23 Contents of this Tutorial
1 Introduction
What is Ruby?
About this Tutorial
irb - the Interactive Ruby Shell
2 Problems and Solutions in Ruby
Problem 1: Hello, world! 2: Silly binary stu
Problem 3: Iterators 4: 2 + 2 = 5
Problem 5: I am Vinny 6: Hash-like thing (Map)
Problem 7: Adding accessor methods to Map 8: Betterrds
Problem 9: Turning Map into a mixin 10: Improving the mixin
Project Euler 1: Higher-order functions in Ruby
3 Further Reading
Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 2 / 23 Introduction What is Ruby?
What is Ruby?
This is Ruby:
5.times {puts "Hello, world!"}
Ruby:
Is a dynamic, object-oriented programming language.
Combines the semantics of Smalltalk with Perl-inspired syntax.
Everything is an object, even 5.
Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 3 / 23 Introduction What is Ruby?
What is Ruby?
This is Ruby:
5.times {puts "Hello, world!"}
Ruby:
Is a dynamic, object-oriented programming language.
Combines the semantics of Smalltalk with Perl-inspired syntax.
Everything is an object, even 5.
Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 3 / 23 Introduction What is Ruby?
What is Ruby?
This is Ruby:
5.times {puts "Hello, world!"}
Ruby:
Is a dynamic, object-oriented programming language.
Combines the semantics of Smalltalk with ...

Sujets

Informations

Publié par
Nombre de lectures 360
Langue English
Poids de l'ouvrage 1 Mo

Exrait

Netsoc Ruby Tutorial Shane hduairc@netsoc.tcd.iei January 13, 2009 Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 1 / 23 Contents of this Tutorial 1 Introduction What is Ruby? About this Tutorial irb - the Interactive Ruby Shell 2 Problems and Solutions in Ruby Problem 1: Hello, world! 2: Silly binary stu Problem 3: Iterators 4: 2 + 2 = 5 Problem 5: I am Vinny 6: Hash-like thing (Map) Problem 7: Adding accessor methods to Map 8: Betterrds Problem 9: Turning Map into a mixin 10: Improving the mixin Project Euler 1: Higher-order functions in Ruby 3 Further Reading Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 2 / 23 Introduction What is Ruby? What is Ruby? This is Ruby: 5.times {puts "Hello, world!"} Ruby: Is a dynamic, object-oriented programming language. Combines the semantics of Smalltalk with Perl-inspired syntax. Everything is an object, even 5. Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 3 / 23 Introduction What is Ruby? What is Ruby? This is Ruby: 5.times {puts "Hello, world!"} Ruby: Is a dynamic, object-oriented programming language. Combines the semantics of Smalltalk with Perl-inspired syntax. Everything is an object, even 5. Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 3 / 23 Introduction What is Ruby? What is Ruby? This is Ruby: 5.times {puts "Hello, world!"} Ruby: Is a dynamic, object-oriented programming language. Combines the semantics of Smalltalk with Perl-inspired syntax. Everything is an object, even 5. Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 3 / 23 Introduction What is Ruby? What is Ruby? This is Ruby: 5.times {puts "Hello, world!"} Ruby: Is a dynamic, object-oriented programming language. Combines the semantics of Smalltalk with Perl-inspired syntax. Everything is an object, even 5. Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 3 / 23 Introduction About this Tutorial About this Tutorial 00.rb This tutorial will: Not focus directly on Ruby’s features or philosophy. Show solutions to problems implemented in Ruby. Explain how and why these solutions work. Reveal the features and philosophy of Ruby this way. Notes: The rst such solution is at http://netsoc.tcd.ie/ duairc/ruby/01.rb The current is indicated in the top-right corner (00.rb). If you download these slides, those indicators are hyperlinks. Get ’em here: http://netsoc.tcd.ie/ duairc/ruby/slides.pdf Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 4 / 23 Introduction About this Tutorial About this Tutorial 00.rb This tutorial will: Not focus directly on Ruby’s features or philosophy. Show solutions to problems implemented in Ruby. Explain how and why these solutions work. Reveal the features and philosophy of Ruby this way. Notes: The rst such solution is at http://netsoc.tcd.ie/ duairc/ruby/01.rb The current is indicated in the top-right corner (00.rb). If you download these slides, those indicators are hyperlinks. Get ’em here: http://netsoc.tcd.ie/ duairc/ruby/slides.pdf Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 4 / 23 Introduction About this Tutorial About this Tutorial 00.rb This tutorial will: Not focus directly on Ruby’s features or philosophy. Show solutions to problems implemented in Ruby. Explain how and why these solutions work. Reveal the features and philosophy of Ruby this way. Notes: The rst such solution is at http://netsoc.tcd.ie/ duairc/ruby/01.rb The current is indicated in the top-right corner (00.rb). If you download these slides, those indicators are hyperlinks. Get ’em here: http://netsoc.tcd.ie/ duairc/ruby/slides.pdf Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 4 / 23 Introduction About this Tutorial About this Tutorial 00.rb This tutorial will: Not focus directly on Ruby’s features or philosophy. Show solutions to problems implemented in Ruby. Explain how and why these solutions work. Reveal the features and philosophy of Ruby this way. Notes: The rst such solution is at http://netsoc.tcd.ie/ duairc/ruby/01.rb The current is indicated in the top-right corner (00.rb). If you download these slides, those indicators are hyperlinks. Get ’em here: http://netsoc.tcd.ie/ duairc/ruby/slides.pdf Shane hduairc@netsoc.tcd.iei () Netsoc Ruby Tutorial January 13, 2009 4 / 23
  • Accueil Accueil
  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • BD BD
  • Documents Documents