SlideShare a Scribd company logo
1 of 7
Ruby Talk – An Introduction to




          Premshree Pillai
        premshree@livejournal.com
Scope of Talk
       What this talk is and what it isn’t
       Me, myself
       What is?
       Why use?
       How to? (a quick run through the syntax)
       Quick comparisons (with Perl and Python)
       Resources


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   2
Purpose
What this talk is?
 Get you interested
 Get you started with Ruby
What it isn’t?
 Not a tutorial



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   3
Who am I?
(or why should you listen to me)

        21/male/single :)
        Technology consultant
        Freelance writer since 2001
        Perl/Python/Ruby/REBOL hacker

Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   4
History (Ruby’s, not mine)
      Created (in Japan) by Yukihiro
     Matsumoto, popularly called Matz
      Named as “Ruby” to reflect its Perl
     hertitage
      Released to the public in 1995
      Licensed under GPL or Ruby terms


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   5
What the heck is Ruby?
      An object-oriented “scripting” language
      As powerful as Perl; simpler, better OO
      The simplicity of Python
      Follows the principle of “Least
     Surprise” – What You Expect Is What
     You Get


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   6
Where can you use Ruby?
        System (n/w, RegExps)
        Web programming (using CGI)
        Agents, crawlers
        DB programming (using DBI)
        GUI (Tk, RubyMagick)



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   7

More Related Content

What's hot

Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Rubykim.mens
 
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...lennartkats
 
1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTPJordi Llonch
 
Metaprogramming in Ruby
Metaprogramming in RubyMetaprogramming in Ruby
Metaprogramming in RubyRoss Lawley
 
New c sharp4_features_part_vi
New c sharp4_features_part_viNew c sharp4_features_part_vi
New c sharp4_features_part_viNico Ludwig
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKonstantin Sorokin
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHBhavsingh Maloth
 
Introduction to Clojure
Introduction to ClojureIntroduction to Clojure
Introduction to ClojureRenzo Borgatti
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1Ahmet Bulut
 
Python: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaPython: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaActiveState
 
Getting started with Linux and Python by Caffe
Getting started with Linux and Python by CaffeGetting started with Linux and Python by Caffe
Getting started with Linux and Python by CaffeLihang Li
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmerselliando dias
 
The dark side of Ruby, or Learn functional programming with Ruby
The dark side of Ruby, or Learn functional programming with RubyThe dark side of Ruby, or Learn functional programming with Ruby
The dark side of Ruby, or Learn functional programming with RubyEvgeny Garlukovich
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserKoan-Sin Tan
 
Model-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionModel-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionEelco Visser
 

What's hot (20)

Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Ruby
 
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...
 
1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP1 hour dive into Erlang/OTP
1 hour dive into Erlang/OTP
 
2CPP02 - C++ Primer
2CPP02 - C++ Primer2CPP02 - C++ Primer
2CPP02 - C++ Primer
 
Ruby programming
Ruby programmingRuby programming
Ruby programming
 
Metaprogramming in Ruby
Metaprogramming in RubyMetaprogramming in Ruby
Metaprogramming in Ruby
 
New c sharp4_features_part_vi
New c sharp4_features_part_viNew c sharp4_features_part_vi
New c sharp4_features_part_vi
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
 
Protocol Buffer.ppt
Protocol Buffer.pptProtocol Buffer.ppt
Protocol Buffer.ppt
 
Ruby golightly
Ruby golightlyRuby golightly
Ruby golightly
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
 
Introduction to Clojure
Introduction to ClojureIntroduction to Clojure
Introduction to Clojure
 
Api and Fluency
Api and FluencyApi and Fluency
Api and Fluency
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
 
Python: The Programmer's Lingua Franca
Python: The Programmer's Lingua FrancaPython: The Programmer's Lingua Franca
Python: The Programmer's Lingua Franca
 
Getting started with Linux and Python by Caffe
Getting started with Linux and Python by CaffeGetting started with Linux and Python by Caffe
Getting started with Linux and Python by Caffe
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmers
 
