rabbit-slide-unasuke-rubykaigi-2023 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.rabbit +2 -0
  3. data/README.rd +24 -0
  4. data/Rakefile +17 -0
  5. data/config.yaml +23 -0
  6. data/img/QUIC-Badge-Dark-RGB-Horiz.png +0 -0
  7. data/img/aioquic-loc.png +0 -0
  8. data/img/aioquic_buffer.png +0 -0
  9. data/img/aioquic_callback.png +0 -0
  10. data/img/aioquic_callback_register.png +0 -0
  11. data/img/aioquic_conn.png +0 -0
  12. data/img/authorsrb.jpg +0 -0
  13. data/img/bytes_python.png +0 -0
  14. data/img/bytes_ruby.png +0 -0
  15. data/img/curl-ngtcp2.png +0 -0
  16. data/img/enum_python.png +0 -0
  17. data/img/enum_python_debug.png +0 -0
  18. data/img/enum_ruby.png +0 -0
  19. data/img/faraday_like_api.png +0 -0
  20. data/img/icon_face.jpeg +0 -0
  21. data/img/key_exchange_python.png +0 -0
  22. data/img/key_exchange_ruby.png +0 -0
  23. data/img/past-kaigi-slides.png +0 -0
  24. data/img/person-raising-hand.svg +1 -0
  25. data/img/protocol-stack-h2-h3-improved-readability.png +0 -0
  26. data/img/python_bytes.png +0 -0
  27. data/img/python_easy_code.png +0 -0
  28. data/img/quic-impl-grep-ruby.png +0 -0
  29. data/img/raioquic-demo.gif +0 -0
  30. data/img/raioquic-loc.png +0 -0
  31. data/img/raioquic-og.png +0 -0
  32. data/img/raioquic_callback.png +0 -0
  33. data/img/raioquic_conn.png +0 -0
  34. data/img/raioquic_demo_client.png +0 -0
  35. data/img/ruby-association-grant-2022-unasuke.png +0 -0
  36. data/img/ruby_bytes.png +0 -0
  37. data/img/ruby_nethttp.png +0 -0
  38. data/img/ruby_openssl_socket.png +0 -0
  39. data/img/rubykaigi-2022.png +0 -0
  40. data/img/rubykaigi-takeout-2021.png +0 -0
  41. data/img/rubymusicmixin2023.jpg +0 -0
  42. data/img/similer_nethttp.png +0 -0
  43. data/img/theme/background.png +0 -0
  44. data/img/theme/background_plane.png +0 -0
  45. data/img/theme/title.png +0 -0
  46. data/img/to-ruby-from-python.png +0 -0
  47. data/pdf/rubykaigi-2023-slide.pdf +0 -0
  48. data/slide.rab +440 -0
  49. data/theme.rb +118 -0
  50. metadata +105 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e4ac52c4a6e0f8334df6c75cc5f20a188221b9b227a856653d04e3fcda2572b9
