15 Sep 2021
Project Update: Libs Team by Mara Bos
A story about how things get stuck, and how to get things moving again. Taking improvements to the standard library's locks as an example, we'll take a look at how large efforts often get stuck, and explore what can be done in such situations. We'll look into breaking problems apart, how to narrow the scope of discussions, and finally at some organisational changes that might help a bit.
A story about how things get stuck, and how to get things moving again. Taking improvements to the standard library's locks as an example, we'll take a look at how large efforts often get stuck, and explore what can be done in such situations. We'll look into breaking problems apart, how to narrow the scope of discussions, and finally at some organisational changes that might help a bit.
- 1 participant
- 29 minutes
15 Sep 2021
Supercharging Your Code With Five Little-Known Attributes by Jackson Lewis
Attributes are one of the most useful and convenient features in the Rust language, enabling programmers to auto-derive traits, set up a test suite in minutes, and conditionally compile code for different platforms. But there are many other useful attributes, both inside and outside of the standard library, that often go unnoticed. Join us as we go through five attributes you might not know about - and how you can use them to both optimize and strengthen your code.
Attributes are one of the most useful and convenient features in the Rust language, enabling programmers to auto-derive traits, set up a test suite in minutes, and conditionally compile code for different platforms. But there are many other useful attributes, both inside and outside of the standard library, that often go unnoticed. Join us as we go through five attributes you might not know about - and how you can use them to both optimize and strengthen your code.
- 1 participant
- 15 minutes
15 Sep 2021
Compile-Time Social Coordination by Zac Burns
You can write good code. So can I. But can we write correct code together? The hardest problem facing the ordinary developer of today is not in algorithms or frameworks. Bugs are commonly found between the lines. Projects contain rules that must be adhered to everywhere but are specified nowhere. They are conventions, tribal knowledge, and best practices. Let's learn how Rust makes it easier to write code that agrees and is consistent across files, crates, and persons. This is the story of how I stopped stepping on everyone's toes and learned to love the borrow checker.
You can write good code. So can I. But can we write correct code together? The hardest problem facing the ordinary developer of today is not in algorithms or frameworks. Bugs are commonly found between the lines. Projects contain rules that must be adhered to everywhere but are specified nowhere. They are conventions, tribal knowledge, and best practices. Let's learn how Rust makes it easier to write code that agrees and is consistent across files, crates, and persons. This is the story of how I stopped stepping on everyone's toes and learned to love the borrow checker.
- 1 participant
- 29 minutes
15 Sep 2021
Fuzz Driven Development by Midas Lambrichts
Sometimes you can come up with an easy method to verify correctness, but you struggle with finding actual examples for the unit tests. You know that "For all x it holds that …", but you can't come up with good possibilities for x. This is where relying on fuzzing can quickly drive forward development through providing you with some real examples of what your code doesn't yet cover, allowing you to quickly cover a lot of ground. Together we'll go through the process of using cargo fuzz in order to build a quick program that can squash JSON Patch operations (RFC 6902), touching upon some utilities/libraries from the Rust community (fuzzing tools, serde_json,…), and learning some lessons about what kind of misconceptions you might have when getting started with fuzzing.
Sometimes you can come up with an easy method to verify correctness, but you struggle with finding actual examples for the unit tests. You know that "For all x it holds that …", but you can't come up with good possibilities for x. This is where relying on fuzzing can quickly drive forward development through providing you with some real examples of what your code doesn't yet cover, allowing you to quickly cover a lot of ground. Together we'll go through the process of using cargo fuzz in order to build a quick program that can squash JSON Patch operations (RFC 6902), touching upon some utilities/libraries from the Rust community (fuzzing tools, serde_json,…), and learning some lessons about what kind of misconceptions you might have when getting started with fuzzing.
- 1 participant
- 29 minutes
15 Sep 2021
Hacking rustc: Contributing to the Compiler by Esteban Kuber
Compilers are very often treated as a daunting "black box" that only a select few can understand. In reality compilers are "just" another type of program. As long as you know the language the compiler is written in, the language the compiler compiles, and have the time, you too can work on them. If you ever were intrigued about modifying a compiler, or you encountered a bug that you really want fixed soon, this is your chance to roll your sleeves and do it yourself, as we go over the basics of hacking on rustc.
Compilers are very often treated as a daunting "black box" that only a select few can understand. In reality compilers are "just" another type of program. As long as you know the language the compiler is written in, the language the compiler compiles, and have the time, you too can work on them. If you ever were intrigued about modifying a compiler, or you encountered a bug that you really want fixed soon, this is your chance to roll your sleeves and do it yourself, as we go over the basics of hacking on rustc.
- 1 participant
- 16 minutes
15 Sep 2021
How I Used Rust to Become Extremely Offline by Luke Westby
I've been on a mission to escape the internet. I have wasted uncountable hours doomscrolling, idly browsing, and posting opinions that no one cares about. I hit a breaking point, and I had to quit. I had to log off.
So, I deleted all of my accounts and I blocked all of the websites that distracted me. I thought I had finally succeeded, but it seems content always finds a way to be consumed. My preferred search engine shows little snippets of news, recent posts, and titles of videos related to the topic of the query. The temptation to search for "The News" and get distracted by the headlines was often too strong, and unfortunately my site blocker only works on URLs and not elements of a page.
In order to cut out this final source of distraction and finally become Extremely Offline, I had to do it myself. I built a browser extension that removes those areas of the page, and I used Rust to make sure I will never turn it off. Let me show you how.
I've been on a mission to escape the internet. I have wasted uncountable hours doomscrolling, idly browsing, and posting opinions that no one cares about. I hit a breaking point, and I had to quit. I had to log off.
So, I deleted all of my accounts and I blocked all of the websites that distracted me. I thought I had finally succeeded, but it seems content always finds a way to be consumed. My preferred search engine shows little snippets of news, recent posts, and titles of videos related to the topic of the query. The temptation to search for "The News" and get distracted by the headlines was often too strong, and unfortunately my site blocker only works on URLs and not elements of a page.
In order to cut out this final source of distraction and finally become Extremely Offline, I had to do it myself. I built a browser extension that removes those areas of the page, and I used Rust to make sure I will never turn it off. Let me show you how.
- 1 participant
- 15 minutes
15 Sep 2021
Identifying Pokémon Cards by Hugo Peixoto
I want my Pokémon TCG inventory to be digitized so I can search my cards and know which ones I still need. After building a tool to manually enter the cards, I decided to explore Computer Vision algorithms to automate part of the process. In this talk we'll go over some common algorithms used in this area and the roadblocks that I hit while learning.
I want my Pokémon TCG inventory to be digitized so I can search my cards and know which ones I still need. After building a tool to manually enter the cards, I decided to explore Computer Vision algorithms to automate part of the process. In this talk we'll go over some common algorithms used in this area and the roadblocks that I hit while learning.
- 1 participant
- 14 minutes
15 Sep 2021
Move Constructors: Is it Possible? by Miguel Young de la Sota
A "self-referential" type is one that holds a reference into itself; async Futures are the most common self-referential types in Rust today. However, they can't be moved without invalidating the reference, so they're pinned on the heap or stack. You can't return them or put them into collections (without Boxing, of course). C++ makes heavy use of safely-moveable self-referential types, via move constructors. Bridging move constructors into Rust is one of the great unsolved problems of C++ FFI. Was an unsolved problem. Using a novel interpretation of the Pin P guarantees, we'll port all C++ constructors, not just move constructors, to Rust, without compromising Rust's move-after-use protections (something C++ lacks). Return-by-move and collections are fully supported in today's stable Rust. Beyond zero-cost C++ FFI, Rust "constructors" can be applied to express novel data structures in pure Rust. No C++ knowledge required!
A "self-referential" type is one that holds a reference into itself; async Futures are the most common self-referential types in Rust today. However, they can't be moved without invalidating the reference, so they're pinned on the heap or stack. You can't return them or put them into collections (without Boxing, of course). C++ makes heavy use of safely-moveable self-referential types, via move constructors. Bridging move constructors into Rust is one of the great unsolved problems of C++ FFI. Was an unsolved problem. Using a novel interpretation of the Pin P guarantees, we'll port all C++ constructors, not just move constructors, to Rust, without compromising Rust's move-after-use protections (something C++ lacks). Return-by-move and collections are fully supported in today's stable Rust. Beyond zero-cost C++ FFI, Rust "constructors" can be applied to express novel data structures in pure Rust. No C++ knowledge required!
- 1 participant
- 24 minutes
15 Sep 2021
Project Update: Lang Team by Niko Matsakis
2021 has been a very exciting year for Rust. In addition to the upcoming release of Rust 2021, we saw the formation of the Rust foundation along with the creation of a number of teams dedicated to Rust development. Rust is even being considered for the linux kernel! Nicholas will talk about what all this means for Rust, and what we can expect to see as Rust moves ever closer to its goal of “empowering everyone to build reliable and efficient software.”
2021 has been a very exciting year for Rust. In addition to the upcoming release of Rust 2021, we saw the formation of the Rust foundation along with the creation of a number of teams dedicated to Rust development. Rust is even being considered for the linux kernel! Nicholas will talk about what all this means for Rust, and what we can expect to see as Rust moves ever closer to its goal of “empowering everyone to build reliable and efficient software.”
- 1 participant
- 33 minutes
15 Sep 2021
The Importance of Not Over-Optimizing in Rust by Lily Mara
The Rust programming language has a lot of advanced features that enable some fantastic optimizations. For new Rust developers these can feel both exciting and constricting. Because Rust allows us to write highly-optimized code that we as experienced Rust developers can understand, it's tempting to do this all the time.
In this talk I will show that these optimizations are often unnecessary to get performance that beats highly dynamic languages like Python. For new Rust developers, breaking the temptation to over-optimize can lead to higher productivity and satisfaction with Rust.
The Rust programming language has a lot of advanced features that enable some fantastic optimizations. For new Rust developers these can feel both exciting and constricting. Because Rust allows us to write highly-optimized code that we as experienced Rust developers can understand, it's tempting to do this all the time.
In this talk I will show that these optimizations are often unnecessary to get performance that beats highly dynamic languages like Python. For new Rust developers, breaking the temptation to over-optimize can lead to higher productivity and satisfaction with Rust.
- 1 participant
- 8 minutes
15 Sep 2021
This Week in Rust: 400 Issues and Counting! by Nell Shamrell-Harrington
For seven years and over 400 issues, This Week in Rust has brought the pulse of the Rust community to Rustaceans' inboxes. As we know from the Stack Overflow Developer Survey, Rust is a beloved language. Each week the long list of blog posts, requests for comments, calls for participation, and more in This Week in Rust show WHY Rust is so loved. Rustaceans are not only dedicated to improving both the language itself and their skills with it, they are also committed to teaching others. Come to this talk for a look back through This Week in Rust's History, including the trends we have seen in community conversations around the language, stories from community members who's articles have been featured in the newsletters, and more. You will also get a behind the scenes look at how your editors bring the newsletter to you each week and learn how you can help too!
For seven years and over 400 issues, This Week in Rust has brought the pulse of the Rust community to Rustaceans' inboxes. As we know from the Stack Overflow Developer Survey, Rust is a beloved language. Each week the long list of blog posts, requests for comments, calls for participation, and more in This Week in Rust show WHY Rust is so loved. Rustaceans are not only dedicated to improving both the language itself and their skills with it, they are also committed to teaching others. Come to this talk for a look back through This Week in Rust's History, including the trends we have seen in community conversations around the language, stories from community members who's articles have been featured in the newsletters, and more. You will also get a behind the scenes look at how your editors bring the newsletter to you each week and learn how you can help too!
- 1 participant
- 21 minutes
15 Sep 2021
Whoops! I Rewrote It in Rust by Brian Martin
Three engineers, at various points, each take their own approach adding Rust to a C codebase, each being more and more ambitious. I initially just wanted to replace the server’s networking and event loop with an equally fast Rust implementation. We’d reuse many core components that were in C and just call into them from Rust. Surely it wouldn’t be that much code… Pelikan is Twitter’s open source and modular framework for in-memory caching, allowing us to replace Memcached and Redis forks with a single codebase and achieve better performance. At Twitter, we operate hundreds of cache clusters storing hundreds of terabytes of small objects in memory. In-memory caching is critical, and demands performance, reliability, and efficiency. In this talk, I’ll share my adventures in working on Pelikan and how rewriting it in Rust can be more than just a meme.
Three engineers, at various points, each take their own approach adding Rust to a C codebase, each being more and more ambitious. I initially just wanted to replace the server’s networking and event loop with an equally fast Rust implementation. We’d reuse many core components that were in C and just call into them from Rust. Surely it wouldn’t be that much code… Pelikan is Twitter’s open source and modular framework for in-memory caching, allowing us to replace Memcached and Redis forks with a single codebase and achieve better performance. At Twitter, we operate hundreds of cache clusters storing hundreds of terabytes of small objects in memory. In-memory caching is critical, and demands performance, reliability, and efficiency. In this talk, I’ll share my adventures in working on Pelikan and how rewriting it in Rust can be more than just a meme.
- 1 participant
- 27 minutes
15 Sep 2021
Writing the Fastest GBDT Library in Rust by Isabella Tromba
In this talk, I will share my experience optimizing a Rust implementation of the Gradient Boosted Decision Tree machine learning algorithm. With code snippets, stack traces, and benchmarks, we’ll explore how rayon, perf, cargo-asm, compiler intrinsics, and unsafe rust were used to write a GBDT library that trains faster than similar libraries written in C/C++.
In this talk, I will share my experience optimizing a Rust implementation of the Gradient Boosted Decision Tree machine learning algorithm. With code snippets, stack traces, and benchmarks, we’ll explore how rayon, perf, cargo-asm, compiler intrinsics, and unsafe rust were used to write a GBDT library that trains faster than similar libraries written in C/C++.
- 1 participant
- 10 minutes