SlideShare une entreprise Scribd logo
1  sur  90
Writing your own Programming
             Language to Understand Ruby better



José Valim                blog.plataformatec.com   @josevalim
Writing your own Programming
             Language to Understand Ruby better


      ID                          blog             twitter

José Valim                blog.plataformatec.com    @josevalim
I am José Valim
    @josevalim
I work at
     blog.plataformatec.com.br
Core Team Member
Elixir
   Simple Object Orientation and
charming syntax on top of Erlang VM
Erlang VM

+Concurrent Processes
+Message Based
+Hot Code Swapping
Erlang Language

+Small and quick to learn
+Functional programming
- Syntax gets too much in your way
- No object orientation
Elixir
   Simple Object Orientation and
charming syntax on top of Erlang VM
<3 Ruby <3
1.Things I learned about Ruby

2.What if?

3.Wrapping up
Things I learned about
          Ruby
The Syntax
puts “hi”
puts “hi”   Lexer
puts “hi”   Lexer
                    [:identi er, “puts”],
                    [:string, “hi”]
puts “hi”   Lexer
                     [:identi er, “puts”],
                     [:string, “hi”]

            Parser
puts “hi”           Lexer
                             [:identi er, “puts”],
                             [:string, “hi”]

                    Parser
[:call, “puts”,[
  [:string, “hi”]
]]
puts “hi”             Lexer
                                  [:identi er, “puts”],
                                  [:string, “hi”]

                      Parser
[:call, “puts”,[
  [:string, “hi”]
]]
                    Extra steps
puts “hi”             Lexer
                                  [:identi er, “puts”],
                                  [:string, “hi”]

                      Parser
[:call, “puts”,[
  [:string, “hi”]
]]
                    Extra steps
                                      [:call, “puts”,[
                                        [:string, “hi”]
                                      ]]
puts “hi”                 Lexer
                                     [:identi er, “puts”],
                                     [:string, “hi”]

                          Parser
[:call, “puts”,[
  [:string, “hi”]
]]
                       Extra steps
                                           [:call, “puts”,[
                                             [:string, “hi”]
                                           ]]
                    Interpreter/Compiler
puts “hi”                 Lexer
                                     [:identi er, “puts”],
                                     [:string, “hi”]

                          Parser
[:call, “puts”,[
  [:string, “hi”]
]]
                       Extra steps
                                           [:call, “puts”,[
                                             [:string, “hi”]
                                           ]]
                    Interpreter/Compiler
Flexible Grammar
def foo
  1
end
foo #=> 1
self.foo #=> 1
def foo
  1
end
foo #=> 1
self.foo #=> 1

foo = 2
foo #=> 2
self.foo #=> 1
foo
foo   Lexer
foo   Lexer
              [:identi er, “foo”]
foo   Lexer
               [:identi er, “foo”]

      Parser
foo              Lexer
                               [:identi er, “foo”]

                      Parser
[:identi er, “foo”]
foo                Lexer
                                    [:identi er, “foo”]

                        Parser
[:identi er, “foo”]


                      Extra steps
foo                Lexer
                                    [:identi er, “foo”]

                        Parser
[:identi er, “foo”]


                      Extra steps
                                              ?
foo                Lexer
                                    [:identi er, “foo”]

                        Parser
[:identi er, “foo”]


                      Extra steps
                                              ?
                  Interpreter/Compiler
def bar
  foo = 1
  foo
end
def bar
  foo = 1
            lexer + parser
  foo
end
               [:method,:bar,[
                 [:assign, "foo", [:integer,1]],
                 [:identifier,"foo"]
               ]]
def bar
  foo = 1
               lexer + parser
  foo
end
                   [:method,:bar,[
                     [:assign, "foo", [:integer,1]],
                     [:identifier,"foo"]
                   ]]
                               extra steps
   [:method,:bar,[
      [:assign, "foo", [:integer,1]],
      [:var,"foo"]
   ]]
def bar(arg)
  arg.class
end
bar /foo/m
def bar(arg)
  arg.class
end
bar /foo/m

bar, foo, m = 0, 1, 2
bar /foo/m
def show
  @user = User.find(self.params[:id])
  if @user.name =~ %r/^Ph.D/i
    self.render :action => "show"
  else
    self.flash[:notice] = "Ph.D required"
    self.redirect_to "/"
  end
end
def show
  @user = User.find(params[:id])
  if @user.name =~ /^Ph.D/i
    render :action => "show"
  else
    flash[:notice] = "Ph.D required"
    redirect_to "/"
  end
