Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Little machines that eat strings
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Penelope Phippen
August 02, 2016
Technology
1
120
Little machines that eat strings
A talk about regular expressions and computer science presented at SF dot RB
Penelope Phippen
August 02, 2016
Tweet
Share
More Decks by Penelope Phippen
See All by Penelope Phippen
Introducing Rubyfmt
penelope_zone
0
590
How RSpec Works
penelope_zone
0
6.8k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
98
Teaching RSpec to play nice with Rails
penelope_zone
2
160
What is processor (brighton ruby edition)
penelope_zone
0
130
What is processor?
penelope_zone
1
370
extremely defensive coding - rubyconf edition
penelope_zone
0
280
Agile, etc.
penelope_zone
2
240
Extremely Defensive Coding
penelope_zone
0
120
Other Decks in Technology
See All in Technology
DEVCON 14 Report at AAMSX RU65: V9968, MSX0tab5, MSXDIY etc
mcd500
0
240
GSIが複数キー対応したことで、俺達はいったい何が嬉しいのか?
smt7174
3
120
Amazon Bedrock AgentCore EvaluationsでAIエージェントを評価してみよう!
yuu551
0
210
データ民主化のための LLM 活用状況と課題紹介(IVRy の場合)
wxyzzz
2
580
Amazon ElastiCacheのコスト最適化を考える/Elasticache Cost Optimization
quiver
0
370
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
1
850
日本語テキストと音楽の対照学習の技術とその応用
lycorptech_jp
PRO
1
400
2026年はチャンキングを極める!
shibuiwilliam
8
1.8k
オープンウェイトのLLMリランカーを契約書で評価する / searchtechjp
sansan_randd
3
550
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
73k
~Everything as Codeを諦めない~ 後からCDK
mu7889yoon
3
190
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
120
Featured
See All Featured
Prompt Engineering for Job Search
mfonobong
0
150
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
100k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
69
Documentation Writing (for coders)
carmenintech
77
5.2k
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
280
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
From π to Pie charts
rasagy
0
120
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
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]