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
Penelope Phippen
August 02, 2016
Technology
130
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
620
How RSpec Works
penelope_zone
0
6.9k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
110
Teaching RSpec to play nice with Rails
penelope_zone
2
180
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
260
Extremely Defensive Coding
penelope_zone
0
140
Other Decks in Technology
See All in Technology
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
120
最高のシステムプロンプトを作るためにフィードバック機能を導入した話
alchemy1115
1
330
修正PRを食べてレビュースキルが賢くなる:Claude Codeによる自己改善サイクル
yuyaumetsu
4
1.2k
Agent 時代の Kaggle 展望 / kaggle-in-the-agentic-era
upura
0
120
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
AI駆動開発は個人技からチーム戦へ:組織でAIを使いこなすための実践設計
moongift
PRO
0
440
[MIRU26] Open-Vocabulary Intention-Guided Object Detection in Diverse Scenes
keio_smilab
PRO
0
140
初めてのGitHub Actions / GitHub Actions at First
tooppoo
0
140
Data Hubグループ 紹介資料
sansan33
PRO
0
3.1k
ブラウザ研修 2026
recruitengineers
PRO
3
500
MIRU 2026 チュートリアル
keisuke198619
0
810
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
110
Featured
See All Featured
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
360
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
Measuring & Analyzing Core Web Vitals
bluesmoon
9
950
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
420
Docker and Python
trallard
47
4.1k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
650
My Coaching Mixtape
mlcsv
0
190
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
The Limits of Empathy - UXLibs8
cassininazir
1
590
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]