The dark side of Ruby, or Learn functional programming with Ruby
The dark side of Ruby, or Learn functional programming with RubyThe dark side of Ruby, or Learn functional programming with Ruby
The dark side of Ruby, or Learn functional programming with Ruby
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk User
 
Model-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionModel-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax Definition
 

Viewers also liked

Google Doodles IndependêNcia
Google Doodles IndependêNciaGoogle Doodles IndependêNcia
Google Doodles IndependêNciaecsette
 
Espírito Santo
Espírito  SantoEspírito  Santo
Espírito Santoecsette
 
Google Doodles Locais
Google Doodles LocaisGoogle Doodles Locais
Google Doodles Locaisecsette
 
Google Doodles 2009
Google Doodles 2009Google Doodles 2009
Google Doodles 2009ecsette
 
Ruby on Rails: um estudo de viabilidade em ambientes empresariais
Ruby on Rails: um estudo de viabilidade em ambientes empresariaisRuby on Rails: um estudo de viabilidade em ambientes empresariais
Ruby on Rails: um estudo de viabilidade em ambientes empresariaisRodrigo Recio
 
Minas Gerais
Minas GeraisMinas Gerais
Minas Geraisecsette
 
Mapa Mundi PolíTico
Mapa Mundi PolíTicoMapa Mundi PolíTico
Mapa Mundi PolíTicoecsette
 
Sistema De Governo
Sistema De GovernoSistema De Governo
Sistema De Governoecsette
 
ManhuaçU
ManhuaçUManhuaçU
ManhuaçUecsette
 

Viewers also liked (9)

Google Doodles IndependêNcia
Google Doodles IndependêNciaGoogle Doodles IndependêNcia
Google Doodles IndependêNcia
 
Espírito Santo
Espírito  SantoEspírito  Santo
Espírito Santo
 
Google Doodles Locais
Google Doodles LocaisGoogle Doodles Locais
Google Doodles Locais
 
Google Doodles 2009
Google Doodles 2009Google Doodles 2009
Google Doodles 2009
 
Ruby on Rails: um estudo de viabilidade em ambientes empresariais
Ruby on Rails: um estudo de viabilidade em ambientes empresariaisRuby on Rails: um estudo de viabilidade em ambientes empresariais
Ruby on Rails: um estudo de viabilidade em ambientes empresariais
 
Minas Gerais
Minas GeraisMinas Gerais
Minas Gerais
 
Mapa Mundi PolíTico
Mapa Mundi PolíTicoMapa Mundi PolíTico
Mapa Mundi PolíTico
 
Sistema De Governo
Sistema De GovernoSistema De Governo
Sistema De Governo
 
ManhuaçU
ManhuaçUManhuaçU
ManhuaçU
 

Similar to Pré Descobrimento Do Brasil

Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Mark Menard
 
Intro To Ror
Intro To RorIntro To Ror
Intro To Rormyuser
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9sagaroceanic11
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9sagaroceanic11
 
Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Muhammad Haseeb Shahid
 
Ruby On Rails pizza training
Ruby On Rails pizza trainingRuby On Rails pizza training
Ruby On Rails pizza trainingdavid_alphen
 
Ruby tutorial
Ruby tutorialRuby tutorial
Ruby tutorialknoppix
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to RubyMark Menard
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on RailsManoj Kumar
 
Ruby'on'rails
Ruby'on'railsRuby'on'rails
Ruby'on'railsgmergel
 
Workin ontherailsroad
Workin ontherailsroadWorkin ontherailsroad
Workin ontherailsroadJim Jones
 
WorkinOnTheRailsRoad
WorkinOnTheRailsRoadWorkinOnTheRailsRoad
WorkinOnTheRailsRoadwebuploader
 

Similar to Pré Descobrimento Do Brasil (20)

Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 
Intro for RoR
Intro for RoRIntro for RoR
Intro for RoR
 
Intro To Ror
Intro To RorIntro To Ror
Intro To Ror
 
Ruby
RubyRuby
Ruby
 
How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on Ruby
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
 
Intro To Ror
Intro To RorIntro To Ror
Intro To Ror
 
Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)
 
