Share
Embed
Why Prism?
Prism is many things: a new default library for parsing Ruby in CRuby 3.3+, the default parser for almost every Ruby implementation in the world, as well as a package in 5 different languages. This talk explains why it was created, the challenges involved, and where the project is going.
Kevin Newton
September 07, 2024
Annual Pro sale · Save $30
Have presentations of your own?
Share with private links, password protection, and more control over your work.
Transcript
119 slides
-
Disclaimer 免責事項 I have Japanese translations on these slides that
were done by DeepL. I am sorry if they are bad. このスライドはDeepLが 日 本語に翻訳したものです。悪 かったらごめんなさい。 -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension • Java bindings → serialization and FFI C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension • Java bindings → serialization and FFI C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension • Java bindings → serialization and FFI • JavaScript/TypeScript bindings → WASM C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension • Java bindings → serialization and FFI • JavaScript/TypeScript bindings → WASM C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension • Java bindings → serialization and FFI • JavaScript/TypeScript bindings → WASM • Rust bindings → bindgen C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension • Java bindings → serialization and FFI • JavaScript/TypeScript bindings → WASM • Rust bindings → bindgen C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension • Java bindings → serialization and FFI • JavaScript/TypeScript bindings → WASM • Rust bindings → bindgen • C++ bindings → extern C C Libr a ry (C99+) -
What is Prism? Ruby language parser written in C99 C99で書かれたRuby
言 語パーサー • CRuby bindings → native extension • Java bindings → serialization and FFI • JavaScript/TypeScript bindings → WASM • Rust bindings → bindgen • C++ bindings → extern C C Libr a ry (C99+) -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー Ruby Gem (CRuby 2.7+) -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー Ruby Gem (CRuby 2.7+) irb(main):001> Prism.parse("1 + 2") => #<Prism::ParseResult:0x00000001047b4e70 @comments=[], @data_loc=nil, @errors=[], @magic_comments=[], @source= #<Prism::ASCIISource:0x0000000109b72360 @offsets=[0], @source="1 + 2", @start_line=1>, @value= @ ProgramNode (location: (1,0)-(1,5)) ├── flags: ∅ ├── locals: [] └── statements: @ StatementsNode (location: (1,0)-(1,5)) ├── flags: ∅ └── body: (length: 1) └── @ CallNode (location: (1,0)-(1,5)) ├── flags: newline ├── receiver: │ @ IntegerNode (location: (1,0)-(1,1)) │ ├── flags: static_literal, decimal │ └── value: 1 ├── call_operator_loc: ∅ ├── name: :+ ├── message_loc: (1,2)-(1,3) = "+" ├── opening_loc: ∅ ├── arguments: │ @ ArgumentsNode (location: (1,4)-(1,5)) │ ├── flags: ∅ │ └── arguments: (length: 1) │ └── @ IntegerNode (location: (1,4)-(1,5)) │ ├── flags: static_literal, decimal │ └── value: 2 ├── closing_loc: ∅ └── block: ∅, @warnings= [#<Prism::ParseWarning @type=:void_statement @message="possibly useless use of + in void context" @location=#<Prism::Location @start_offset=0 @length=5 start_line=1> @level=:verbose>]> irb(main):002> -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 Ruby Gem (CRuby 2.7+) -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper Ruby Gem (CRuby 2.7+) -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper Ruby Gem (CRuby 2.7+) irb(main):001> Ripper.sexp_raw("1 + 2") => [:program, [:stmts_add, [:stmts_new], [:binary, [:@int, "1", [1, 0]], :+, [:@int, "2", [1, 4]]]]] irb(main):002> Prism::Translation::Ripper.sexp_raw("1 + 2") => [:program, [:stmts_add, [:stmts_new], [:binary, [:@int, "1", [1, 0]], :+, [:@int, "2", [1, 4]]]]] irb(main):003> -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper • seattlerb/ruby_parser Ruby Gem (CRuby 2.7+) -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper • seattlerb/ruby_parser Ruby Gem (CRuby 2.7+) irb(main):001> RubyParser.new.parse("1 + 2") => s(:call, s(:lit, 1), :+, s(:lit, 2)) irb(main):002> Prism::Translation::RubyParser.new.parse("1 + 2") => s(:call, s(:lit, 1), :+, s(:lit, 2)) irb(main):003> -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper • seattlerb/ruby_parser • whitequark/parser Ruby Gem (CRuby 2.7+) -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper • seattlerb/ruby_parser • whitequark/parser Ruby Gem (CRuby 2.7+) irb(main):001> Parser::CurrentRuby.parse("1 + 2") => s(:send, s(:int, 1), :+, s(:int, 2)) irb(main):002> Prism::Translation::Parser.parse("1 + 2") => s(:send, s(:int, 1), :+, s(:int, 2)) irb(main):003> -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper • seattlerb/ruby_parser • whitequark/parser • APIs for pattern matching, searching, etc. パターンマッチング、検索などのためのAPI。 Ruby Gem (CRuby 2.7+) -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper • seattlerb/ruby_parser • whitequark/parser • APIs for pattern matching, searching, etc. パターンマッチング、検索などのためのAPI。 Ruby Gem (CRuby 2.7+) irb(main):001> value = Prism.parse("[1, 2, 3, 4, 5]").value => @ ProgramNode (location: (1,0)-(1,15)) ... irb(main):002* value.breadth_first_search do |node| irb(main):003* node in Prism::IntegerNode[value: 5..] irb(main):004> end => @ IntegerNode (location: (1,13)-(1,14)) ├── flags: static_literal, decimal └── value: 5 irb(main):005> -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper • seattlerb/ruby_parser • whitequark/parser • APIs for pattern matching, searching, etc. パターンマッチング、検索などのためのAPI。 • RBS + Steep, RBI + Sorbet Ruby Gem (CRuby 2.7+) -
What is Prism? • Syntax tree with rich location information
豊富な位置情報を持つ構 文 ツリー • Translation 翻訳 • Ripper • seattlerb/ruby_parser • whitequark/parser • APIs for pattern matching, searching, etc. パターンマッチング、検索などのためのAPI。 • RBS + Steep, RBI + Sorbet Ruby Gem (CRuby 2.7+) -
What is Prism? • A new compiler for CRuby 3.3+
CRuby 3.3+ 用 の新しいコンパイラ CRuby compiler -
What is Prism? • A new compiler for CRuby 3.3+
CRuby 3.3+ 用 の新しいコンパイラ • Generates the same YARV instruction sequences as compile.c compile.cと同じYARV命令シーケンスを 生 成する。 CRuby compiler -
What is Prism? • A new compiler for CRuby 3.3+
CRuby 3.3+ 用 の新しいコンパイラ • Generates the same YARV instruction sequences as compile.c compile.cと同じYARV命令シーケンスを 生 成する。 • A richer AST simpli fi es compilation リッチなASTはコンパイルを単純化する CRuby compiler -
Requirements • Involve the community of language developers from the
start 言 語開発者のコミュニティを最初から巻き込む Criteri a -
Requirements • Involve the community of language developers from the
start 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス Criteri a -
Requirements • Involve the community of language developers from the
start 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス • Same or better memory usage 同じかそれ以上のメモリ使 用 量 Criteri a -
Requirements • Involve the community of language developers from the
start 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス • Same or better memory usage 同じかそれ以上のメモリ使 用 量 • Error tolerant 誤差公差 Criteri a -
Requirements • Involve the community of language developers from the
start 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス • Same or better memory usage 同じかそれ以上のメモリ使 用 量 • Error tolerant 誤差公差 • Portable to other implementations and tools 他の実装やツールへの移植性 Criteri a -
Requirements • Involve the community of language developers from the
start 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス • Same or better memory usage 同じかそれ以上のメモリ使 用 量 • Error tolerant 誤差公差 • Portable to other implementations and tools 他の実装やツールへの移植性 • Maintainable 維持可能 Criteri a -
Requirements • Written in C99, supporting same platforms as CRuby
C99で書かれ、CRubyと同じプラットフォームをサポートする。 Fe a tures -
Requirements • Written in C99, supporting same platforms as CRuby
C99で書かれ、CRubyと同じプラットフォームをサポートする。 • Bindings to Java, C++, Rust, and WASM Java、C++、Rust、WASMへのバインディング Fe a tures -
Requirements • Written in C99, supporting same platforms as CRuby
C99で書かれ、CRubyと同じプラットフォームをサポートする。 • Bindings to Java, C++, Rust, and WASM Java、C++、Rust、WASMへのバインディング • FFI bindings can only require one function call FFIバインディングは1つの関数呼び出ししか必要としない Fe a tures -
Requirements • Written in C99, supporting same platforms as CRuby
C99で書かれ、CRubyと同じプラットフォームをサポートする。 • Bindings to Java, C++, Rust, and WASM Java、C++、Rust、WASMへのバインディング • FFI bindings can only require one function call FFIバインディングは1つの関数呼び出ししか必要としない • Small memory footprint to support embedded targets 組み込みターゲットをサポートする 小 さなメモリフットプリント Fe a tures -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート P
a rser intern a ls -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート P
a rser intern a ls if (parser->encoding->isupper_char(start, length)) { return PM_TOKEN_CONSTANT; } else { return PM_TOKEN_IDENTIFIER; } -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート •
Regular expression support (named captures, encoding, extended mode) 正規表現のサポート P a rser intern a ls -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート •
Regular expression support (named captures, encoding, extended mode) 正規表現のサポート P a rser intern a ls /(?<a>\w)/ =~ "b" a # => "b" -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート •
Regular expression support (named captures, encoding, extended mode) 正規表現のサポート • Static literals/string concatenation 文 字列の連結 P a rser intern a ls -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート •
Regular expression support (named captures, encoding, extended mode) 正規表現のサポート • Static literals/string concatenation 文 字列の連結 P a rser intern a ls "a #{"b"} c " "d e " "f" == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(1,24)> 0000 putstring "a b c d e f" ( 1) [Li] 0002 leave -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート •
Regular expression support (named captures, encoding, extended mode) 正規表現のサポート • Static literals/string concatenation 文 字列の連結 • RActor pragmas RActor のコメント P a rser intern a ls -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート •
Regular expression support (named captures, encoding, extended mode) 正規表現のサポート • Static literals/string concatenation 文 字列の連結 • RActor pragmas RActor のコメント P a rser intern a ls # shareable_constant_value: literal C = { a: b } -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート •
Regular expression support (named captures, encoding, extended mode) 正規表現のサポート • Static literals/string concatenation 文 字列の連結 • RActor pragmas RActor のコメント P a rser intern a ls == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(1,12)> 0000 putobject :a ( 1)[Li] 0002 putself 0003 opt_send_without_block <calldata!mid:b, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0005 newhash 2 0007 dup 0008 putspecialobject 3 0010 setconstant :C 0012 leave -
Requirements • Encoding support (90 encodings, 154 names) エンコーディングɾサポート •
Regular expression support (named captures, encoding, extended mode) 正規表現のサポート • Static literals/string concatenation 文 字列の連結 • RActor pragmas RActor のコメント P a rser intern a ls == disasm: #<ISeq:<main>@test.rb:1 (1,0)-(3,12)> 0000 putobject RubyVM::FrozenCore ( 3)[Li] 0002 putobject :a 0004 putobject RubyVM::FrozenCore 0006 putself 0007 opt_send_without_block <calldata!mid:b, argc:0, FCALL|VCALL|ARGS_SIMPLE> 0009 putobject "C" 0011 opt_send_without_block <calldata!mid:ensure_shareable, argc:2, ARGS_SIMPLE> 0013 newhash 2 0015 opt_send_without_block <calldata!mid:make_shareable, argc:1, ARGS_SIMPLE> 0017 dup 0018 putspecialobject 3 0020 setconstant :C 0022 leave -
Requirements • String, fi le, FIFO fi le, IO P
a rser extern a ls -
Requirements • String, fi le, FIFO fi le, IO P
a rser extern a ls Prism.parse(source) Prism.parse_file(filepath) Prism.parse_file(File.mkfifo("tmp/fifo")) Prism.parse_stream(STDIN) -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ P a rser extern a ls -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ P a rser extern a ls SCRIPT_LINES__ = {} require "prism" SCRIPT_LINES__.keys.length # => 6 -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ • DATA, __END__ P a rser extern a ls -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ • DATA, __END__ P a rser extern a ls DATA.read # => "Hello, world!" __END__ Hello, world! -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ • DATA, __END__ • --dump=parsetree P a rser extern a ls -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ • DATA, __END__ • --dump=parsetree P a rser extern a ls @ ProgramNode (location: (1,0)-(1,1)) +-- locals: [] +-- statements: @ StatementsNode (location: (1,0)-(1,1)) +-- body: (length: 1) +-- @ IntegerNode (location: (1,0)-(1,1)) +-- IntegerBaseFlags: decimal +-- value: 1 -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ • DATA, __END__ • --dump=parsetree • shebang fl ags P a rser extern a ls -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ • DATA, __END__ • --dump=parsetree • shebang fl ags P a rser extern a ls #! /usr/local/bin/ruby -s -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ • DATA, __END__ • --dump=parsetree • shebang fl ags • eval scopes P a rser extern a ls -
Requirements • String, fi le, FIFO fi le, IO •
RubyVM.keep_script_lines, SCRIPT_LINES__ • DATA, __END__ • --dump=parsetree • shebang fl ags • eval scopes P a rser extern a ls a = 1 eval("a + 2") -
By-products • Bug #19838 — Ripper nested heredocs • Bug
#19848 — Ripper BOM • Bug #19924 — Character literal \xFF stops parsing • Bug #20025 — Parsing identi fi ers is case-folding dependent • Bug #20041 — Array restructuring and default values in parameters • Bug #20043 — de fi ned? checks for method existence, but only sometimes • Bug #20217 — void value not checked for begin/ensure/rescue • Bug #20392 — delegate super calls with a block P a rser/compiler bugs (p a ge 1/2) -
By-products P a rser/compiler bugs (p a ge 2/2) •
Bug #20417 — RubyVM::AbstractSyntaxTree.parse warns about block local variables • Bug #20449 — Ripper issue in fi eld production on Ruby 3.1.5 • Bug #20474 — Heredoc common leading whitespace calculation • Bug #20571 — Compile error on for loop • Bug #20572 — Compilation hangs with nested until -
By-products • Bug #19835 — Parser leaks memory for incomplete
tokens • Bug #19836 — Parser leaks memory for incomplete lambdas • Bug #20521 — Memory leak in Ripper parsing Memory le a ks -
By-products • Bug #20219 — Segfault with circular parameter •
Bug #20339 — Parser segfault with ractor comment • Bug #20341 — Parser segfault with shareable constant with array • Bug #20468 — Segfault on safe navigation in for target Segf a ults -
By-products • Bug #19904 — Deprecate or warn on multiple
regular expression encodings • Bug #19973 — Duplicate keyword argument names don't always warn • Bug #20457 — Final `return` is eliminated from the AST • Bug #20465 — parse.y adds an extra empty string to the AST • Bug #20466 — Interpolated regular expressions have di ff erent encoding than interpolated strings Us a bility issues -
Criticisms “L a ck of a form a l gr
a mm a r will le a d to a synt a x combin a tion explosion” 正式な 文 法が 欠 如していると、構 文 の組み合わせが爆発してしまう。 -
Criticisms b rescue d b rescue d e b rescue
d(e) b(c) rescue d b(c) rescue d e b(c) rescue d(e) b c rescue d b c rescue d e b c rescue d(e) a = b rescue d a = b rescue d e a = b rescue d(e) a = b(c) rescue d a = b(c) rescue d e a = b(c) rescue d(e) a = b c rescue d a = b c rescue d e a = b c rescue d(e) -
Criticisms for a in c do end for a, b
in c do end for a, b, in c do end for a, *, b in c do end for (a, b) in c do end for @a in c do end for @@a in c do end for $a in c do end for A in c do end for A::B in c do end for a.b in c do end for a::b in c do end for a&.b in c do end for a[:b] in c do end for a[b:] in c do end for a[&b] in c do end -
Criticisms for a in c do end for a, b
in c do end for a, b, in c do end for a, *, b in c do end for (a, b) in c do end for @a in c do end for @@a in c do end for $a in c do end for A in c do end for A::B in c do end for a.b in c do end for a::b in c do end for a&.b in c do end for a[:b] in c do end for a[b:] in c do end for a[&b] in c do end 💥💥 Segfault -
Criticisms for a in c do end for a, b
in c do end for a, b, in c do end for a, *, b in c do end for (a, b) in c do end for @a in c do end for @@a in c do end for $a in c do end for A in c do end for A::B in c do end for a.b in c do end for a::b in c do end for a&.b in c do end for a[:b] in c do end for a[b:] in c do end for a[&b] in c do end If nobu doesn’t know about it, then no one knows about it. nobu が知らなければ、誰も知らない。 -
Criticisms “A h a nd-written p a rser is b
a d for m a int a in a bility. LALR is better.” 手 書きのパーサーは保守性に悪い。LALRの 方 が良い。 -
Criticisms Parser generator • Ruby (CRuby) • PostgreSQL/MySQL/SQLite • PHP
(Zend) • Python (CPython) -
Criticisms Parser generator • Ruby (CRuby) • PostgreSQL/MySQL/SQLite • PHP
(Zend) • Python (CPython) Hand-written • C/C++ (GCC) • C/C++ (Clang) • C# (Roslyn) • CSS (Chromium) • Go • Java (OpenJDK) • JavaScript (V8) • Julia • Lua • Rust • Swift • TypeScript • PHP (Microsoft) -
Criticisms Parser generator • Ruby (CRuby) • PostgreSQL/MySQL/SQLite • PHP
(Zend) • Python (CPython) Hand-written • C/C++ (GCC) • C/C++ (Clang) • C# (Roslyn) • CSS (Chromium) • Go • Java (OpenJDK) • JavaScript (V8) • Julia • Lua • Rust • Swift • TypeScript • PHP (Microsoft) -
Criticisms “A h a nd-written p a rser requires more
lines of code, it is not a s re a d a ble” 手 書きのパーサーは、より多くのコード 行 を必要とし、可読性に劣る。 -
Criticisms ... but it does not have to be. Now
it is fewer lines than parse.y. …しかし、その必要はない。 今はparse.yより 行 数が少な い。 -
Criticisms “P a rser gener a tors a re b
a sed on computer science. H a nd-written p a rsers a re not.” パーサー・ジェネレーターはコンピュータ科学に基づいている 手 書きのパーサーはそうではありません。 -
Criticisms • Analysis of the Structure of Formula Translators (1961)
• Top Down Operator Precedence (1973) • Evaluating and Improving Recursive Descent Parsers (1979) • Incremental Recursive Descent Parsing (1990) • Compact Recursive-Descent Parsing of Expressions (1985) • Generalised Recursive Descent Parsing and Follow-Determinisms (1998) • Parsing Expressions by Recursive Descent (1999) • Recursive-descent Parsing (2012) -
Status • CRuby → C, optional in 3.3, default in
next 3.4 preview 3.3ではオプション、次期3.4プレビューではデフォルト Ruby implement a tions -
Status • CRuby → C, optional in 3.3, default in
next 3.4 preview 3.3ではオプション、次期3.4プレビューではデフォルト • JRuby → serialization, FFI, Java, and WASM Ruby implement a tions -
Status • CRuby → C, optional in 3.3, default in
next 3.4 preview 3.3ではオプション、次期3.4プレビューではデフォルト • JRuby → serialization, FFI, Java, and WASM • Tru ffl eRuby → serialization, FFI, Java Ruby implement a tions -
Status • CRuby → C, optional in 3.3, default in
next 3.4 preview 3.3ではオプション、次期3.4プレビューではデフォルト • JRuby → serialization, FFI, Java, and WASM • Tru ffl eRuby → serialization, FFI, Java • Natalie → serialization, FFI, C++, Ruby Ruby implement a tions -
Status • CRuby → C, optional in 3.3, default in
next 3.4 preview 3.3ではオプション、次期3.4プレビューではデフォルト • JRuby → serialization, FFI, Java, and WASM • Tru ffl eRuby → serialization, FFI, Java • Natalie → serialization, FFI, C++, Ruby • mruby → experimental Ruby implement a tions -
Status • CRuby → C, optional in 3.3, default in
next 3.4 preview 3.3ではオプション、次期3.4プレビューではデフォルト • JRuby → serialization, FFI, Java, and WASM • Tru ffl eRuby → serialization, FFI, Java • Natalie → serialization, FFI, C++, Ruby • mruby → experimental • PicoRuby → experimental Ruby implement a tions -
Status • CRuby → C, optional in 3.3, default in
next 3.4 preview 3.3ではオプション、次期3.4プレビューではデフォルト • JRuby → serialization, FFI, Java, and WASM • Tru ffl eRuby → serialization, FFI, Java • Natalie → serialization, FFI, C++, Ruby • mruby → experimental • PicoRuby → experimental • Opal → experimental, Ruby, WASM Ruby implement a tions -
Status • CRuby → C, optional in 3.3, default in
next 3.4 preview 3.3ではオプション、次期3.4プレビューではデフォルト • JRuby → serialization, FFI, Java, and WASM • Tru ffl eRuby → serialization, FFI, Java • Natalie → serialization, FFI, C++, Ruby • mruby → experimental • PicoRuby → experimental • Opal → experimental, Ruby, WASM • Garnet → WASM Ruby implement a tions -
Status • minifyrb • packwerk • rbi • rails •
repl_type_completer • rubocop Ruby libr a ries a nd tools • ruby-lsp • sorbet • syntax_suggest • syntax_tree • typeprof -
Status • Involve the community of language developers from the
start 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス • Same or better memory usage 同じかそれ以上のメモリ使 用 量 • Error tolerant 誤差公差 • Portable to other implementations and tools 他の実装やツールへの移植性 • Maintainable 維持可能 Criteri a -
Status • Involve the community of language developers from the
start ✅ 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス • Same or better memory usage 同じかそれ以上のメモリ使 用 量 • Error tolerant 誤差公差 • Portable to other implementations and tools 他の実装やツールへの移植性 • Maintainable 維持可能 Criteri a -
Status • Involve the community of language developers from the
start ✅ 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス ✅ • Same or better memory usage 同じかそれ以上のメモリ使 用 量 • Error tolerant 誤差公差 • Portable to other implementations and tools 他の実装やツールへの移植性 • Maintainable 維持可能 Criteri a -
Status • Involve the community of language developers from the
start ✅ 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス ✅ • Same or better memory usage 同じかそれ以上のメモリ使 用 量 ✅ • Error tolerant 誤差公差 • Portable to other implementations and tools 他の実装やツールへの移植性 • Maintainable 維持可能 Criteri a -
Status • Involve the community of language developers from the
start ✅ 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス ✅ • Same or better memory usage 同じかそれ以上のメモリ使 用 量 ✅ • Error tolerant 誤差公差 ✅ • Portable to other implementations and tools 他の実装やツールへの移植性 • Maintainable 維持可能 Criteri a -
Status • Involve the community of language developers from the
start ✅ 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス ✅ • Same or better memory usage 同じかそれ以上のメモリ使 用 量 ✅ • Error tolerant 誤差公差 ✅ • Portable to other implementations and tools 他の実装やツールへの移植性 ✅ • Maintainable 維持可能 Criteri a -
Status • Involve the community of language developers from the
start ✅ 言 語開発者のコミュニティを最初から巻き込む • Same or better performance 同等以上のパフォーマンス ✅ • Same or better memory usage 同じかそれ以上のメモリ使 用 量 ✅ • Error tolerant 誤差公差 ✅ • Portable to other implementations and tools 他の実装やツールへの移植性 ✅ • Maintainable 維持可能 ✅ Criteri a -
It will be a very large amount of work to
reimplement Prism internals. Prismの内部を再実装するのは、 非 常に膨 大 な作業になるだろう。 -
If we work together on Prism, we could have the
best possible parser and compiler. Prismで協 力 し合えば、 最 高 のパーサーとコンパイラができるだろう。