Andrew Gallant Profile Banner
Andrew Gallant Profile
Andrew Gallant

@burntsushi5

Followers
9,245
Following
104
Media
111
Statuses
3,178

I love to code. I rarely check DMs. My email address is on my web site.

Marlborough, MA
Joined October 2016
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
Pinned Tweet
@burntsushi5
Andrew Gallant
1 year
I've finally decided to join GitHub Sponsors. Any contribution would be most welcome, even if it is just a one-time "thanks" for past work. :-)
5
27
213
@burntsushi5
Andrew Gallant
1 year
@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.
13
25
1K
@burntsushi5
Andrew Gallant
6 months
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.
26
44
540
@burntsushi5
Andrew Gallant
10 months
The best things in life are fleeting.
Tweet media one
6
7
511
@burntsushi5
Andrew Gallant
2 years
"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."
4
95
439
@burntsushi5
Andrew Gallant
2 years
"Using unwrap() in Rust is Okay" First blog post in over two years. Finally.
14
61
435
@burntsushi5
Andrew Gallant
1 year
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!
16
16
431
@burntsushi5
Andrew Gallant
4 years
After an almost 3 year struggle with infertility, I'm happy to announce that my wife is 21 weeks pregnant! :D
Tweet media one
37
1
427
@burntsushi5
Andrew Gallant
1 month
It's not every day you get a new PB.
Tweet media one
14
9
425
@burntsushi5
Andrew Gallant
1 year
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:
11
50
409
@burntsushi5
Andrew Gallant
3 years
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.
5
65
400
@burntsushi5
Andrew Gallant
10 months
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.
3
25
327
@burntsushi5
Andrew Gallant
5 years
My FOSS Story
17
91
322
@burntsushi5
Andrew Gallant
3 years
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.
3
12
288
@burntsushi5
Andrew Gallant
3 years
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!
10
15
261
@burntsushi5
Andrew Gallant
7 months
Just a little taste of what I hope will be my next Rust library. #rustlang
Tweet media one
Tweet media two
8
7
249
@burntsushi5
Andrew Gallant
4 years
Apologies for burying it in a reddit thread, but I wrote about my perspective on moderation: (Please DON'T downvote the parent comment.)
5
37
235
@burntsushi5
Andrew Gallant
3 years
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.
9
18
234
@burntsushi5
Andrew Gallant
4 years
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:
3
19
192
@burntsushi5
Andrew Gallant
2 years
bstr 1.0: A byte string library for Rust
6
21
189
@burntsushi5
Andrew Gallant
4 years
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.
4
25
183
@burntsushi5
Andrew Gallant
7 months
Benchmarks are hard. I wrote a response (with moar benchmarks) here:
@ashvardanian
Ash Vardanian
7 months
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:
Tweet media one
2
0
14
3
8
171
@burntsushi5
Andrew Gallant
1 year
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`.
@burntsushi5
Andrew Gallant
1 year
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.
13
2
72
2
29
171
@burntsushi5
Andrew Gallant
7 years
ripgrep 0.8.0 is out! Featuring configuration files, compressed file search and true colors!
3
47
167
@burntsushi5
Andrew Gallant
3 months
The Jiff (datetime library) dependency tree on Unix.
Tweet media one
7
3
163
@burntsushi5
Andrew Gallant
5 years
You know you've really made it when your tool gets its own cheat sheet. 🙃
@Cheatography
Cheatography
5 years
The wait is over! ripgrep Cheat Sheet by njones #cheatsheet #ripgrep #rg
Tweet media one
1
6
27
6
14
157
@burntsushi5
Andrew Gallant
6 years
libripgrep is beginning to produce fruits. multi line search is coming!
Tweet media one
4
18
156
@burntsushi5
Andrew Gallant
5 years
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).
4
22
153
@burntsushi5
Andrew Gallant
9 months
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.
0
16
148
@burntsushi5
Andrew Gallant
6 years
ripgrep is now in Debian Unstable!
2
30
148
@burntsushi5
Andrew Gallant
6 years
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!
3
53
145
@burntsushi5
Andrew Gallant
3 years
Here are some pics of my new #FrameworkLaptop !
Tweet media one
Tweet media two
Tweet media three
Tweet media four
3
10
141
@burntsushi5
Andrew Gallant
1 year
@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.
4
2
142
@burntsushi5
Andrew Gallant
10 months
Shipped my first feature at Astral!
@charliermarsh
Charlie Marsh
10 months
Ruff v0.1.8 is out now, and includes support for formatting Python doctests + Python snippets in docstrings (Markdown and reStructuredText), Thanks to @burntsushi5 .
Tweet media one
5
19
178
2
3
138
@burntsushi5
Andrew Gallant
8 months
Framework 13, meet Framework 16. Archlinux works perfectly on the 16 out of the box. w00t.
Tweet media one
2
6
133
@burntsushi5
Andrew Gallant
6 months
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!
Tweet media one
6
11
132
@burntsushi5
Andrew Gallant
1 year
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.
7
6
131
@burntsushi5
Andrew Gallant
4 years
The quickcheck crate was the first Rust code I ever wrote, and it is now finally 1.0!
3
16
129
@burntsushi5
Andrew Gallant
2 years
A little teaser of things to come.
Tweet media one
2
7
129
@burntsushi5
Andrew Gallant
3 years
I guess that's my cue to leave. So long, Lobsters!
Tweet media one
30
5
127
@burntsushi5
Andrew Gallant
2 years
They also cited an ReDoS bug in the regex crate, yet C++'s standard regex engine uses backtracking and is susceptible to exponential blowup.
@m_ou_se
Mara
2 years
@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.
5
62
506
2
5
120
@burntsushi5
Andrew Gallant
1 month
Made it to 4 years. Had a brief scare just a couple days ago with a power outage, but the UPS and generator pulled through and kept the streak alive.
Tweet media one
5
1
118
@burntsushi5
Andrew Gallant
10 months
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. :-)
1
2
116
@burntsushi5
Andrew Gallant
1 year
Cauchy, Aug 2010 - Sept 30, 2023. I love you buddy. I'll miss you.
Tweet media one
Tweet media two
Tweet media three
Tweet media four
5
0
114
@burntsushi5
Andrew Gallant
2 years
First time using 'let ... else' Rust syntax in a short little program. I love it. It is the bomb dot com.
6
4
116
@burntsushi5
Andrew Gallant
1 year
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:
Tweet media one
1
8
115
@burntsushi5
Andrew Gallant
11 months
I translated a simple C program implementing the Thompson NFA simulation to a few different Rust programs. I shared a few thoughts about it too.
3
9
113
@burntsushi5
Andrew Gallant
3 years
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.
1
11
109
@burntsushi5
Andrew Gallant
6 years
I am attempting Advent of Code this year for the first time and posting my solutions in Rust. I welcome beginner questions on the issue tracker!
3
23
111
@burntsushi5
Andrew Gallant
2 months
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.
2
5
107
@burntsushi5
Andrew Gallant
7 months
Friendly reminder that if you have a question about the `regex` crate, then I welcome any and all questions. Just open a new Discussion post!
2
8
103
@burntsushi5
Andrew Gallant
6 months
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.
6
5
104
@burntsushi5
Andrew Gallant
5 years
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:
9
16
101
@burntsushi5
Andrew Gallant
1 year
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.
0
7
99
@burntsushi5
Andrew Gallant
5 years
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.
4
7
99
@burntsushi5
Andrew Gallant
3 years
Truly a thing of beauty. Now if only my email inbox could be the same as ripgrep's PR queue. A fool can dream.
Tweet media one
4
1
98
@burntsushi5
Andrew Gallant
1 year
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!
0
7
97
@burntsushi5
Andrew Gallant
1 year
Got to 3 years of uptime on my mac mini in my home office.
Tweet media one
5
1
95
@burntsushi5
Andrew Gallant
7 months
A quick take on why I think Rust is good for working with strings.
2
7
95
@burntsushi5
Andrew Gallant
6 months
Helix 24.03 is shipping with a streaming regex implementation based on regex-automata. w00t!
Tweet media one
1
3
89
@burntsushi5
Andrew Gallant
4 years
Well, it only took 3 days, but as a result of the insurrection, a crazy family member has been cut out of my life. Nuts, but a good thing overall.
2
1
90
@burntsushi5
Andrew Gallant
6 years
csv 1.0 released!
3
15
89
@burntsushi5
Andrew Gallant
2 years
@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
1
6
89
@burntsushi5
Andrew Gallant
6 years
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!
4
5
87
@burntsushi5
Andrew Gallant
3 years
People using time to compile ripgrep as their CPU benchmark. Now I know how Google feels when people use them to test their Internet connection. Hehe.
0
2
85
@burntsushi5
Andrew Gallant
2 years
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.
4
20
81
@burntsushi5
Andrew Gallant
10 months
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.
2
8
84
@burntsushi5
Andrew Gallant
3 months
4
8
84
@burntsushi5
Andrew Gallant
7 months
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
17
3
80
@burntsushi5
Andrew Gallant
6 years
serde is so amazing. Easily best in class. #rustlang
3
9
82
@burntsushi5
Andrew Gallant
6 years
A new low level regex library for working with DFAs directly, including support for deserializing DFAs and using them in no_std environments:
0
12
77
@burntsushi5
Andrew Gallant
1 year
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.
13
2
72
@burntsushi5
Andrew Gallant
4 years
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:
3
2
69
@burntsushi5
Andrew Gallant
3 years
Benchmarks greps is tricky. Don't try this at home folks.
0
12
71
@burntsushi5
Andrew Gallant
6 months
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.
2
1
68