Text search library in Rust, day 3

I’m rewriting my GNETextSearch C library in Rust. Day 1 Day 2 Day 3 How to generate Rust bindings for GNETextSearch After getting GNETextSearch to compile correctly using cc-rs, my next task was to generate Rust bindings for the C interface of GNETextSearch. After generating the Rust bindings and exposing them in the text-search-sys crate, I’ll consume them in text-search. The common way to generate Rust bindings for C code is via the bindgen crate.

Text search library in Rust, day 2

I’m rewriting my GNETextSearch C library in Rust. Day 1 Day 2 Day 3 The plan Taking some inspiration from Michael Bryan’s article “How to not RiiR”, my plan is to first write a Rust wrapper around GNETextSearch. I’ll try to write an ergonomic Rust API for the library, add a bunch of tests, and then start replacing the C implementation with a Rust one. Creating a Rust workspace Before getting started on any code, of course, I needed to create a new Rust project.

Text search library in Rust, day 1

I’ve played around a bit with Rust—mostly at the urging of my friend, Ryan Levick, who advocates for the use of Rust here at Microsoft—but it’s been hard for me to come up with a reason to choose Rust over other languages for the programming projects in my life. Historically, I’ve been more focused on building macOS and iOS apps using Objective-C and Swift. My current team at Microsoft, in turn, is focused on building world-class services using C# and .

Whither Sunstroke?

I just made Sunstroke available for free on the App Store. As you may have noticed, Sunstroke hasn’t received any updates since last August’s huge full-text search update. This is due to two reasons: I moved to a new city and country (Berlin, Germany) and started a new job (Objective-C developer at 6Wunderkinder, the makers of Wunderlist) Sunstroke hasn’t made enough money to be worth my time. These things are unlikely to change, and so I’ve decided to remove Sunstroke from sale.

Sunstroke 1.6

My blog, as is often the case with these things, has turned into an almost complete non-entity. It’s gotten to the point where I only seem to blog about new releases of my app, Sunstroke. Well, unfortunately, now is not the time I will break that streak because, today, I’m incredibly excited to announce the release of Sunstroke 1.6, which makes Sunstroke into the app I’ve always wanted it to be.

Sunstroke: past and present

Sunstroke 1.5 has just been released to the App Store. This update isn’t a feature update. Rather, I focused all my energy on improving the user interface and user experience of the app. Before I talk about the specific changes I made to Sunstroke, let me give you the backstory of the app. I first started working on Sunstroke back in the days of iPhone OS 3 (yes, it was called iPhone OS, not iOS, back then).

Good photography

I don’t understand photography. Although I can recognize good photography (I know it when I see it), I have absolutely no idea how to produce it. I don’t know how to “line up a shot” (hell, I don’t even really understand what that phrase means), and I know less than nothing about how to work a “real” camera. The same is not true for my good friend, Colin Bissessar. He

Chinese zoos

I’ve been to two zoos in China. The first was the Beijing Zoo. It was terrible and depressing. The second was the (old, apparently) Changsha Zoo. It was terrible and depressing. My friend, Colin, recently was dragged along to the new Changsha Zoo. Looking at his pictures, I can’t believe how much better this zoo is than either of the others. Wonderful to see progress made on animal rights in China.

iOS Maps and China (redux)

Here are a couple more examples of the differences between Google Maps in iOS 5 and Apple’s iOS Maps in iOS 6. First, Google Maps on iOS 5 (fully zoomed in). Second, iOS 6 Maps zoomed out a bit to cover approximately the same area.

iOS Maps and China

It seems like people really hate the new Maps in iOS 6. Now, I’m not disputing that Maps does give a lot of strange results to a lot of people all around the world, but for a large, large number of people, iOS 6 Maps has been a huge improvement over Google Maps. I’m talking about those of us who live in China (you know, the place with 1.3+ billion people and the second-largest economy in the world).

Sunstroke review roundup