end
The Object Model
object = Object.new
def object.greet(name)
  puts "Hello #{name}"
end
object.greet("Matz")
Ruby methods are stored in
        modules
module Greeter
  def greet(name)
    "Hello #{name}"
  end
end

class Person
  include Greeter
end

Person.new.greet "Matz"
class Person
  def greet(name)
    "Hello #{name}"
  end
end

Person.new.greet "Matz"
Person.is_a?(Module) #=> true
Class.superclass     #=> Module
object = Object.new
def object.greet(name)
  puts "Hello #{name}"
end
object.greet("Matz")
object.class.ancestors
#=> [Object, Kernel, BasicObject]
object.class.ancestors
#=> [Object, Kernel, BasicObject]

object.class.ancestors.any? do |r|
  r.method_defined?(:greet)
end
#=> false
object.class.ancestors
#=> [Object, Kernel, BasicObject]

object.class.ancestors.any? do |r|
  r.method_defined?(:greet)
end
#=> false

object.singleton_class.
  method_defined?(:greet)
#=> true
object.class.ancestors
#=> [Object, Kernel, BasicObject]

object.class.ancestors.any? do |r|
  r.method_defined?(:greet)
end
#=> false

object.singleton_class.
  method_defined?(:greet)
#=> true

object.singleton_class.is_a?(Module)
#=> true
What if?
... we did not have
       blocks?
<3 Blocks <3
File.open("euruko.txt") do |f|
  f.write "doing it live"
end
File.open "euruko.txt", do |f|
  f.write "doing it live"
end
File.open "euruko.txt", do |f|
  f.write "doing it live"
end
File.open("euruko.txt", do |f|
  f.write "doing it live"
end)
do_it = do |f|
  f.write "doing it live"
end

File.open "euruko.txt", do_it
No blocks


+No need for yield, &block
+Passing more than one block around is more
 natural
... we had Array and Hash
     comprehensions?
n = [1,2,3,4]

[x * 2 for x in n]

# => [2,4,6,8]
n = [1,2,3]

[x * 2 for x in n, x.odd?]

# => [2,6]
n = [1,2,3,4]

[[x,y] for x in n, y in n, x * x == y]

# => [[1,1],[2,4]]
n = [1,2,3,4]

{x => y for x in n, y in n, x * x == y}

# => { 1 => 1, 2 => 4 }
... our hashes were more
         like JSON?
{ a: 1 }
{ "a": 1 }
... we had pattern
     matching?
x, y, *z = [1,2,3,4,5]

x #=> 1
y #=> 2
z #=> [3,4,5]
x, [y1,*y2], *z = [1,[2,3,4],5]

x    #=>   1
y1   #=>   2
y2   #=>   [3,4]
z    #=>   [5]
x, x, *z = [1,2,3,4,5]
#=> Raises an error
x, x, *z = [1,1,3,4,5]
#=> Works!
x = 1

~x, *y = [3, 2, 1]
#=> Raises an error!

~x, *y = [1, 2, 3]
# => Works!
... we de ned a syntax
         tree?
[:method,:bar,[
  [:assign, "foo", [:integer,1]],
  [:var,"foo"]
]]
class Foo
  memoize def bar
    # Something
  end
end
class Foo
  memoize(def bar
    # Something
  end)
end
def memoize(method)
  tree = method.tree
  # Do something
  method.redefine! new_tree
end
Wrapping up
<3 Matz <3
<3 Elixir <3
github.com/josevalim/elixir
createyourproglang.com
?

José Valim   blog.plataformatec.com   @josevalim
?
      ID             blog             twitter

José Valim   blog.plataformatec.com    @josevalim

Contenu connexe

Tendances

Python chapter 2
Python chapter 2Python chapter 2
Python chapter 2Raghu nath
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In PerlKang-min Liu
 
Getting started with Pod::Weaver
Getting started with Pod::WeaverGetting started with Pod::Weaver
Getting started with Pod::WeaverJoshua Keroes
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In PythonMarwan Osman
 
Introduction To Php For Wit2009
Introduction To Php For Wit2009Introduction To Php For Wit2009
Introduction To Php For Wit2009cwarren
 
Evolving Software with Moose
Evolving Software with MooseEvolving Software with Moose
Evolving Software with MooseDave Cross
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim Perlchinaguestcf9240
 
Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in KotlinKotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in KotlinJetBrains Russia
 