Ruby On Rails pizza training
Ruby On Rails pizza trainingRuby On Rails pizza training
Ruby On Rails pizza training
 
l-rubysocks-a4
l-rubysocks-a4l-rubysocks-a4
l-rubysocks-a4
 
l-rubysocks-a4
l-rubysocks-a4l-rubysocks-a4
l-rubysocks-a4
 
Ruby tutorial
Ruby tutorialRuby tutorial
Ruby tutorial
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Ruby
 
Initiation à Ruby on Rails
Initiation à Ruby on RailsInitiation à Ruby on Rails
Initiation à Ruby on Rails
 
Introduction to Ruby on Rails
Introduction to Ruby on RailsIntroduction to Ruby on Rails
Introduction to Ruby on Rails
 
Ruby'on'rails
Ruby'on'railsRuby'on'rails
Ruby'on'rails
 
Workin ontherailsroad
Workin ontherailsroadWorkin ontherailsroad
Workin ontherailsroad
 
WorkinOnTheRailsRoad
WorkinOnTheRailsRoadWorkinOnTheRailsRoad
WorkinOnTheRailsRoad
 
02 ruby overview
02 ruby overview02 ruby overview
02 ruby overview
 

More from ecsette

RegiõEs Do Brasil Norte
RegiõEs Do Brasil   NorteRegiõEs Do Brasil   Norte
RegiõEs Do Brasil Norteecsette
 
Google Doodles 2008
Google Doodles 2008Google Doodles 2008
Google Doodles 2008ecsette
 
Google Doodles 2007
Google Doodles 2007Google Doodles 2007
Google Doodles 2007ecsette
 
Google Doodles 2006
Google Doodles 2006Google Doodles 2006
Google Doodles 2006ecsette
 
Google Doodles 2005
Google Doodles 2005Google Doodles 2005
Google Doodles 2005ecsette
 
Google Doodles 2004
Google Doodles 2004Google Doodles 2004
Google Doodles 2004ecsette
 
Google Doodles 2003
Google Doodles 2003Google Doodles 2003
Google Doodles 2003ecsette
 
Google Doodles 2002
Google Doodles 2002Google Doodles 2002
Google Doodles 2002ecsette
 
Google Doodles 2001
Google Doodles 2001Google Doodles 2001
Google Doodles 2001ecsette
 
Google Doodles 2000
Google Doodles 2000Google Doodles 2000
Google Doodles 2000ecsette
 
Google Doodles 1999
Google Doodles 1999Google Doodles 1999
Google Doodles 1999ecsette
 
Google Doodles 1998
Google Doodles 1998Google Doodles 1998
Google Doodles 1998ecsette
 
Guerra De Canudos
Guerra De CanudosGuerra De Canudos
Guerra De Canudosecsette
 
Guerra Dos Farrapos
Guerra Dos FarraposGuerra Dos Farrapos
Guerra Dos Farraposecsette
 
Guerra Do Paraguai
Guerra Do ParaguaiGuerra Do Paraguai
Guerra Do Paraguaiecsette
 
PoluiçãO Do Meio Ambiente
PoluiçãO Do Meio AmbientePoluiçãO Do Meio Ambiente
PoluiçãO Do Meio Ambienteecsette
 
PoluiçãO Do Ar
PoluiçãO Do ArPoluiçãO Do Ar
PoluiçãO Do Arecsette
 
PoluiçãO Visual
PoluiçãO VisualPoluiçãO Visual
PoluiçãO Visualecsette
 
PoluiçãO Do Solo
PoluiçãO Do SoloPoluiçãO Do Solo
PoluiçãO Do Soloecsette
 
PoluiçãO Sonora
PoluiçãO SonoraPoluiçãO Sonora
PoluiçãO Sonoraecsette
 

More from ecsette (20)

RegiõEs Do Brasil Norte
RegiõEs Do Brasil   NorteRegiõEs Do Brasil   Norte
RegiõEs Do Brasil Norte
 
Google Doodles 2008
Google Doodles 2008Google Doodles 2008
Google Doodles 2008
 
Google Doodles 2007
Google Doodles 2007Google Doodles 2007
Google Doodles 2007
 