I’m thrilled to say that Sunstroke has been starting to get a lot of attention. The reviews/mentions are scattered all over the web, though, so I thought that I’d collect them here for anyone who might be interested. From newest to oldest: Robert Agcaoili at gridwriter just wrote a detailed review. Ben Brooks at The Brooks Review posted some positive comments about the most recent version of Sunstroke (1.3.1). Dave Bragdon at Readability did a nice writeup about Sunstroke and its recent inclusion of support for sending items to Readability.

Why and how I use Fever

Let’s get this out of the way at the beginning. I’m the developer of Sunstroke—the first (and still best, in my admittedly biased opinion) iPhone client for Shaun Inman’s Fever. I think the combination of Fever and Sunstroke is the single best way to stay informed and up to date. I want everyone who reads this to go out and buy Fever and Sunstroke. You’ll be happy you did.

Now that's professionalism

If you haven’t already, stop what you’re doing and go listen to Dan Benjamin’s Regarding The Talk Show. Classy. Pitch-perfect. I take back what I said previously about Dan (now, it’s time for John Gruber to be classy and professional).


Earlier today, we learned that John Gruber has decided to leave the 5by5 podcasting network to join the Mule Radio Syndicate. For any fans of Gruber and Dan, this came as quite a surprise. I think I speak for a lot of fans of The Talk Show when I say that I’ll really miss the interplay between them. I wish Gruber the best on his new show, though. Of course, I’ll continue to read Daring Fireball, and I’ll also continue to listen to a bunch of shows on 5by5, especially Hypercritical, Amplified, Build and Analyze, The Critical Path, and Back to Work.

Altruism in China

My friend, Colin, has been absolutely killing it recently on his blog. If you’re at all interested in anything having to do with China, check it out. One post that especially resonated with me is entitled “Don’t Be a Stranger,” which details the dichotomy between the way Chinese treat their family, friends, and guests and the way they treat strangers. Colin isn’t the first person to point out this contradiction. In fact, it has almost become cliché to say that China is a country full of contradictions.

Don't let this happen to you

My good friend Colin makes a list of deaths to avoid. The newest addition to the list is especially rough.

Nice review of Sunstroke

I really appreciated reading this review of Sunstroke by Michael at Initial Charge. Reading positive reviews first thing in the morning is a great way to start the day.

The "no Internet" podcast

The newest episode of the Vergecast was entertaining, as always. However, the way Josh and Nilay had to awkwardly accommodate Paul Miller’s decision to forgo the Internet for a full year was painful to listen to. Just one more example of how senseless it is for a technology blogger to leave the Internet for a year.

Apple is doomed in China

Nathan T. Washburn is wrong. As is the case with most Western “analysts” (in this case, “analyst” stands for “assistant professor”) commenting on China, he betrays his ignorance about China fairly quickly. To start with, more than half of the 30 million iPhone users in China have unlocked their phones (a hint that something isn’t right) and are using them on an unauthorized network (China Mobile) that until recently limited them to 2G data speeds.


Dispatch::Queue.concurrent.async do begin response = get "[reddit.com](http://reddit.com/#){endpoint}" data = response["data"]["children"].map {|i| RedditPost.new i["data"] } Dispatch::Queue.main.sync { @posts = data; view.reloadData } rescueException => msg puts "Loading Failed: #{msg}" end …is all you need to see to be intrigued by RubyMotion. Read about it on Ars Technica.

Shrink-wrapped fish

There are many differences between China and America. There are also many similarities. You can decide which one this is. In America, a teacher will sometimes receive a small gift from a student. The stereotypical example is an apple. In China, a teacher will sometimes receive a small gift from a student. Here is one example:


I’ve been thinking about starting a blog for a long, long time. I never seemed to get around to it. With the release of Sunstroke, I finally feel like I have enough time to blog. This is probably a bad idea, but this blog will encompass three different topics—technology, programming, and China. Sometimes, these topics will be distinct from one another. At other times, I’ll write about their intersection. Let’s see how this turns out.