What's New in PHP 5.5
What's New in PHP 5.5What's New in PHP 5.5
What's New in PHP 5.5Corey Ballou
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaLin Yo-An
 
The bones of a nice Python script
The bones of a nice Python scriptThe bones of a nice Python script
The bones of a nice Python scriptsaniac
 
Quick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHPQuick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHPSanju Sony Kurian
 
Introduction to Perl Best Practices
Introduction to Perl Best PracticesIntroduction to Perl Best Practices
Introduction to Perl Best PracticesJosé Castro
 

Tendances (17)

Python chapter 2
Python chapter 2Python chapter 2
Python chapter 2
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
P3 2018 python_regexes
P3 2018 python_regexesP3 2018 python_regexes
P3 2018 python_regexes
 
Getting started with Pod::Weaver
Getting started with Pod::WeaverGetting started with Pod::Weaver
Getting started with Pod::Weaver
 
Programming Under Linux In Python
Programming Under Linux In PythonProgramming Under Linux In Python
Programming Under Linux In Python
 
extending-php
extending-phpextending-php
extending-php
 
Unfiltered Unveiled
Unfiltered UnveiledUnfiltered Unveiled
Unfiltered Unveiled
 
Introduction To Php For Wit2009
Introduction To Php For Wit2009Introduction To Php For Wit2009
Introduction To Php For Wit2009
 
Evolving Software with Moose
Evolving Software with MooseEvolving Software with Moose
Evolving Software with Moose
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim Perlchina
 
Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in KotlinKotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
Kotlin Programming Language. What it is all about. Roman Belov, PMM in Kotlin
 
What's New in PHP 5.5
What's New in PHP 5.5What's New in PHP 5.5
What's New in PHP 5.5
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim Perlchina
 
The bones of a nice Python script
The bones of a nice Python scriptThe bones of a nice Python script
The bones of a nice Python script
 
Quick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHPQuick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHP
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Introduction to Perl Best Practices
Introduction to Perl Best PracticesIntroduction to Perl Best Practices
Introduction to Perl Best Practices
 

En vedette

Building Micro-Services with Scala
Building Micro-Services with ScalaBuilding Micro-Services with Scala
Building Micro-Services with ScalaYardena Meymann
 
The Coming Intelligent Digital Assistant Era and Its Impact on Online Platforms
The Coming Intelligent Digital Assistant Era and Its Impact on Online PlatformsThe Coming Intelligent Digital Assistant Era and Its Impact on Online Platforms
The Coming Intelligent Digital Assistant Era and Its Impact on Online PlatformsCognizant
 
Les évolutions adaptatives
Les évolutions adaptativesLes évolutions adaptatives
Les évolutions adaptativesRESPONSIV
 
Suisse ombrelle presentation for v cs
Suisse ombrelle presentation for v csSuisse ombrelle presentation for v cs
Suisse ombrelle presentation for v csChristian Sutter
 
Help us transform Italian Public Administration! - Team per la Trasformazione...
Help us transform Italian Public Administration! - Team per la Trasformazione...Help us transform Italian Public Administration! - Team per la Trasformazione...
Help us transform Italian Public Administration! - Team per la Trasformazione...Team per la Trasformazione Digitale
 
SI-PI, Khristina Damayanti, Hapzi Ali, Isu Sosial Dan Etika Dalam Sistem Info...
SI-PI, Khristina Damayanti, Hapzi Ali, Isu Sosial Dan Etika Dalam Sistem Info...SI-PI, Khristina Damayanti, Hapzi Ali, Isu Sosial Dan Etika Dalam Sistem Info...
SI-PI, Khristina Damayanti, Hapzi Ali, Isu Sosial Dan Etika Dalam Sistem Info...khristina damayanti
 
Fbe manchester the agents perspective 24th march 17
Fbe manchester the agents perspective 24th march 17Fbe manchester the agents perspective 24th march 17
Fbe manchester the agents perspective 24th march 17FBE Manchester
 
L’association marocaine de médecins généralistes Al Hakim tient son deuxième...
L’association marocaine de médecins généralistes Al  Hakim tient son deuxième...L’association marocaine de médecins généralistes Al  Hakim tient son deuxième...
L’association marocaine de médecins généralistes Al Hakim tient son deuxième...Khadija Moussayer
 
Missing Action Plan (May 2015)
Missing Action Plan (May 2015)Missing Action Plan (May 2015)
Missing Action Plan (May 2015)Victoria Gaitskell
 

En vedette (12)

Programmer Anarchy
Programmer AnarchyProgrammer Anarchy
Programmer Anarchy
 
