Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Little machines that eat strings
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Penelope Phippen
August 02, 2016
Technology
150
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Little machines that eat strings
A talk about regular expressions and computer science presented at SF dot RB
Penelope Phippen
August 02, 2016
More Decks by Penelope Phippen
See All by Penelope Phippen
Introducing Rubyfmt
penelope_zone
0
630
How RSpec Works
penelope_zone
0
6.9k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
120
Teaching RSpec to play nice with Rails
penelope_zone
2
190
What is processor (brighton ruby edition)
penelope_zone
0
150
What is processor?
penelope_zone
1
390
extremely defensive coding - rubyconf edition
penelope_zone
0
300
Agile, etc.
penelope_zone
2
270
Extremely Defensive Coding
penelope_zone
0
150
Other Decks in Technology
See All in Technology
分析AIエージェントを育てる、動く環境を育てる
codatum
0
260
React Nativeでの OTA Updateって、 どう説明する?
ichiki1023
0
150
Deep Data Security 機能解説
oracle4engineer
PRO
2
720
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
2
1.4k
The seven pitfalls of AI (revised version)
ufried
0
280
AI時代のAPI開発を加速する品質ガードレール / API Quality Guardrails in the AI Era
yokawasa
0
160
プロダクト価値を、 チームが使える判断軸に変える
vivion
0
130
全人類(ほぼ)AWS Organizations の上でAWSを利用している、その世界を知る話
htan
0
120
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
510
私の推しは「聞いてから進む」AIです -AI-DLCに一人でアプリを作らせた話
yama3133
1
180
1万名の社員が使う認証基盤で どう信頼性を担保するか?
kairim0
0
210
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
4
1.2k
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
520
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
270
Making the Leap to Tech Lead
cromwellryan
135
10k
Building AI with AI
inesmontani
PRO
1
1.3k
Product Roadmaps are Hard
iamctodd
55
13k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
210
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
350
The Limits of Empathy - UXLibs8
cassininazir
2
710
Transcript
Little machines that eat strings
I am @samphippen on all the internets
Computer Science
I ❤❤ Computer Science
But not the way it’s taught
None
CS (mostly) won’t make you better at Rails
CS (mostly) won’t make you better at Node
CS (mostly) won’t make you better at Browsers
But it’s super interesting
It’s like art for programmers
I’m gonna teach you a little computer science
None
Regular Expressions
In Ruby
>> /wtf/
>> /wtf/ === "abc"
>> /wtf/ === "abc" => false
>> /wtf/ === "wtf" => true
>> /wtf/ === "hiwtf" => true
>> /wtf/ === "hiwtflol" => true
So how does it regex?
Let’s introduce a model
Let’s say we don’t speak english
Let’s say we have a different alphabet
There are only two characters
Regular Expressions
>> / / === “ ” => true
>> / / === “ ” => false
>> / / === “ ” => false
>> / / === “ ” => true
>> / / === “ ” => true
>> / / === “ ” => true
This implies regular expressions have state
Let’s introduce a model
Regular Expressions
None
Machines have a starting state
/ /
/ /
Regexp.new(“”)
Regexp.new(“”)
/ /
Remember earlier when I said they have state?
/ /
None
None
Starting state Accepting state
This is called a “deterministic finite automata”
This model of Regex was extremely helpful to my learning
It’s a different way of thinking about regular expressions
To me, that’s what CS is
A series of techniques for thinking about computer differently
Thanks @samphippen
[email protected]