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
140
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
ブラウザで変わるID連携(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
270
Android skills に学ぶ
kokiko
0
180
Kiro入門|仕様駆動開発で変わるAI時代の開発スタイル
cmkudo
0
380
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
460
AWS Blocks が楽しい #ゆるWeb札幌
tacck
PRO
0
150
EUDIWの枠組みを出発点に民間エコシステムの在り方を考える(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
270
カーネルまで探検して理解するふたつの自動計装
sumiyae
0
320
1000⼈規模のClaude Enterprise運⽤を「Oktaのグループ」と「Slack」に集約する
sansantech
PRO
0
390
Digital Credentials API × OpenID4VP ブラウザ完結型本人確認の実装知見(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
260
Kiro WebとCloud Sessions
nagisa53
2
200
Windows の互換機能 - 古いプログラムはなぜ動作できるのか
murachiakira
PRO
0
110
型落ちシンクライアント端末のPoEモジュールを自作したかった話
logica0419
0
440
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
540
Leo the Paperboy
mayatellez
8
2.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Test your architecture with Archunit
thirion
2
2.4k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Statistics for Hackers
jakevdp
799
230k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Navigating Weather and Climate Data
rabernat
0
490
ラッコキーワード サービス紹介資料
rakko
1
4.5M
Art, The Web, and Tiny UX
lynnandtonic
304
22k
First, design no harm
axbom
PRO
2
1.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.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]