Building Micro-Services with Scala
Building Micro-Services with ScalaBuilding Micro-Services with Scala
Building Micro-Services with Scala
 
The Coming Intelligent Digital Assistant Era and Its Impact on Online Platforms
The Coming Intelligent Digital Assistant Era and Its Impact on Online PlatformsThe Coming Intelligent Digital Assistant Era and Its Impact on Online Platforms
The Coming Intelligent Digital Assistant Era and Its Impact on Online Platforms
 
Les évolutions adaptatives
Les évolutions adaptativesLes évolutions adaptatives
Les évolutions adaptatives
 
Suisse ombrelle presentation for v cs
Suisse ombrelle presentation for v csSuisse ombrelle presentation for v cs
Suisse ombrelle presentation for v cs
 
Help us transform Italian Public Administration! - Team per la Trasformazione...
Help us transform Italian Public Administration! - Team per la Trasformazione...Help us transform Italian Public Administration! - Team per la Trasformazione...
Help us transform Italian Public Administration! - Team per la Trasformazione...
 
SI-PI, Khristina Damayanti, Hapzi Ali, Isu Sosial Dan Etika Dalam Sistem Info...
SI-PI, Khristina Damayanti, Hapzi Ali, Isu Sosial Dan Etika Dalam Sistem Info...SI-PI, Khristina Damayanti, Hapzi Ali, Isu Sosial Dan Etika Dalam Sistem Info...
SI-PI, Khristina Damayanti, Hapzi Ali, Isu Sosial Dan Etika Dalam Sistem Info...
 
Storyboard
StoryboardStoryboard
Storyboard
 
Fbe manchester the agents perspective 24th march 17
Fbe manchester the agents perspective 24th march 17Fbe manchester the agents perspective 24th march 17
Fbe manchester the agents perspective 24th march 17
 
L’association marocaine de médecins généralistes Al Hakim tient son deuxième...
L’association marocaine de médecins généralistes Al  Hakim tient son deuxième...L’association marocaine de médecins généralistes Al  Hakim tient son deuxième...
L’association marocaine de médecins généralistes Al Hakim tient son deuxième...
 
Poseidon Adventures
Poseidon AdventuresPoseidon Adventures
Poseidon Adventures
 
Missing Action Plan (May 2015)
Missing Action Plan (May 2015)Missing Action Plan (May 2015)
Missing Action Plan (May 2015)
 

Similaire à Writing your own programming language to understand Ruby better - Euruko 2011

Ruby 程式語言入門導覽
Ruby 程式語言入門導覽Ruby 程式語言入門導覽
Ruby 程式語言入門導覽Wen-Tien Chang
 
Elixir formatter Internals
Elixir formatter InternalsElixir formatter Internals
Elixir formatter InternalsPedro Medeiros
 
Ruby - Uma Introdução
Ruby - Uma IntroduçãoRuby - Uma Introdução
Ruby - Uma IntroduçãoÍgor Bonadio
 
Building Interpreters with PyPy
Building Interpreters with PyPyBuilding Interpreters with PyPy
Building Interpreters with PyPyDaniel Neuhäuser
 
Ruby 入門 第一次就上手
Ruby 入門 第一次就上手Ruby 入門 第一次就上手
Ruby 入門 第一次就上手Wen-Tien Chang
 
Invertible-syntax 入門
Invertible-syntax 入門Invertible-syntax 入門
Invertible-syntax 入門Hiromi Ishii
 
Slides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersSlides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersGiovanni924
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go ProgrammingLin Yo-An
 
An (Inaccurate) Introduction to Python
An (Inaccurate) Introduction to PythonAn (Inaccurate) Introduction to Python
An (Inaccurate) Introduction to PythonNicholas Tollervey
 
Scala: Functioneel programmeren in een object georiënteerde wereld
Scala: Functioneel programmeren in een object georiënteerde wereldScala: Functioneel programmeren in een object georiënteerde wereld
Scala: Functioneel programmeren in een object georiënteerde wereldWerner Hofstra
 
Ruby 2: some new things
Ruby 2: some new thingsRuby 2: some new things
Ruby 2: some new thingsDavid Black
 
A Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsA Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsMichael Pirnat
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackUAnshu Prateek
 
A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009Jordan Baker
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10acme
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Henry S
 

Similaire à Writing your own programming language to understand Ruby better - Euruko 2011 (20)

An introduction to Ruby
An introduction to RubyAn introduction to Ruby
An introduction to Ruby
 
