Trends in Scripting Languages History For me the purpose of life is partly to have joy. Programmers often feel joy when they can concentrate on the creative.

Slides:



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

John Pinney Ruby in 20 minutes John Pinney
Lecture 9: More on objects, classes, strings discuss hw3 assign hw4 default values for variables scope of variables and shadowing null reference and NullPointerException.
CS324e - Elements of Graphics and Visualization A Little Java A Little Python.
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.
What is a scripting language? What is Python?
ISBN Chapter 6 Data Types Character Strings Pattern Matching.
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,
Scripting Languages CS351 – Programming Paradigms.
Scripting with Ruby What is a scripting language? What is Ruby?
Learning Ruby - 6 Regular Expressions. Ruby's Regex Technology Specifying what you are after using a terse, compact syntax Very useful when working with.
Introduction to Ruby CSE 413 Autumn 2008 Credit: Dan Grossman, CSE341.
8/22/ Ruby Recitation1 Automation: Time to learn Ruby Spring 2010, Recitation 5 Your Awesome TAs.
Subroutines Just like C, PERL offers the ability to use subroutines for all the same reasons – Code that you will use over and over again – Breaking large.
The Ruby Programming Language
CMSC 330: Organization of Programming Languages 1 Overview of Ruby.
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.
General Purpose Language Ruby Kit Chan COMP3351 Programming Languages November 9, 2007.
By Timothy Sparks. Yukihiro Matsumoto wanted “a scripting language that was more powerful than Perl, and more object- oriented than Python. That's why.
SCRIPTING IN RUBY By Amber Bennett “Ruby is simple in appearance, but is very complex inside, just like our human body.” --Yukihiro Matsumoto.
1 Perl Perl basics Perl Elements Arrays and Hashes Control statements Operators OOP in Perl.
CIT 383: Administrative Scripting
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,
H3D API Training  Part 3.1: Python – Quick overview.
Ruby. Who am I? 1- Bunlong Van 2- Sreyleap Lay, 3- Chhon Meily Blog:
RegExp. Regular Expression A regular expression is a certain way to describe a pattern of characters. Pattern-matching or keyword search. Regular expressions.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Ruby. Quick History Name chosen because it was the birthstone of the colleage of the creator Yukihiro Matsumoto First public release Dec Created.
A very basic overview of Server-Side Scripting Or what is PHP, Perl, Python, Ruby and what can they do for me?
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Perl Language Yize Chen CS354. History Perl was designed by Larry Wall in 1987 as a text processing language Perl has revised several times and becomes.
C463 / B551 Artificial Intelligence Dana Vrajitoru Python.
Evaluating Python as an Introductory Programming Language A. Thomas and H.L. Liang UNISA.
Scripting with Ruby What is a scripting language? What is Ruby?
Report Haiyong Wang. Outline A brief introduction to Chef A brief introduction to Ruby Latching VS Locking.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
Random Bits of Perl None of this stuff is worthy of it’s own lecture, but it’s all a bunch of things you should learn to use Perl well.
CIT 383: Administrative ScriptingSlide #1 CIT 383: Administrative Scripting Regular Expressions.
RUBY by Ryan Chase.
Department of Electrical and Computer Engineering Introduction to Perl By Hector M Lugo-Cordero August 26, 2008.
Scripting with Ruby What is a scripting language? What is Ruby?
Standard Types and Regular Expressions CS 480/680 – Comparative Languages.
Smalltalk Interpreted by Alan Frazier & Brian Sparks.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
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.
CS 142 Lecture Notes: RubySlide 1 Basic Ruby Syntax sum = 0 i = 1 while i
 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.
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
Introduction to information systems RUBY dr inż. Tomasz Pieciukiewicz.
Dept. of Animal Breeding and Genetics Programming basics & introduction to PERL Mats Pettersson.
CMSC330 More Ruby. Last lecture Scripting languages Ruby language –Implicit variable declarations –Many control statements –Classes & objects –Strings.
1 Charles Oliver Nutter Thomas Enebo Tor Norbye Martin Krauskopf JRuby: Understanding the Fuss Except where otherwise noted, the content of this presentation.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Ruby Getting started & Ruby.New Presented by Mario Tayah
Scripting Languages Info derived largely from Programming Language Pragmatics, by Michael Scott.
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.
Chapter 14 Introduction to Ruby.
CIT 383: Administrative Scripting
What to do today: Brief history of Ruby General qualities/info
Sloan coders club kickoff meeting
Control Structures: if Conditional
Introduction to Python
Ruby Testing 2, 11/9/2004.
SWEN-250 Personal Software Engineering
Topics to cover Instance variables vs. local variables.
Presentation transcript:

Trends in Scripting Languages

History 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

History  1993  Fill what lacked in Perl and Python  More powerful than Perl  More Object Oriented than Python  Facilitate creativity  1995 – First release

Basic Syntax #example if-block if goldilocks > 10 puts “too big” elsif goldilocks < 10 puts “too small” else puts “just right” end

Basic Syntax #example function call def my_funct(arg) “Hello #{arg}” end puts my_funct(“world!”)

Example Bear Object Part 1  Initialization  Accessor Methods  Mutator Methods

Types  Seven basic types: numbers strings hashes ranges symbols regular expressions

Types - Numbers num = 81 6.times do puts “#{num.class}: #{num}” num *= num end

Types - Strings  single quoted strings  double quoted strings puts ‘string \n string’ puts “string \n string”

Types - Hashes  Basically Associative Arrays  Uses {} and => notation bears = { “mamma” =>1, “pappa” =>2, “baby” =>3 } puts[“pappa”]

Types - Ranges  Inclusive ranges (‘a’..’e’)  Exclusive ranges (‘a’…’e’)  As a “Comparator” must support comparable operator must implement the succ method

Example Bear Object Part 2  Implementing Range support Comparable operator succ method

Types – Regular Expressions  Pattern matching of String objects  Object of class Regexp declared from constructor defined directly re1 = Regexp.new(‘[a-z]’) re2 = /[a-z]/ “Goldilocks” =~ re1 “GOLDILOCKS” =~ re1

Scope of Variables  Specific syntax for declaring scope LocalGlobalInstanceClassConstant  Local  within each block  Global, Instance, Class  maintain their scope with their respective definition Can use the :: operator i.e. ClassName::ConstName

Conclusion  A programmer’s language  Readability vs. Writability  Facilitate creativity?

Questions?