4
+ data.tar.gz: b5bc15e123c696a2568f7b78d1f87ecfab1dca011a127ee840d83b0c3cc44d3c
5
+ SHA512:
6
+ metadata.gz: 0a6b102030495471f6dfa4e88a54e460f798e34ce54b539cac5c412edd9af71920616a22076ef12f4173f6d32efc3400fafd4b5d721ba0715333cf84d0c2fe58
7
+ data.tar.gz: 75e3d510d3d0ad0c61d888ecf699188c06b1232eee3850e5e659c5d621ed1cc1ad5b146fa83ae8a7742687557009730da0f7675c3cb0f3b24e5e2cc77f786dd6
data/.rabbit ADDED
@@ -0,0 +1,2 @@
1
+ --size 1920,1080
2
+ slide.rab
data/README.rd ADDED
@@ -0,0 +1,24 @@
1
+ = Ruby Implementation of QUIC: Progress and Challenges
2
+
3
+ https://rubykaigi.org/2023/presentations/yu_suke1994.html#day2
4
+
5
+ == 作者向け
6
+
7
+ === 表示
8
+
9
+ rake
10
+
11
+ === 公開
12
+
13
+ rake publish
14
+
15
+ == 閲覧者向け
16
+
17
+ === インストール
18
+
19
+ gem install rabbit-slide-unasuke-rubykaigi-2023
20
+
21
+ === 表示
22
+
23
+ rabbit rabbit-slide-unasuke-rubykaigi-2023.gem
24
+
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ require "rabbit/task/slide"
2
+
3
+ # Edit ./config.yaml to customize meta data
4
+
5
+ spec = nil
6
+ Rabbit::Task::Slide.new do |task|
7
+ spec = task.spec
8
+ # spec.files += Dir.glob("doc/**/*.*")
9
+ # spec.files -= Dir.glob("private/**/*.*")
10
+ # spec.add_runtime_dependency("rabbit-theme-YOUR-THEME")
11
+ end
12
+
13
+ desc "Tag #{spec.version}"
14
+ task :tag do
15
+ sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
16
+ sh("git", "push", "--tags")
17
+ end
data/config.yaml ADDED
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: rubykaigi-2023
3
+ base_name: slide
4
+ tags: ['ruby', 'python', 'rubykaigi', 'quic']
5
+ presentation_date: '2023-05-12'
6
+ presentation_start_time:
7
+ presentation_end_time:
8
+ version: 1.0.0
9
+ licenses: ['MIT']
10
+ slideshare_id:
11
+ speaker_deck_id:
12
+ vimeo_id:
13
+ youtube_id:
14
+ width: 1920
15
+ height: 1080
16
+ author:
17
+ markup_language: :rd
18
+ name: unasuke
19
+ email: yusuke1994525@gmail.com
20
+ rubygems_user: unasuke
21
+ slideshare_user:
22
+ speaker_deck_user:
23
+ source_code_url: https://github.com/unasuke/rubykaigi-2023
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/img/authorsrb.jpg ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/img/enum_ruby.png ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#FA743E" d="M27 27H10v9h21v-5c0-2.209-1.791-4-4-4z"/><path fill="#FFDC5D" d="M15 22v6c0 1.657 1.343 3 3 3s3-1.343 3-3v-6h-6z"/><path fill="#DD551F" d="M26 32h1v4h-1z"/><path fill="#FFAC33" d="M21.906 1.262c-2.02-.654-6.772-.475-7.96 1.069-3.089.059-6.713 2.851-7.188 6.535-.47 3.645.578 5.338.951 8.079.422 3.106 2.168 4.099 3.564 4.515C13.281 24.114 15.415 24 19 24c7 0 10.334-4.684 10.629-12.639.178-4.812-2.645-8.456-7.723-10.099z"/><path fill="#FFDC5D" d="M25.909 11.701c-.677-.938-1.545-1.693-3.446-1.96.713.327 1.396 1.455 1.485 2.079.089.624.178 1.129-.386.505-2.26-2.499-4.722-1.515-7.162-3.041-1.704-1.066-2.223-2.246-2.223-2.246s-.208 1.574-2.792 3.178c-.749.465-1.643 1.5-2.139 3.03C8.889 14.345 9 15.325 9 17c0 4.889 4.029 9 9 9s9-4.147 9-9c0-3.041-.319-4.229-1.091-5.299z"/><path fill="#C1694F" d="M22 22h-8s1 2 4 2 4-2 4-2zm-3-2.5h-2c-.276 0-.5-.224-.5-.5s.224-.5.5-.5h2c.276 0 .5.224.5.5s-.224.5-.5.5z"/><path fill="#662113" d="M14 16c-.552 0-1-.448-1-1v-1c0-.552.448-1 1-1s1 .448 1 1v1c0 .552-.448 1-1 1zm8 0c-.552 0-1-.448-1-1v-1c0-.552.448-1 1-1s1 .448 1 1v1c0 .552-.448 1-1 1z"/><path fill="#FFDC5D" d="M12.421 2.935c-.591-.389-1.387-.224-1.776.367L10 4.284V2c0-1.105-.896-2-2-2H4C2.896 0 2 .896 2 2v8s0 1 1 1h6l1-1V8.957l2.789-4.246c.389-.592.225-1.387-.368-1.776z"/><path fill="#EF9645" d="M4 0h1v5H4zm3 0h1v5H7z"/><path fill="#FA743E" d="M9 27h3l-2 9c-8 0-8-9-8-9V10h8L9 27z"/></svg>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/slide.rab ADDED
@@ -0,0 +1,440 @@
1
+ = Ruby Implementation of QUIC: Progress and Challenges
2
+
3
+ : author
4
+ unasuke (Yusuke Nakamura)
5
+ : content-source
6
+ RubyKaigi 2023
7
+ : date
8
+ 2023-05-12
9
+ : theme
10
+ theme
11
+
12
+ = Self introduction
13
+
14
+ * Name: unasuke (Yusuke Nakamura)
15
+ * Work: freelance Web app developer @ Japan
16
+ * Itamae gem maintainer, Kaigi on Rails Organizer
17
+ * (('tag:x-small')) GitHub ((<URL:https://github.com/unasuke>))
18
+ * (('tag:x-small')) Mastodon ((<URL:https://mstdn.unasuke.com/@unasuke>))
19
+ * (('tag:x-small')) Twitter ((<URL:https://twitter.com/yu_suke1994>))
20
+
21
+
22
+ # image
23
+ # src = img/icon_face.jpeg
24
+ # relative_width = 24
25
+ # align = right
26
+ # relative_margin_right = -8
27
+ # relative_margin_top = 33
28
+
29
+ #= [AD 1] Rubyist Book Authors Stamp Rally
30
+ # # image
31
+ # # src = img/authorsrb.jpg
32
+ # # relative_width = 85
33
+ #
34
+ #= [AD 2] RubyMusicMixin2023 by pixiv at Day 3
35
+ # # image
36
+ # # src = img/rubymusicmixin2023.jpg
37
+ # # relative_width = 80
38
+
39
+ = Ruby Association Grant
40
+ # image
41
+ # src = img/ruby-association-grant-2022-unasuke.png
42
+ # relative_width = 90
43
+
44
+ (('tag:small'))(('tag:center'))((<URL:https://www.ruby.or.jp/en/news/20221027>))
45
+
46
+ = What is QUIC?
47
+ * UDP-based communication protocol
48
+ * HTTP/3 uses QUIC
49
+ * Faster than HTTP/2 (TCP)
50
+
51
+ \n
52
+ # image
53
+ # src = img/QUIC-Badge-Dark-RGB-Horiz.png
54
+ # relative_width = 50
55
+ # align = center
56
+ (('tag:x-small'))(('tag:center')) image from ((<URL:https://github.com/quicwg/wg-materials>))
57
+
58
+
59
+ = What is QUIC? - Diagram by Robin Marx
60
+ # image
61
+ # src = img/protocol-stack-h2-h3-improved-readability.png
62
+ # relative_width = 45
63
+ # align = center
64
+
65
+ (('tag:x-small'))(('tag:center')) image from ((<URL:https://github.com/rmarx/h3-protocol-stack>))
66
+
67
+ = My talks
68
+ * RubyKaigi Takeout 2021
69
+ * "Ruby, Ractor, QUIC"
70
+ * RubyKaigi 2022 (Tsu)
71
+ * "Ruby, Ractor, QUIC"
72
+ * Now (2023, Matsumoto)
73
+
74
+ \n
75
+ # image
76
+ # src = img/past-kaigi-slides.png
77
+ # relative_width = 40
78
+ # align = right
79
+
80
+
81
+ = Implement QUIC from scratch
82
+ (('tag:center'))Have you ever created a Rails application?
83
+
84
+ # image
85
+ # src = img/person-raising-hand.svg
86
+ # relative_width = 30
87
+ # align = center
88
+
89
+ = Implement QUIC from scratch
90
+ (('tag:center'))Have you ever implemented the QUIC protocol?
91
+
92
+ # image
93
+ # src = img/person-raising-hand.svg
94
+ # relative_width = 30
95
+ # align = center
96
+
97
+
98
+ = Implement QUIC from scratch
99
+ It's too difficult! \n
100
+
101
+ * When create a Rails application
102
+ * learn from "Rails Guides" and "Rails Tutorial"
103
+ * When create a QUIC implementation...?
104
+ * RFCs are not a "implementation guide"
105
+
106
+ = Try to implement QUIC once
107
+
108
+ * To learn how to implement QUIC
109
+ * Implement it once (how?)
110
+ * Porting existing implementation!
111
+
112
+
113
+ = Topics
114
+
115
+ (1) (('tag:large'))Porting from Python to Ruby
116
+ (2) (('tag:large'))Rubyish QUIC implementation
117
+ (3) (('tag:large'))Future of my implementation
118
+
119
+
120
+ = Porting from Python to Ruby
121
+ # image
122
+ # src = img/to-ruby-from-python.png
123
+ # relative_width = 78
124
+ # align = center
125
+ (('tag:xx-small'))(('tag:center'))((<URL:https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/>))
126
+
127
+ = Porting from Python to Ruby
128
+ # image
129
+ # src = img/python_easy_code.png
130
+ # relative_width = 80
131
+ # align = center
132
+
133
+ (('tag:center'))Can you port this Python code to Ruby?
134
+
135
+ = Porting from Python to Ruby - Code amount
136
+ # image
137
+ # src = img/aioquic-loc.png
138
+ # relative_width = 100
139
+ # align = center
140
+
141
+ = Porting from Python to Ruby - How I ported it
142
+ * Keep the same structure as Python
143
+ * Carelessly changed may cause getting stuck
144
+ * Avoid porting asynchronous processing parts
145
+ * Difference of functionality
146
+ * My lack of knowledge
147
+
148
+ = Porting from Python to Ruby - Built-in types, bytes
149
+ # image
150
+ # src = img/aioquic_buffer.png
151
+ # relative_width = 100
152
+ # align = center
153
+
154
+ (('tag:x-small'))(('tag:center'))((<URL:https://github.com/aiortc/aioquic/blob/main/src/aioquic/_buffer.pyi>))
155
+
156
+ = Porting from Python to Ruby - Built-in types, bytes
157
+
158
+ * bytes in Python
159
+ * immutable (bytearray is not)
160
+ * String in Ruby
161
+ * mutable
162
+ * has Encoding (not only ASCII)
163
+
164
+ = Porting from Python to Ruby - Built-in types, bytes
165
+ Python returns 3
166
+ # image
167
+ # src = img/bytes_python.png
168
+ # relative_width = 60
169
+ # align = center
170
+
171
+ Ruby returns 1 (return 3 if use String#bytesize)
172
+ # image
173
+ # src = img/bytes_ruby.png
174
+ # relative_width = 60
175
+ # align = center
176
+
177
+ = Porting from Python to Ruby - Built-in types, enum
178
+ # image
179
+ # src = img/enum_python.png
180
+ # relative_width = 80
181
+ # align = center
182
+
183
+ (('tag:center')) Python
184
+
185
+
186
+ = Porting from Python to Ruby - Built-in types, enum
187
+ # image
188
+ # src = img/enum_ruby.png
189
+ # relative_width = 80
190
+ # align = center
191
+
192
+ (('tag:center')) Ruby
193
+
194
+ = Porting from Python to Ruby - Built-in types, enum
195
+ # image
196
+ # src = img/enum_python_debug.png
197
+ # relative_width = 80
198
+ # align = center
199
+
200
+ "Oh! 1025 is the SignatureAlgorithm.RSA_PKCS1_SHA256 in TLS 1.3!"
201
+
202
+ = Porting from Python to Ruby - Built-in types, tuple
203
+ # image
204
+ # src = img/aioquic_conn.png
205
+ # relative_width = 90
206
+ # align = center
207
+
208
+ (('tag:center')) Python
209
+
210
+ = Porting from Python to Ruby - Built-in types, tuple
211
+ # image
212
+ # src = img/raioquic_conn.png
213
+ # relative_width = 90
214
+ # align = center
215
+
216
+ (('tag:center')) Ruby
217
+
218
+ = Porting from Python to Ruby - Code style
219
+ # image
220
+ # src = img/aioquic_callback.png
221
+ # relative_width = 70
222
+ # align = center
223
+
224
+ (('tag:center')) Python
225
+
226
+ = Porting from Python to Ruby - Code style
227
+ # image
228
+ # src = img/raioquic_callback.png
229
+ # relative_width = 75
230
+ # align = center
231
+
232
+ (('tag:center')) Ruby
233
+
234
+ = Porting from Python to Ruby - Code style
235
+ # image
236
+ # src = img/aioquic_callback_register.png
237
+ # relative_width = 80
238
+ # align = center
239
+
240
+ (('tag:center')) callback register in Python
241
+
242
+
243
+ = Porting from Python to Ruby - Library API
244
+ Not only language themselves but also API differences.
245
+
246
+ Using OpenSSL functionality from...
247
+
248
+ * Python (aioquic)
249
+ * pyca/cryptography
250
+ * ((<URL:https://github.com/pyca/cryptography>))
251
+ * Ruby
252
+ * openssl gem
253
+ * ((<URL:https://github.com/ruby/openssl>))
254
+
255
+ (to implement TLS 1.3)
256
+
257
+ = Porting from Python to Ruby - Library API
258
+ (1) looked for API calls to pyca/cryptography's
259
+ (2) find which C API of OpenSSL it corresponds to
260
+ (3) find how it is wrapped in the openssl gem
261
+ (4) port it to a Ruby API call in the openssl gem
262
+
263
+ = Porting from Python to Ruby - Library API example
264
+ # image
265
+ # src = img/key_exchange_python.png
266
+ # relative_width = 100
267
+ # align = center
268
+
269
+ = Porting from Python to Ruby - Library API example
270
+ # image
271
+ # src = img/key_exchange_ruby.png
272
+ # relative_width = 90
273
+ # align = center
274
+
275
+ = Porting from Python to Ruby - Result
276
+ # image
277
+ # src = img/raioquic-loc.png
278
+ # relative_width = 90
279
+ # align = center
280
+
281
+ = Porting from Python to Ruby - Demo
282
+ # image
283
+ # src = img/raioquic-demo.gif
284
+ # relative_width = 85
285
+ # align = center
286
+
287
+ = Porting from Python to Ruby - Insights
288
+
289
+ (1) QUIC IS VERY DIFFICULT
290
+ (2) TLS 1.3 IS ALSO VERY DIFFICULT
291
+ (3) "writing once" empowers me
292
+
293
+ = Porting from Python to Ruby - "Raioquic"
294
+ # image
295
+ # src = img/raioquic-og.png
296
+ # relative_width = 80
297
+ # align = center
298
+
299
+ (('tag:center'))((<URL:https://github.com/unasuke/raioquic>))
300
+
301
+
302
+ = Rubyish QUIC implementation
303
+ # image
304
+ # src = img/raioquic_demo_client.png
305
+ # relative_width = 44
306
+ # align = center
307
+
308
+ = Future of my implementation - How to make it Rubyish?
309
+ To make implementation Rubyish...
310
+
311
+ (1) Use suitable features to Ruby (internal)
312
+ * tuple → class or dedicated struct or data
313
+ * bytes → IO::Buffer, not String
314
+ (2) Adapt to existing API styles (public API)
315
+
316
+ = Future of my implementation - TLS in Ruby
317
+ # image
318
+ # src = img/ruby_nethttp.png
319
+ # relative_width = 90
320
+ # align = center
321
+
322
+ (('tag:center'))High level API (use Net::HTTP)
323
+
324
+ = Future of my implementation - TLS in Ruby
325
+ # image
326
+ # src = img/ruby_openssl_socket.png
327
+ # relative_width = 90
328
+ # align = center
329
+
330
+ (('tag:center'))Low level API (use OpenSSL::SSL::SSLSocket)
331
+
332
+ = Future of my implementation - Faraday style
333
+ # image
334
+ # src = img/faraday_like_api.png
335
+ # relative_width = 90
336
+ # align = center
337
+
338
+ (('tag:center'))Very high level API
339
+
340
+ = Future of my implementation - Net::HTTP style
341
+ # image
342
+ # src = img/similer_nethttp.png
343
+ # relative_width = 90
344
+ # align = center
345
+
346
+ (('tag:center'))Net::HTTP style API
347
+
348
+ = Future of my implementation - Vaporware
349
+ * The APIs like I've been talking about, doesn't exist yet
350
+ * next year...?
351
+ * um...
352
+
353
+ = Future of my implementation - Raise your hand time!
354
+ (('tag:center'))Are you running some Rails apps on production env?
355
+
356
+ # image
357
+ # src = img/person-raising-hand.svg
358
+ # relative_width = 30
359
+ # align = center
360
+
361
+ = Future of my implementation - Raise your hand time!
362
+ (('tag:center'))Are you running some Rails apps on production ((*without*)) reverse proxies or load balancers?
363
+
364
+ # image
365
+ # src = img/person-raising-hand.svg
366
+ # relative_width = 30
367
+ # align = center
368
+
369
+ # = Future of my implementation - Where could it be used
370
+ #
371
+ # * Are you runs Rails app on production?
372
+ # * Are you use reverse proxy or load balancer?
373
+ # * e.g. Nginx, Apache, H2O, ALB...
374
+ #
375
+
376
+ = Future of my implementation - Speed!
377
+
378
+ * Most Rails app is behind of web server (load balancer)
379
+ * TLS termination is high cost
380
+ * (asset delivery)
381
+
382
+ = Future of my implementation - QUIC diagram (again!)
383
+ # image
384
+ # src = img/protocol-stack-h2-h3-improved-readability.png
385
+ # relative_width = 45
386
+ # align = center
387
+
388
+ (('tag:x-small'))(('tag:center')) image from ((<URL:https://github.com/rmarx/h3-protocol-stack>))
389
+
390
+ = Future of my implementation - Faster language impls
391
+ * C or Rust or...
392
+ * ((<(('socketry/protocol-quic'))|URL:https://github.com/socketry/protocol-quic>)) gem wraps ngtcp2
393
+ * created by Samuel-san (ioquatix)
394
+ * "Unleashing the Power of Asynchronous HTTP with Ruby" in Day 3
395
+ * ((<(('ngtcp2/ngtcp2'))|URL:https://github.com/ngtcp2/ngtcp2>)) written by C
396
+
397
+ = Future of my implementation - ngtcp2 used by curl
398
+ # image
399
+ # src = img/curl-ngtcp2.png
400
+ # relative_width = 85
401
+ # align = center
402
+
403
+ (('tag:center'))((<URL:https://github.com/curl/curl/blob/master/docs/HTTP3.md>))
404
+
405
+ = Future of my implementation - Worth of Pure Ruby
406
+ * Research
407
+ * Implementations that make it easy to change internal behavior are useful
408
+ * QUIC implementation itself
409
+ * Helping QUIC implementation itself
410
+ * e.g. Build data for test its behavior
411
+
412
+ = Future of my implementation - Motivation
413
+ # image
414
+ # src = img/quic-impl-grep-ruby.png
415
+ # relative_width = 70
416
+ # align = center
417
+
418
+ (('tag:x-small'))(('tag:center')) ((<URL:https://github.com/quicwg/base-drafts/wiki/Implementations>))
419
+
420
+ = Summary
421
+
422
+ * Ported aioquic (Python) to Ruby
423
+ * Diffs from language features, library API makes porting hard
424
+ * Ported impl could communicate other impls
425
+ * Creating Rubyish implementation
426
+ * Uses Ruby's built-in features
427
+ * Make it can apply existing idioms
428
+ * This may be where this implementation would be useful
429
+ * Research
430
+ * QUIC implementation itself
431
+
432
+ = Acknowledgments
433
+ * Ruby Association
434
+ * For adopting my project
435
+ * Koichi Sasada-san
436
+ * a mentor of the porting project
437
+ * Kuwayama-san
438
+ * Author of tttls1.3 gem
439
+ * Daisuke Aritomo a.k.a. osyoyu
440
+ * Adviser of this talk
data/theme.rb ADDED
@@ -0,0 +1,118 @@
1
+ @default_foreground ||= @foreground
2
+ @default_background ||= @background
3
+ @default_shadow_color ||= @shadow_color
4
+
5
+ rubykaigi_color = '#2c2c31'
6
+ rubykaigi_purple = '#41414f'
7
+ @default_font = 'Montserrat'
8
+ @font_family = find_font_family(@default_font)
9
+ @bold_font = @default_font
10
+ @bold_font_family = find_font_family(@bold_font)
11
+ @monospace_font = 'HackGen'
12
+ @monospace_font_family = find_font_family(@monospace_font)
13
+
14
+ @default_item1_mark_color = rubykaigi_purple
15
+ @default_item2_mark_color = rubykaigi_purple
16
+
17
+ @xxxx_large_font_size = screen_size(10 * Pango::SCALE)
18
+ @xxx_large_font_size = screen_size(8 * Pango::SCALE)
19
+ @xx_large_font_size = screen_size(6 * Pango::SCALE)
20
+ @x_large_font_size = screen_size(4.5 * Pango::SCALE)
21
+ @large_font_size = screen_size(4 * Pango::SCALE)
22
+ @normal_font_size = screen_size(3.5 * Pango::SCALE)
23
+ @small_font_size = screen_size(3.2 * Pango::SCALE)
24
+ @x_small_font_size = screen_size(3 * Pango::SCALE)
25
+ @xx_small_font_size = screen_size(2.8 * Pango::SCALE)
26
+ @xxx_small_font_size = screen_size(2.5 * Pango::SCALE)
27
+ @script_font_size = @x_small_font_size
28
+ @large_script_font_size = @small_font_size
29
+ @x_large_script_font_size = @large_font_size
30
+ @title_slide_title_font_size = @xxx_large_font_size
31
+
32
+ @block_quote_fill_color = "#f8f8f8"
33
+ @preformatted_fill_color = "#f8f8f8"
34
+ @default_headline_line_color = rubykaigi_color
35
+ @description_term_line_color = @default_headline_line_color
36
+
37
+ @title_slide_background_image = 'img/theme/title.png'
38
+ @slide_background_image = 'img/theme/background.png'
39
+
40
+ # set_foreground(@default_foreground)
41
+ # set_background(@default_background)
42
+
43
+ add_image_path("ruby-images")
44
+ include_theme("default-icon")
45
+ include_theme("default-title-text")
46
+ include_theme("default-text")
47
+ include_theme("default-title-slide")
48
+ include_theme("default-slide")
49
+ include_theme("default-item-mark")
50
+ include_theme("default-method-list")
51
+ include_theme("default-preformatted")
52
+ include_theme("default-block-quote")
53
+ include_theme("default-foot-text")
54
+ include_theme("default-description")
55
+ include_theme("image")
56
+ include_theme("table")
57
+ include_theme("newline-in-slides")
58
+ include_theme("per-slide-background-color")
59
+ include_theme("background-image-toolkit")
60
+ include_theme("per-slide-background-image")
61
+ include_theme("body-background-image")
62
+ include_theme("tag")
63
+ include_theme("syntax-highlighting")
64
+ include_theme("default-comment")
65
+
66
+ include_theme("title-slide-background-image")
67
+ include_theme("slide-background-image")
68
+
69
+ match(TitleSlide, Title) do |titles|
70
+ # titles.padding_top = @space * 28
71
+ titles.prop_set("size", screen_size(4.9 * Pango::SCALE))
72
+ titles.prop_set("weight", "SemiBold")
73
+ end
74
+
75
+ match(Slide, HeadLine) do |heads|
76
+ heads.prop_set("size", @large_font_size)
77
+ heads.prop_set("weight", "bold")
78
+ end
79
+
80
+ match(TitleSlide) do |slides|
81
+ slides.vertical_centering = true
82
+ slides.margin_left = 0
83
+ slides.margin_right = 500
84
+ slides.prop_set("foreground", rubykaigi_color)
85
+ slides.prop_set("weight", "Bold")
86
+ end
87
+
88
+ match(TitleSlide, Subtitle) do |subtitle|
89
+ subtitle.margin_top = -20
90
+ subtitle.prop_set("weight", "normal")
91
+ subtitle.prop_set("size", @large_font_size)
92
+ end
93
+ match(TitleSlide, Author) do |author|
94
+ author.margin_top = 25
95
+ author.prop_set("weight", "normal")
96
+ end
97
+ match(TitleSlide, Place) do |place|
98
+ place.prop_set("weight", "normal")
99
+ place.prop_set("size", @small_font_size)
100
+ end
101
+ match(TitleSlide, Date) do |date|
102
+ date.prop_set("weight", "normal")
103
+ end
104
+ match(TitleSlide, ContentSource) do |cs|
105
+ cs.prop_set("weight", "normal")
106
+ end
107
+ match(TitleSlide, "*") do |elems|
108
+ # elems.horizontal_centering = true
109
+ end
110
+ match(Slide) do |slide|
111
+ slide.prop_set("foreground", rubykaigi_color)
112
+ end
113
+
114
+ match("**", Paragraph) do |texts|
115
+ texts.prop_set("weight", "medium")
116
+ end
117
+
118
+ pp "reloaded!"
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-unasuke-rubykaigi-2023
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - unasuke
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-05-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rabbit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.2
27
+ description: https://rubykaigi.org/2023/presentations/yu_suke1994.html#day2
28
+ email:
29
+ - yusuke1994525@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".rabbit"
35
+ - README.rd
36
+ - Rakefile
37
+ - config.yaml
38
+ - img/QUIC-Badge-Dark-RGB-Horiz.png
39
+ - img/aioquic-loc.png
40
+ - img/aioquic_buffer.png
41
+ - img/aioquic_callback.png
42
+ - img/aioquic_callback_register.png
43
+ - img/aioquic_conn.png
44
+ - img/authorsrb.jpg
45
+ - img/bytes_python.png
46
+ - img/bytes_ruby.png
47
+ - img/curl-ngtcp2.png
48
+ - img/enum_python.png
49
+ - img/enum_python_debug.png
50
+ - img/enum_ruby.png
51
+ - img/faraday_like_api.png
52
+ - img/icon_face.jpeg
53
+ - img/key_exchange_python.png
54
+ - img/key_exchange_ruby.png
55
+ - img/past-kaigi-slides.png
56
+ - img/person-raising-hand.svg
57
+ - img/protocol-stack-h2-h3-improved-readability.png
58
+ - img/python_bytes.png
59
+ - img/python_easy_code.png
60
+ - img/quic-impl-grep-ruby.png
61
+ - img/raioquic-demo.gif
62
+ - img/raioquic-loc.png
63
+ - img/raioquic-og.png
64
+ - img/raioquic_callback.png
65
+ - img/raioquic_conn.png
66
+ - img/raioquic_demo_client.png
67
+ - img/ruby-association-grant-2022-unasuke.png
68
+ - img/ruby_bytes.png
69
+ - img/ruby_nethttp.png
70
+ - img/ruby_openssl_socket.png
71
+ - img/rubykaigi-2022.png
72
+ - img/rubykaigi-takeout-2021.png
73
+ - img/rubymusicmixin2023.jpg
74
+ - img/similer_nethttp.png
75
+ - img/theme/background.png
76
+ - img/theme/background_plane.png
77
+ - img/theme/title.png
78
+ - img/to-ruby-from-python.png
79
+ - pdf/rubykaigi-2023-slide.pdf
80
+ - slide.rab
81
+ - theme.rb
82
+ homepage: https://slide.rabbit-shocker.org/authors/unasuke/rubykaigi-2023/
83
+ licenses:
84
+ - MIT
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubygems_version: 3.4.6
102
+ signing_key:
103
+ specification_version: 4
104
+ summary: 'Ruby Implementation of QUIC: Progress and Challenges'
105
+ test_files: []