Google Doodles 2006
Google Doodles 2006Google Doodles 2006
Google Doodles 2006
 
Google Doodles 2005
Google Doodles 2005Google Doodles 2005
Google Doodles 2005
 
Google Doodles 2004
Google Doodles 2004Google Doodles 2004
Google Doodles 2004
 
Google Doodles 2003
Google Doodles 2003Google Doodles 2003
Google Doodles 2003
 
Google Doodles 2002
Google Doodles 2002Google Doodles 2002
Google Doodles 2002
 
Google Doodles 2001
Google Doodles 2001Google Doodles 2001
Google Doodles 2001
 
Google Doodles 2000
Google Doodles 2000Google Doodles 2000
Google Doodles 2000
 
Google Doodles 1999
Google Doodles 1999Google Doodles 1999
Google Doodles 1999
 
Google Doodles 1998
Google Doodles 1998Google Doodles 1998
Google Doodles 1998
 
Guerra De Canudos
Guerra De CanudosGuerra De Canudos
Guerra De Canudos
 
Guerra Dos Farrapos
Guerra Dos FarraposGuerra Dos Farrapos
Guerra Dos Farrapos
 
Guerra Do Paraguai
Guerra Do ParaguaiGuerra Do Paraguai
Guerra Do Paraguai
 
PoluiçãO Do Meio Ambiente
PoluiçãO Do Meio AmbientePoluiçãO Do Meio Ambiente
PoluiçãO Do Meio Ambiente
 
PoluiçãO Do Ar
PoluiçãO Do ArPoluiçãO Do Ar
PoluiçãO Do Ar
 
PoluiçãO Visual
PoluiçãO VisualPoluiçãO Visual
PoluiçãO Visual
 
PoluiçãO Do Solo
PoluiçãO Do SoloPoluiçãO Do Solo
PoluiçãO Do Solo
 
PoluiçãO Sonora
PoluiçãO SonoraPoluiçãO Sonora
PoluiçãO Sonora
 

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 

