Archive for the ‘iPhone’ Category

Random snapshot

Thursday, January 14th, 2010
The new iPhone camera really is pretty good.

The new iPhone camera really is pretty good.

That took a while

Sunday, October 11th, 2009

win

This is the quite-worth-it Solebon Solitaire Deluxe ($2). 35-odd card games, very well executed. Me, simpleton that I am, I just play Klondike draw one. At a roughly 3:1 loss:win ratio, that’s a lot of spare time, standing in line, etc.

Paul wins an iPhone!

Thursday, July 23rd, 2009
The iPhone 3GS

The iPhone 3GS

On July 14th, hosting company Engine Yard posted a programming contest that was (presumably) to promote their services and generally create PR. First and second prize included…. new iPhones! (Actually, Dorian pointed the contest out to me – thanks!)

Now, I’ve only tried one programming contest, and it was An Epic Fail. EPIC.

Ahem. Traumatic memories.

Anyway, this time the coding problem was based around the SHA-1 hash algorithm, trying to find a close match to one posted by Engine Yard. What I know about hash algorithms is pretty basic, but we have a couple of friends who do lots of code & crypto, namely Dan Bernstein and Tanja Lange. I figured that if anyone had code laying about, it’d be them and that was in fact the case. I also guessed that CUDA would be the weapon of choice for this sort of pleasingly-parallel application; that also turned out to be correct. I fired off an email and promptly forgot about it in the rush to get ready to travel.

Luckily, Dan and Tanja had time, were interested, had compute resources and (most importantly to me) didn’t want an iPhone. Win!

(Insert scramble to find computers, of which I only got two and they got over 100)

Dan rolled out some seriously awesome code, starting with the OpenSSL SHA-1 codebase. His core2 tweaked version started at 2725 CPU cycles per hash, but by version 8 was down to 201 – a nice factor of 10+ speedup, and fast enough to do 10 million+ keys/second even on my laptop. It wasn’t parallel, so we just ran one version per CPU, which worked quite well.

As if that wasn’t enough, he wrote his first CUDA program and got it down to 35 cycles/hash, meaning that it really screamed. He and Tanja contacted a couple of their Taiwanese collaborators, who had GPUs to run the CUDA code, and we were off to the races. (They wanted the 2,000$ in cloud computing credits if we won, which was of no interest to me, Dan or Tanja – a perfect collaboration.) At peak, we were cranking over 3 billion keys per second, which was a tremendous advantage in a contest reliant on searching an enormous keyspace. You can see all the people, machines, rates and details on the page Tanja wrote for the contest.

It was a blast. We used Skype to text-chat during the contest, subversion for the code and that was all we needed. “We” is a bit strong, since I mainly cheerlead as far as code. (Dan doesn’t believe in comments, it would seem!) One odd thing was that the GPU version of the code gave my MacBook fits:

  • I had to compile it as 32 and not 64 bit, or I’d get compile errors in the C++ ‘new’ header file. That was a head scratcher.
  • You have to add -msse2 the compiler to get the cpucycles.c to compile
  • As before, you need the DYLD fix.
  • With gcc-4.0 and 4.2, running the binary would freeze the laptop. 100% repeatable, required a poweroff. Mouse still worked, but that’s it. The same code worked on the Linux boxes in Taiwan, so I’m stumped here. Other people had GPU code running on OSX, so it may be something in my configuration or the code.
And we won! At the last minute we got lucky, and a Tesla GPU in Taiwan found the winning key. We won by a single bit, but the odds of that were pretty low so it was actually a decent margin.
Of the two Macintoshes I brought in, the laptop (ebauche) found a 34, and the 8-CPU MacPro found a 33.
Technically, the main insight for speed was to pick words that totaled to 64 bytes in length, compute that hash and then feed that into a search of the 5-character keyspace. SHA-1 does blocks of 64 bytes, so this is twice as fast as computing the whole thing every time.
On the coincidence front, the GPUs exercised were quite possibly using some of my brother John’s code, as he does kernel driver development for nVidia. I only thought of this afterward, but it’s kinda cool. It’s a small world sometimes.
I’ve not talked to Engine Yard yet about the phone, and dunno how I’ll deal with service since we’re still on T-Mobile, but I’m still thrilled and can’t wait to get it. With any luck they’ll be willing to pay for the unlocked version…
Friends are wonderful. Dan and Tanja – thanks for a great deal of fun, for letting me claim the prize that was yours for the taking, and for teaching me lots of fast SHA-1 tricks in a very short period of time!

