@rust_foundation
"The Project would like the word Rust in a crate name to imply ownership by the Project."
Who decided that? I've been a project member for years, and this is the first I've heard of it.
I updated the firmware on my Brother laser printer the other day. Apparently it came with an awesome new feature called "toner DRM." My aftermarket toner no longer works. So I had to buy "genuine" toner. And ooo boy is it more expensive.
Lesson learned: never update firmware.
"There are approximately 1.5 million total lines of Rust code in AOSP ... To date, there have been zero memory safety vulnerabilities discovered in Android’s Rust code."
I'm excited to share that I've left Salesforce and joined
@astral_sh
! I don't start until November, but I can't wait to get started improving Python tooling with Rust!
I've spent the last 3 years or so working on a rewrite of the regex crate. Much of that time has gone into publishing the crate internals as its own separately versioned library. I wrote about the final result here:
ripgrep 13 is out! Lots of bug fixes, perf improvements and a fix for CVE-2021-3013. -. is now an alias for --hidden, and Windows binaries are now fully static executables.
Why is Rust's standard library substring search so much slower than what memchr provides? This is asked a lot, so I finally attempted to write a complete answer to this in memchr's README.
After our resignation a few weeks ago, I'm so relieved to see the Core team and the team leads working together on a path forward. This has all been incredibly stressful for all involved, but our call for action has not been ignored.
Writing docs in Rust has become immensely more pleasant now that I can do [`memmem::find`] instead of [`memmem::find`](memmem/fn.find.html). Massive quality of life improvement!
The former Rust mod team has retracted the part of our resignation statement that urged folks to be skeptical of Core. We apologize for any harm that this statement caused. It was poor judgment on our part.
fun fact: a Regex was ~500 bytes on the stack prior to 1.4.4. In 1.4.4, some internal changes made it ~800 bytes. This caused stack overflows in some environments that used lots of regex! Now, in 1.4.5, a Regex is 16 bytes. See:
Hopefully coming to a Rust near you soon: fearless transmutes.
Really has the potential to make a lot of unsafe Rust much safer, and also make transmutes in general more accessible and easier to be confident in their correctness. Game changer IMO.
I've benchmarked one of most popular
#Rust
libraries `memchr` (200M downloads) against `stringzilla` 🦖
Won 7 benchmarks out 8. I was hoping for a clear win, but apparently I still have things to optimize on Arm 💪
The benchmarks are very easy to repeat:
It turns out that samply is the answer! Big shout out. Really nice user experience (particularly via the Firefox profiler UI). I might even start using it on Linux in lieu of `perf report`.
How do folks do CPU profiling on macOS? Specifically, I'm looking for something like `perf annotate` on Linux, where one can see the specific instructions that are taking up the most time.
This PR adds several features to the `regex` crate that let you trim the fat. In my experiments, binary size overhead drops from 1.3M to 332K, compile times decrease by about 2x and the entire dependency tree shrinks to a single crate (regex-syntax).
ripgrep 14.1.0 is out! It comes with an unbounded memory growth bug fix, some improvements to fish shell completions and release binaries for more ARM targets.
ripgrep 0.10.0 is out! It comes with PCRE2 support (-P), multi-line searching (-U), JSON output (--json) and even a work-around for CRLF support on Windows (--crlf). Along with lots of bug fixes!
@lzsthw
The root of this issue is this long standing Windows-only request:
Thanks for giving ripgrep a try. Now that you're a former user, I'll certainly enjoy you not shitting on my work now.
Ruff v0.1.8 is out now, and includes support for formatting Python doctests + Python snippets in docstrings (Markdown and reStructuredText), Thanks to
@burntsushi5
.
I thought I was being trolled at first, but the Antarctica/Troll IANA time zone has a DST transition that moves the clocks forward *2* hours. That means days in Troll can be 22, 24 or 26 hours long!
It took me hours to figure out that `man groff_man_style` is probably what one wants to read if one wants to learn how to write a man page on Linux.
Hours.
@OtaK_
Fun fact: the most recent CVE in the Rust standard library (remove_dir_all) also applies to C++ standard library implementations. But in C++ it's just considered undefined behaviour and your own fault if any other process touches the file system, so it's not considered an issue.
Gentle reminder that the regex crate repo has Discussions enabled, and I'm happy to field all manner of questions. Everything from general wonderingments to help with Advent of Code programs. :-)
I've just released aho-corasick 1.1.0, which comes with a SIMD implementation of Teddy on aarch64. That means searches for a small number of patterns are likely to get a lot faster. This trickles up to the regex engine and into tools like ripgrep:
In Rust, why does substring search return byte offsets instead of codepoint offsets? Answer:
The really interesting bit of this question is that it's motivated by a valid use case for using codepoint offsets in the first place! A rare sight indeed.
I should have done this with the initial release, but if you've tried to use Jiff and are willing to share your experience, I'd love to have it! I've created a new Discussions category for it.
I'm way behind the eight-ball on this one, but
@mitsuhiko
's `insta` Rust library for snapshot testing is amazing. It's a game changer. I was introduced to it at
@astral_sh
, and now I'm starting to use it in my own projects.
I just upgraded my laptop for the first time in ~8 years. I went from a ThinkPad T430 to a System76 Darter Pro. I wrote up my thoughts on the laptop and my experience installing Archlinux on it:
I like the nudge to read more LLVM IR. I spend a lot of time switching between Rust and Assembly, but perhaps adding LLVM IR into that process will demystify some things.
anyhow is brilliant. I've started using it in all my CLI programs and internal libraries for which structured errors aren't important. It's really lovely and pleasant to use. It's the first error helper library I've used more than once.
regex 1.9.5 should mostly fix a long-standing performance problem when sharing a regex across multiple threads. Please report any time or significant memory usage regressions!
@pcwalton
I had an electrician say "I don't know, I'll have to consult the code book" to a question I had. He then said, "but don't tell my boss, he doesn't like it when I say 'I don't know.'"
Presumably because too many people see "I don't know" as a weakness.
But it's really a strength
Around ten years ago, I switched to Google Chrome from Firefox when it was released. I've gotten tired of Chrome's slowness, so I've been experimenting with Firefox again over the last couple weeks and have made the full switch over!
I hope to be releasing aho-corasick 1.0 soon, and before I do, I would love feedback on the API!
Even if you have no idea what the heck this funny sounding "Aho-Corasick" thing is, I still would love to hear from you.
I was today years old when I learned that `git rebase --update-refs` makes it just about painless to automatically update dependency branches. I had been trying various `git rebase --onto dependency dependency@{10}` machinations to try to get it right before. What a life changer.
What kinds of things do you want from a Rust datetime library that you've found difficult or impossible to get from the crates that exist today?
Also, happy leap year!
#rustlang
How do folks do CPU profiling on macOS? Specifically, I'm looking for something like `perf annotate` on Linux, where one can see the specific instructions that are taking up the most time.
I just spent the last two evenings converting from vim to neovim. Most of the work was just going through every line of my vim config and cleaning things up. But I also dug into getting LSP w/ rust-analyzer working right. Here's my final recipe:
Also, apparently, you can swap out the chips on the aftermarkert carts with the chips from your genuine carts. But I don't have my genuine carts any more. So I had to buy new ones. I'll definitely be trying the chip swap once the genuine carts run out.