Pré Descobrimento Do Brasil

  • 1. Ruby Talk – An Introduction to Premshree Pillai premshree@livejournal.com
  • 2. Scope of Talk What this talk is and what it isn’t Me, myself What is? Why use? How to? (a quick run through the syntax) Quick comparisons (with Perl and Python) Resources Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 2
  • 3. Purpose What this talk is? Get you interested Get you started with Ruby What it isn’t? Not a tutorial Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 3
  • 4. Who am I? (or why should you listen to me) 21/male/single :) Technology consultant Freelance writer since 2001 Perl/Python/Ruby/REBOL hacker Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 4
  • 5. History (Ruby’s, not mine) Created (in Japan) by Yukihiro Matsumoto, popularly called Matz Named as “Ruby” to reflect its Perl hertitage Released to the public in 1995 Licensed under GPL or Ruby terms Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 5
  • 6. What the heck is Ruby? An object-oriented “scripting” language As powerful as Perl; simpler, better OO The simplicity of Python Follows the principle of “Least Surprise” – What You Expect Is What You Get Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 6
  • 7. Where can you use Ruby? System (n/w, RegExps) Web programming (using CGI)  Agents, crawlers DB programming (using DBI) GUI (Tk, RubyMagick) Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 7
  • 8. General Features High level language True OO (everything’s an object!) Interpreted Portable Low learning curve A quick scan thro’ the syntax Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 8
  • 9. Running Ruby From the command line: ruby file.rb Windows binary comes bundled with Scintilla Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 9
  • 10. Basic stuff print 'Hello, world!' p 'Hello, world!' # prints with newline my_var = gets # get input Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 10
  • 11. Operators + (addition) - (subtraction/negation) * (multiplication) / (division) % (modulus) ** (exponentiation) Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 11
  • 12. Operators (contd.) == <=> (returns -1, 0 or 1) <, <=, >=, > =~ (matching) eql? (test of equality of type and values) Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 12
  • 13. Operators (contd.) ++ and -- are not reserved operators Use += and +- Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 13
  • 14. Logical Operators and or not Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 14
  • 15. Typing Dynamic typed  Type checking at run-time Strong typed Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 15
  • 16. Basic Data Types Integers and floats Strings Ranges Arrays Hashes Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 16
  • 17. Strings my_str = 'whatever' my_str = "blah, blah" my_str.split(",")[0].split("")[2] * 3 Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 17
  • 18. Ranges Inclusive range my_range = 1 .. 3 my_range = 'abc' .. 'abf' Non-inclusive range my_range = 1 … 5 my_range = 'abc' … 'abf' Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 18
  • 19. Arrays my_array = [1, 2, 3] Common methods: my_array.length my_array << 4 my_array[0], etc. Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 19
  • 20. Hashes my_hash = { 'desc' => {'color' => 'blue',}, 1 => [1, 2, 3] } print my_hash['desc']['color'] will return blue Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 20
  • 21. Hashes (contd.) Common methods: my_hash.keys my_hash.values Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 21
  • 22. Data Type Conversion Converting to an Array: var_data_type.to_a Converting to an String: var_data_type.to_s More (guess!): var_data_type.to_i var_data_type.to_f Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 22
  • 23. Everything's an Object Methods can be applied to data directly – not just on variables holding data Example: 5.to_s will return "5" Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 23
  • 24. Code Blocks Code blocks may use braces ( { } ) or do/end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 24
  • 25. Code Blocks (contd.) Example def my_print(what) print what end You cannot use braces for function blocks Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 25
  • 26. If Statement if expression code block elsif (expression) code block else code block end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 26
  • 27. While Statement while expression code block end Example: count = 1 while count < 10 print count count += 1 end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 27
  • 28. For Loop for variable_name in range code block end Example: for count in 0..2 print count end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 28
  • 29. Iterators array_or_range = value array_or_range.each { |x| print x } Example: my_range = 1..5 my_range.each { |x| print x } Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 29
  • 30. Functions Functions begin with the keyword def def function_name([args]) code block end Example: def print_name(name='Ruby') print name end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 30
  • 31. OO Ruby Classes are containers for static data members and functions Declared using the class keyword. All class names should begin with a capital letter Constructor declared using the initialize keyword Class variables precede with an “@” Objects created using the new method Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 31
  • 32. Example class class My_class def initialize(arg1, arg2) @arg1 = arg1 @arg2 = arg1 end def print_arg1() print @arg1 end def print_foo() print "I Love Ruby!" end private def print_arg2() print @arg2 end end my_object = My_class.new(2, 3) my_object.print_arg1 my_object.print_arg2 # will cause an exception Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 32
  • 33. Inheritance class Derived_class < My_class def initialize() @arg = "I Love Ruby!" end def print_arg() print @arg end end my_object = Derived_class.new my_object.print_foo Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 33
  • 34. Notes on OO Ruby Access specifiers: public, protected, private Multiple inheritance not possible Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 34
  • 35. Ruby modules require 'net/http' superclass subclass Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 35
  • 36. Advanced topics Regular expressions Network programming MT programming GUI programming (using Tk) Web programming Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 36
  • 37. Now what? What you can do now? Get your hands dirty with Ruby Write simple Ruby programs What you have to do? Explore Ruby modules Find a problem, and Ruby it! Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 37
  • 38. Perl compared to Ruby Complicated OO Cryptic code (Ruby is often called “A Better Perl”) PS: Don’t kill me! Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 38
  • 39. Python compared to Ruby Incomplete OO Instance variables require self.var No class method No true GC (uses ref counting) Not suitable for one-liners PS: Don’t kill me! Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 39
  • 40. Resources Ruby Home Page http://www.ruby-lang.org/en/ Programming Ruby http://www.rubycentral.com/book/ RubyGarden http://www.rubygarden.org/ruby Ruby Application Archive (RAA) http://raa.ruby-lang.org/ Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 40
  • 41. Resources (contd.) RubyForge http://rubyforge.org/ ruby-talk http://blade.nagaokaut.ac.jp/ruby/ruby-talk Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 41
  • 42. If God did OOP, he’d probably do it in Python; He’s now considering switching to Ruby! Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 42
  • 43. Thank you! Questions? Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 43