Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ruby The Gem of new programming languages. An interpreted scripting language.

Similar presentations


Presentation on theme: "Ruby The Gem of new programming languages. An interpreted scripting language."— Presentation transcript:

1 Ruby The Gem of new programming languages. An interpreted scripting language

2 Introductions Speakers: Ryan Krcelic, Jay Stinson, and Josh Parker

3 Recipe for Ruby Take a true object oriented language Give it a “clean” syntax. No semicolons, brackets, or need to declare variables. Add in a good measure of the flexibility and convenience of languages such as Python and Perl

4 The Evolution of Ruby Written by Yukihiro Matsumoto Evolved mainly from Perl and Python Designed to make programming easy and fun. Ruby allows you to concentrate on the creative side of programming, with less stress about complicated syntax

5 More History 1993: conception, work begins Early 1995: implementation of the interpreter (Japanese only) 1997: Version 1.0 released 1998: Development version released 2003: Version 1.6.8, large community support and development

6 Some Features Object Oriented language with scripting Allows you to access underlying OS features Variables declare themselves automatically depending on the data that is assigned to them Strings can use operators

7 More Features exception handling features, like Java or Python, to make it easy to handle errors Writing C extensions in Ruby is easier than in Perl or Python Ruby features OS independent threading. Thus, for all platforms on which Ruby runs, you also have multithreading, regardless of if the OS supports it or not, even on MS-DOS!

8 Example A hello = “Hello world/n” hello = hello * 3 puts hello This statement prints: Hello world The /n denotes the start of a new line.

9 EXAMPLE B def sayGoodnight(name) result = “Goodnight ” + name return result end #This is a comment puts sayGoodnight(“John”)

10 Example C count = 0 sum = 10 #example of a for loop 5.times do count += 1 sum += count end #Convert number to a string puts sum.to_s

11 Compared to C++ Ruby C++ Dynamic Static Yes No Typing Run Time access to method names Metaclasses Garbage Collection

12 Sources http://www.rubycentral.com/book/ http://www.ruby-lang.org/en/20020103.html


Download ppt "Ruby The Gem of new programming languages. An interpreted scripting language."

Similar presentations


Ads by Google