fnord goes iPhone

Friday, July 10th, 2009

Today I installed the wptouch plugin on fnord, so if you surf here from iphone/ipod, you see the website formatted to look like a native app:

Fnord on iPhone

Fnord on iPhone

Pretty darn cool, if you ask me. I’ll probably enable it on Annalog and Gemmacasa too.

Some things are harder than you expect

Wednesday, February 11th, 2009

Inspired by the recent news that Google now has free sync of calendars and address books, I set off to try and get the following working:

  1. I want to share a group called ’shared’ from my address book to Chris and her iPod touch. (There’s a bunch of other entries she doesn’t want.)
  2. We really need a family calendar that we can both easily view and edit, for stuff like daycare outages, pediatrician visits, house guests and the like. If at all possible, push sync to iPhone/iPod would rock.
(Experienced geeks will by now be rolling on the floor and having trouble breathing.)
Things that didn’t work well enough:
  1. The Google ‘Calaboration‘ tool works with existing Google calendars and events. You can’t share your existing data to Google and then sync that, so you have to move events into the Google calendars manually. Ug.
  2. The addressbook sync to Google, accessed via iTunes, works well buuuut:
    • It syncs everything – I had to manually clean up the entries from my little-used gmail, delete dups, etc.
    • Google now has your full addressbook – it’s all or nothing. I’m not paranoid, but I dislike this.
  3. Next, following these instructions, and this must-read also, I installed Darwin Calendar Server (DCS) on our iMac. Basic setup is OK, but if you want much there’s no docs and precious little help on the net. I’d like to have separate calendars for each of us, plus a shared calendar for Anna stuff, and even that is quite difficult. (I’m not alone in this, it seems.)
  4. After a while with that, I head-slapped myself when I discovered that Debian now has a ‘calendarserver’ package with DCS neatly rolled up! I prefer to run servers on the Debian anyway, so this is excellent. Edit two files in /etc/caldavd and… well, not voila, because you’re back to the problems of step #3.
  5. I’ve now got my calendar and the shared calendar working, and one for Chris, but I can’t figure out how to subscribe to her calendar and vice-versa. The idea would be to start with ‘I can see but not edit her calendar’ and progress to delegated write access. I have a group setup with both of us as members; maybe all my calendars need to be inside the group?? The docs are studiously vague.
It looks like shelling out a jaw-dropping $500 for OSX Server would solve a lot of this, but we don’t really have that much spare cash. It looks like, once you get DCS working, you can use BusySync or NuevaSync to do the wireless-push; I’ll post on that if I get that far.
Needless to say, my goals and expectations are being scaled back quite rapidly. Other avenue to explore:
  1. Zimbra works and is recommended by Stacey, but is almost as costly as OSX to get shared addressbook support.
  2. OpenLDAP seems to work as an addressbook server, and there are apps to push an existing book into it.
  3. Google Apps does contact sharing as well.
  4. There’s also this nice page of general alternatives.

Overall, I highly recommend pursuing this if you want to feel like an idiot. It’s working for me.

What does this mean?

Thursday, December 18th, 2008

Saw this today while pumping gasoline in University City, at the corner of Genesee and Governor:

I’ve never seen that circular symbol next to T-Mobile. Usually it says ‘E’ for EDGE.

Data access worked, so I’m mystified.

Update from Dan: This denotes GPRS. Ahh, makes sense now.

Do you have too much time on your hands?

Wednesday, November 5th, 2008

If so, I highly recommend spending $4.99 on Fieldrunners, a ‘Tower defense‘ type of game for the iPod touch and iPhone. Here’s a screenshot from last night:


(Sorry for the rotated image, seems to be a wordpress problem)

There’s a better and longer review at Ars Technica, but concisely I highly recommend it if you like tower defense-style games. Really well done indeed.

Never do email on the stairs

Monday, September 1st, 2008

Or you may do this to your ankle:


All puffed up, quite impressive:

Thankfully the bruising has faded, its been about 2 weeks. First time I’ve really rolled an ankle; usually if you let yourself fall into it you can avoid injury, but in this case I’d have fallen down a stairwell. 