Rails by example
Rails by exampleRails by example
Rails by example
 
Ruby 程式語言入門導覽
Ruby 程式語言入門導覽Ruby 程式語言入門導覽
Ruby 程式語言入門導覽
 
Elixir formatter Internals
Elixir formatter InternalsElixir formatter Internals
Elixir formatter Internals
 
Ruby - Uma Introdução
Ruby - Uma IntroduçãoRuby - Uma Introdução
Ruby - Uma Introdução
 
Building Interpreters with PyPy
Building Interpreters with PyPyBuilding Interpreters with PyPy
Building Interpreters with PyPy
 
Ruby 入門 第一次就上手
Ruby 入門 第一次就上手Ruby 入門 第一次就上手
Ruby 入門 第一次就上手
 
Poetic APIs
Poetic APIsPoetic APIs
Poetic APIs
 
Invertible-syntax 入門
Invertible-syntax 入門Invertible-syntax 入門
Invertible-syntax 入門
 
Slides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersSlides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammers
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go Programming
 
An (Inaccurate) Introduction to Python
An (Inaccurate) Introduction to PythonAn (Inaccurate) Introduction to Python
An (Inaccurate) Introduction to Python
 
Scala: Functioneel programmeren in een object georiënteerde wereld
Scala: Functioneel programmeren in een object georiënteerde wereldScala: Functioneel programmeren in een object georiënteerde wereld
Scala: Functioneel programmeren in een object georiënteerde wereld
 
Ruby 2: some new things
Ruby 2: some new thingsRuby 2: some new things
Ruby 2: some new things
 
A Few of My Favorite (Python) Things
A Few of My Favorite (Python) ThingsA Few of My Favorite (Python) Things
A Few of My Favorite (Python) Things
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackU
 
BDT on PHP
BDT on PHPBDT on PHP
BDT on PHP
 
A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009A Taste of Python - Devdays Toronto 2009
A Taste of Python - Devdays Toronto 2009
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10
 
Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2Code for Startup MVP (Ruby on Rails) Session 2
Code for Startup MVP (Ruby on Rails) Session 2
 

Plus de Plataformatec

Do your own hacking evening - RubyConf UR
Do your own hacking evening - RubyConf URDo your own hacking evening - RubyConf UR
Do your own hacking evening - RubyConf URPlataformatec
 
Product Owner - Simples como dizem? - Agile Tour 2011
Product Owner - Simples como dizem? - Agile Tour 2011Product Owner - Simples como dizem? - Agile Tour 2011
Product Owner - Simples como dizem? - Agile Tour 2011Plataformatec
 
As reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
As reais razões do porque eu devo ser Ágil - Agile Tour São PauloAs reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
As reais razões do porque eu devo ser Ágil - Agile Tour São PauloPlataformatec
 
Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010Plataformatec
 
Railties - Ruby Masters Conf - 26Feb2011
Railties - Ruby Masters Conf - 26Feb2011Railties - Ruby Masters Conf - 26Feb2011
Railties - Ruby Masters Conf - 26Feb2011Plataformatec
 
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010Plataformatec
 
Rails 3 - The Developers Conference - 21aug2010
Rails 3 - The Developers Conference - 21aug2010Rails 3 - The Developers Conference - 21aug2010
Rails 3 - The Developers Conference - 21aug2010Plataformatec
 
CRUDing Open Source - WhyDay - 19aug2010
CRUDing Open Source - WhyDay - 19aug2010CRUDing Open Source - WhyDay - 19aug2010
CRUDing Open Source - WhyDay - 19aug2010Plataformatec
 
Rails 3 - RS on Rails - 21aug2010
Rails 3 - RS on Rails - 21aug2010Rails 3 - RS on Rails - 21aug2010
Rails 3 - RS on Rails - 21aug2010Plataformatec
 
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010Plataformatec
 
Project Rescue - Oxente Rails - 05aug2010
Project Rescue - Oxente Rails - 05aug2010Project Rescue - Oxente Rails - 05aug2010
Project Rescue - Oxente Rails - 05aug2010Plataformatec
 
The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010Plataformatec
 
DSL or NoDSL - Euruko - 29may2010
DSL or NoDSL - Euruko - 29may2010DSL or NoDSL - Euruko - 29may2010
DSL or NoDSL - Euruko - 29may2010Plataformatec
 
Classificação de textos - Dev in Sampa - 28nov2009
Classificação de textos - Dev in Sampa - 28nov2009Classificação de textos - Dev in Sampa - 28nov2009
Classificação de textos - Dev in Sampa - 28nov2009Plataformatec
 
