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 2
Raghu nath
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
Kang-min Liu
 
Evolving Software with Moose
Evolving Software with MooseEvolving Software with Moose
Evolving Software with Moose
Dave Cross
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim Perlchina
guestcf9240
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim Perlchina
Lin Yo-An
 

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

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
 
Building Interpreters with PyPy
Building Interpreters with PyPyBuilding Interpreters with PyPy
Building Interpreters with PyPy
Daniel Neuhäuser
 
Ruby 入門 第一次就上手
Ruby 入門 第一次就上手Ruby 入門 第一次就上手
Ruby 入門 第一次就上手
Wen-Tien Chang
 
Slides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammersSlides chapter3part1 ruby-forjavaprogrammers
Slides chapter3part1 ruby-forjavaprogrammers
Giovanni924
 

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 UR
Plataformatec
 
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
Plataformatec
 
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
Plataformatec
 
The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010The Plafatorma Way - Oxente Rails - 05aug2010
The Plafatorma Way - Oxente Rails - 05aug2010
Plataformatec
 

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

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

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