-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
858 lines (794 loc) · 25.5 KB
/
index.html
File metadata and controls
858 lines (794 loc) · 25.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>reveal.js</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/white.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<p>PREP:</p>
<ul style="font-size:50%; font-family: monospace;">
<li>git config user.email github@matt.mchenryfamily.org</li>
<li>export NIX_PATH=nixpkgs=/home/mmchenry/git/nixos/nixpkgs</li>
</ul>
</section>
<section>
<div style="display: flex; flex-direction: row;">
<div style="flex: 5;">
<p style="font-size:200%">Hashing &<br />Content Addressability</p>
<p>Foundations of Git, Bitcoin, & Nix</p>
<p style="font-size:75%">Matt McHenry</p>
<p style="font-size:75%">https://matt.mchenryfamily.org/hash-talk</p>
</div>
<div style="flex: 1; margin-top: 25vh;">
<img src="slides-link-qr.png" />
</div>
</section>
<section>
<ul>
<li>Principal Software Engineer, Carnegie Learning</li>
<li>25 years experience</li>
<li>For Work: Java, TypeScript</li>
<li>For Fun: Elm, Haskell</li>
</ul>
</section>
<section data-auto-animate>
<p>What are</p>
<p style="font-size:300%" data-id="h">Hash</p>
<p style="font-size:300%" data-id="f">Functions</p>
<p>anyway?</p>
</section>
<section data-auto-animate>
<p style="font-size:150%" data-id="f">Functions</p>
<p class="fragment fade-in">map a domain to a range</p>
</section>
<section data-auto-animate>
<p style="font-size:150%" data-id="h">Hash</p>
<p style="font-size:150%" data-id="f">Functions</p>
<p class="fragment fade-in">map a large domain to a small range</p>
<p class="fragment fade-in">put things in categories</p>
</section>
<section>
<p style="font-size:200%">Who's at the conference?</p>
<aside class="notes">
<p>is Kevin here? -- easy to find in short list</p>
<p>is Anthony here? -- hard to find in long list</p>
</aside>
</section>
<section data-auto-animate>
<div style="display: grid; grid-template-columns: repeat(6, 1fr);">
<div data-id="Megan">Megan</div>
<div data-id="Kayla">Kayla</div>
<div data-id="Robert">Robert</div>
<div data-id="Amber">Amber</div>
<div data-id="Michael">Michael</div>
<div data-id="Rachel">Rachel</div>
<div data-id="Amanda">Amanda</div>
<div data-id="John">John</div>
<div data-id="Jasmine">Jasmine</div>
<div data-id="Anthony">Anthony</div>
<div data-id="Justin">Justin</div>
<div data-id="Alyssa">Alyssa</div>
<div data-id="Jacob">Jacob</div>
<div data-id="Joseph">Joseph</div>
<div data-id="Austin">Austin</div>
<div data-id="Stephanie">Stephanie</div>
<div data-id="Kevin">Kevin</div>
<div data-id="Samantha">Samantha</div>
<div data-id="Jonathan">Jonathan</div>
<div data-id="Ashley">Ashley</div>
<div data-id="Rebecca">Rebecca</div>
<div data-id="Jennifer">Jennifer</div>
<div data-id="James">James</div>
<div data-id="Alexis">Alexis</div>
<div data-id="Ryan">Ryan</div>
<div data-id="Joshua">Joshua</div>
<div data-id="Andrew">Andrew</div>
<div data-id="Sarah">Sarah</div>
<div data-id="Alexander">Alexander</div>
<div data-id="Matthew">Matthew</div>
<div data-id="Jessica">Jessica</div>
<div data-id="Kyle">Kyle</div>
</div>
</section>
<section data-auto-animate>
<div style="display: grid; grid-template-columns: repeat(6, 1fr);">
<div style="grid-column-start: 1" data-id="Amanda">Amanda</div>
<div style="grid-column-start: 1" data-id="Alexis">Alexis</div>
<div style="grid-column-start: 1" data-id="Alexander">Alexander</div>
<div style="grid-column-start: 1" data-id="Austin">Austin</div>
<div style="grid-column-start: 1" data-id="Anthony">Anthony</div>
<div style="grid-column-start: 1" data-id="Andrew">Andrew</div>
<div style="grid-column-start: 1" data-id="Ashley">Ashley</div>
<div style="grid-column-start: 1" data-id="Alyssa">Alyssa</div>
<div style="grid-column-start: 1" data-id="Amber">Amber</div>
<div style="grid-row-start: 1; grid-column-start: 2" data-id="Jacob">Jacob</div>
<div style="grid-row-start: 2; grid-column-start: 2" data-id="Joshua">Joshua</div>
<div style="grid-row-start: 3; grid-column-start: 2" data-id="Jessica">Jessica</div>
<div style="grid-row-start: 4; grid-column-start: 2" data-id="James">James</div>
<div style="grid-row-start: 5; grid-column-start: 2" data-id="John">John</div>
<div style="grid-row-start: 6; grid-column-start: 2" data-id="Jonathan">Jonathan</div>
<div style="grid-row-start: 7; grid-column-start: 2" data-id="Justin">Justin</div>
<div style="grid-row-start: 8; grid-column-start: 2" data-id="Jasmine">Jasmine</div>
<div style="grid-row-start: 9; grid-column-start: 2" data-id="Joseph">Joseph</div>
<div style="grid-row-start: 10; grid-column-start: 2" data-id="Jennifer">Jennifer</div>
<div style="grid-row-start: 1; grid-column-start: 3" data-id="Kyle">Kyle</div>
<div style="grid-row-start: 2; grid-column-start: 3" data-id="Kayla">Kayla</div>
<div style="grid-row-start: 3; grid-column-start: 3" data-id="Kevin">Kevin</div>
<div style="grid-row-start: 1; grid-column-start: 4" data-id="Matthew">Matthew</div>
<div style="grid-row-start: 2; grid-column-start: 4" data-id="Michael">Michael</div>
<div style="grid-row-start: 3; grid-column-start: 4" data-id="Megan">Megan</div>
<div style="grid-row-start: 1; grid-column-start: 5" data-id="Ryan">Ryan</div>
<div style="grid-row-start: 2; grid-column-start: 5" data-id="Rachel">Rachel</div>
<div style="grid-row-start: 3; grid-column-start: 5" data-id="Robert">Robert</div>
<div style="grid-row-start: 4; grid-column-start: 5" data-id="Rebecca">Rebecca</div>
<div style="grid-row-start: 1; grid-column-start: 6" data-id="Samantha">Samantha</div>
<div style="grid-row-start: 2; grid-column-start: 6" data-id="Stephanie">Stephanie</div>
<div style="grid-row-start: 3; grid-column-start: 6" data-id="Sarah">Sarah</div>
</div>
</section>
<!-- section>
<p style="font-size:200%">Let's Hash<br />Some Humans!</p>
<aside class="notes">
<ol>
<li>born after 1900? -- puts everybody in the <b>same</b> category</li>
<li>born after 1990? -- splits us about in half</li>
<li>born after 1990? -- </li>
<li>born after 1990?</li>
</ol>
</aside>
</section -->
<!-- section>
<!- - hash function properties:
* different values
* evenly-distributed values
* values not predictable (apparently random)
* a value for every input
* quickly computable
* can't easily find a collision
* can't easily find an input that produces a specific output - ->
<table>
<thead>
<th>Things (Domain)</th>
<th class="fragment fade-in">Categories (Range)</th>
</thead>
<tr>
<td class="fragment fade-in">👫</td>
<td class="fragment fade-in">Born after <span style="font-family: monospace">$year</span>?</td>
</tr>
<tr>
<td class="fragment fade-in">👫</td>
<td class="fragment fade-in">Birth Month</td>
<!- - July & August more likely, but depends on latitude - ->
</tr>
<tr>
<td class="fragment fade-in">👫</td>
<td class="fragment fade-in">Last 4 digits of ☎#</td>
</tr>
</table>
<aside class="notes">
</aside>
</section -->
<section data-auto-animate>
<p style="font-size:150%">Hash Functions</p>
<ul>
<li data-id="1" class="fragment">Even Distribution</li>
<li class="fragment">Fast to Compute</li>
</ul>
</section>
<section data-auto-animate>
<p style="font-size:150%">Cryptographic</p>
<p style="font-size:150%">Hash Functions</p>
<ul>
<li data-id="1"><span class="r-stack" style="text-align: left;"><span class="fragment fade-out">Even
Distribution</span><span class="fragment">Apparently Random</span></span></li>
<li>Fast to Compute</li>
<li class="fragment">Large Range</li>
<li class="fragment">Hard to Invert</li>
<li class="fragment">Collision Resistant</li>
</ul>
</section>
<section>
<table>
<thead>
<th>Attendee</th>
<th>SHA1</th>
</thead>
<tr>
<td>Kevin</td>
<td style="font-family: monospace; font-size: 75%">61aad75ca16d9e75d82d5212be6aacc289705692</td>
</tr>
<tr>
<td>Anthony</td>
<td style="font-family: monospace; font-size: 75%">bace0349ea0a9fed3b05c3d3937ff7f65984919b</td>
</tr>
</table>
</section>
<section>
<p style="font-size:200%">Who's at the conference?</p>
<aside class="notes">
<p>is Kevin here? -- easy to find in short list</p>
<p>is Anthony here? -- hard to find in long list</p>
</aside>
</section>
<section>
<section>
<table style="font-size: 50%">
<thead>
<th>hash</th>
<th>name</th>
</thead>
<tr>
<td>0000000000000000000000000000000000000000</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000001</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000002</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000003</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000004</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000005</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000006</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000007</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000008</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000009</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000000a</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000000b</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000000c</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000000d</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000000e</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000000f</td>
<td></td>
</tr>
</table>
</section>
<section>
<table style="font-size: 50%">
<thead>
<th>hash</th>
<th>name</th>
</thead>
<tr>
<td>0000000000000000000000000000000000000010</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000011</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000012</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000013</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000014</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000015</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000016</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000017</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000018</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000019</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000001a</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000001b</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000001c</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000001d</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000001e</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000001f</td>
<td></td>
</tr>
</table>
</section>
<section>
<table style="font-size: 50%">
<thead>
<th>hash</th>
<th>name</th>
</thead>
<tr>
<td>0000000000000000000000000000000000000020</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000021</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000022</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000023</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000024</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000025</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000026</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000027</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000028</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000029</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000002a</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000002b</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000002c</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000002d</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000002e</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000002f</td>
<td></td>
</tr>
</table>
</section>
<section>
<table style="font-size: 50%">
<thead>
<th>hash</th>
<th>name</th>
</thead>
<tr>
<td>0000000000000000000000000000000000000030</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000031</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000032</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000033</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000034</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000035</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000036</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000037</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000038</td>
<td></td>
</tr>
<tr>
<td>0000000000000000000000000000000000000039</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000003a</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000003b</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000003c</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000003d</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000003e</td>
<td></td>
</tr>
<tr>
<td>000000000000000000000000000000000000003f</td>
<td></td>
</tr>
</table>
</section>
<section>
<p>Welcome to TechFest 3175!</p>
</section>
<section>
<table style="font-size: 50%">
<thead>
<th>hash</th>
<th>name</th>
</thead>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705690</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705691</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705692</td>
<td>Kevin</td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705693</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705694</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705695</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705696</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705697</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705698</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc289705699</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc28970569a</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc28970569b</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc28970569c</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc28970569d</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc28970569e</td>
<td></td>
</tr>
<tr>
<td>61aad75ca16d9e75d82d5212be6aacc28970569f</td>
<td></td>
</tr>
</table>
</section>
</section>
<section>
<p style="font-size:150%">How big is SHA1's output size?</p>
<table style="font-size:50%">
<tr class="fragment">
<td style="text-align: right;">7,500,000,000,000,000,000</td>
<td>grains of sand on Earth</td>
</tr>
<tr class="fragment">
<td style="text-align: right;">434,881,440,000,000,000,000</td>
<td>age of the universe (ms)</td>
</tr>
<tr class="fragment">
<td style="text-align: right;">602,214,076,000,000,000,000,000</td>
<td>atoms in 12g of carbon</td>
</tr>
<tr class="fragment">
<td style="text-align: right;">1,000,000,000,000,000,000,000,000</td>
<td>stars in the Universe</td>
</tr>
<tr class="fragment">
<td style="text-align: right;">1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976
</td>
<td>possible SHA1 values</td>
</tr>
</table>
</section>
<section data-background-iframe="https://emn178.github.io/online-tools/sha1.html"
data-background-interactive>
</section>
<section>
<p style="font-size: 200%">Git</p>
<p class="fragment fade-in">The problem of
<span style="font-style: italic;">distributed</span> version control
</p>
<p class="fragment fade-in">or, who gets to hand out the revision numbers?</p>
</section>
<!--
nix-shell
mkdir demo-repo
cd demo-repo
git init
npm init
cat package.json
git add package.json
git commit -am 'the next awesome npm package starts with a single commit'
tree .git
rm .git/hooks/*.sample
tree .git
cat .git/objects/68/34179c8adffce6dcca35cbba9c4332077392fe
cat .git/objects/68/34179c8adffce6dcca35cbba9c4332077392fe | file -
cat .git/objects/68/34179c8adffce6dcca35cbba9c4332077392fe | unpigz
wc -c package.json
echo -e "blob $(wc -c package.json | cut -d ' ' -f 1)$(cat package.json)" | sha1sum
cat .git/objects/68/34179c8adffce6dcca35cbba9c4332077392fe | unpigz | od -c
echo -e "blob $(wc -c package.json | cut -d ' ' -f 1)\x00$(cat package.json)" | sha1sum
cat .git/objects/2a/bde3ea3cf2549ca98a3b186a6003d186423945
cat .git/objects/2a/bde3ea3cf2549ca98a3b186a6003d186423945 | unpigz
cat .git/objects/2a/bde3ea3cf2549ca98a3b186a6003d186423945 | unpigz | od -xc
cat .git/objects/<the-commit> | unpigz
cat .git/HEAD
cat .git/refs/heads/master
git log --format=raw
git log --raw
git log
for n in $(seq 1 10000); do clear; echo; (git log -1 | cat &); if git commit --amend -m "the next awesome npm package starts with a single commit" -m "salt: $n" | grep '[a-z] 412'; then break; fi; done
-->
<section>
<p style="font-size: 200%">Bitcoin</p>
<p class="fragment fade-in">A transaction ledger that is:</p>
<ul>
<!-- hashes ensure transaction history can't be changed -->
<li class="fragment fade-in">Immutable</li>
<!-- no central bank to verify transactions -->
<!-- no one actor can control the system easily -->
<li class="fragment fade-in">Decentralized</li>
</ul>
</section>
<section>
<p style="font-size: 150%">Bitcoin: Key Idea #1</p>
<p>Transactions</p>
<p>build on other</p>
<p>transactions</p>
</section>
<section>
<p style="font-size: 150%">Bitcoin: Key Idea #2</p>
<p>Proof of Work</p>
</section>
<section data-auto-animate>
<div class="fig-container" data-file="bitcoin-parent-only.html"></div>
</section>
<section data-auto-animate>
<div class="fig-container" data-file="bitcoin-txns-only.html"></div>
</section>
<section data-auto-animate>
<div class="fig-container" data-file="bitcoin-special-hashes.html"></div>
</section>
<section data-auto-animate>
<div class="fig-container" data-file="bitcoin.html"></div>
</section>
<!--section>
<p>Bitcoin Block Structure</p>
<img src="https://www.gsr.io/wp-content/uploads/2021/09/18.-Block-Structure-1024x527.png">
<!- - blockchain diagrams:
https://www.0xkishan.com/blogs/bitcoin-blocks-understanding-the-basics
https://www.gsr.io/reports/cotw-how-bitcoin-works/ - ->
</section -->
<section>
<a href="https://www.blockchain.com/explorer/blocks/btc/918500">An Example Bitcoin Block</a>
</section>
<section>
<p style="font-size: 200%">Nix</p>
</section>
<section data-auto-animate>
<p>We've fed</p>
<div class="r-stack">
<p class="fragment current-visible">files</p>
<p class="fragment current-visible">directories</p>
<p class="fragment current-visible">commits</p>
<p class="fragment current-visible">transactions</p>
<p class="fragment current-visible">blocks</p>
</div>
<p data-id="into">into a hash function</p>
</section>
<section data-auto-animate>
<p>What if we feed your</p>
<div class="r-stack">
<p class="fragment current-visible"><span style="font-family: monospace">Dockerfile</span></p>
<p class="fragment current-visible"><span style="font-family: monospace">Makefile</span></p>
<p class="fragment current-visible"><span style="font-family: monospace">package.json</span></p>
<p class="fragment current-visible"><span style="font-family: monospace">pom.xml</span></p>
<p class="fragment current-visible">build scripts</p>
</div>
<p data-id="into">into a hash function?</p>
</section>
<section>
<p style="font-size: 150%">Nix:</p>
<p class="fragment">Reproducible Builds</p>
<p class="fragment">Portable Results</p>
</section>
<section data-auto-animate>
<p class="fragment" data-fragment-index="2" style="font-size: 150%"><span data-id="key-idea">Nix: Key
Idea</span> #1</p>
<p class="fragment" data-fragment-index="3">Name the</p>
<p class="fragment" data-fragment-index="1" data-id="build-products">build products</p>
<p class="fragment" data-fragment-index="4">with the hash of the</p>
<p data-id="build-recipe">build recipe</p>
</section>
<section data-auto-animate>
<p style="font-size: 150%"><span data-id="key-idea">Nix: Key Idea</span> #2</p>
<p>Downstream</p>
<p data-id="build-recipe">build recipes</p>
<p>reference upstream</p>
<p data-id="build-products">build products</p>
</section>
<section>
<ul>
<li>hash(commit -> hash(commit -> hash(commit ...)))</li>
<li class="fragment">hash(block -> hash(block -> hash(block ...)))</li>
<li class="fragment">hash(build -> hash(build -> hash(build ...)))</li>
</ul>
<p class="fragment">What entities in your domain follow this pattern?</p>
</section>
<section>
<div style="display: flex; flex-direction: row;">
<div style="flex: 5;">
<p>Thank You!</p>
<p>https://matt.mchenryfamily.org/hash-talk</p>
</div>
<div style="flex: 1">
<img src="slides-link-qr.png" />
</div>
</section>
<!--section data-auto-animate data-auto-animate-restart>
<p><span class="fragment" data-fragment-index="5">"</span>There are two hard problems in computer
science:
</p>
<ul>
<li class="fragment" data-fragment-index="2">Cache Invalidation</li>
<li class="fragment" data-fragment-index="3" data-id="naming-things" naming-things">Naming Things
</li>
<li class="fragment" data-fragment-index="4">Off-by-one Errors<span class="fragment"
data-fragment-index="5">"</span></li>
</ul>
<p class="fragment" data-fragment-index="5">-- Leon Bambrick</p>
</section>
<section data-auto-animate>
<p data-id="naming-things">Naming Things</p>
</section -->
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script src="plugin/reveald3.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
totalTime: 3600,
// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes, Reveald3]
});
</script>
</body>
</html>