Start...End time | TrackGrand Auditorium | TrackMiddle Auditorium |
---|---|---|
01:50 - 03:00 UTC |
Lang: ja
Track: TrackGrand Auditorium
Ruby meets WebAssemblyWebAssembly (Wasm) is a binary format for programs written in any language, designed to eventually run everywhere without changes, mainly inside Web browsers. Wasm is now used beyond the Web, from edge computing to smart contracts in blockchain. Now CRuby can be compiled to WebAssembly, which can be run in web browsers and many non-web environments with WASI. This talk will give you how we got there, techniques, and its use cases. |
|
04:30 - 05:00 UTC |
Lang: ja
Track: TrackGrand Auditorium
Making *MaNy* threads on RubyWe will introduce *MaNy* project: supports massive number of threads on Ruby. Concurrent mchanism (threads, processes, etc.) is an important language feature especially for multiple network connections. Ruby supports Ractor/Thread/Fiber for concurrency. However making many Threads (and Ractors) introduce huge overhead. Fiber scheduler was introduced for this purpose but it has some limitations. On the other languages, for example, Go language supports goroutine. They can make many goroutines and they can run concurrently or in parallel. Other languages (Erlang, Rust, ...) also support similar features. They use a well-known technique called M:N threading. In short, M:N threading supports many M threads on N (enough small number) system threads. *MaNy* project introduces M:N threading into Ruby. In this talk, we will show the background and progress of *MaNy* project. Because we are replacing the threading mechanism of current Ruby, we can share some details about it. |
Lang: en
Track: TrackMiddle Auditorium
Ruby Archaeology: Forgotten web frameworks### In the 2000's everyone was writing a Ruby web framework **Today, it seems, we are all too content to focus our energy on a small number of large Ruby web projects**. What happened to our creative spirit? In this talk we will focus on old Ruby web frameworks that have long gone by the wayside. I won't spoil the frameworks here, but I can tell you what we _won't_ be covering: * Sinatra * Hanami * Camping.rb * roda * grape * merb We will answer questions like: * Why are fewer people experimenting with their own frameworks today? * What features, idioms and ideas are worth exploring? * Are any of these frameworks worth reviving or copying? |
05:10 - 05:40 UTC |
Lang: en
Track: TrackGrand Auditorium
Building a Lightweight IR and Backend for YJITLast year, the YJIT compiler was upstreamed into CRuby and released as part of Ruby 3.1. Key advantages of YJIT are that it delivers fast warm up time and significant speedup on typical Ruby workloads such as Rails applications. However, up to this point, YJIT has only been available on x86-64 platforms. This year, our goal is to transition from an experimental compiler towards something more broadly usable and future-proof. In order to make YJIT available on more platforms, we are currently working on the implementation of a new Intermediate Representation (IR) and backend for the compiler. This will make it possible for YJIT to run natively on the Apple M1/M2, AWS Graviton processors and the Raspberry Pi. This talk will cover our objectives and constraints, the design of our new IR, the strategy we took to be able to support both x86-64 and ARM CPUs, the challenges we encountered, how we plan to optimize the quality of the generated machine code, and early performance results. |
Lang: ja
Track: TrackMiddle Auditorium
Types teaches success, what will we do?Are there “Types" of Ruby in the project you are involved with? Starting with Ruby 3.0, RBS and Steep are bundled, and Ruby now has static Types. Unfortunately, many projects have not yet introduced Types, I think. One reason for this is the lack of gem Types used in many projects. In this talk, I propose a contribution to `gem_rbs_collection` as one of the things we can do to promote the Type Ecosystem in Ruby. I'll walk you step by step through the process of contributing to `gem_rbs_collection` so that you can commit without hesitation when the opportunity arises. If more Rubyists become interested in gem_rbs_collection as a result of this talk, it is expected to accelerate the spread of the Type ecosystem. |
05:50 - 06:20 UTC |
Lang: ja
Track: TrackGrand Auditorium
Tools for Providing rich user experience in debuggerruby/debug is one of the very active projects, and many users use it. Also, there are some hidden valuable features to enhance your development experience. This talk dives into Chrome integration and History Viewer within them. Chrome integration: Debugging with Chrome DevTools is the one of popular ways, especially in JavaScript. The advantages of Chrome DevTools are easy setup and a rich user experience. You don't have to install any tools except for Chrome. History Viewer: What do you do when you want to step back to the specified line? History Viewer can help you in the situation. History Viewer, which extends stepping back, is the feature in VSCode extension for ruby/debug. You can go back to the location without thinking about how many times "step back" commands are needed. In this talk, I will introduce how to use them and how they work, such as how to communicate between ruby/debug and Chrome DevTools. |
Lang: en
Track: TrackMiddle Auditorium
Adding Type Signatures into Ruby DocsSince Ruby's beginnings, its documentation has been maintained by people who help and support the language. Before the core team releases a new version of Ruby, contributors must update the documentation to reflect the current set of functionality, which presents many challenges to remaining consistent over Ruby's long history. One method may describe a set of arguments and the types one way, but another may tell them differently. Ruby 3 gained a highly requested feature, Type Annotations! A way to describe the structure of your Ruby Programs. In this talk, we'll look at improving Ruby's documentation by leveraging Ruby's Type Signatures to provide users with more accurate and consistent documentation. |
06:50 - 07:20 UTC |
Lang: en
Track: TrackGrand Auditorium
Towards Ruby 4 JITFrom Ruby 3.1, we started to see CRuby's JIT compilers optimize real-world applications like Rails. However, you might be still wondering whether you should run it on production or not, given the fact that we're only seeing the beginning of the improvement. How far can we go in the foreseeable future? What would the impact on your production application look like? Let's talk about that together. |
Lang: ja
Track: TrackMiddle Auditorium
ZRouter.org with mrubyZRouter.org build tool for FreeBSD system. I use mruby on FreeBSD built by ZRouter.org. This is very powerful environment for small modules. |
07:30 - 08:40 UTC |
Lang: ja
Track: TrackGrand Auditorium
TRICK 2022 (Returns)After four years, the programming contest comes back. |
01:50 - 03:00
WebAssembly (Wasm) is a binary format for programs written in any language, designed to eventually run everywhere without changes, mainly inside Web browsers. Wasm is now used beyond the Web, from edge computing to smart contracts in blockchain. Now CRuby can be compiled to WebAssembly, which can be run in web browsers and many non-web environments with WASI. This talk will give you how we got there, techniques, and its use cases.
04:30 - 05:00
We will introduce *MaNy* project: supports massive number of threads on Ruby. Concurrent mchanism (threads, processes, etc.) is an important language feature especially for multiple network connections. Ruby supports Ractor/Thread/Fiber for concurrency. However making many Threads (and Ractors) introduce huge overhead. Fiber scheduler was introduced for this purpose but it has some limitations. On the other languages, for example, Go language supports goroutine. They can make many goroutines and they can run concurrently or in parallel. Other languages (Erlang, Rust, ...) also support similar features. They use a well-known technique called M:N threading. In short, M:N threading supports many M threads on N (enough small number) system threads. *MaNy* project introduces M:N threading into Ruby. In this talk, we will show the background and progress of *MaNy* project. Because we are replacing the threading mechanism of current Ruby, we can share some details about it.
### In the 2000's everyone was writing a Ruby web framework **Today, it seems, we are all too content to focus our energy on a small number of large Ruby web projects**. What happened to our creative spirit? In this talk we will focus on old Ruby web frameworks that have long gone by the wayside. I won't spoil the frameworks here, but I can tell you what we _won't_ be covering: * Sinatra * Hanami * Camping.rb * roda * grape * merb We will answer questions like: * Why are fewer people experimenting with their own frameworks today? * What features, idioms and ideas are worth exploring? * Are any of these frameworks worth reviving or copying?
05:10 - 05:40
Last year, the YJIT compiler was upstreamed into CRuby and released as part of Ruby 3.1. Key advantages of YJIT are that it delivers fast warm up time and significant speedup on typical Ruby workloads such as Rails applications. However, up to this point, YJIT has only been available on x86-64 platforms. This year, our goal is to transition from an experimental compiler towards something more broadly usable and future-proof. In order to make YJIT available on more platforms, we are currently working on the implementation of a new Intermediate Representation (IR) and backend for the compiler. This will make it possible for YJIT to run natively on the Apple M1/M2, AWS Graviton processors and the Raspberry Pi. This talk will cover our objectives and constraints, the design of our new IR, the strategy we took to be able to support both x86-64 and ARM CPUs, the challenges we encountered, how we plan to optimize the quality of the generated machine code, and early performance results.
Are there “Types" of Ruby in the project you are involved with? Starting with Ruby 3.0, RBS and Steep are bundled, and Ruby now has static Types. Unfortunately, many projects have not yet introduced Types, I think. One reason for this is the lack of gem Types used in many projects. In this talk, I propose a contribution to `gem_rbs_collection` as one of the things we can do to promote the Type Ecosystem in Ruby. I'll walk you step by step through the process of contributing to `gem_rbs_collection` so that you can commit without hesitation when the opportunity arises. If more Rubyists become interested in gem_rbs_collection as a result of this talk, it is expected to accelerate the spread of the Type ecosystem.
05:50 - 06:20
ruby/debug is one of the very active projects, and many users use it. Also, there are some hidden valuable features to enhance your development experience. This talk dives into Chrome integration and History Viewer within them. Chrome integration: Debugging with Chrome DevTools is the one of popular ways, especially in JavaScript. The advantages of Chrome DevTools are easy setup and a rich user experience. You don't have to install any tools except for Chrome. History Viewer: What do you do when you want to step back to the specified line? History Viewer can help you in the situation. History Viewer, which extends stepping back, is the feature in VSCode extension for ruby/debug. You can go back to the location without thinking about how many times "step back" commands are needed. In this talk, I will introduce how to use them and how they work, such as how to communicate between ruby/debug and Chrome DevTools.
Since Ruby's beginnings, its documentation has been maintained by people who help and support the language. Before the core team releases a new version of Ruby, contributors must update the documentation to reflect the current set of functionality, which presents many challenges to remaining consistent over Ruby's long history. One method may describe a set of arguments and the types one way, but another may tell them differently. Ruby 3 gained a highly requested feature, Type Annotations! A way to describe the structure of your Ruby Programs. In this talk, we'll look at improving Ruby's documentation by leveraging Ruby's Type Signatures to provide users with more accurate and consistent documentation.
06:50 - 07:20
From Ruby 3.1, we started to see CRuby's JIT compilers optimize real-world applications like Rails. However, you might be still wondering whether you should run it on production or not, given the fact that we're only seeing the beginning of the improvement. How far can we go in the foreseeable future? What would the impact on your production application look like? Let's talk about that together.
ZRouter.org build tool for FreeBSD system. I use mruby on FreeBSD built by ZRouter.org. This is very powerful environment for small modules.
07:30 - 08:40
After four years, the programming contest comes back.
Start...End time | TrackGrand Auditorium | TrackMiddle Auditorium |
---|---|---|
00:30 - 01:40 UTC |
|
|
01:50 - 02:20 UTC |
Lang: en
Track: TrackGrand Auditorium
Ruby debugger - The best investment for your productivityIn this talk, I want to show you how adopting the Ruby debugger (`ruby/debug`) can be the single best thing to improve your productivity. It will include: - The difference between puts debugging, REPL (`Pry`/`IRB`) debugging and debugger debugging - Comparison with byebug - How you can use debugger to achieve even better puts and REPL debugging result: - Replace REPL debugging with breakpoint commands - Replace puts debugging with tracing and context commands - Automate debugging steps with `do:` and `pre:` options - Remote debugging capability - The debugging tooling spectrum and when you should **not** use the debugger |
Lang: ja
Track: TrackMiddle Auditorium
Do Pure Ruby Dream of Encrypted Binary Protocol?A. There is a harsh reality. To implement QUIC, it is necessary to read and write data bit by bit. Furthermore, the data must be encrypted, so proper encryption and decryption must be performed. Programming languages such as C or Rust are suited for such operations. What are the difficulties in implementing such a protocol in Ruby? |
02:30 - 03:00 UTC |
Lang: en
Track: TrackGrand Auditorium
Implementing Object Shapes in CRubyObject Shapes are a technique for representing properties of an object that can increase cache hits in instance variable lookups, decrease runtime checks, and improve JIT performance. In this talk, we'll learn all about the CRuby implementaion of Object Shapes, including how they work, why implement them, and interesting implementation details. |
Lang: ja
Track: TrackMiddle Auditorium
Make RuboCop super fastRuboCop introduces the new server options for super fast mode. RuboCop 2.0 has the catchphrase RuboCop 2x2, like Ruby 3x3. the server mode is a big move towards that. This is perfect for the current era where quick feedback to developer is required, especially when interacting with text editors and IDEs. Through the design and implementation of server options, you will get the essence of how fast RuboCop works. |
04:30 - 05:00 UTC |
Lang: ja
Track: TrackGrand Auditorium
Method-based JIT compilation by transpiling to JuliaI will demonstrate a new approach to the method-based Just-In-Time compilation for Ruby. This is used Julia language as an infrastructure of the JIT compilation. I will describe the characteristics of this approach and show you some example results. |
Lang: en
Track: TrackMiddle Auditorium
Ruby x BPF in Action: How important observability isDo you like to measure your code? When it comes to applications that you write mainly in Ruby, there are powerful observability tools such as stackprof, but what about observability outside the Ruby world such as C, C++ and Rust? BPF will be perfect for solving those problems. So, what is BPF? BPF is one of the emerging technologies for Linux. The talk focuses on what the BPF is for the audiences who are new to BPF. I will give a brief history and basic concepts at first. And I will also illustrate its strong points and restrictions compared to existing tools (e.g. strace or perf); The talk will also cover the relationship between the various tools related to BPF (you might have heard of BCC, bpftrace, RbBCC, Rucy, etc.). In addition, I will give examples of BPF use cases applied for smaller or PoC Ruby applications. Finally, practical performance measurement and tuning cases using BPF based on several Rust-based Rubygems (owned by the author) will be introduced. |
05:10 - 05:40 UTC |
Lang: en
Track: TrackGrand Auditorium
Heaping on the complexity! An adventure in GC CompactionRecently some changes were made to the way Ruby stores objects of different sizes in memory. These changes impacted the way that the compaction handles fragmented memory inside the Ruby garbage collector. In this talk I'll introduce the concepts of memory fragmentation and compacting GC's and discuss how Ruby implements compaction. I'll explore the consequences of the recent memory changes and take you on the journey I went on to explore some potential solutions, as well as the approach I eventually settled on. Along the way we'll see some techniques to inspect Ruby's memory and introduce a tool I built, heapviz, that visualises the Ruby object space, allowing us to see the effect of compaction. |
Lang: ja
Track: TrackMiddle Auditorium
How fast really is Ruby 3.x?Ruby 3 brings novel improvements such as YJIT and Ractor, but the extent to which these techniques can speed up real applications is unknown. Performance claims should not be accepted solely based on abstract theories or micro benchmarks, but by the supporting evidence from actual applications. We recently ported a large-scale, open-source Ruby application (Fluentd) to Ruby 3, and conducted a survey to obtain an estimate of the speed improvements over Ruby 2.x. This talk will explain and discuss the results. |
05:50 - 06:20 UTC |
Lang: en
Track: TrackGrand Auditorium
Hunting Production Memory Leaks with Heap SamplingExisting Ruby tooling is quite helpful when investigating memory leaks if and when we can reproduce them on our development machine or staging environment. But what about those cases when the memory leak only really shows up in Production? Perhaps over a long time period? In this talk, we introduce the `ruby_memprofiler_pprof` heap profiling gem, showing how low-overhead heap sampling can be implemented and used to investigate memory leaks in production. We also discuss early production wins when using this technique at Zendesk. |
Lang: ja
Track: TrackMiddle Auditorium
Packet analysis with mruby on Wireshark - dRuby as exampleWireshark is a very popular network traffic analyzer that supports not only many popular network protocols, but also custom protocols by adding an extension plugin called "dissector".' Currently, Wireshark provides APIs to develop dissectors in Lua and C only. It’s a little disappointing for us Rubyists, we cannot write Ruby for developing Wireshark dissectors. So I have created an extension for Wireshark that makes it possible to easily add dissector by writing a configuration file via Ruby DSL, allowing you to analyze any protocols. It is accomplished by embedding mruby into Wireshark and wrapping Wireshark’s C API with Ruby. This presentation will show its usage and implementation, and as an example, how to analyze dRuby (familiar to all Rubyists!) packets. |
06:50 - 07:20 UTC |
Lang: en
Track: TrackGrand Auditorium
Caching With MessagePackAn object cache is like magic: put an object into the box and it comes back later, exactly as it went in. The magic is seductive because it makes things so easy. It only takes a bit of thought, however, to see the dangers of this trick. Class names can change; a method can return a different result. Objects exist in a universe, and that universe is constantly evolving. Marshal, Ruby's default binary serialization library, does not handle changes like this gracefully. We discovered this recently when a code change collided with a cached class, leading to a fire in production. To avoid incidents like this, we switched the cache serializer in our core Rails monolith from Marshal to MessagePack, an alternative, generic binary serializer. MessagePack has a more compact format than Marshal, with stricter typing and less magic. In this talk, I'll crack open MessagePack to show how it works, how we migrated to it, and why you might want to do the same. |
Lang: ja
Track: TrackMiddle Auditorium
Create my own search engine.What do you do after reading the search engine textbook? In this talk, I will explain about the creation of my own search engine. I needed a search engine for Pokemon TCG decks. I will explain the implementation of this search engine and the technique of operation on Heroku. |
07:30 - 08:40 UTC |
Lang: ja
Track: TrackGrand Auditorium
Ruby Committers vs The WorldRuby core committers on stage! |
00:30 - 01:40
01:50 - 02:20
In this talk, I want to show you how adopting the Ruby debugger (`ruby/debug`) can be the single best thing to improve your productivity. It will include: - The difference between puts debugging, REPL (`Pry`/`IRB`) debugging and debugger debugging - Comparison with byebug - How you can use debugger to achieve even better puts and REPL debugging result: - Replace REPL debugging with breakpoint commands - Replace puts debugging with tracing and context commands - Automate debugging steps with `do:` and `pre:` options - Remote debugging capability - The debugging tooling spectrum and when you should **not** use the debugger
A. There is a harsh reality. To implement QUIC, it is necessary to read and write data bit by bit. Furthermore, the data must be encrypted, so proper encryption and decryption must be performed. Programming languages such as C or Rust are suited for such operations. What are the difficulties in implementing such a protocol in Ruby?
02:30 - 03:00
Object Shapes are a technique for representing properties of an object that can increase cache hits in instance variable lookups, decrease runtime checks, and improve JIT performance. In this talk, we'll learn all about the CRuby implementaion of Object Shapes, including how they work, why implement them, and interesting implementation details.
RuboCop introduces the new server options for super fast mode. RuboCop 2.0 has the catchphrase RuboCop 2x2, like Ruby 3x3. the server mode is a big move towards that. This is perfect for the current era where quick feedback to developer is required, especially when interacting with text editors and IDEs. Through the design and implementation of server options, you will get the essence of how fast RuboCop works.
04:30 - 05:00
I will demonstrate a new approach to the method-based Just-In-Time compilation for Ruby. This is used Julia language as an infrastructure of the JIT compilation. I will describe the characteristics of this approach and show you some example results.
Do you like to measure your code? When it comes to applications that you write mainly in Ruby, there are powerful observability tools such as stackprof, but what about observability outside the Ruby world such as C, C++ and Rust? BPF will be perfect for solving those problems. So, what is BPF? BPF is one of the emerging technologies for Linux. The talk focuses on what the BPF is for the audiences who are new to BPF. I will give a brief history and basic concepts at first. And I will also illustrate its strong points and restrictions compared to existing tools (e.g. strace or perf); The talk will also cover the relationship between the various tools related to BPF (you might have heard of BCC, bpftrace, RbBCC, Rucy, etc.). In addition, I will give examples of BPF use cases applied for smaller or PoC Ruby applications. Finally, practical performance measurement and tuning cases using BPF based on several Rust-based Rubygems (owned by the author) will be introduced.
05:10 - 05:40
Recently some changes were made to the way Ruby stores objects of different sizes in memory. These changes impacted the way that the compaction handles fragmented memory inside the Ruby garbage collector. In this talk I'll introduce the concepts of memory fragmentation and compacting GC's and discuss how Ruby implements compaction. I'll explore the consequences of the recent memory changes and take you on the journey I went on to explore some potential solutions, as well as the approach I eventually settled on. Along the way we'll see some techniques to inspect Ruby's memory and introduce a tool I built, heapviz, that visualises the Ruby object space, allowing us to see the effect of compaction.
Ruby 3 brings novel improvements such as YJIT and Ractor, but the extent to which these techniques can speed up real applications is unknown. Performance claims should not be accepted solely based on abstract theories or micro benchmarks, but by the supporting evidence from actual applications. We recently ported a large-scale, open-source Ruby application (Fluentd) to Ruby 3, and conducted a survey to obtain an estimate of the speed improvements over Ruby 2.x. This talk will explain and discuss the results.
05:50 - 06:20
Existing Ruby tooling is quite helpful when investigating memory leaks if and when we can reproduce them on our development machine or staging environment. But what about those cases when the memory leak only really shows up in Production? Perhaps over a long time period? In this talk, we introduce the `ruby_memprofiler_pprof` heap profiling gem, showing how low-overhead heap sampling can be implemented and used to investigate memory leaks in production. We also discuss early production wins when using this technique at Zendesk.
Wireshark is a very popular network traffic analyzer that supports not only many popular network protocols, but also custom protocols by adding an extension plugin called "dissector".' Currently, Wireshark provides APIs to develop dissectors in Lua and C only. It’s a little disappointing for us Rubyists, we cannot write Ruby for developing Wireshark dissectors. So I have created an extension for Wireshark that makes it possible to easily add dissector by writing a configuration file via Ruby DSL, allowing you to analyze any protocols. It is accomplished by embedding mruby into Wireshark and wrapping Wireshark’s C API with Ruby. This presentation will show its usage and implementation, and as an example, how to analyze dRuby (familiar to all Rubyists!) packets.
06:50 - 07:20
An object cache is like magic: put an object into the box and it comes back later, exactly as it went in. The magic is seductive because it makes things so easy. It only takes a bit of thought, however, to see the dangers of this trick. Class names can change; a method can return a different result. Objects exist in a universe, and that universe is constantly evolving. Marshal, Ruby's default binary serialization library, does not handle changes like this gracefully. We discovered this recently when a code change collided with a cached class, leading to a fire in production. To avoid incidents like this, we switched the cache serializer in our core Rails monolith from Marshal to MessagePack, an alternative, generic binary serializer. MessagePack has a more compact format than Marshal, with stricter typing and less magic. In this talk, I'll crack open MessagePack to show how it works, how we migrated to it, and why you might want to do the same.
What do you do after reading the search engine textbook? In this talk, I will explain about the creation of my own search engine. I needed a search engine for Pokemon TCG decks. I will explain the implementation of this search engine and the technique of operation on Heroku.
07:30 - 08:40
Ruby core committers on stage!
Start...End time | TrackGrand Auditorium | TrackMiddle Auditorium |
---|---|---|
00:30 - 01:00 UTC |
Lang: ja
Track: TrackGrand Auditorium
error_highlight: user-friendly error diagnosticsRuby 3.1 has introduced a gem called "error_highlight", which shows a code snippet with an underline to spot where `NameError` or `NoMethodError` was raised. ``` $ ruby test.rb test.rb:1:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError) json[:foo][:bar] ^^^^^^ ``` We will talk about the design and implementation of error_highlight: how it works, why and how we designed it, how we resolved the difficulties we faced during implementation, and the feedback we received. This feature goes further in Ruby 3.2: more error support other than `NameError`/`NoMethodError` and more fine-grained error spotting. We also redesigned its backend by introducing a new API, `Exception#detailed_message`, which allows us to enhance error messages with fewer incompatibilities. In fact, it allowed simple integration with other error message extensions such as did_you_mean and dead_end. We will also talk about what we would like users to help us with to make error_highlight better. |
Lang: en
Track: TrackMiddle Auditorium
Megaruby - Running mruby/c programs on Sega Mega DriveHave you heard of Sega Mega Drive? It was a very popular video gaming platform back in the 80s and 90s, and now you can run programs on it written in Ruby! I have been working on porting mruby/c to Mega Drive. It now works well enough to run a simple game and I have developed one. I would like to share with you what has been done so far, what I would like to do next, how you can also develop your Mega Drive game with Ruby, and why we should program on platforms like Mega Drive. This will also include a live demo on a Mega Drive unit (or compatible hardware). |
01:10 - 01:40 UTC |
Lang: en
Track: TrackGrand Auditorium
Syntax TreeSyntax Tree is a new toolkit for interacting with the Ruby parse tree. It can be used to analyze, inspect, debug, and format your Ruby code. In this talk we'll walk through how it works, how to use it in your own applications, and the exciting future possibilities enabled by Syntax Tree. |
Lang: ja
Track: TrackMiddle Auditorium
RBS generation framework using Rack architectureFor a happy programming experience, type support is a very effective approach. However, type information is still far from sufficient. RBS definition is labor intensive. I have worked on RBS definitions for several libraries and applications. From my experience, I have found that different libraries and applications have very different needs for RBS generation. Therefore, I am developing a code generation framework for RBS. By writing code generation scripts using this framework, you can automate RBS generation as much as possible in accordance with Ruby code updates. You can use the Rack architecture to combine your preferred features to meet a variety of needs. In addition, you can test your own extensions on the fly or publish them as extension gems. This talk will present the progress of the project, implementation details, as well as the usefulness of the Rack architecture in one-shot scripting. |
01:50 - 02:20 UTC |
Lang: en
Track: TrackGrand Auditorium
Real World Applications with the Ruby Fiber SchedulerRuby 3 introduced the fiber scheduler which provides transparent context switching between fibers when they perform blocking operations. With minimal changes, web applications can take advantage of the fiber scheduler to improve performance and unlock new techniques for application design and interactivity. We discuss the current state of the fiber scheduler design, its usage in several real world applications, and how you can take advantage of it in your own projects. |
Lang: ja
Track: TrackMiddle Auditorium
Let's collect type info during Ruby running and automaticallCurrently, Ruby is introducing RBS, which defines type information, and developing TypeProf, which statically analyzes Ruby code to extract type information, as efforts to improve the Developer Experience. So I am working on a different approach than TypeProf, using `TracePoint` to collect information on method calls when Ruby code is executed and generate RBS files based on that information. I will explain the advantages and disadvantages of this approach compared to TypeProf, as well as how I achieved it. Let's use this session as an opportunity to get more people interested in RBS and work together to improve the future Ruby Developer Experience! |
02:30 - 03:00 UTC |
Lang: en
Track: TrackGrand Auditorium
A Faster CRuby interpreter with dynamically specialized IRA new CRuby internal representation (IR) dynamically specialized during execution will be presented. The major specialization includes generation of * Hybrid stack-RTL instructions * Type specialized instructions using basic block versioning technique * Speculatively specialized instructions based on profile-based information Deoptimization technique of speculatively specialized instructions when the original assumptions become wrong will be also discussed. Using specialized IR can significantly speed up the interpretation and can permit generation of effective JIT code with static compilers like MIR or GCC. The new IR can be also used to implement Ruby specific optimizations, e.g. inlining. Performance comparison of CRuby interpreter with the specialized IR, the current CRuby interpreter, YJIT, and MJIT will be given for some benchmarks. |
Lang: ja
Track: TrackMiddle Auditorium
Why is building the Ruby environment hard?The Rubyists are facing the build error with missing libraries like openssl, libyaml and libffi issues when they install the new versions every year. Other people are facing issues of nokogiri, rmagick and others when they develop Rails application. Why we got these issues everyday? I describe the build failure case and their solution from the ruby-build maintainer's point of view. Finally, I introduce the plan for the imcompatible changes about build process in Ruby 3.2 and Rust support of next version of RubyGems. |
04:30 - 05:00 UTC |
Lang: en
Track: TrackGrand Auditorium
Automatically Find Memory Leaks in Native GemsRuby apps are known to leak memory which causes performance degradation. This eventually results in the system running out of memory and killing the Ruby process. Often, this is caused by a buggy native gem that forgot to clean up unused memory. It's time to fix this problem. Introducing ruby_memcheck, a gem that automatically finds memory leaks in native gems, powered by Valgrind Memcheck. In this talk, we'll discuss memory leaks, the Valgrind Memcheck tool, and how ruby_memcheck works. |
Lang: ja
Track: TrackMiddle Auditorium
The Better RuboCop World to enjoy RubyTools like RuboCop are very useful. I am very grateful for contributors. I think it's really helpful to keep our code clean and consistent. However, sometimes I feel there is a gap between 'Cop' culture and Ruby culture. In general, 'Cop' restricts our rights though Ruby gives freedom to us. I understand we have right not to use RuboCop or disable some Cops. But it is not very easy in reality, especially for Ruby beginners in their teams. To make them happier, experts would be able to set up config perfectly. But again, it is not very easy in reality. As a result, even though there is no evil, in some case people wrongfully make detour and give up their creativeness to keep CI green. It's a pity, isn't it? In this talk, I introduce my thoughts on RubyCop and programming and some idea of a bit better RuboCop world, with lower risk to damage productivity and to misguide beginners. |
05:10 - 05:40 UTC |
Lang: ja
Track: TrackGrand Auditorium
Fast data processing with Ruby and Apache ArrowI introduced Ruby and Apache Arrow integration including the "super fast large data interchange and processing" Apache Arrow feature at [RubyKaigi Takeout 2021](https://rubykaigi.org/2021-takeout/presentations/ktou.html). This talk introduces how we can use the "super fast large data interchange and processing" Apache Arrow feature in Ruby. Here are some use cases: * Fast data retrieval (fast `pluck`) from DB such as MySQL and PostgreSQL for batch processes in a Ruby on Rails application * Fast data interchange with JavaScript for dynamic visualization in a Ruby on Rails application * Fast OLAP with in-process DB such as DuckDB and Apache Arrow DataFusion in a Ruby on Rails application or irb session |
Lang: en
Track: TrackMiddle Auditorium
Ethereum for RubyThis talk will cover the use of Ruby libraries that interact with the Ethereum blockchain and their implementation. You will get an overview of the Ethereum ecosystem, how blockchain transactions work, how signatures work, and learn how to use eth.rb. How it is implemented in Ruby code will also be explained. Lets create a web application that connects to the blockchain together. |
05:50 - 06:20 UTC |
Lang: en
Track: TrackGrand Auditorium
Fixing Assignment Evaluation OrderFor a long time, Ruby's assignment evaluation order was inconsistent. Normal assignment would evaluate the left hand side before the right hand side, but multiple assignment and constant assignment would evaluate the right hand side first. This issue was known since before the release of Ruby 1.9.3, but it was considered difficult to fix. Come learn how we fixed evaluation order for multiple assignment in Ruby 3.1, and evaluation order for constant assignment in Ruby 3.2. |
Lang: ja
Track: TrackMiddle Auditorium
String Meets EncodingRuby's String has Encoding, which allows for very flexible character encoding. What is the trade-off for that flexibility? I recently looked at the bottleneck in CSV.read and found that in one file with Encoding CP932, 30% of the processing time was spent on String#split. From the perspective of optimizing String#split, we will explain the relationship between String and Encoding in Ruby, how String knows its own Encoding, and which process is the bottleneck. Then we will discuss approaches toward faster encoding. |
06:50 - 07:20 UTC |
Lang: en
Track: TrackGrand Auditorium
Ruby programming with types in actionI have been developing Steep, a static type checker for Ruby, for more than five years. Let's see how it transforms an editor into an IDE and how the Ruby programming experience changes with it. This session includes a live coding using Steep. It will start with writing the RBS type definitions, then demonstrate Ruby coding with IDE assistance, and finally refactor the code. This is how I write new Ruby code and will show the benefits of using Steep. |
Lang: ja
Track: TrackMiddle Auditorium
History of Japanese Ruby reference manual, and futureI will talk about history of Japanese reference manual and future plans. Contributing to current Japanese Ruby reference manual (rurema) is harder than other projects. Because current document format (based on RD) is not familiar to recent Ruby users, and there are a few documents for new contributors. So I will explain historical reasons and how to improve systems for new contributors. |
07:30 - 08:40 UTC |
Lang: en
Track: TrackGrand Auditorium
Stories from developing YJITYJIT is CRuby's second just-in-time compiler first released with Ruby 3.1.0. Much sweat and tears were shed during YJIT's development. What are the performance goals of YJIT and how are we going for them? How do CPUs react to YJIT's output? What is it like to retrofit a JIT compiler into a runtime system with a long history? Why is Rust involved now? |
00:30 - 01:00
Ruby 3.1 has introduced a gem called "error_highlight", which shows a code snippet with an underline to spot where `NameError` or `NoMethodError` was raised. ``` $ ruby test.rb test.rb:1:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError) json[:foo][:bar] ^^^^^^ ``` We will talk about the design and implementation of error_highlight: how it works, why and how we designed it, how we resolved the difficulties we faced during implementation, and the feedback we received. This feature goes further in Ruby 3.2: more error support other than `NameError`/`NoMethodError` and more fine-grained error spotting. We also redesigned its backend by introducing a new API, `Exception#detailed_message`, which allows us to enhance error messages with fewer incompatibilities. In fact, it allowed simple integration with other error message extensions such as did_you_mean and dead_end. We will also talk about what we would like users to help us with to make error_highlight better.
Have you heard of Sega Mega Drive? It was a very popular video gaming platform back in the 80s and 90s, and now you can run programs on it written in Ruby! I have been working on porting mruby/c to Mega Drive. It now works well enough to run a simple game and I have developed one. I would like to share with you what has been done so far, what I would like to do next, how you can also develop your Mega Drive game with Ruby, and why we should program on platforms like Mega Drive. This will also include a live demo on a Mega Drive unit (or compatible hardware).
01:10 - 01:40
Syntax Tree is a new toolkit for interacting with the Ruby parse tree. It can be used to analyze, inspect, debug, and format your Ruby code. In this talk we'll walk through how it works, how to use it in your own applications, and the exciting future possibilities enabled by Syntax Tree.
For a happy programming experience, type support is a very effective approach. However, type information is still far from sufficient. RBS definition is labor intensive. I have worked on RBS definitions for several libraries and applications. From my experience, I have found that different libraries and applications have very different needs for RBS generation. Therefore, I am developing a code generation framework for RBS. By writing code generation scripts using this framework, you can automate RBS generation as much as possible in accordance with Ruby code updates. You can use the Rack architecture to combine your preferred features to meet a variety of needs. In addition, you can test your own extensions on the fly or publish them as extension gems. This talk will present the progress of the project, implementation details, as well as the usefulness of the Rack architecture in one-shot scripting.
01:50 - 02:20
Ruby 3 introduced the fiber scheduler which provides transparent context switching between fibers when they perform blocking operations. With minimal changes, web applications can take advantage of the fiber scheduler to improve performance and unlock new techniques for application design and interactivity. We discuss the current state of the fiber scheduler design, its usage in several real world applications, and how you can take advantage of it in your own projects.
Currently, Ruby is introducing RBS, which defines type information, and developing TypeProf, which statically analyzes Ruby code to extract type information, as efforts to improve the Developer Experience. So I am working on a different approach than TypeProf, using `TracePoint` to collect information on method calls when Ruby code is executed and generate RBS files based on that information. I will explain the advantages and disadvantages of this approach compared to TypeProf, as well as how I achieved it. Let's use this session as an opportunity to get more people interested in RBS and work together to improve the future Ruby Developer Experience!
02:30 - 03:00
A new CRuby internal representation (IR) dynamically specialized during execution will be presented. The major specialization includes generation of * Hybrid stack-RTL instructions * Type specialized instructions using basic block versioning technique * Speculatively specialized instructions based on profile-based information Deoptimization technique of speculatively specialized instructions when the original assumptions become wrong will be also discussed. Using specialized IR can significantly speed up the interpretation and can permit generation of effective JIT code with static compilers like MIR or GCC. The new IR can be also used to implement Ruby specific optimizations, e.g. inlining. Performance comparison of CRuby interpreter with the specialized IR, the current CRuby interpreter, YJIT, and MJIT will be given for some benchmarks.
The Rubyists are facing the build error with missing libraries like openssl, libyaml and libffi issues when they install the new versions every year. Other people are facing issues of nokogiri, rmagick and others when they develop Rails application. Why we got these issues everyday? I describe the build failure case and their solution from the ruby-build maintainer's point of view. Finally, I introduce the plan for the imcompatible changes about build process in Ruby 3.2 and Rust support of next version of RubyGems.
04:30 - 05:00
Ruby apps are known to leak memory which causes performance degradation. This eventually results in the system running out of memory and killing the Ruby process. Often, this is caused by a buggy native gem that forgot to clean up unused memory. It's time to fix this problem. Introducing ruby_memcheck, a gem that automatically finds memory leaks in native gems, powered by Valgrind Memcheck. In this talk, we'll discuss memory leaks, the Valgrind Memcheck tool, and how ruby_memcheck works.
Tools like RuboCop are very useful. I am very grateful for contributors. I think it's really helpful to keep our code clean and consistent. However, sometimes I feel there is a gap between 'Cop' culture and Ruby culture. In general, 'Cop' restricts our rights though Ruby gives freedom to us. I understand we have right not to use RuboCop or disable some Cops. But it is not very easy in reality, especially for Ruby beginners in their teams. To make them happier, experts would be able to set up config perfectly. But again, it is not very easy in reality. As a result, even though there is no evil, in some case people wrongfully make detour and give up their creativeness to keep CI green. It's a pity, isn't it? In this talk, I introduce my thoughts on RubyCop and programming and some idea of a bit better RuboCop world, with lower risk to damage productivity and to misguide beginners.
05:10 - 05:40
I introduced Ruby and Apache Arrow integration including the "super fast large data interchange and processing" Apache Arrow feature at [RubyKaigi Takeout 2021](https://rubykaigi.org/2021-takeout/presentations/ktou.html). This talk introduces how we can use the "super fast large data interchange and processing" Apache Arrow feature in Ruby. Here are some use cases: * Fast data retrieval (fast `pluck`) from DB such as MySQL and PostgreSQL for batch processes in a Ruby on Rails application * Fast data interchange with JavaScript for dynamic visualization in a Ruby on Rails application * Fast OLAP with in-process DB such as DuckDB and Apache Arrow DataFusion in a Ruby on Rails application or irb session
This talk will cover the use of Ruby libraries that interact with the Ethereum blockchain and their implementation. You will get an overview of the Ethereum ecosystem, how blockchain transactions work, how signatures work, and learn how to use eth.rb. How it is implemented in Ruby code will also be explained. Lets create a web application that connects to the blockchain together.
05:50 - 06:20
For a long time, Ruby's assignment evaluation order was inconsistent. Normal assignment would evaluate the left hand side before the right hand side, but multiple assignment and constant assignment would evaluate the right hand side first. This issue was known since before the release of Ruby 1.9.3, but it was considered difficult to fix. Come learn how we fixed evaluation order for multiple assignment in Ruby 3.1, and evaluation order for constant assignment in Ruby 3.2.
Ruby's String has Encoding, which allows for very flexible character encoding. What is the trade-off for that flexibility? I recently looked at the bottleneck in CSV.read and found that in one file with Encoding CP932, 30% of the processing time was spent on String#split. From the perspective of optimizing String#split, we will explain the relationship between String and Encoding in Ruby, how String knows its own Encoding, and which process is the bottleneck. Then we will discuss approaches toward faster encoding.
06:50 - 07:20
I have been developing Steep, a static type checker for Ruby, for more than five years. Let's see how it transforms an editor into an IDE and how the Ruby programming experience changes with it. This session includes a live coding using Steep. It will start with writing the RBS type definitions, then demonstrate Ruby coding with IDE assistance, and finally refactor the code. This is how I write new Ruby code and will show the benefits of using Steep.
I will talk about history of Japanese reference manual and future plans. Contributing to current Japanese Ruby reference manual (rurema) is harder than other projects. Because current document format (based on RD) is not familiar to recent Ruby users, and there are a few documents for new contributors. So I will explain historical reasons and how to improve systems for new contributors.
07:30 - 08:40
YJIT is CRuby's second just-in-time compiler first released with Ruby 3.1.0. Much sweat and tears were shed during YJIT's development. What are the performance goals of YJIT and how are we going for them? How do CPUs react to YJIT's output? What is it like to retrofit a JIT compiler into a runtime system with a long history? Why is Rust involved now?