A TOUR OF RUBY 2011 ACM Class, Dong Xie. What is Ruby?  Dynamic programming language  Complex but expressive grammar  A core class library with rich.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Introduction to Ruby.
Advertisements

How SAS implements structured programming constructs
John Pinney Ruby in 20 minutes John Pinney
Adapted from Scott, Chapter 6:: Control Flow Programming Language Pragmatics Michael L. Scott.
CS 355 – PROGRAMMING LANGUAGES Dr. X. Apply-to-all A functional form that takes a single function as a parameter and yields a list of values obtained.
Language of the Month If it’s December, it must be Ruby! Adam Coffman and Brent Beer.
Ruby: An introduction - Who am I? Maciej Mensfeld Presented by: Maciej Mensfeld Ruby: An introduction dev.mensfeld.pl github.com/mensfeld.
Lisp – Introduction יעל נצר מערכות נבונות סמסטר ב' תשס"ו.
Principles of Object-Oriented Software Development The language Smalltalk.
Object-Oriented PHP (1)
PHP Presented by Christine Fang and Ian Stuart ● CS616 Spring 2003.
Ruby The Gem of new programming languages. An interpreted scripting language.
Page 1 Ruby by Tim Hanson & Mamadou Seck. Page 2 Philosophy "I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming,
Presented by Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion.
Object-oriented programming and design 1 Smalltalk in a Nutshell Objects & classes Messages & methods Inheritance & metaclasses.
By Logan Phipps Hal student.  This power point explains some common programming languages enjoy  When done click on the home button to return to home.
Identifiers and Assignment Statements. Data structures In any programming language you need to refer to data The simplest way is with the actual data.
Introduction to Ruby CSE 413 Autumn 2008 Credit: Dan Grossman, CSE341.
Ruby (on Rails) CSE 190M, Spring 2009 Week 1. The Players Kelly "Everyday I'm Hustlin' " Dunn Kim "Mouse" Todd Ryan "Papa T" Tucker.
The Ruby Programming Language
General Purpose Language Ruby Kit Chan COMP3351 Programming Languages November 9, 2007.
SCRIPTING IN RUBY By Amber Bennett “Ruby is simple in appearance, but is very complex inside, just like our human body.” --Yukihiro Matsumoto.
A brief introduction to 11ACM 朱旻申. Outline What is Groovy ? Differences between Groovy & Java About closure & Dagger Methods.
Basic Lisp CIS 479/579 Bruce R. Maxim UM-Dearborn.
CS 355 – PROGRAMMING LANGUAGES Dr. X. Common LISP A combination of many of the features of the popular dialects of LISP around in the early 1980s A large.
Ruby! Ronald L. Ramos. What is Ruby? Ruby is a scripting language designed by Yukihiro Matsumoto, also known as Matz. It runs on a variety of platforms,
Ruby. Who am I? 1- Bunlong Van 2- Sreyleap Lay, 3- Chhon Meily Blog:
Ruby on Rails. What is Ruby? Programming Language Object-oriented Interpreted.
A very basic overview of Server-Side Scripting Or what is PHP, Perl, Python, Ruby and what can they do for me?
USING RUBY An Introduction By Evgeny Rahman. About Me Principal Engineer at FirstFuel Software 10+ years in Software Engineering 5 years working with.
And other languages….  Array literals/initialization a = [1,2,3] a2 = [-10..0, 0..10] a3 = [[1,2],[3,4]] a4 = [w*h, w, h] a5 = [] empty = Array.new zeros.
Chapter 12 Support for Object oriented Programming.
C463 / B551 Artificial Intelligence Dana Vrajitoru Python.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
+ Ruby and other programming Languages Ronald L. Ramos.
Statement Level Flow of Control Iteration Structures Copyright © by Curt Hill.
Scripting with Ruby What is a scripting language? What is Ruby?
RUBY by Ryan Chase.
Scripting with Ruby What is a scripting language? What is Ruby?
PHP vs. Python. Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
1 Getting Started with Ruby. 2 What’s Ruby? Ruby is an OO, dynamic, agile language –Everything’s an object For example, try puts -1.abs –Derives strengths.
CS190/295 Programming in Python for Life Sciences: Lecture 6 Instructor: Xiaohui Xie University of California, Irvine.
Expressions and Order of Operations Operators – There are the standard operators: add, subtract, divide, multiply – Note that * means multiply? (No times.
Collaborative Development Services Learning From the Open Source Agile Development Process Richard Kilmer, InfoEther LLC.
Introduction to information systems RUBY dr inż. Tomasz Pieciukiewicz.
Quiz 1 A sample quiz 1 is linked to the grading page on the course web site. Everything up to and including this Friday’s lecture except that conditionals.
Ruby Tien Ho and Brandon Hostetter. Overview ▸ Object-oriented, functional, imperative, and reflective ▸ Interpreted language ▸ Influenced by Perl, Smalltalk,
Presented By P.SRIVIDYA 085D1A0552 Programming Language.
1 Charles Oliver Nutter Thomas Enebo Tor Norbye Martin Krauskopf JRuby: Understanding the Fuss Except where otherwise noted, the content of this presentation.
Computer Concepts 2016 Unit E Step-by-Step: Programming with Python ENHANCED EDITION.
Ruby: An Introduction Created by Yukihiro Matsumoto in 1993 (named after his birthstone) Pure OO language (even the number 1 is an instance of a class)
Scope History of Ruby. Where can you use Ruby? General Features.
Sequence, Selection, Iteration The IF Statement
Types of Programming Languages
Fundamentals of Functional Programming Languages
Chapter 14 Introduction to Ruby.
What to do today: Brief history of Ruby General qualities/info
CS190/295 Programming in Python for Life Sciences: Lecture 6
CIT 383: Administrative Scripting
Ruby Testing 2, 11/9/2004.
PHP.
Statement-Level Control Structures
Overview of Programming Paradigms
Introduction to Computer Science
Functional Programming and Haskell
CSE 3302 Programming Languages
Computer Programming Tutorial
Functional Programming and Haskell
Presentation transcript:

A TOUR OF RUBY 2011 ACM Class, Dong Xie

What is Ruby?  Dynamic programming language  Complex but expressive grammar  A core class library with rich and powerful APIs  Draws inspiration from Lisp, Smalltalk and Perl  Easy for C and Java programmers to learn  Ruby is designed to make programmers happy. ——By Yukihiro Matsumoto

 Optional parentheses  Parallel assignment  Punctuation Suffixes and Prefixes Simplified Expressions

Everything is an Object  Completely object-oriented language  Seeing Everything as an Object  even simple numeric literals and the values true, false and nil  Only single inheritance, the Mixin(Module)

Everything has a value  NO difference between expressions and statements  Everything has a value, even if that value is nil  Even control structures have their own value such as if, while, etc.

Classes are Open  Dynamic Programming Language  Not only dynamic-typed (like python, PHP, etc.)  Allows its users to freely alter its parts  Add, Remove, Redefine

Singleton methods  Per-object methods  Only available on the Object you defined it on

Iterators and Blocks  “A truly expressive feature”  Iterators —— loops  Blocks —— associate with a method invocation

Procs and Lambdas  Class Proc, Kernel.Lambda  Functions that can be manipulated as objects  Block as a single parameter  Instances of class Proc as parameters

And more…  Symbols are not lightweight strings  “Variable” constants  Fake keyword parameters  The universal truth  Missing methods  Metaprogramming capability  Packages —— RubyGems  ……

To learn more…  Official Site:  Ruby in a Nutshell  The Ruby Programming Language  The Book of Ruby  Programming Ruby  Ruby Cookbook

Any questions are welcomed… Q&A

Contact: Thanks for Listening