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
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がコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
1
680
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
570
freeeらしさをAIとともに作る / Creating the freee Experience with AI
ymrl
0
220
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
1.8k
SREでアラート疲れを 解決しよう!
kairim0
1
220
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
380
今さら理解するウェブフォントver.2026
takanorip
3
520
今こそ知りたいAmplifyGen2
mkdev10
2
160
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
110
UniFi(ユニファイ)AIカメラの現場活用
ludicmind
1
390
FactoryBotアンチパターン / factory_bot anti-patterns
toshimaru
0
140
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
510
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
7.2k
Design in an AI World
tapps
1
350
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Speed Design
sergeychernyshev
33
2.1k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
720
GraphQLとの向き合い方2022年版
quramy
50
15k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
440
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
510
Embracing the Ebb and Flow
colly
88
5.2k
Marketing to machines
jonoalderson
1
5.9k
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]