Devise - RSLA - 13oct2009
Devise - RSLA - 13oct2009Devise - RSLA - 13oct2009
Devise - RSLA - 13oct2009Plataformatec
 
Thor - RSLA - 13oct2009
Thor - RSLA - 13oct2009Thor - RSLA - 13oct2009
Thor - RSLA - 13oct2009Plataformatec
 

Plus de Plataformatec (16)

Do your own hacking evening - RubyConf UR
Do your own hacking evening - RubyConf URDo your own hacking evening - RubyConf UR
Do your own hacking evening - RubyConf UR
 
Product Owner - Simples como dizem? - Agile Tour 2011
Product Owner - Simples como dizem? - Agile Tour 2011Product Owner - Simples como dizem? - Agile Tour 2011
Product Owner - Simples como dizem? - Agile Tour 2011
 
As reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
As reais razões do porque eu devo ser Ágil - Agile Tour São PauloAs reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
As reais razões do porque eu devo ser Ágil - Agile Tour São Paulo
 
Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010Código Saudável => Programador Feliz - Rs on Rails 2010
Código Saudável => Programador Feliz - Rs on Rails 2010
 
Railties - Ruby Masters Conf - 26Feb2011
Railties - Ruby Masters Conf - 26Feb2011Railties - Ruby Masters Conf - 26Feb2011
Railties - Ruby Masters Conf - 26Feb2011
 
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
Rails 2.3, 3.0 and 3.1 - RubyConfBR - 26oct2010
 
Rails 3 - The Developers Conference - 21aug2010
Rails 3 - The Developers Conference - 21aug2010Rails 3 - The Developers Conference - 21aug2010
Rails 3 - The Developers Conference - 21aug2010
 
CRUDing Open Source - WhyDay - 19aug2010
CRUDing Open Source - WhyDay - 19aug2010CRUDing Open Source - WhyDay - 19aug2010
CRUDing Open Source - WhyDay - 19aug2010
 
Rails 3 - RS on Rails - 21aug2010
Rails 3 - RS on Rails - 21aug2010Rails 3 - RS on Rails - 21aug2010
Rails 3 - RS on Rails - 21aug2010
 
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010
 
Project Rescue - Oxente Rails - 05aug2010
Project Rescue - Oxente Rails - 05aug2010Project Rescue - Oxente Rails - 05aug2010
Project Rescue - Oxente Rails - 05aug2010
 
The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010
 
DSL or NoDSL - Euruko - 29may2010
DSL or NoDSL - Euruko - 29may2010DSL or NoDSL - Euruko - 29may2010
DSL or NoDSL - Euruko - 29may2010
 
Classificação de textos - Dev in Sampa - 28nov2009
Classificação de textos - Dev in Sampa - 28nov2009Classificação de textos - Dev in Sampa - 28nov2009
Classificação de textos - Dev in Sampa - 28nov2009
 
Devise - RSLA - 13oct2009
Devise - RSLA - 13oct2009Devise - RSLA - 13oct2009
Devise - RSLA - 13oct2009
 
Thor - RSLA - 13oct2009
Thor - RSLA - 13oct2009Thor - RSLA - 13oct2009
Thor - RSLA - 13oct2009
 

Dernier

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
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
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 

Dernier (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
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!
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
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!
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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.
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 

Writing your own programming language to understand Ruby better - Euruko 2011

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. And that was it. There are other small things I found interesting, like implementing super in Elixir, but we can discuss later if you are interested because now it is time to move to the second part of the talk. &amp;#x201C;What if?&amp;#x201D;\n\nSome of the &amp;#x201C;What if?&amp;#x201D; cases here are very unlikely to be added to Ruby because it would generate incompatibilities, but some could be there someday and some are even under discussion for Ruby 2.0.\n
  54. \n
  55. First off, I love Ruby blocks. But I am going to give you an alternative and explain why it maybe could be better. The point is to start a discussion and see if you think I am completely insane or not.\n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. Maybe this can cause conflict with ternaries, but I am not sure.\n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. And, in the same way, you mentioned at the time that Larry Wall (the guy how created Perl) was your hero, I can safely say your mine.\n
  84. Several things I discussed here already exists in Elixir. There are a bunch other differences, like immutability and the Erlang VM is quite awesome. Come, try it and you will learn a lot.\n
  85. Also, keep an eye on Rubinius VM.\n
  86. \n
  87. \n
  88. \n