SlideShare a Scribd company logo
1 of 158
stdin, 
stdout 
pup, Go & life at the command-line
stdin, 
stdout 
pup, Go & life at the command-line
$ cd ~/talks/codementor 
$ cat hello.txt 
Hello, Code Mentor! 
$
CLI life: Data
data
[LOG] some data 
[LOG] more data 
[LOG] even more
col1,col2,col3 
some,data,and 
even,more,data
{ 
“some”: “data”, 
“more”: “data” 
}
<div> 
<h1>Some</h1> 
<p>data</p> 
</div>
grep & nl
cat grep
cat grep
pipes!
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
curl & wget
$ wget -O Shakespeare.txt  
http://gutenberg.org/cache/epub/100/pg100.txt
$ wget -O Shakespeare.txt  
http://gutenberg.org/cache/epub/100/pg100.txt
$ wget -O Shakespeare.txt  
http://gutenberg.org/cache/epub/100/pg100.txt
wget =
$ wget --load-cookies cookies.txt
$ wget -O Shakespeare.txt  
http://gutenberg.org/cache/epub/100/pg100.txt
$ curl -o Shakespeare.txt  
http://gutenberg.org/cache/epub/100/pg100.txt
$ cat Shakespeare.txt |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
$ curl http://gutenberg.org... |  
sed -e 's/s+/n/g' |  
tr -d ' ' |  
grep -e '^$' -v |  
tr '[:upper:]' '[:lower:]' |  
sort | uniq -c | sort -nr |  
head -n 50
curl & 
wget
curl & 
wget
I hate HTML
HTML is 
really hard
“Every time you attempt to 
parse HTML with regular 
expressions, the unholy child 
weeps the blood of virgins, 
and Russian hackers pwn 
your webapp.”
“Have you tried using an 
XML parser instead?”
But it gets 
worse
<tbody> 
<tr><img src="foo"></tr> 
<tr><img/><br> 
</tbody> 
</table>
Yes, this is valid HTML: 
<tbody> 
<tr><img src="foo"></tr> 
<tr><img/><br> 
</tbody> 
</table>
Yes, this is valid HTML: 
<tbody> 
<tr><img src="foo"></tr> 
<tr><img/><br> 
</tbody> 
</table>
Yes, this is valid HTML: 
<tbody> 
<tr><img src="foo"></tr> 
<tr><img/><br> 
</tbody> 
</table>
Yes, this is valid HTML: 
<tbody> 
<tr><img src="foo"></tr> 
<tr><img/><br> 
</tbody> 
</table>
NEVER TRY 
TO WRITE AN 
HTML PARSER
Nokogiri 鋸
pup
Still HTML
$ curl -L -s reddit.com/r/programming/ |  
pup p.title a[href^=http] attr{href} 
$ curl -s https://news.ycombinator.com/ |  
pup td.title a[href^=http] attr{href}
$ curl -L -s reddit.com/r/programming/ |  
pup p.title a[href^=http] attr{href} 
$ curl -s https://news.ycombinator.com/ |  
pup td.title a[href^=http] attr{href}
$ curl -L -s reddit.com/r/programming/ |  
pup p.title a[href^=http] attr{href} 
$ curl -s https://news.ycombinator.com/ |  
pup td.title a[href^=http] attr{href}
$ curl -L -s reddit.com/r/programming/ |  
pup p.title a[href^=http] attr{href} 
$ curl -s https://news.ycombinator.com/ |  
pup td.title a[href^=http] attr{href}
$ curl -s https://news.ycombinator.com/ |  
pup td.title a[href^=http] json{} 
[ 
{ 
"attrs": { 
"href": "https://hacks.mozilla.org/2014/10/passwordless-authentication- 
secure-simple-and-fast-to-deploy/" 
}, 
... 
]
$ curl -s https://news.ycombinator.com/ |  
pup td.title a[href^=http] json{} 
[ 
{ 
"attrs": { 
"href": "https://hacks.mozilla.org/2014/10/passwordless-authentication- 
secure-simple-and-fast-to-deploy/" 
}, 
... 
]
$ curl -s https://news.ycombinator.com/ |  
pup td.title a[href^=http] json{} 
[ 
{ 
"attrs": { 
"href": "https:.../" 
}, 
"tag": "a", 
"text": "SHOW HN: pup" 
}, 
... 
]
github.com/EricChiang/pup
Part II: 
Building CLI 
tools in Go
import java.util.Scanner; 
class Hello { 
public static void main(String[] args) { 
Scanner reader = new Scanner(System.in); 
System.out.print("Enter your name: "); 
String name = reader.nextLine(); 
System.out.printf("Hello, "+name+"!"); 
} 
}
import java.util.Scanner; 
class Hello { 
public static void main(String[] args) { 
Scanner reader = new Scanner(System.in); 
System.out.print("Enter your name: "); 
String name = reader.nextLine(); 
System.out.printf("Hello, "+name+"!"); 
} 
}
import java.util.Scanner; 
class Hello { 
public static void main(String[] args) { 
Scanner reader = new Scanner(System.in); 
System.out.print("Enter your name: "); 
String name = reader.nextLine(); 
System.out.printf("Hello, "+name+"!"); 
} 
}
import java.util.Scanner; 
class Hello { 
public static void main(String[] args) { 
Scanner reader = new Scanner(System.in); 
System.out.print("Enter your name: "); 
String name = reader.nextLine(); 
System.out.printf("Hello, "+name+"!"); 
} 
}
Why 
Go?
Why 
not?
Taken from Rob Pike’s talk public static void main (2012)
“dear god make it stop” 
Taken from Rob Pike’s talk public static void main (2012)
Why 
not?
Why 
not?
I suck at 
this -->
Go
package main 
import "fmt" 
func main() { 
fmt.Println("Hello, world!") 
}
line
package main 
import "io" 
import "os" 
func main() { 
io.Copy(os.Stdout, os.Stdin) 
io.WriteString(os.Stdout, "n") 
}
package main 
import "io" 
import "os" 
func main() { 
io.Copy(os.Stdout, os.Stdin) 
io.WriteString(os.Stdout, "n") 
}
package main 
import "io" 
import "os" 
func main() { 
io.Copy(os.Stdout, os.Stdin) 
io.WriteString(os.Stdout, "n") 
}
package main 
import "io" 
import "os" 
func main() { 
io.Copy(os.Stdout, os.Stdin) 
io.WriteString(os.Stdout, "n") 
}
package main 
import "io" 
import "os" 
func main() { 
io.Copy(os.Stdout, os.Stdin) 
io.WriteString(os.Stdout, "n") 
}
$ echo "Hello, World" 
Hello, World
$ echo "Hello, World" 
Hello, World 
$ go get github.com/ericchiang/line
$ echo "Hello, World" 
Hello, World 
$ go get github.com/ericchiang/line 
$ echo "Hello, World" | line 
Hello, World 
$
url-encode
Live demo!
gox
Messing 
with zip
Thanks!

More Related Content

What's hot

Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perlworr1244
 
Visualizing ORACLE performance data with R @ #C16LV
Visualizing ORACLE performance data with R @ #C16LVVisualizing ORACLE performance data with R @ #C16LV
Visualizing ORACLE performance data with R @ #C16LVMaxym Kharchenko
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Workhorse Computing
 
Creating a keystroke logger in unix shell scripting
Creating a keystroke logger in unix shell scriptingCreating a keystroke logger in unix shell scripting
Creating a keystroke logger in unix shell scriptingDan Morrill
 
201412 seccon2014 オンライン予選(英語) write-up
201412 seccon2014 オンライン予選(英語) write-up201412 seccon2014 オンライン予選(英語) write-up
201412 seccon2014 オンライン予選(英語) write-up恵寿 東
 
Mkscript sh
Mkscript shMkscript sh
Mkscript shBen Pope
 
Windows power shell basics
Windows power shell basicsWindows power shell basics
Windows power shell basicsDan Morrill
 
Ch3(working with file)
Ch3(working with file)Ch3(working with file)
Ch3(working with file)Chhom Karath
 
Windows power shell and active directory
Windows power shell and active directoryWindows power shell and active directory
Windows power shell and active directoryDan Morrill
 
Ten modules I haven't yet talked about
Ten modules I haven't yet talked aboutTen modules I haven't yet talked about
Ten modules I haven't yet talked aboutacme
 
Rails 2010 Workshop
Rails 2010 WorkshopRails 2010 Workshop
Rails 2010 Workshopdtsadok
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingDan Morrill
 
TLS305 Using DynamoDB with the AWS SDK for PHP - AWS re: Invent 2012
TLS305 Using DynamoDB with the AWS SDK for PHP - AWS re: Invent 2012TLS305 Using DynamoDB with the AWS SDK for PHP - AWS re: Invent 2012
TLS305 Using DynamoDB with the AWS SDK for PHP - AWS re: Invent 2012Amazon Web Services
 
Fewer cables
Fewer cablesFewer cables
Fewer cablesacme
 

What's hot (20)

Ruby 1.9
Ruby 1.9Ruby 1.9
Ruby 1.9
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
Unix 5 en
Unix 5 enUnix 5 en
Unix 5 en
 
Visualizing ORACLE performance data with R @ #C16LV
Visualizing ORACLE performance data with R @ #C16LVVisualizing ORACLE performance data with R @ #C16LV
Visualizing ORACLE performance data with R @ #C16LV
 
Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6Ethiopian multiplication in Perl6
Ethiopian multiplication in Perl6
 
Creating a keystroke logger in unix shell scripting
Creating a keystroke logger in unix shell scriptingCreating a keystroke logger in unix shell scripting
Creating a keystroke logger in unix shell scripting
 
Tres Gemas De Ruby
Tres Gemas De RubyTres Gemas De Ruby
Tres Gemas De Ruby
 
serverstats
serverstatsserverstats
serverstats
 
201412 seccon2014 オンライン予選(英語) write-up
201412 seccon2014 オンライン予選(英語) write-up201412 seccon2014 オンライン予選(英語) write-up
201412 seccon2014 オンライン予選(英語) write-up
 
Mkscript sh
Mkscript shMkscript sh
Mkscript sh
 
Windows power shell basics
Windows power shell basicsWindows power shell basics
Windows power shell basics
 
Ch3(working with file)
Ch3(working with file)Ch3(working with file)
Ch3(working with file)
 
Unix cheatsheet
Unix cheatsheetUnix cheatsheet
Unix cheatsheet
 
Windows power shell and active directory
Windows power shell and active directoryWindows power shell and active directory
Windows power shell and active directory
 
Ten modules I haven't yet talked about
Ten modules I haven't yet talked aboutTen modules I haven't yet talked about
Ten modules I haven't yet talked about
 
Rails 2010 Workshop
Rails 2010 WorkshopRails 2010 Workshop
Rails 2010 Workshop
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
 
TLS305 Using DynamoDB with the AWS SDK for PHP - AWS re: Invent 2012
TLS305 Using DynamoDB with the AWS SDK for PHP - AWS re: Invent 2012TLS305 Using DynamoDB with the AWS SDK for PHP - AWS re: Invent 2012
TLS305 Using DynamoDB with the AWS SDK for PHP - AWS re: Invent 2012
 
Fewer cables
Fewer cablesFewer cables
Fewer cables
 
dotCloud and go
dotCloud and godotCloud and go
dotCloud and go
 

Viewers also liked

Go for statistical programming
Go for statistical programmingGo for statistical programming
Go for statistical programmingHakka Labs
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hypebridgetkromhout
 
Sometimes you feel like a docker... (NYC)
Sometimes you feel like a docker... (NYC)Sometimes you feel like a docker... (NYC)
Sometimes you feel like a docker... (NYC)bridgetkromhout
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1Dave Cross
 
Come With Golang
Come With GolangCome With Golang
Come With Golang尚文 曾
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki MizunoNexus FrontierTech
 
Reference, Sense, and Referring Expression in Semantics
Reference, Sense, and Referring Expression in SemanticsReference, Sense, and Referring Expression in Semantics
Reference, Sense, and Referring Expression in SemanticsErsa Dewana
 

Viewers also liked (8)

Go for statistical programming
Go for statistical programmingGo for statistical programming
Go for statistical programming
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hype
 
Sometimes you feel like a docker... (NYC)
Sometimes you feel like a docker... (NYC)Sometimes you feel like a docker... (NYC)
Sometimes you feel like a docker... (NYC)
 
Perl Introduction
Perl IntroductionPerl Introduction
Perl Introduction
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1
 
Come With Golang
Come With GolangCome With Golang
Come With Golang
 
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno [INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
 
Reference, Sense, and Referring Expression in Semantics
Reference, Sense, and Referring Expression in SemanticsReference, Sense, and Referring Expression in Semantics
Reference, Sense, and Referring Expression in Semantics
 

Similar to Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at the command-line

Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Michael Schwern
 
Perl.Hacks.On.Vim
Perl.Hacks.On.VimPerl.Hacks.On.Vim
Perl.Hacks.On.VimLin Yo-An
 
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Workhorse Computing
 
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic InterpolationBASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic InterpolationWorkhorse Computing
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2ady36
 
Unix command-line tools
Unix command-line toolsUnix command-line tools
Unix command-line toolsEric Wilson
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim Perlchinaguestcf9240
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webclkao
 
My First Rails Plugin - Usertext
My First Rails Plugin - UsertextMy First Rails Plugin - Usertext
My First Rails Plugin - Usertextfrankieroberto
 
Modern Web Development with Perl
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with PerlDave Cross
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First WidgetChris Wilcoxson
 
Mining Ruby Gem vulnerabilities for Fun and No Profit.
Mining Ruby Gem vulnerabilities for Fun and No Profit.Mining Ruby Gem vulnerabilities for Fun and No Profit.
Mining Ruby Gem vulnerabilities for Fun and No Profit.Larry Cashdollar
 
Template Haskell とか
Template Haskell とかTemplate Haskell とか
Template Haskell とかHiromi Ishii
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaLin Yo-An
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Kang-min Liu
 
Os Fetterupdated
Os FetterupdatedOs Fetterupdated
Os Fetterupdatedoscon2007
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked aboutTatsuhiko Miyagawa
 

Similar to Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at the command-line (20)

Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)
 
Perl.Hacks.On.Vim
Perl.Hacks.On.VimPerl.Hacks.On.Vim
Perl.Hacks.On.Vim
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.
 
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic InterpolationBASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic Interpolation
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2
 
Unix command-line tools
Unix command-line toolsUnix command-line tools
Unix command-line tools
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
Command
CommandCommand
Command
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim Perlchina
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
My First Rails Plugin - Usertext
My First Rails Plugin - UsertextMy First Rails Plugin - Usertext
My First Rails Plugin - Usertext
 
Modern Web Development with Perl
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with Perl
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
 
Mining Ruby Gem vulnerabilities for Fun and No Profit.
Mining Ruby Gem vulnerabilities for Fun and No Profit.Mining Ruby Gem vulnerabilities for Fun and No Profit.
Mining Ruby Gem vulnerabilities for Fun and No Profit.
 
Template Haskell とか
Template Haskell とかTemplate Haskell とか
Template Haskell とか
 
Perl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim PerlchinaPerl.Hacks.On.Vim Perlchina
Perl.Hacks.On.Vim Perlchina
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Os Fetterupdated
Os FetterupdatedOs Fetterupdated
Os Fetterupdated
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 

More from Arc & Codementor

Remote Career Summit 2020 - the State of Remote Jobs - Weiting Liu of Arc
Remote Career Summit 2020 - the State of Remote Jobs - Weiting Liu of ArcRemote Career Summit 2020 - the State of Remote Jobs - Weiting Liu of Arc
Remote Career Summit 2020 - the State of Remote Jobs - Weiting Liu of ArcArc & Codementor
 
Introduction to Python for Data Science
Introduction to Python for Data ScienceIntroduction to Python for Data Science
Introduction to Python for Data ScienceArc & Codementor
 
25 php interview questions – codementor
25 php interview questions – codementor25 php interview questions – codementor
25 php interview questions – codementorArc & Codementor
 
20 iOS developer interview questions
20 iOS developer interview questions20 iOS developer interview questions
20 iOS developer interview questionsArc & Codementor
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview QuestionsArc & Codementor
 
37 Java Interview Questions
37 Java Interview Questions37 Java Interview Questions
37 Java Interview QuestionsArc & Codementor
 
21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview Questions21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview QuestionsArc & Codementor
 
Top 10 Programming Languages in 2015
Top 10 Programming Languages in 2015Top 10 Programming Languages in 2015
Top 10 Programming Languages in 2015Arc & Codementor
 
How to Build Your App from Scratch
How to Build Your App from ScratchHow to Build Your App from Scratch
How to Build Your App from ScratchArc & Codementor
 
Angular meteor for angular devs
Angular meteor for angular devsAngular meteor for angular devs
Angular meteor for angular devsArc & Codementor
 
Introduction to Tmux - Codementor Tmux Office Hours Part 1
Introduction to Tmux - Codementor Tmux Office Hours Part 1Introduction to Tmux - Codementor Tmux Office Hours Part 1
Introduction to Tmux - Codementor Tmux Office Hours Part 1Arc & Codementor
 
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...Building Modern and Secure PHP Applications – Codementor Office Hours with Be...
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...Arc & Codementor
 
Python Internals Optimization Choices Made - Codementors Office Hours with St...
Python Internals Optimization Choices Made - Codementors Office Hours with St...Python Internals Optimization Choices Made - Codementors Office Hours with St...
Python Internals Optimization Choices Made - Codementors Office Hours with St...Arc & Codementor
 

More from Arc & Codementor (14)

Remote Career Summit 2020 - the State of Remote Jobs - Weiting Liu of Arc
Remote Career Summit 2020 - the State of Remote Jobs - Weiting Liu of ArcRemote Career Summit 2020 - the State of Remote Jobs - Weiting Liu of Arc
Remote Career Summit 2020 - the State of Remote Jobs - Weiting Liu of Arc
 
Introduction to Python for Data Science
Introduction to Python for Data ScienceIntroduction to Python for Data Science
Introduction to Python for Data Science
 
25 php interview questions – codementor
25 php interview questions – codementor25 php interview questions – codementor
25 php interview questions – codementor
 
20 iOS developer interview questions
20 iOS developer interview questions20 iOS developer interview questions
20 iOS developer interview questions
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions
 
37 Java Interview Questions
37 Java Interview Questions37 Java Interview Questions
37 Java Interview Questions
 
21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview Questions21 Essential JavaScript Interview Questions
21 Essential JavaScript Interview Questions
 
Top 10 Programming Languages in 2015
Top 10 Programming Languages in 2015Top 10 Programming Languages in 2015
Top 10 Programming Languages in 2015
 
How to Build Your App from Scratch
How to Build Your App from ScratchHow to Build Your App from Scratch
How to Build Your App from Scratch
 
Angular meteor for angular devs
Angular meteor for angular devsAngular meteor for angular devs
Angular meteor for angular devs
 
Tmux tips and_tricks
Tmux tips and_tricksTmux tips and_tricks
Tmux tips and_tricks
 
Introduction to Tmux - Codementor Tmux Office Hours Part 1
Introduction to Tmux - Codementor Tmux Office Hours Part 1Introduction to Tmux - Codementor Tmux Office Hours Part 1
Introduction to Tmux - Codementor Tmux Office Hours Part 1
 
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...Building Modern and Secure PHP Applications – Codementor Office Hours with Be...
Building Modern and Secure PHP Applications – Codementor Office Hours with Be...
 
Python Internals Optimization Choices Made - Codementors Office Hours with St...
Python Internals Optimization Choices Made - Codementors Office Hours with St...Python Internals Optimization Choices Made - Codementors Office Hours with St...
Python Internals Optimization Choices Made - Codementors Office Hours with St...
 

Recently uploaded

IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka DoktorováCzechDreamin
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfChristopherTHyatt
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsUXDXConf
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreelreely ones
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 

Recently uploaded (20)

IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 

Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at the command-line

  • 1. stdin, stdout pup, Go & life at the command-line
  • 2.
  • 3. stdin, stdout pup, Go & life at the command-line
  • 4.
  • 5. $ cd ~/talks/codementor $ cat hello.txt Hello, Code Mentor! $
  • 6.
  • 7.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. data
  • 21. [LOG] some data [LOG] more data [LOG] even more
  • 23. { “some”: “data”, “more”: “data” }
  • 25.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 38.
  • 39.
  • 40.
  • 41.
  • 43. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 44. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 45. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 46. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 47. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 48. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 49. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 50. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 51. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 52.
  • 53. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 55. $ wget -O Shakespeare.txt http://gutenberg.org/cache/epub/100/pg100.txt
  • 56. $ wget -O Shakespeare.txt http://gutenberg.org/cache/epub/100/pg100.txt
  • 57. $ wget -O Shakespeare.txt http://gutenberg.org/cache/epub/100/pg100.txt
  • 59. $ wget --load-cookies cookies.txt
  • 60.
  • 61.
  • 62.
  • 63. $ wget -O Shakespeare.txt http://gutenberg.org/cache/epub/100/pg100.txt
  • 64. $ curl -o Shakespeare.txt http://gutenberg.org/cache/epub/100/pg100.txt
  • 65. $ cat Shakespeare.txt | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 66. $ curl http://gutenberg.org... | sed -e 's/s+/n/g' | tr -d ' ' | grep -e '^$' -v | tr '[:upper:]' '[:lower:]' | sort | uniq -c | sort -nr | head -n 50
  • 69.
  • 72.
  • 73. “Every time you attempt to parse HTML with regular expressions, the unholy child weeps the blood of virgins, and Russian hackers pwn your webapp.”
  • 74. “Have you tried using an XML parser instead?”
  • 75. But it gets worse
  • 76. <tbody> <tr><img src="foo"></tr> <tr><img/><br> </tbody> </table>
  • 77. Yes, this is valid HTML: <tbody> <tr><img src="foo"></tr> <tr><img/><br> </tbody> </table>
  • 78. Yes, this is valid HTML: <tbody> <tr><img src="foo"></tr> <tr><img/><br> </tbody> </table>
  • 79. Yes, this is valid HTML: <tbody> <tr><img src="foo"></tr> <tr><img/><br> </tbody> </table>
  • 80. Yes, this is valid HTML: <tbody> <tr><img src="foo"></tr> <tr><img/><br> </tbody> </table>
  • 81.
  • 82.
  • 83. NEVER TRY TO WRITE AN HTML PARSER
  • 85.
  • 86.
  • 87. pup
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 108.
  • 109.
  • 110.
  • 111. $ curl -L -s reddit.com/r/programming/ | pup p.title a[href^=http] attr{href} $ curl -s https://news.ycombinator.com/ | pup td.title a[href^=http] attr{href}
  • 112. $ curl -L -s reddit.com/r/programming/ | pup p.title a[href^=http] attr{href} $ curl -s https://news.ycombinator.com/ | pup td.title a[href^=http] attr{href}
  • 113. $ curl -L -s reddit.com/r/programming/ | pup p.title a[href^=http] attr{href} $ curl -s https://news.ycombinator.com/ | pup td.title a[href^=http] attr{href}
  • 114. $ curl -L -s reddit.com/r/programming/ | pup p.title a[href^=http] attr{href} $ curl -s https://news.ycombinator.com/ | pup td.title a[href^=http] attr{href}
  • 115. $ curl -s https://news.ycombinator.com/ | pup td.title a[href^=http] json{} [ { "attrs": { "href": "https://hacks.mozilla.org/2014/10/passwordless-authentication- secure-simple-and-fast-to-deploy/" }, ... ]
  • 116. $ curl -s https://news.ycombinator.com/ | pup td.title a[href^=http] json{} [ { "attrs": { "href": "https://hacks.mozilla.org/2014/10/passwordless-authentication- secure-simple-and-fast-to-deploy/" }, ... ]
  • 117. $ curl -s https://news.ycombinator.com/ | pup td.title a[href^=http] json{} [ { "attrs": { "href": "https:.../" }, "tag": "a", "text": "SHOW HN: pup" }, ... ]
  • 119. Part II: Building CLI tools in Go
  • 120. import java.util.Scanner; class Hello { public static void main(String[] args) { Scanner reader = new Scanner(System.in); System.out.print("Enter your name: "); String name = reader.nextLine(); System.out.printf("Hello, "+name+"!"); } }
  • 121.
  • 122. import java.util.Scanner; class Hello { public static void main(String[] args) { Scanner reader = new Scanner(System.in); System.out.print("Enter your name: "); String name = reader.nextLine(); System.out.printf("Hello, "+name+"!"); } }
  • 123. import java.util.Scanner; class Hello { public static void main(String[] args) { Scanner reader = new Scanner(System.in); System.out.print("Enter your name: "); String name = reader.nextLine(); System.out.printf("Hello, "+name+"!"); } }
  • 124.
  • 125. import java.util.Scanner; class Hello { public static void main(String[] args) { Scanner reader = new Scanner(System.in); System.out.print("Enter your name: "); String name = reader.nextLine(); System.out.printf("Hello, "+name+"!"); } }
  • 126.
  • 127.
  • 130. Taken from Rob Pike’s talk public static void main (2012)
  • 131. “dear god make it stop” Taken from Rob Pike’s talk public static void main (2012)
  • 134. I suck at this -->
  • 135.
  • 136. Go
  • 137. package main import "fmt" func main() { fmt.Println("Hello, world!") }
  • 138. line
  • 139. package main import "io" import "os" func main() { io.Copy(os.Stdout, os.Stdin) io.WriteString(os.Stdout, "n") }
  • 140. package main import "io" import "os" func main() { io.Copy(os.Stdout, os.Stdin) io.WriteString(os.Stdout, "n") }
  • 141. package main import "io" import "os" func main() { io.Copy(os.Stdout, os.Stdin) io.WriteString(os.Stdout, "n") }
  • 142. package main import "io" import "os" func main() { io.Copy(os.Stdout, os.Stdin) io.WriteString(os.Stdout, "n") }
  • 143. package main import "io" import "os" func main() { io.Copy(os.Stdout, os.Stdin) io.WriteString(os.Stdout, "n") }
  • 144. $ echo "Hello, World" Hello, World
  • 145. $ echo "Hello, World" Hello, World $ go get github.com/ericchiang/line
  • 146. $ echo "Hello, World" Hello, World $ go get github.com/ericchiang/line $ echo "Hello, World" | line Hello, World $
  • 149. gox
  • 150.
  • 152.
  • 153.
  • 154.
  • 155.
  • 156.
  • 157.

Editor's Notes

  1. Hi there. I’m a founding member and software engineer here. Come check us out!
  2. Big data… dude.
  3. This is what data can look like. Just a log from some process.
  4. Or a csv from an excell spreadsheet.
  5. Sometimes (if you’re lucky) data looks like this.
  6. Some data looks like this
  7. But the stand out command here is actually the pipe. It’s allowing us to string together a tone of other commands.
  8. On of my favorite uses of wget, is combining it with my session cookies. All of a sudden, the data I’m trying to
  9. But the stand out command here is actually the pipe. It’s allowing us to string together a tone of other commands.
  10. No, but really.
  11. One of the most popular answers ever on stackoverflow
  12. Okay let’s start with the trivial. <img> tags never have closing tags but can sometimes have slashes before their last brace.
  13. But what about <tr>? Did you know that the last closing tag is optional in many circumstances?
  14. An yeah, that’s not me cutting off the top of the HTML code. The opening <table> is optional depending on the context.
  15. Ouch. So much for our XML parser.
  16. Ouch. So much for our XML parser.
  17. There are some things you should never build yourself. And along with CAPCHAs (https://github.com/mieko/sr-captcha/blob/gh-pages/index.md), HTML parsers are among them.
  18. We need more pipes!
  19. With the success of pup, I’d like to introduce you to my newest command line creation.
  20. I learned how to program in college.
  21. This is what this program does. It prompts the user for some input, then
  22. Stdin, stdout, and stderr.
  23. This is what this program does. It prompts the user for some input, then
  24. This is what this program does. It prompts the user for some input, then
  25. With the success of pup, I’d like to introduce you to my newest command line creation.
  26. With the success of pup, I’d like to introduce you to my newest command line creation.
  27. With the success of pup, I’d like to introduce you to my newest command line creation.
  28. With the success of pup, I’d like to introduce you to my newest command line creation.