hg checkouthg checkout is a built-in alias for is a built-in alias for hg updatehg update, which updates the working directory or switces revisions. It’s equivalent to one of the several meanings of , which updates the working directory or switces revisions. It’s equivalent to one of the several meanings of git checkoutgit checkout, in this case, the , in this case, the git checkout <commit-ish>git checkout <commit-ish> variant. I’m not sure I like the use of the word variant. I’m not sure I like the use of the word updateupdate here, hence my using the alias. here, hence my using the alias.↩↩
This is the start of a daily series in the run-up to Christmas where I learn mercurial. This first post will be about what's making me want to do this in the first place.
Here’s my late #rust2018 post. I contribute code to a lot of projects in a lot of different languages. I think it’s really important not to think about Rust in isolation, but in the context of the greater open source world. Here area few specific ways I think about this: ease of contributing to projects in rust interoperability with other...
A somewhat unknown bit of git trivia is that git rebase is implemented as a ~600 line shell script. A few months ago, I did a full-distro upgrade on my machine. I kept working while it updated, and was surprised when git add --patch failed, because I was using other git commands just fine. Even weirder, plain git add worked! The message I got...
Let’s say you want to intercept events in an Android app, but don’t want to modify your source code. As a simple example, you want to add logging whenever the user clicks on any button in your app. I got a bit curious about whether it was possible so I spent some time last week figuring out how this might work. This was extra fun because I’ve...
In the last few days, I got drafted / nerd-sniped into helping Julia Evans on her Ruby stacktrace spying program. Specifically, one of the next big things is to read type information out of the Ruby binary so that it’s not hardcoded to work for just one Ruby version. Going in, I didn’t know much about DWARF, its data model, or how to access it...
Lately I’ve been contributing to rustfmt, which is a tool for formatting Rust code. Right now, it formats entire files, which is great if you keep your entire project formatted by rustfmt. If you’re adding code to an existing unrustfmted project, using rustfmt leads to big diffs where most of the changes are just formatting. These can be really...
This afternoon, I got a segmentation fault in a Rust program, and was confused. This is Rust, I shouldn’t get segfaults! I quickly checked the couple of places I used unsafe, and they were either calling C functions (and checking the errors), or telling the compiler not to initialize some memory because I was going to write into it...
It’s been a month since the last update, which is definitely too long. Here we go! projects I worked since last update cargo fmt-diff After weeks of being “almost there”, I finally tidied up my initial work into a pull request! The pull request and commit messages are good if you want to see details of what I did. The tl;dr is that there is a...
Lately I’m writing lots of Rust, and I’m particularly interested in systems programming on unix. I’ve been using and contributing to a library called nix1, whose mission is to provide ‘Rust friendly bindings to *nix APIs’. In this blog post, I hope to convince you that you might want to reach for Rust and nix the next time you need to do some...
I said last time that I should keep a log; I didn’t. This is from memory + what I could convince git and GitHub to tell me. Writing this also makes me realize that now we’re two months into 100:10:1, I should promote some more projects to round out my list of 10. I’ll try and make some progress there this week! projects I worked on this week...
I need to find a better way to track my time and know what I worked on. Here’s my recollection: cargo fmt-diff I reached a great state on Saturday: I can pass a set of line ranges in on the command line, and statements—but only statements—in that range will be reformatted! I probably spent half an hour trying different sets of arguments just to...