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
1
100
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
570
How RSpec Works
penelope_zone
0
6.6k
Quick and easy browser testing using RSpec and Rails 5.1
penelope_zone
1
82
Teaching RSpec to play nice with Rails
penelope_zone
2
140
What is processor (brighton ruby edition)
penelope_zone
0
110
What is processor?
penelope_zone
1
360
extremely defensive coding - rubyconf edition
penelope_zone
0
260
Agile, etc.
penelope_zone
2
220
Extremely Defensive Coding
penelope_zone
0
97
Other Decks in Technology
See All in Technology
AWS DDoS攻撃防御の最前線
ryutakondo
1
150
僕たちが「開発しやすさ」を求め 模索し続けたアーキテクチャ #アーキテクチャ勉強会_findy
bengo4com
0
2.3k
Nx × AI によるモノレポ活用 〜コードジェネレーター編〜
puku0x
0
480
生成AI時代におけるAI・機械学習技術を用いたプロダクト開発の深化と進化 #BetAIDay
layerx
PRO
1
1.1k
Amazon Q と『音楽』-ゲーム音楽もAmazonQで作成してみた感想-
senseofunity129
0
130
2025-07-31: GitHub Copilot Agent mode at Vibe Coding Cafe (15min)
chomado
2
400
相互運用可能な学修歴クレデンシャルに向けた標準技術と国際動向
fujie
0
240
いかにして命令の入れ替わりについて心配するのをやめ、メモリモデルを愛するようになったか(改)
nullpo_head
7
2.5k
薬屋のひとりごとにみるトラブルシューティング
tomokusaba
0
250
専門分化が進む分業下でもユーザーが本当に欲しかったものを追求するプロダクトマネジメント/Focus on real user needs despite deep specialization and division of labor
moriyuya
1
1.3k
LLMで構造化出力の成功率をグンと上げる方法
keisuketakiguchi
0
740
Foundation Model × VisionKit で実現するローカル OCR
sansantech
PRO
1
340
Featured
See All Featured
Scaling GitHub
holman
461
140k
Unsuck your backbone
ammeep
671
58k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Visualization
eitanlees
146
16k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
For a Future-Friendly Web
brad_frost
179
9.9k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
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]