@interface AQBlog : NSBlog @end

Tutorials, musings on programming and ePublishing

Adobe Joins the Readium Foundation


I'm feeling rather legitimized today: none other than Adobe themselves have joined the Readium Foundation. The initial goal of our collaboration is to ensure that any reading system built using the Readium SDK will have the option to include built-in handling for EPUB 2 and EPUB 3 documents protected using Adobe Content Server 4 – the most pervasive form of DRM in the eBook industry.

Now, you all know that I'm personally not convinced of the need for DRM, but even I have to admit that this particular effort will be incredibly useful: the vast majority of eBook publishers and vendors in the world make use of Adobe Content Server and its DRM. So long as that's the case, any new eReader technology will have a difficult road ahead if it cannot work with those existing tools and ecosystem. Maybe we can wean everyone from DRM in the long term, but we need to get them in the door first, and this is how it happens.

So, we now have Kobo, Sony, and Adobe involved. Two more 'A's are left in the wings– I wonder if or when either of those will decide to join in?

You can view the official announcement here.

iTunes Radio


Tyler Hayes on iTunes Radio:

The design and goal is clearly focused on listeners purchasing music — but even so, iTunes Radio feels like the first truly modern take on what terrestrial radio wishes it could be. Radio was always meant to be a promotion tool, a way to sell more music, but without being built directly on top of the world’s biggest music retailer, it was always too distant from the marketplace to be more effectual. Now a “buy” button lives next to every song, or a wish list one for those hesitant, and it feels like this is how modern radio should function.

Agreed; iTunes Radio is well-done and well-designed. I’m a little surprised Apple is making everyone wait for iOS 7 to get it.

I, on the other hand, am absolutely not surprised that Big Media is refusing to allow this product to operate in more than one market.

Once again they'll need to be dragged, kicking and screaming, into a worldwide rollout. Once again this will not be possible until the absolute maximum amount of positive evidence has been provided by Apple.

And once again they'll doubtless choose to keep Canada out of the deal for as long as possible so it can act as a proxy for 'what the US market would be like' to gainsay any evidence.

Airing My NSBriefs


A couple of weeks ago I had the immense honour of being invited to speak with Saul Mora for his NSBrief podcast. We wound up talking for well over two hours, and only remembered to start recording about half an hour in. I think we could probably fill another one or two episodes without much trouble!

The end result is now available for your delight and edification. We wound up reminiscing on the halcyon days of Apple TV development, back in 2006 and 2007 (was it really so long ago??).

You can download the episode here, or you can subscribe to the series on iTunes.

Redirection on Octopress and Heroku


For a little while now I've had notifications from gaug.es that a number of inbound links were getting HTTP 404 errors. This all stemmed from the fact that I reassigned this domain from a Tumblog (still accessible at tumblr.alanquatermain.me, btw) and ported all the relevant (i.e. longer-form) posts across from that source. There were still a few links out there which were pointing to the old Tumblr articles, though, which no longer worked.

What to do?

App.net Invitational


I've been on Twitter for a long time now, and it's arguably been instrumental in my success as a solo developer and a person of note in the world of Mac & iOS development. These days, though, I find myself using it less for conversations and more for feeding outward. I browse through occasionally, but there's so much happening on there now that I've no real expectation that it's useful as a source of news. Similarly, I've found it less useful for conducting conversations: I'm a wordy person, and I choose my words and expressions fairly carefully, yet I spend half my time trying to cut down the character count. Sure, I can split something over multiple tweets, but that makes it problematic for a user to follow the thread of a conversation backwards. Software like Twitterrific goes a long way toward helping that, but browse through a few such conversations and you start seeing errors: your API Call Count has passed the allowed limit (horror!)

C++03 vs. C++11: Fight!


In updating some stuff for the Readium SDK project, I wanted to use std::shared_ptr in some containers without lots of typing. Essentially I wanted something like shared_vector<SomeType> to magically unfold into vector<shared_ptr<SomeType>>.

Since I'm using C++11 for the project, that's actually pretty easy to do through the magic of template aliases:

template <class _Tp>
using shared_vector = std::vector<std::shared_ptr<_Tp>>;
template <class _Tp>
using shared_list = std::list<std::shared_ptr<_Tp>>;

Sadly, Microsoft's C++ compiler in Visual Studio 2012 doesn't support this syntax just yet, so I had to drop back to the C++03 implementation for that platform:

template <class _Tp>
class shared_vector : public std::vector<std::shared_ptr<_Tp>>
typedef std::vector<std::shared_ptr<_Tp>> _Base;
shared_vector() _NOEXCEPT_(std::is_nothrow_default_constructible<typename _Base::allocator_type>::value) : _Base() {}
explicit shared_vector(const typename _Base::allocator_type& __alloc) : _Base(__alloc) {}
explicit shared_vector(typename _Base::size_type __n) : _Base(__n) {}
shared_vector(typename _Base::size_type __n, const typename _Base::value_type& __v, const typename _Base::allocator_type& __a = typename _Base::allocator_type()) : _Base(__n, __v, __a) {}
template <class _InputIterator>
shared_vector(_InputIterator __f, _InputIterator __l, const typename _Base::allocator_type& __a = typename _Base::allocator_type()) : _Base(__f, __l, __a) {}
shared_vector(const shared_vector& __o) : _Base(__o) {}
shared_vector(shared_vector&& __o) : _Base(std::move(__o)) {}
shared_vector(std::initializer_list<typename _Base::value_type> __il) : _Base(__il) {}
shared_vector(std::initializer_list<typename _Base::value_type> __il, const typename _Base::allocator_type& __a) : _Base(__il, __a) {}
~shared_vector() { ~_Base(); }
shared_vector& operator=(const shared_vector& __o) { _Base::operator=(__o); return *this; }
shared_vector& operator=(shared_vector&& __o) { _Base::operator=(std::move(__o)); return *this; }
template <class _Tp>
class shared_list : public std::list<std::shared_ptr<_Tp>>
typedef std::list<std::shared_ptr<_Tp>> _Base;
shared_list() _NOEXCEPT_(std::is_nothrow_default_constructible<typename _Base::value_type>::value) : _Base() {}
explicit shared_list(const typename _Base::allocator_type& __a) : _Base(__a) {}
explicit shared_list(typename _Base::size_type __n) : _Base(__n) {}
shared_list(typename _Base::size_type __n, const typename _Base::value_type& __v) : _Base(__n, __v) {}
shared_list(typename _Base::size_type __n, const typename _Base::value_type& __v, const typename _Base::allocator_type& __a) : _Base(__n, __v, __a) {}
template <class _Iter>
shared_list(_Iter __f, _Iter __l) : _Base(__f, __l) {}
template <class _Iter>
shared_list(_Iter __f, _Iter __l, const typename _Base::allocator_type& __a) : _Base(__f, __l, __a) {}
shared_list(const shared_list& __o) : _Base(__o) {}
shared_list(shared_list&& __o) : _Base(std::move(__o)) {}
shared_list(std::initializer_list<typename _Base::value_type> __il) : _Base(__il) {}
shared_list(std::initializer_list<typename _Base::value_type> __il, const typename _Base::allocator_type& __a) : _Base(__il, __a) {}
~shared_list() { ~_Base(); }
shared_list& operator=(const shared_list& __o) { _Base::operator=(__o); return *this; }
shared_list& operator=(shared_list&& __o) { _Base::operator=(std::move(__o)); return *this; }

C++11 wins so hard it's not even funny.

Introducing the Readium SDK


Something great begins today

Well, actually it started a few months ago. Or maybe a year ago.

Perhaps it started in February 2012, when the IDPF started an initiative to create an open source reference implementation of an EPUB® 3 reading system. This was given the name ‘Readium’, and it was implemented in JavaScript as a Chrome browser extension. A lot of companies were involved with this effort, although the primary architects were the folks at Evident Point in Vancouver, BC. Along the way, the folks at ACCESS began contributing some major changes into the WebKit browser to provide significantly better typography for Japanese text.

eBook DRM and unDRM


A couple of days ago (on my birthday, no less!) I had the honour of moderating a session at the inaugural W3C and IDPF workshop on eBooks and the Open Web Platform, “eBooks: Great Expectations for Web Standards.” Due to a little something I wrote a while ago, I was asked to provide a position paper to the conference which naturally I was quite happy to do. One thing led to another, and there I was on Tuesday in New York, talking about DRM technology in a workshop hosted by O'Reilly, one of the most ardently anti-DRM companies you might name.

…not exactly a situation I'd anticipated when I started this job, certainly.

I decided to focus on the technology components behind such a system and the relevant standards, including their adoption and how user benefits can be built from the same components traditionally used to implement restrictions. I think, from discussions which took place later on, that I was broadly successful in achieving my aims; time will tell, I'm sure, if that impression is correct.

The slides and notes from my presentation are available from the W3C; here I'll go into some more detail on the topics I covered and some of the other output from the session. You can also find minutes from both days of the conference from the workshop's agenda page– here are direct links from day one and from day two.

All in all, it was fantastic to be involved, and I'm extremely thankful to the chairs and hosts for letting me be a part of it.