Backstory: Late for a meeting, rushing down stairs, checking email on iPhone to see if a change had been sent out and missed that there was one more stair left. Oops.

I seem to be addicted to RSS

Thursday, August 28th, 2008

I’ve been an RSS fan for years now, and with the advent of the iPhone/Google Reader combo I read even more. I used to use NetNewsWire, but by using Google Reader I’m always in sync on mobile and desktop. Their iPhone interface is really good, even on EDGE data rates.

Yesterday, I checked out Google Reader Trends, and found the following:

Umm, that’s a lot, right?

Kinda interesting. What I’m finding is that the iPhone allows me to do short newsfrouping sessions when I have a few spare minutes, so I end up reading more than I did before. I also really like that the load of loading feeds and pages is moved to Google, resulting in less laptop/PDA CPU usage and faster overall performance. It is, in a word, magnificent.

Even if you don’t have an iPhone or iTouch, Google Reader is still most excellent. If you do, fire up Safari and start keeping up with more of the world than previously possible!

Highly recommended.

P.S. I have several hundred feeds, with an unusual organization that I plan to post later. I’m also happy to share the list with you in OPML format if you want to jump-start your Reader setup.

Update: Here’s reading by time of day and day of week. Lots of late-night!

Why I probably won’t be getting an iPhone 3G

Tuesday, June 10th, 2008

Yesterday, amid much hullabaloo and inflated expectation, Apple introduced the second generation iPhone or ‘iPhone 3G.’ Announced yesterday, it’ll be available July 11th. There’s a bunch of incremental improvements (Battery life, faster wireless, GPS, nicer shape, metal buttons) and some extraordinarily clever RF engineering (ten wireless bands on just 2 antennas – brilliant!), but the basic unit doesn’t change much. Much to my surprise, the software (iPhone 2.0) will also be free for generation-1 units such as mine. Previously, in iPods, new features were never released for older hardware, so this is a delightful change.

Nevertheless, as it stands now I won’t be getting one. And it’s a toddle that a lot of other geeks won’t be, either. Here’s why: The first-gen iPhones introduced the idea of ‘activation at home.’ Instead of sitting at a desk with some clerk, forking over credit card, SSN and driver’s license, you simply bought the iPhone and walked away. Once at home, you plug the phone into your computer, on your own time, and ran the streamlined activation via iTunes. As a way to reduce consumer frustration and humiliation, it was brilliant, and had the side benefit of helping stores too – you didn’t need activation staff, counter space, etc, and you could sell more phones in less time. Huzzahs all around.

(One of the main reasons this worked was the revenue model – the phone were expensive (started at $600) and AT&T had a monthly kickback to Apple based on subscriber revenue.)

The downside of this became evident later, as literally thousands of geeks bent their efforts to unlocking the iPhone for use on other networks, or simply to write and run their own programs. Since you didn’t have to activate in-store, or make any sort of promise, it was much easier to do and many (yours truly included) did just that. 

Now, however, they’ve changed the revenue model to copy other cell phones: The phones are subsidized down to $200/$300, with AT&T footing part of the bill. The elephant in the room is that you now have to activate before you leave the store. Think long lines, annoying idiot salespeople, and a required new 2 year contract with a minimum monthly cost of $70/month. (Your bill will be higher, due to taxes and such.)

Because of this, you can’t order one online any more, and anyone wanting to hack their phone faces the breach of contract fee from AT&T, which is probably at least $200. This is really going to put the hurt on iPhone hacking, which they probably accepted as an ancillary cost to reducing the numbers of unlocked iPhones in the wild. I wonder how they accounted for the customer backlash of in-store activation?

Tech companies such as Apple regularly ignore propellerheads such as myself for the very $imple rea$on of money: Though vocal, we’re just not that large of a market, and stuff that makes us happy doesn’t necessarily translate to mass sales. Therefore, those of us who wanted to upgrade and use it on, say, T-Mobile, are acceptable collateral damage. I do suspect that they’ve underestimated how peevish people are going to be at the bad old activation hassle, though. Fingers crossed for the resumption of sanity, because there’s one thing that I’m completely certain of: The iPhone 3G will get hacked anyway. People like this will make it happen, so why play King Canute?

(In the meantime, I’ll probably buy a 16G gen-one unit and give/sell my 8G to a relative that wants one.)