SlideShare una empresa de Scribd logo
1 de 13
Small Eigen Collider
Creating random ruby programs
Andrew Grimm
Rationale
● Unit tests of existing projects failed on
Rubinius because of bugs in things like
String#split or StringIO#gets
● If I could generate random programs, I
could see whether less popular
implementations did the same thing as
more popular implementations
Producing random code
result = @receiver.send(@method,
@parameter_objects, &:inspect)
Where @receiver and
@parameter_objects are randomly chosen
objects, and @method is a randomly
chosen method name.
Logging the results
● Currently printing the receiver, method,
parameter objects and the result
Receiver object: “a”
Method: “casecmp”
Parameters: [“b”]
Result: -1
Comparing the results
● Run the script under different ruby versions
● Do a diff on the outputs
Example of a diff
● Lines above were running “a”.casecmp(“b”)
diff MRI_output.txt rubinius_output.txt
180c180
< Result: -1
---
> Result: 1
Contents of the two files
MRI_output.txt
Receiver object: "a"
Method: "casecmp"
Parameters: ["b"]
Result: -1
rubinius_output.txt
Receiver object: “a”
Method: “casecmp”
Parameters: [“b”]
Result: 1
Manual confirmation
rvm ruby -e 'puts [RUBY_ENGINE,
“a”.casecmp”b”].join(“t”)
jruby -1
macruby -1
ruby -1
rbx 1 <= spot the odd one out
Protip
● Test the !@#$ing happy path!
describe "String#casecmp" do
it "is a case-insensitive version of String#<=>" do
"abcdef".casecmp("abcde").should == 1
"aBcDeF".casecmp("abcdef").should == 0
"abcdef".casecmp("abcdefg").should == -1
"abcdef".casecmp("ABCDEF").should == 0
end
# Snipped I18N tests
end
Current tasks
● Make as safe as ruby allows (grain of salt
here)
● Rather than randomly generating tasks
each time, allow the tasks to be generated
once, and run many times
Making the program safe
Receiver object: nil
Method: “system”
Parameters: [“rm -rf /”]
Result: :(
● Applying $SAFE to try to prevent bad
things in a ruby-specific way
● Researching other sandboxing methods
Generate once, run many times
● Currently, I give all the rubies the same
random number generator seed and same
set of objects, and leave it up to them to
choose which objects are in each task
● JRuby gives different random values than
other platforms
● If the choice of tasks were made only once,
then I could compare JRuby with others
Questions?

Más contenido relacionado

La actualidad más candente

Declarative JavaScript concepts and implemetation
Declarative JavaScript concepts and implemetationDeclarative JavaScript concepts and implemetation
Declarative JavaScript concepts and implemetationOm Shankar
 
Engineering Efficiency in LINE
Engineering Efficiency in LINEEngineering Efficiency in LINE
Engineering Efficiency in LINEHuy Do
 
RxJS - The Reactive Extensions for JavaScript
RxJS - The Reactive Extensions for JavaScriptRxJS - The Reactive Extensions for JavaScript
RxJS - The Reactive Extensions for JavaScriptViliam Elischer
 
No More, No Less: A Formal Model for Serverless Computing
No More, No Less: A Formal Model for Serverless ComputingNo More, No Less: A Formal Model for Serverless Computing
No More, No Less: A Formal Model for Serverless ComputingMarco Peressotti
 
Ansible Israel Kickoff Meetup
Ansible Israel Kickoff MeetupAnsible Israel Kickoff Meetup
Ansible Israel Kickoff Meetupansibleil
 
Introduction to Ansible - Peter Halligan
Introduction to Ansible - Peter HalliganIntroduction to Ansible - Peter Halligan
Introduction to Ansible - Peter HalliganCorkOpenTech
 
Swimat - Swift formatter
Swimat - Swift formatterSwimat - Swift formatter
Swimat - Swift formatterJintin Lin
 
Reactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwiftReactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwiftFlorent Pillet
 
Asynchronous Programming in .NET
Asynchronous Programming in .NETAsynchronous Programming in .NET
Asynchronous Programming in .NETPierre-Luc Maheu
 
Callable and runnable objects in ruby
Callable and runnable objects in rubyCallable and runnable objects in ruby
Callable and runnable objects in rubyRahul Bajaj
 
Real World Optimization
Real World OptimizationReal World Optimization
Real World OptimizationDavid Golden
 
Anatomy of a Reactive Application
Anatomy of a Reactive ApplicationAnatomy of a Reactive Application
Anatomy of a Reactive ApplicationMark Wilson
 

La actualidad más candente (19)

Smalltalk on rubinius
Smalltalk on rubiniusSmalltalk on rubinius
Smalltalk on rubinius
 
Ruby Blocks
Ruby BlocksRuby Blocks
Ruby Blocks
 
Declarative JavaScript concepts and implemetation
Declarative JavaScript concepts and implemetationDeclarative JavaScript concepts and implemetation
Declarative JavaScript concepts and implemetation
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 
Flamingo in Production
Flamingo in ProductionFlamingo in Production
Flamingo in Production
 
Reactive Angular 2
Reactive Angular 2Reactive Angular 2
Reactive Angular 2
 
Engineering Efficiency in LINE
Engineering Efficiency in LINEEngineering Efficiency in LINE
Engineering Efficiency in LINE
 
RxJS - The Reactive Extensions for JavaScript
RxJS - The Reactive Extensions for JavaScriptRxJS - The Reactive Extensions for JavaScript
RxJS - The Reactive Extensions for JavaScript
 
Flex With Rubyamf
Flex With RubyamfFlex With Rubyamf
Flex With Rubyamf
 
No More, No Less: A Formal Model for Serverless Computing
No More, No Less: A Formal Model for Serverless ComputingNo More, No Less: A Formal Model for Serverless Computing
No More, No Less: A Formal Model for Serverless Computing
 
Ansible Israel Kickoff Meetup
Ansible Israel Kickoff MeetupAnsible Israel Kickoff Meetup
Ansible Israel Kickoff Meetup
 
Introduction to Ansible - Peter Halligan
Introduction to Ansible - Peter HalliganIntroduction to Ansible - Peter Halligan
Introduction to Ansible - Peter Halligan
 
Swimat - Swift formatter
Swimat - Swift formatterSwimat - Swift formatter
Swimat - Swift formatter
 
Reactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwiftReactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwift
 
Asynchronous Programming in .NET
Asynchronous Programming in .NETAsynchronous Programming in .NET
Asynchronous Programming in .NET
 
Callable and runnable objects in ruby
Callable and runnable objects in rubyCallable and runnable objects in ruby
Callable and runnable objects in ruby
 
Real World Optimization
Real World OptimizationReal World Optimization
Real World Optimization
 
Excellent
ExcellentExcellent
Excellent
 
Anatomy of a Reactive Application
Anatomy of a Reactive ApplicationAnatomy of a Reactive Application
Anatomy of a Reactive Application
 

Destacado

Small eigen collider ruby kaigi 2011
Small eigen collider ruby kaigi 2011Small eigen collider ruby kaigi 2011
Small eigen collider ruby kaigi 2011Andrew Grimm
 
Mistakes I have made
Mistakes I have madeMistakes I have made
Mistakes I have madeAndrew Grimm
 
Doing A Bradbury With Heckle
Doing A Bradbury With HeckleDoing A Bradbury With Heckle
Doing A Bradbury With HeckleAndrew Grimm
 
Ruby 1.8.8 and professor
Ruby 1.8.8 and professorRuby 1.8.8 and professor
Ruby 1.8.8 and professorAndrew Grimm
 
Railscamp lousy tshirt draft
Railscamp lousy tshirt draftRailscamp lousy tshirt draft
Railscamp lousy tshirt draftAndrew Grimm
 
YHA Japan travel night (internet version)
YHA Japan travel night (internet version)YHA Japan travel night (internet version)
YHA Japan travel night (internet version)Andrew Grimm
 
Nihon go do you speak it
Nihon go do you speak itNihon go do you speak it
Nihon go do you speak itAndrew Grimm
 

Destacado (7)

Small eigen collider ruby kaigi 2011
Small eigen collider ruby kaigi 2011Small eigen collider ruby kaigi 2011
Small eigen collider ruby kaigi 2011
 
Mistakes I have made
Mistakes I have madeMistakes I have made
Mistakes I have made
 
Doing A Bradbury With Heckle
Doing A Bradbury With HeckleDoing A Bradbury With Heckle
Doing A Bradbury With Heckle
 
Ruby 1.8.8 and professor
Ruby 1.8.8 and professorRuby 1.8.8 and professor
Ruby 1.8.8 and professor
 
Railscamp lousy tshirt draft
Railscamp lousy tshirt draftRailscamp lousy tshirt draft
Railscamp lousy tshirt draft
 
YHA Japan travel night (internet version)
YHA Japan travel night (internet version)YHA Japan travel night (internet version)
YHA Japan travel night (internet version)
 
Nihon go do you speak it
Nihon go do you speak itNihon go do you speak it
Nihon go do you speak it
 

Similar a Small eigen collider

Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript DevelopmentJussi Pohjolainen
 
2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD Workshop2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD WorkshopWolfram Arnold
 
How to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHow to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHiroshi SHIBATA
 
Lens: Data exploration with Dask and Jupyter widgets
Lens: Data exploration with Dask and Jupyter widgetsLens: Data exploration with Dask and Jupyter widgets
Lens: Data exploration with Dask and Jupyter widgetsVíctor Zabalza
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruitBruce Werdschinski
 
High Performance Ruby: Evented vs. Threaded
High Performance Ruby: Evented vs. ThreadedHigh Performance Ruby: Evented vs. Threaded
High Performance Ruby: Evented vs. ThreadedEngine Yard
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceJesse Vincent
 
Optimizing a large angular application (ng conf)
Optimizing a large angular application (ng conf)Optimizing a large angular application (ng conf)
Optimizing a large angular application (ng conf)A K M Zahiduzzaman
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Automated Puppet Testing - PuppetCamp Chicago '12 - Scott Nottingham
Automated Puppet Testing - PuppetCamp Chicago '12 - Scott NottinghamAutomated Puppet Testing - PuppetCamp Chicago '12 - Scott Nottingham
Automated Puppet Testing - PuppetCamp Chicago '12 - Scott NottinghamPuppet
 
Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2nottings
 
Ruby/rails performance and profiling
Ruby/rails performance and profilingRuby/rails performance and profiling
Ruby/rails performance and profilingDanny Guinther
 
All about Erubis (English)
All about Erubis (English)All about Erubis (English)
All about Erubis (English)kwatch
 
TDC 2012 - Patterns e Anti-Patterns em Ruby
TDC 2012 - Patterns e Anti-Patterns em RubyTDC 2012 - Patterns e Anti-Patterns em Ruby
TDC 2012 - Patterns e Anti-Patterns em RubyFabio Akita
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHiroshi SHIBATA
 
NovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsNovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsGreg Banks
 
Fixing Growing Pains With Puppet Data Patterns
Fixing Growing Pains With Puppet Data PatternsFixing Growing Pains With Puppet Data Patterns
Fixing Growing Pains With Puppet Data PatternsMartin Jackson
 
Open Source Saturday - How can I contribute to Ruby on Rails?
Open Source Saturday - How can I contribute to Ruby on Rails?Open Source Saturday - How can I contribute to Ruby on Rails?
Open Source Saturday - How can I contribute to Ruby on Rails?Pravin Mishra
 
Unit Testing for Great Justice
Unit Testing for Great JusticeUnit Testing for Great Justice
Unit Testing for Great JusticeDomenic Denicola
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceJesse Vincent
 

Similar a Small eigen collider (20)

Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 
2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD Workshop2011-02-03 LA RubyConf Rails3 TDD Workshop
2011-02-03 LA RubyConf Rails3 TDD Workshop
 
How to Begin Developing Ruby Core
How to Begin Developing Ruby CoreHow to Begin Developing Ruby Core
How to Begin Developing Ruby Core
 
Lens: Data exploration with Dask and Jupyter widgets
Lens: Data exploration with Dask and Jupyter widgetsLens: Data exploration with Dask and Jupyter widgets
Lens: Data exploration with Dask and Jupyter widgets
 
Ruby performance - The low hanging fruit
Ruby performance - The low hanging fruitRuby performance - The low hanging fruit
Ruby performance - The low hanging fruit
 
High Performance Ruby: Evented vs. Threaded
High Performance Ruby: Evented vs. ThreadedHigh Performance Ruby: Evented vs. Threaded
High Performance Ruby: Evented vs. Threaded
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
 
Optimizing a large angular application (ng conf)
Optimizing a large angular application (ng conf)Optimizing a large angular application (ng conf)
Optimizing a large angular application (ng conf)
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Automated Puppet Testing - PuppetCamp Chicago '12 - Scott Nottingham
Automated Puppet Testing - PuppetCamp Chicago '12 - Scott NottinghamAutomated Puppet Testing - PuppetCamp Chicago '12 - Scott Nottingham
Automated Puppet Testing - PuppetCamp Chicago '12 - Scott Nottingham
 
Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2
 
Ruby/rails performance and profiling
Ruby/rails performance and profilingRuby/rails performance and profiling
Ruby/rails performance and profiling
 
All about Erubis (English)
All about Erubis (English)All about Erubis (English)
All about Erubis (English)
 
TDC 2012 - Patterns e Anti-Patterns em Ruby
TDC 2012 - Patterns e Anti-Patterns em RubyTDC 2012 - Patterns e Anti-Patterns em Ruby
TDC 2012 - Patterns e Anti-Patterns em Ruby
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
 
NovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsNovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programs
 
Fixing Growing Pains With Puppet Data Patterns
Fixing Growing Pains With Puppet Data PatternsFixing Growing Pains With Puppet Data Patterns
Fixing Growing Pains With Puppet Data Patterns
 
Open Source Saturday - How can I contribute to Ruby on Rails?
Open Source Saturday - How can I contribute to Ruby on Rails?Open Source Saturday - How can I contribute to Ruby on Rails?
Open Source Saturday - How can I contribute to Ruby on Rails?
 
Unit Testing for Great Justice
Unit Testing for Great JusticeUnit Testing for Great Justice
Unit Testing for Great Justice
 
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret SauceBeijing Perl Workshop 2008 Hiveminder Secret Sauce
Beijing Perl Workshop 2008 Hiveminder Secret Sauce
 

Más de Andrew Grimm

Finding Japanese Flatmates with Ruby (English and Japanese)
Finding Japanese Flatmates with Ruby (English and Japanese)Finding Japanese Flatmates with Ruby (English and Japanese)
Finding Japanese Flatmates with Ruby (English and Japanese)Andrew Grimm
 
Git Tips and Tricks
Git Tips and TricksGit Tips and Tricks
Git Tips and TricksAndrew Grimm
 
Tootle returning to rails
Tootle returning to railsTootle returning to rails
Tootle returning to railsAndrew Grimm
 
Finding Japanese flatmates with Ruby
Finding Japanese flatmates with RubyFinding Japanese flatmates with Ruby
Finding Japanese flatmates with RubyAndrew Grimm
 
Curing AIDS, with programming
Curing AIDS, with programmingCuring AIDS, with programming
Curing AIDS, with programmingAndrew Grimm
 
Avoiding niseko syndrome
Avoiding niseko syndromeAvoiding niseko syndrome
Avoiding niseko syndromeAndrew Grimm
 
Curing AIDS, with programming
Curing AIDS, with programmingCuring AIDS, with programming
Curing AIDS, with programmingAndrew Grimm
 
Memoirs of a programmer (internet version)
Memoirs of a programmer (internet version)Memoirs of a programmer (internet version)
Memoirs of a programmer (internet version)Andrew Grimm
 
Japanese: a programmers language
Japanese: a programmers languageJapanese: a programmers language
Japanese: a programmers languageAndrew Grimm
 
Ruby for newbies Lake Ainsworth
Ruby for newbies Lake AinsworthRuby for newbies Lake Ainsworth
Ruby for newbies Lake AinsworthAndrew Grimm
 
Sapporo ruby kaigi
Sapporo ruby kaigiSapporo ruby kaigi
Sapporo ruby kaigiAndrew Grimm
 
How to talk like a ge1sha
How to talk like a ge1shaHow to talk like a ge1sha
How to talk like a ge1shaAndrew Grimm
 
All I want for Matz-mas
All I want for Matz-masAll I want for Matz-mas
All I want for Matz-masAndrew Grimm
 
Small eigen collider ruby kaigi 2011
Small eigen collider ruby kaigi 2011Small eigen collider ruby kaigi 2011
Small eigen collider ruby kaigi 2011Andrew Grimm
 
Making easy roommate easy
Making easy roommate easyMaking easy roommate easy
Making easy roommate easyAndrew Grimm
 
What has source control ever done for us?
What has source control ever done for us?What has source control ever done for us?
What has source control ever done for us?Andrew Grimm
 

Más de Andrew Grimm (20)

Finding Japanese Flatmates with Ruby (English and Japanese)
Finding Japanese Flatmates with Ruby (English and Japanese)Finding Japanese Flatmates with Ruby (English and Japanese)
Finding Japanese Flatmates with Ruby (English and Japanese)
 
Git Tips and Tricks
Git Tips and TricksGit Tips and Tricks
Git Tips and Tricks
 
RuboCop
RuboCopRuboCop
RuboCop
 
Tootle returning to rails
Tootle returning to railsTootle returning to rails
Tootle returning to rails
 
Finding Japanese flatmates with Ruby
Finding Japanese flatmates with RubyFinding Japanese flatmates with Ruby
Finding Japanese flatmates with Ruby
 
Curing AIDS, with programming
Curing AIDS, with programmingCuring AIDS, with programming
Curing AIDS, with programming
 
Avoiding niseko syndrome
Avoiding niseko syndromeAvoiding niseko syndrome
Avoiding niseko syndrome
 
Curing AIDS, with programming
Curing AIDS, with programmingCuring AIDS, with programming
Curing AIDS, with programming
 
Memoirs of a programmer (internet version)
Memoirs of a programmer (internet version)Memoirs of a programmer (internet version)
Memoirs of a programmer (internet version)
 
Rubyist in oz
Rubyist in ozRubyist in oz
Rubyist in oz
 
Japanese: a programmers language
Japanese: a programmers languageJapanese: a programmers language
Japanese: a programmers language
 
Ruby for newbies Lake Ainsworth
Ruby for newbies Lake AinsworthRuby for newbies Lake Ainsworth
Ruby for newbies Lake Ainsworth
 
Sapporo ruby kaigi
Sapporo ruby kaigiSapporo ruby kaigi
Sapporo ruby kaigi
 
How to talk like a ge1sha
How to talk like a ge1shaHow to talk like a ge1sha
How to talk like a ge1sha
 
All I want for Matz-mas
All I want for Matz-masAll I want for Matz-mas
All I want for Matz-mas
 
Ampersand method
Ampersand methodAmpersand method
Ampersand method
 
Small eigen collider ruby kaigi 2011
Small eigen collider ruby kaigi 2011Small eigen collider ruby kaigi 2011
Small eigen collider ruby kaigi 2011
 
Making easy roommate easy
Making easy roommate easyMaking easy roommate easy
Making easy roommate easy
 
What has source control ever done for us?
What has source control ever done for us?What has source control ever done for us?
What has source control ever done for us?
 
Philosophy talk
Philosophy talkPhilosophy talk
Philosophy talk
 

Último

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"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
 
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
 

Último (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
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
 
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!
 
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
 
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
 
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
 
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
 
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
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"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
 
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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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.
 

Small eigen collider

  • 1. Small Eigen Collider Creating random ruby programs Andrew Grimm
  • 2. Rationale ● Unit tests of existing projects failed on Rubinius because of bugs in things like String#split or StringIO#gets ● If I could generate random programs, I could see whether less popular implementations did the same thing as more popular implementations
  • 3. Producing random code result = @receiver.send(@method, @parameter_objects, &:inspect) Where @receiver and @parameter_objects are randomly chosen objects, and @method is a randomly chosen method name.
  • 4. Logging the results ● Currently printing the receiver, method, parameter objects and the result Receiver object: “a” Method: “casecmp” Parameters: [“b”] Result: -1
  • 5. Comparing the results ● Run the script under different ruby versions ● Do a diff on the outputs
  • 6. Example of a diff ● Lines above were running “a”.casecmp(“b”) diff MRI_output.txt rubinius_output.txt 180c180 < Result: -1 --- > Result: 1
  • 7. Contents of the two files MRI_output.txt Receiver object: "a" Method: "casecmp" Parameters: ["b"] Result: -1 rubinius_output.txt Receiver object: “a” Method: “casecmp” Parameters: [“b”] Result: 1
  • 8. Manual confirmation rvm ruby -e 'puts [RUBY_ENGINE, “a”.casecmp”b”].join(“t”) jruby -1 macruby -1 ruby -1 rbx 1 <= spot the odd one out
  • 9. Protip ● Test the !@#$ing happy path! describe "String#casecmp" do it "is a case-insensitive version of String#<=>" do "abcdef".casecmp("abcde").should == 1 "aBcDeF".casecmp("abcdef").should == 0 "abcdef".casecmp("abcdefg").should == -1 "abcdef".casecmp("ABCDEF").should == 0 end # Snipped I18N tests end
  • 10. Current tasks ● Make as safe as ruby allows (grain of salt here) ● Rather than randomly generating tasks each time, allow the tasks to be generated once, and run many times
  • 11. Making the program safe Receiver object: nil Method: “system” Parameters: [“rm -rf /”] Result: :( ● Applying $SAFE to try to prevent bad things in a ruby-specific way ● Researching other sandboxing methods
  • 12. Generate once, run many times ● Currently, I give all the rubies the same random number generator seed and same set of objects, and leave it up to them to choose which objects are in each task ● JRuby gives different random values than other platforms ● If the choice of tasks were made only once, then I could compare JRuby with others