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
Papers we love: Elixir edition
Search
Andrea Leopardi
July 16, 2018
Programming
5
1k
Papers we love: Elixir edition
Andrea Leopardi
July 16, 2018
Tweet
Share
More Decks by Andrea Leopardi
See All by Andrea Leopardi
The World is a Network (and We Are Just Nodes)
whatyouhide
0
140
BEAM: The Perfect Fit for Networks
whatyouhide
1
140
Update from the Elixir team - 2022
whatyouhide
0
340
Testing Asynchronous OTP
whatyouhide
0
460
Elixir Sightseeing Tour
whatyouhide
0
340
Mint - Disrupting HTTP clients
whatyouhide
0
210
BEAM Architecture Handbook
whatyouhide
7
2.6k
The Evolution of a Language
whatyouhide
0
110
Elixir - functional, concurrent, distributed programming for the rest of us
whatyouhide
2
290
Other Decks in Programming
See All in Programming
AWSでゲームサーバーを運用! Amazon GameLiftのお話
iriikeita
0
200
3 Effective Rules for Success with Signals in Angular
manfredsteyer
PRO
0
120
Namespace on read
tagomoris
2
370
CSC307 Lecture 10
javiergs
PRO
0
310
「2024年版 Kotlin サーバーサイドプログラミング実践開発」の補講 〜O/Rマッパー編〜
n_takehata
2
260
ピグパーティにおけるMongoDB CommunityバージョンからAtlasへの移行事例
10969hotaka
0
130
Jetpack for KMP
fornewid
1
290
12年前の『型システム入門』翻訳の思い出話
mame
11
1.2k
유연한 Composable 설계
l2hyunwoo
0
380
Xcode 16のPreviewModifierと@Previewableを活用した効率的なプレビュー方法の考察
ojun9
2
160
OpenAI/Gemini APIを使って EPUBを翻訳するCLIツールをつくってみた
tomiyan
0
790
DMMプラットフォームにおけるTiDBの導入から運用まで
pospome
7
3k
Featured
See All Featured
Done Done
chrislema
179
15k
How GitHub (no longer) Works
holman
305
140k
Visualization
eitanlees
139
14k
Agile that works and the tools we love
rasmusluckow
325
20k
Build The Right Thing And Hit Your Dates
maggiecrowley
28
2.2k
The Mythical Team-Month
searls
217
43k
The Invisible Customer
myddelton
117
13k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
GraphQLとの向き合い方2022年版
quramy
36
13k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
17
1.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
353
29k
Become a Pro
speakerdeck
PRO
15
4.8k
Transcript
PAPERS WE LOVE ELIXIR EDITION PAPERS WE LOVE ELIXIR EDITION
@whatyouhide
None
None
None
None
None
“You know Yelp? Yeah, but for weed”– me
None
None
“You know Uber Eats?”– me
None
weedmaps.com/careers
ELIXIR functional concurrent fault tolerant
The Elixir core team
we existing research
Formatting code Diffing data structures Property-based testing ⚙
FORMATTING CODE
Code formatter welcoming to newcomers consistency across teams/orgs/community no style
discussions
print code with line length limit
%{foo: [1, 2, 3], bar: "baz"}
%{foo: [1, 2, 3], bar: "baz"} 30
%{foo: [1, 2, 3], bar: "baz"} 25
%{ foo: [1, 2, 3], bar: "baz" } 25
%{ foo: [1, 2, 3], bar: "baz" } 13
%{ foo: [ 1, 2, 3 ], bar: "baz" }
13
The Design of a Pretty-printing Library John Hughes
Documents "text" concat(document1, document2) nest(document, columns)
"[" |> concat("1,") |> concat("2,") |> concat("3") |> concat("]") [1,
2, 3]
"[" |> line("1,") |> line("2,") |> line("3") |> nest(2) |>
line("]") [ 1, 2, 3 ]
A Prettier Printer Philip Wadler
group( "[" |> concat("1,") |> concat("2,") |> concat("3") |> nest(2)
|> concat("]") ) [ 1, 2, 3 ]
choose( doc, replace_concat_with_line_break(doc) ) DANGER: STRICT LANGUAGE AHEAD
Strictly Pretty Christian Lindig
Our documents color(doc, :blue) nest(doc, :cursor) ...
DIFFING DATA STRUCTURES
1) test two strings are different (Test) test.ex:6 Assertion with
== failed code: assert "hello world!" == "Hello, my world" left: "hello world!" right: "Hello, my world" stacktrace: test.ex:7: (test)
None
An O(ND) Difference Algorithm and Its Variations Eugene W. Myers
“Find the shortest edit script to turn a sequence A
into a sequence B.” = Find shortest path in a graph
O(ND) D is related to how "similar" the two sequences
are DNA strand mutation source code changes
iex> List.myers_difference([1, 4, 2, 3], [1, 2, 3, 4]) [eq:
[1], del: [4], eq: [2, 3], ins: [4]]
Now colorize
No modifications to the paper this time
String Matching with Metric Trees Using an Approximate Distance Ilaria
Bartolini, Paolo Ciaccia, Marco Patella
PROPERTY-BASED TESTING
Shape of input Properties of output + + Randomness =
Property-based testing
check all list <- list_of(term()) do sorted = sort(list) assert
is_list(sorted) assert length(list) == length(sorted) end
String.starts_with?(s1 <> s2, s1) String.ends_with?(s1 <> s2, s2) For any
strings s1 and s2:
Only Erlang tools (with different license)
QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs
Koen Classen John Hughes
all the base ideas are there but it relies too
heavily on types
data Colour = Red | Blue | Green instance Arbitrary
Colour where arbitrary = oneof [return Red, return Blue, return Green]
(prop/for-all [v (gen/vector gen/int)] (= (sort v) (sort (sort v))))
Clojure's test.check
StreamData check all s1 <- string(), s2 <- string() do
assert String.starts_with?(s1 <> s2, s1) assert String.ends_with?(s1 <> s2, s2) end
Generators functions that take some random state and return a
lazy tree
Lazy tree a value plus a "recipe" for shrinking it
StreamData.integer() 3 0 2 0 1 0
StreamData.integer() 3 0 2 0 1 0
map(StreamData.integer(), fn x -> x * 2 end) 3 *
2 0 * 2 2 * 2 0 * 2 1 * 2 0 * 2
map(StreamData.integer(), fn x -> x * 2 end) 6 0
4 0 2 0
HONORABLE MENTIONS
How to make ad-hoc polymorphism less ad hoc Philip Wadler
Stephen Blott
Recursive functions of symbolic expressions and their computation by machine
John McCarthy
Advances in record linkage methodology as applied to the 1985
census of Tampa Florida Matthew A. Jaro
Iteratee: Teaching an Old Fold New Tricks John W. Lato
CONCLUSIONS
Existing research is AWESOME
Research tends to solve problems in a general/simple/flexible/elegant way
HDD Hughes-driven development
@whatyouhide