rabbit-slide-kou-rubykaigi-2017 2017.9.18.1 → 2017.9.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config.yaml +1 -1
- data/extension-by-cpp.rab +67 -63
- data/pdf/rubykaigi-2017-extension-by-cpp.pdf +0 -0
- data/theme.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a93af02f700acc28698c7a79bae5e4303361c28
|
4
|
+
data.tar.gz: f08c702d6a23f2c619091f3f4ce5b44a97372aba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca38cda3001a004da18c1564f6ae473f1f48a5e0b56a77fbaf7bbbc0baf32bfd1d64e39932c3271ece8ad6a26a1a22ba905dc109ca2ad7d1ad5ced0cab1f1736
|
7
|
+
data.tar.gz: c83333038a54243f56a739a6665cae4de263ccdddf73569e0e335aab51c0f74ab0916db0ab5e687dfb89e4d44603d81949973bad8c2a19823ce3fe0f93d42264
|
data/config.yaml
CHANGED
data/extension-by-cpp.rab
CHANGED
@@ -45,7 +45,7 @@
|
|
45
45
|
* Project that provides data processing tools for Ruby\n
|
46
46
|
(('note:Ruby用のデータ処理ツール群を提供するプロジェクト'))
|
47
47
|
* https://red-data-tools.github.io/
|
48
|
-
* Workshop
|
48
|
+
* Workshop during the afternoon break on the 2nd day (today!)\n
|
49
49
|
(('note:2日目(今日!)の午後休憩中にワークショップがあるよ!'))
|
50
50
|
|
51
51
|
= Ad4: OSS Gate
|
@@ -56,21 +56,21 @@
|
|
56
56
|
|
57
57
|
= Ad4: OSS Gate
|
58
58
|
|
59
|
-
* Ruby is
|
59
|
+
* Ruby is OSS\n
|
60
60
|
(('note:RubyもOSS'))
|
61
61
|
* OSS Gate wants to increase people to join Ruby itself and RubyGems development!\n
|
62
62
|
(('note:OSS GateではRuby本体の開発や各種RubyGemの開発に参加する人も増やしたい!'))
|
63
63
|
|
64
64
|
= Ad4: OSS Gate
|
65
65
|
|
66
|
-
* Now,
|
66
|
+
* Now, in Tokyo, Sapporo, Osaka and Kyoto\n
|
67
67
|
(('note:現在は東京・札幌・大阪・京都で活動中'))
|
68
|
-
* If you live
|
68
|
+
* If you live near by, join "OSS Gate workshop"!\n
|
69
69
|
(('note:これらの地域に住んでいる人は「OSS Gateワークショップ」に参加しよう!'))
|
70
70
|
|
71
71
|
= Ad4: OSS Gate
|
72
72
|
|
73
|
-
*
|
73
|
+
* Want to expand to Hiroshima and other areas all over the world!\n
|
74
74
|
(('note:広島や世界中のいろんな地域で活動したい!'))
|
75
75
|
* If you're interested in increasing people who join OSS development, talk to me!\n
|
76
76
|
(('note:OSSの開発に参加する人が増えることに興味のある人は私に声をかけて!'))
|
@@ -82,10 +82,10 @@ Improve performance\n
|
|
82
82
|
with C/C++ libraries\n
|
83
83
|
(('note:C/C++のライブラリーを使った高速化'))
|
84
84
|
|
85
|
-
* Not
|
85
|
+
* Not create binding\n
|
86
86
|
(('note:バインディングを作りたいわけじゃない'))
|
87
87
|
|
88
|
-
= Point of
|
88
|
+
= Point of improving perf\n(('note:高速化するために大事なこと'))
|
89
89
|
|
90
90
|
(('tag:center'))
|
91
91
|
Done in C/C++\n
|
@@ -118,7 +118,7 @@ as much as possible\n
|
|
118
118
|
# 50x faster(50倍速い)
|
119
119
|
numbers.inject(:+)
|
120
120
|
|
121
|
-
= Extension and binding\n(('note
|
121
|
+
= Extension and binding\n(('note:拡張ライブラリーとバインディング'))
|
122
122
|
|
123
123
|
* Extension(('note:(拡張ライブラリー)'))
|
124
124
|
* Ruby library implemented in C\n
|
@@ -148,7 +148,7 @@ as much as possible\n
|
|
148
148
|
context.show_page # API
|
149
149
|
s.finish # API
|
150
150
|
|
151
|
-
= Point of
|
151
|
+
= Point of improving perf\n(('note:高速化するために大事なこと'))
|
152
152
|
|
153
153
|
(('tag:center'))
|
154
154
|
Done in C/C++\n
|
@@ -159,7 +159,7 @@ as much as possible\n
|
|
159
159
|
C/C++ and Ruby\n
|
160
160
|
(('note:C/C++とRuby間でいったりきたりしない'))
|
161
161
|
|
162
|
-
=
|
162
|
+
= Perf improvement example\n(('note:高速化例'))
|
163
163
|
|
164
164
|
# coderay ruby
|
165
165
|
|
@@ -180,7 +180,7 @@ Improve performance\n
|
|
180
180
|
with C/C++ libraries\n
|
181
181
|
(('note:C/C++のライブラリーを使った高速化'))
|
182
182
|
|
183
|
-
* Not
|
183
|
+
* Not create binding\n
|
184
184
|
(('note:バインディングを作りたいわけじゃない'))
|
185
185
|
|
186
186
|
= Use case\n(('note:高速化したい場面'))
|
@@ -193,7 +193,7 @@ with C/C++ libraries\n
|
|
193
193
|
= Raw C API for extension\n(('note:拡張ライブラリー用の生のC API'))
|
194
194
|
|
195
195
|
(('tag:center'))
|
196
|
-
Not bad but
|
196
|
+
Not bad but can be verbose because of C\n
|
197
197
|
(('note:悪くないんだけどCなので冗長'))
|
198
198
|
|
199
199
|
* Need better approach\n
|
@@ -212,7 +212,7 @@ Not bad but has some verbosities because of C\n
|
|
212
212
|
|
213
213
|
* Extend language to support writing extension\n
|
214
214
|
(('note:拡張ライブラリーを書けるように言語を拡張'))
|
215
|
-
*
|
215
|
+
* Not based on C\n
|
216
216
|
(('note:C以外の言語を使う'))
|
217
217
|
* Provide convenient API\n
|
218
218
|
(('note:便利APIを提供'))
|
@@ -221,7 +221,7 @@ Not bad but has some verbosities because of C\n
|
|
221
221
|
|
222
222
|
* Extend language to support writing extension\n
|
223
223
|
(('note:拡張ライブラリーを書けるように言語を拡張'))
|
224
|
-
*
|
224
|
+
* Not based on C\n
|
225
225
|
(('note:C以外の言語を使う'))
|
226
226
|
* ((*Provide convenient API*))\n
|
227
227
|
(('note:便利APIを提供'))
|
@@ -237,7 +237,7 @@ Not bad but has some verbosities because of C\n
|
|
237
237
|
|
238
238
|
* C++ can use C API directory\n
|
239
239
|
(('note:C++ではCのAPIを直接使える'))
|
240
|
-
* No
|
240
|
+
* No wrapper API or libffi\n
|
241
241
|
(('note:ラッパーAPIもlibffiもいらない'))
|
242
242
|
* C++((*11 or later*)) has many convenient features\n
|
243
243
|
(('note:C++11以降には便利機能がたくさんある'))
|
@@ -245,8 +245,8 @@ Not bad but has some verbosities because of C\n
|
|
245
245
|
= C++ convenient feature1\n(('note:C++の便利機能1'))
|
246
246
|
|
247
247
|
(('tag:center'))
|
248
|
-
Type detection
|
249
|
-
(('note:auto
|
248
|
+
Type detection with "auto"\n
|
249
|
+
(('note:autoで型推論(C++11)'))
|
250
250
|
|
251
251
|
# coderay cpp
|
252
252
|
|
@@ -259,7 +259,7 @@ Type detection by auto (C++11)\n
|
|
259
259
|
|
260
260
|
(('tag:center'))
|
261
261
|
Lambda expression (C++11)\n
|
262
|
-
(('note
|
262
|
+
(('note:ラムダ式(C++11)'))
|
263
263
|
|
264
264
|
# coderay cpp
|
265
265
|
|
@@ -273,7 +273,7 @@ Lambda expression (C++11)\n
|
|
273
273
|
|
274
274
|
(('tag:center'))
|
275
275
|
Default argument\n
|
276
|
-
(('note
|
276
|
+
(('note:デフォルト引数'))
|
277
277
|
|
278
278
|
# coderay cpp
|
279
279
|
|
@@ -340,12 +340,12 @@ Default argument\n
|
|
340
340
|
|
341
341
|
(('tag:center'))
|
342
342
|
Custom type conversion\n
|
343
|
-
(('note
|
343
|
+
(('note:型変換のカスタマイズ'))
|
344
344
|
|
345
345
|
* "Cast" is customizable\n
|
346
346
|
(('note:「キャスト」をカスタマイズできるということ'))
|
347
347
|
|
348
|
-
= Custom type conversion\n(('note
|
348
|
+
= Custom type conversion\n(('note:型変換のカスタマイズ'))
|
349
349
|
|
350
350
|
# coderay cpp
|
351
351
|
|
@@ -360,7 +360,7 @@ Custom type conversion\n
|
|
360
360
|
VALUE rb_object_;
|
361
361
|
};
|
362
362
|
|
363
|
-
= Custom type conversion\n(('note
|
363
|
+
= Custom type conversion\n(('note:型変換のカスタマイズ'))
|
364
364
|
|
365
365
|
# coderay cpp
|
366
366
|
|
@@ -372,7 +372,7 @@ Custom type conversion\n
|
|
372
372
|
// Object nil(Qnil); // Qnil wrapper
|
373
373
|
// if (nil) { → if (RTEST(Qnil)) {
|
374
374
|
|
375
|
-
= Custom type conversion\n(('note
|
375
|
+
= Custom type conversion\n(('note:型変換のカスタマイズ'))
|
376
376
|
|
377
377
|
# coderay cpp
|
378
378
|
|
@@ -385,7 +385,7 @@ Custom type conversion\n
|
|
385
385
|
// → 1 + 1
|
386
386
|
// → 2
|
387
387
|
|
388
|
-
= Custom type conversion\n(('note
|
388
|
+
= Custom type conversion\n(('note:型変換のカスタマイズ'))
|
389
389
|
|
390
390
|
# coderay cpp
|
391
391
|
|
@@ -398,7 +398,7 @@ Custom type conversion\n
|
|
398
398
|
};
|
399
399
|
// Object(Qtrue) + 1; // → Compile error
|
400
400
|
|
401
|
-
= Custom type conversion\n(('note
|
401
|
+
= Custom type conversion\n(('note:型変換のカスタマイズ'))
|
402
402
|
|
403
403
|
# coderay cpp
|
404
404
|
|
@@ -410,7 +410,7 @@ Custom type conversion\n
|
|
410
410
|
Object(VALUE rb_object);
|
411
411
|
};
|
412
412
|
|
413
|
-
= Custom type conversion\n(('note
|
413
|
+
= Custom type conversion\n(('note:型変換のカスタマイズ'))
|
414
414
|
|
415
415
|
# coderay cpp
|
416
416
|
|
@@ -422,7 +422,7 @@ Custom type conversion\n
|
|
422
422
|
// 暗黙的にVALUE→Objectとキャスト
|
423
423
|
identify(100); // == identify(Object(100));
|
424
424
|
|
425
|
-
= Custom type conversion\n(('note
|
425
|
+
= Custom type conversion\n(('note:型変換のカスタマイズ'))
|
426
426
|
|
427
427
|
# coderay cpp
|
428
428
|
|
@@ -433,7 +433,7 @@ Custom type conversion\n
|
|
433
433
|
};
|
434
434
|
// identify(100); // → Compile error
|
435
435
|
|
436
|
-
= Custom type conversion\n(('note
|
436
|
+
= Custom type conversion\n(('note:型変換のカスタマイズ'))
|
437
437
|
|
438
438
|
# coderay cpp
|
439
439
|
|
@@ -447,13 +447,13 @@ Custom type conversion\n
|
|
447
447
|
// → 8 + 1;
|
448
448
|
// → 9;
|
449
449
|
|
450
|
-
= C++ convenient
|
450
|
+
= C++ convenient feature5\n(('note:C++の便利機能5'))
|
451
451
|
|
452
452
|
(('tag:center'))
|
453
453
|
Template and specialization\n
|
454
|
-
(('note
|
454
|
+
(('note:テンプレートと特殊化'))
|
455
455
|
|
456
|
-
*
|
456
|
+
* 👍Consistent cast API\n
|
457
457
|
(('note:一貫性のあるキャストAPIに使える'))
|
458
458
|
|
459
459
|
= Consistent cast API\n(('note:一貫性のあるキャストAPI'))
|
@@ -498,21 +498,22 @@ Template and specialization\n
|
|
498
498
|
return Object(rb_str_new_cstr(c_string));
|
499
499
|
}
|
500
500
|
|
501
|
-
= C++ convenient
|
501
|
+
= C++ convenient feature6\n(('note:C++の便利機能6'))
|
502
502
|
|
503
503
|
(('tag:center'))
|
504
504
|
Initializer list (C++11)\n
|
505
505
|
(('note:初期化リスト(C++11)'))
|
506
506
|
|
507
|
-
* "{A,
|
508
|
-
(('note:「{A, B,
|
507
|
+
* "{A,B,...}" is customizable\n
|
508
|
+
(('note:「{A, B, ...}」をカスタマイズできる'))
|
509
509
|
|
510
510
|
= Initializer list\n(('note:初期化リスト'))
|
511
511
|
|
512
512
|
# coderay cpp
|
513
513
|
|
514
514
|
Object Object::send(
|
515
|
-
ID name_id,
|
515
|
+
ID name_id,
|
516
|
+
std::initializer_list<VALUE> args);
|
516
517
|
// Ruby: "hello".send(:tr, "e", "E")
|
517
518
|
Object(rb_str_new_cstr("hello")).
|
518
519
|
send(rb_intern("tr"),
|
@@ -563,7 +564,7 @@ Initializer list (C++11)\n
|
|
563
564
|
= C++ based API: Pros1\n(('note:C++ベースのAPI:長所1'))
|
564
565
|
|
565
566
|
(('tag:center'))
|
566
|
-
|
567
|
+
Easier to write than C\n
|
567
568
|
(('note:Cより書きやすい'))
|
568
569
|
|
569
570
|
* Require C++11 or later\n
|
@@ -575,7 +576,7 @@ Easy to write than C\n
|
|
575
576
|
Easy to use for C API users\n
|
576
577
|
(('note:既存のC APIを使っている人なら使いやすい'))
|
577
578
|
|
578
|
-
*
|
579
|
+
* Use C directly incl macro\n
|
579
580
|
(('note:マクロも含めてCの機能を直接使える'))
|
580
581
|
* Don't need to migrate to all convenient API at once\n
|
581
582
|
(('note:一気に書き換えるのではなく徐々に移行できる'))
|
@@ -754,7 +755,7 @@ Slower build\n
|
|
754
755
|
Exception\n
|
755
756
|
(('note:例外'))
|
756
757
|
|
757
|
-
* Ruby exception breaks C++ RAII (destructor)\n
|
758
|
+
* Ruby exception breaks C++ RAII (destructor)\n(('note:(Resource Acquisition Is Initialization)'))\n
|
758
759
|
(('note:Rubyの例外発生→C++のRAII(デストラクター)が動かない'))
|
759
760
|
* Because it uses setjmp/longjmp\n
|
760
761
|
(('note:Rubyの例外はsetjmp/longjmpを使っているから'))
|
@@ -795,7 +796,7 @@ Introduce easy to write extension approaches\n
|
|
795
796
|
|
796
797
|
* Extend language to support writing extension\n
|
797
798
|
(('note:拡張ライブラリーを書けるように言語を拡張'))
|
798
|
-
*
|
799
|
+
* Not based on C\n
|
799
800
|
(('note:C以外の言語を使う'))
|
800
801
|
* Provide convenient API\n
|
801
802
|
(('note:便利APIを提供'))
|
@@ -809,9 +810,9 @@ Introduce easy to write extension approaches\n
|
|
809
810
|
|
810
811
|
= How to run\n(('note:動かし方'))
|
811
812
|
|
812
|
-
*
|
813
|
+
* Translate extension code to C\n
|
813
814
|
(('note:拡張言語で書かれたコードをCにコンパイル'))
|
814
|
-
*
|
815
|
+
* Compile C code\n
|
815
816
|
(('note:コンパイルされたCコードをビルド'))
|
816
817
|
* Load the built extension\n
|
817
818
|
(('note:ビルドした拡張ライブラリーを読み込む'))
|
@@ -851,30 +852,31 @@ Introduce easy to write extension approaches\n
|
|
851
852
|
= Extend language: Pros1\n(('note:拡張言語:長所1'))
|
852
853
|
|
853
854
|
(('tag:center'))
|
854
|
-
Friendly syntax for
|
855
|
+
Friendly syntax for\n
|
856
|
+
base language users\n
|
855
857
|
(('note:ベースの言語のユーザーにはなじみやすい構文'))
|
856
858
|
|
857
|
-
* Most
|
859
|
+
* Most syntax is the same\n
|
858
860
|
(('note:構文の大部分は同じだから'))
|
859
861
|
|
860
|
-
= Extend language:
|
862
|
+
= Extend language: Pros2\n(('note:拡張言語:長所2'))
|
861
863
|
|
862
864
|
(('tag:center'))
|
863
865
|
Easy to migrate from base lang\n
|
864
866
|
(('note:ベースの言語からの移行が容易'))
|
865
867
|
|
866
|
-
* Because
|
868
|
+
* Because upward compatibility\n
|
867
869
|
(('note:上位互換だから'))
|
868
870
|
* Code for base language works without modification\n
|
869
871
|
(('note:ベースの言語で書かれたコードは変更なしで動く'))
|
870
872
|
|
871
|
-
= Extend language:
|
873
|
+
= Extend language: Pros3\n(('note:拡張言語:長所3'))
|
872
874
|
|
873
875
|
(('tag:center'))
|
874
|
-
|
876
|
+
Doesn't require much C knowledge\n
|
875
877
|
(('note:そんなにCの知識は必要ない'))
|
876
878
|
|
877
|
-
* Most
|
879
|
+
* Most code can be written with base language knowledge\n
|
878
880
|
(('note:コードの大部分はベースの言語の知識で書ける'))
|
879
881
|
|
880
882
|
= Extend language: Cons1\n(('note:拡張言語:短所1'))
|
@@ -901,14 +903,14 @@ Difficult to debug\n
|
|
901
903
|
= Extend language: Cons3\n(('note:拡張言語:短所2'))
|
902
904
|
|
903
905
|
(('tag:center'))
|
904
|
-
|
906
|
+
Hard to maintain\n
|
905
907
|
(('note:(For maintainers, not for users)'))\n
|
906
908
|
(('note:(ユーザーではなくメンテナーが)メンテナンスが大変'))
|
907
909
|
|
908
910
|
* Base language introduces a new syntax then extend language should implement it\n
|
909
911
|
(('note:ベースの言語が新しい構文を導入→拡張言語でも実装'))
|
910
912
|
|
911
|
-
=
|
913
|
+
= Not based on C\n(('note:C言語以外をベースにする'))
|
912
914
|
|
913
915
|
* JRuby: Java + Ruby
|
914
916
|
* Helix: Rust + Ruby
|
@@ -936,27 +938,28 @@ Need many works to maintain\n
|
|
936
938
|
java_import "Fibonacci"
|
937
939
|
p Fibonacci.new.compute(100)
|
938
940
|
|
939
|
-
=
|
941
|
+
= Not based on C: Pros1\n(('note:C言語以外をベースにする:長所1'))
|
940
942
|
|
941
943
|
(('tag:center'))
|
942
|
-
|
944
|
+
Easier to write than C\n
|
943
945
|
(('note:Cより書きやすい'))
|
944
946
|
|
945
947
|
* Simpler syntax\n
|
946
948
|
(('note:洗練された構文'))
|
947
|
-
* Rich features
|
949
|
+
* Rich features compared to C\n
|
948
950
|
(('note:Cより機能が多い'))
|
949
951
|
|
950
|
-
=
|
952
|
+
= Not based on C: Pros2\n(('note:C言語以外をベースにする:長所2'))
|
951
953
|
|
952
954
|
(('tag:center'))
|
953
|
-
Can use libraries
|
955
|
+
Can use libraries\n
|
956
|
+
in base language\n
|
954
957
|
(('note:ベース言語のライブラリーを使える'))
|
955
958
|
|
956
|
-
* Major languages have many
|
959
|
+
* Major languages have many libs\n
|
957
960
|
(('note:広く使われている言語はライブラリーも多い'))
|
958
961
|
|
959
|
-
=
|
962
|
+
= Not based on C: Cons1\n(('note:C言語以外をベースにする:短所1'))
|
960
963
|
|
961
964
|
(('tag:center'))
|
962
965
|
Need base language knowledge\n
|
@@ -965,7 +968,7 @@ Need base language knowledge\n
|
|
965
968
|
* Java for JRuby(('note:(JRubyならJava)'))
|
966
969
|
* Rust for Helix(('note:(HelixならRust)'))
|
967
970
|
|
968
|
-
=
|
971
|
+
= Not based on C: Cons2\n(('note:C言語以外をベースにする:短所2'))
|
969
972
|
|
970
973
|
(('tag:center'))
|
971
974
|
May need C knowledge\n
|
@@ -977,10 +980,10 @@ May need C knowledge\n
|
|
977
980
|
* e.g.: (({sys::RSTRING_PTR})) on Helix\n
|
978
981
|
(('note:例:Helixならsys::RSTRING_PTRがラップしたAPI'))
|
979
982
|
|
980
|
-
=
|
983
|
+
= Not based on C: Cons3\n(('note:C言語以外をベースにする:短所3'))
|
981
984
|
|
982
985
|
(('tag:center'))
|
983
|
-
|
986
|
+
Hard to maintain\n
|
984
987
|
(('note:(When Ruby implementation is MRI)'))\n
|
985
988
|
(('note:Rubyの実装がMRIならメンテナンスが大変かも'))
|
986
989
|
|
@@ -991,7 +994,7 @@ May need many works to maintain\n
|
|
991
994
|
= Provide convenient API\n(('note:便利なAPIを提供'))
|
992
995
|
|
993
996
|
* Rice: C++ + Ruby
|
994
|
-
* Ext++: C++ + Ruby
|
997
|
+
* Ext++: C++11 + Ruby
|
995
998
|
* Boost.Python: C++ + Python
|
996
999
|
* pybind11: C++11 + Python
|
997
1000
|
|
@@ -1049,8 +1052,9 @@ Omit\n
|
|
1049
1052
|
Conv from Ruby may be a bother\n
|
1050
1053
|
(('note:Ruby実装の移植が面倒'))
|
1051
1054
|
|
1052
|
-
* C++ with convenient Ruby C API needs more
|
1053
|
-
(('note:RubyのC APIにC++の便利APIがあっても
|
1055
|
+
* C++ with convenient Ruby C API needs more code than Ruby\n
|
1056
|
+
(('note:RubyのC APIにC++の便利APIがあっても'))\n
|
1057
|
+
(('note:Rubyよりもたくさんコードが必要'))
|
1054
1058
|
|
1055
1059
|
= From Ruby: Rice\n(('note:RubyからRiceに移植'))
|
1056
1060
|
|
Binary file
|
data/theme.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit-slide-kou-rubykaigi-2017
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2017.9.18.
|
4
|
+
version: 2017.9.18.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rabbit
|