Kamal Marhubi

http://kamalmarhubi.com/ (RSS)
visit blog
hg advent -m '06: debugging hg-git'
9 Dec 2018 | original ↗
What happened to my hg advent series?
9 Dec 2018 | original ↗
hg advent -m '05: heads and `hg commit --close`'
6 Dec 2018 | original ↗

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 &lt;commit-ish&gt; 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.↩↩

hg advent -m '03: revsets!'
3 Dec 2018 | original ↗
hg advent -m '04: there is no index'
3 Dec 2018 | original ↗
hg advent -m '02: extensions'
2 Dec 2018 | original ↗
hg advent init
1 Dec 2018 | original ↗

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.

Rust should be an excellent open source citizen #rust2018
31 Jan 2018 | original ↗

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...

Poking around /usr/lib/git-core
7 Oct 2016 | original ↗

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...

Spying on Android events without modifying source code
3 Oct 2016 | original ↗

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...

Some things I learned about libdwarf
25 Jul 2016 | original ↗

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...

Things you could do with the Rust AST
2 Jun 2016 | original ↗

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...

Segfaults are our friends and teachers
25 Apr 2016 | original ↗

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...

100:10:1 update 7
25 Apr 2016 | original ↗

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...

Rust + nix = easier unix systems programming <3
13 Apr 2016 | original ↗

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...

100:10:1 update 6
22 Mar 2016 | original ↗

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...

100:10:1 update 5
14 Mar 2016 | original ↗

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...

↑ these items are from RSS. Visit the blog itself at http://kamalmarhubi.com/ to find other articles and to appreciate the author's digital home.