Planet LCA 2009

Syndicate content
Planet 2009 -
Updated: 1 year 19 weeks ago

Keith Packard: fd-passing

October 6, 2012 - 07:30
FD passing for DRI.Next

Using the DMA-BUF interfaces to pass DRI objects between the client and server, as discussed in my previous blog posting on DRI-Next, requires that we successfully pass file descriptors over the X protocol socket.

Rumor has it that this has been tried and found to be difficult, and so I decided to do a bit of experimentation to see how this could be made to work within the existing X implementation.

(All of the examples shown here are licensed under the GPL, version 2 and are available from git://

Basics of FD passing

The kernel internals that support FD passing are actually quite simple — POSIX already require that two processes be able to share the same underlying reference to a file because of the semantics of the fork(2) call. Adding some ability to share arbitrary file descriptors between two processes then is far more about how you ask the kernel than the actual file descriptor sharing operation.

In Linux, file descriptors can be passed through local network sockets. The sender constructs a mystic-looking sendmsg(2) call, placing the file descriptor in the control field of that operation. The kernel pulls the file descriptor out of the control field, allocates a file descriptor in the target process which references the same file object and then sticks the file descriptor in a queue for the receiving process to fetch.

The receiver then constructs a matching call to recvmsg that provides a place for the kernel to stick the new file descriptor.

A helper API for testing

I first write a stand-alone program that created a socketpair, forked and then passed an fd from the parent to the child. Once that was working, I decided that some short helper functions would make further testing a whole lot easier.

Here’s a function that writes some data and an optional file descriptor:

ssize_t sock_fd_write(int sock, void *buf, ssize_t buflen, int fd) { ssize_t size; struct msghdr msg; struct iovec iov; union { struct cmsghdr cmsghdr; char control[CMSG_SPACE(sizeof (int))]; } cmsgu; struct cmsghdr *cmsg; iov.iov_base = buf; iov.iov_len = buflen; msg.msg_name = NULL; msg.msg_namelen = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; if (fd != -1) { msg.msg_control = cmsgu.control; msg.msg_controllen = sizeof(cmsgu.control); cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_len = CMSG_LEN(sizeof (int)); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; printf ("passing fd %d\n", fd); *((int *) CMSG_DATA(cmsg)) = fd; } else { msg.msg_control = NULL; msg.msg_controllen = 0; printf ("not passing fd\n"); } size = sendmsg(sock, &msg, 0); if (size < 0) perror ("sendmsg"); return size; }

And here’s the matching receiver function:

ssize_t sock_fd_read(int sock, void *buf, ssize_t bufsize, int *fd) { ssize_t size; if (fd) { struct msghdr msg; struct iovec iov; union { struct cmsghdr cmsghdr; char control[CMSG_SPACE(sizeof (int))]; } cmsgu; struct cmsghdr *cmsg; iov.iov_base = buf; iov.iov_len = bufsize; msg.msg_name = NULL; msg.msg_namelen = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = cmsgu.control; msg.msg_controllen = sizeof(cmsgu.control); size = recvmsg (sock, &msg, 0); if (size < 0) { perror ("recvmsg"); exit(1); } cmsg = CMSG_FIRSTHDR(&msg); if (cmsg && cmsg->cmsg_len == CMSG_LEN(sizeof(int))) { if (cmsg->cmsg_level != SOL_SOCKET) { fprintf (stderr, "invalid cmsg_level %d\n", cmsg->cmsg_level); exit(1); } if (cmsg->cmsg_type != SCM_RIGHTS) { fprintf (stderr, "invalid cmsg_type %d\n", cmsg->cmsg_type); exit(1); } *fd = *((int *) CMSG_DATA(cmsg)); printf ("received fd %d\n", *fd); } else *fd = -1; } else { size = read (sock, buf, bufsize); if (size < 0) { perror("read"); exit(1); } } return size; }

With these two functions, I rewrote the simple example as follows:

void child(int sock) { int fd; char buf[16]; ssize_t size; sleep(1); for (;;) { size = sock_fd_read(sock, buf, sizeof(buf), &fd); if (size <= 0) break; printf ("read %d\n", size); if (fd != -1) { write(fd, "hello, world\n", 13); close(fd); } } } void parent(int sock) { ssize_t size; int i; int fd; fd = 1; size = sock_fd_write(sock, "1", 1, 1); printf ("wrote %d\n", size); } int main(int argc, char **argv) { int sv[2]; int pid; if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sv) < 0) { perror("socketpair"); exit(1); } switch ((pid = fork())) { case 0: close(sv[0]); child(sv[1]); break; case -1: perror("fork"); exit(1); default: close(sv[1]); parent(sv[0]); break; } return 0; } Experimenting with multiple writes

I wanted to know what would happen if multiple writes were made, some with file descriptors and some without. So I changed the simple example parent function to look like:

void parent(int sock) { ssize_t size; int i; int fd; fd = 1; size = sock_fd_write(sock, "1", 1, -1); printf ("wrote %d without fd\n", size); size = sock_fd_write(sock, "1", 1, 1); printf ("wrote %d with fd\n", size); size = sock_fd_write(sock, "1", 1, -1); printf ("wrote %d without fd\n", size); }

When run, this demonstrates that the reader gets two bytes in the first read along with a file descriptor followed by one byte in a second read, without a file descriptor. This demonstrates that a file descriptor message forms a barrier within the socket; multiple messages will be merged together, but not past a message containing a file descriptor.

Reading without accepting a file descriptor

What happens when the reader isn’t expecting a file descriptor? Does it just get lost? Does the reader not get the message until it asks for the file descriptor? What about the boundary issue described above?

Here’s my test case:

void child(int sock) { int fd; char buf[16]; ssize_t size; sleep(1); size = sock_fd_read(sock, buf, sizeof(buf), NULL); if (size <= 0) return; printf ("read %d\n", size); size = sock_fd_read(sock, buf, sizeof(buf), &fd); if (size <= 0) return; printf ("read %d\n", size); if (fd != -1) { write(fd, "hello, world\n", 13); close(fd); } } void parent(int sock) { ssize_t size; int i; int fd; fd = 1; size = sock_fd_write(sock, "1", 1, 1); printf ("wrote %d without fd\n", size); size = sock_fd_write(sock, "1", 1, 2); printf ("wrote %d with fd\n", size); }

This shows that the first passed file descriptor is picked up by the first sockfdread call, but the file descriptor is closed. The second file descriptor passed is picked up by the second sockfdread call.

Zero-length writes

Can a file descriptor be passed without sending any data?

void parent(int sock) { ssize_t size; int i; int fd; fd = 1; size = sock_fd_write(sock, "1", 1, -1); printf ("wrote %d without fd\n", size); size = sock_fd_write(sock, NULL, 0, 1); printf ("wrote %d with fd\n", size); size = sock_fd_write(sock, "1", 1, -1); printf ("wrote %d without fd\n", size); }

And the answer is clearly “no” — the file descriptor is not passed when no data are included in the write.

A summary of results
  1. read and recvmsg don’t merge data across a file descriptor message boundary.

  2. failing to accept an fd in the receiver results in the fd being closed by the kernel.

  3. a file descriptor must be accompanied by some data.

Make X pass file descriptors

I’d like to get X to pass a file descriptor without completely rewriting the internals of both the library and the X server. Ideally, without making any changes to the existing code paths for regular request processing at all.

On the sending side, this seems pretty straightforward — we just need to get the X connection file descriptor and call sendmsg directly, passing the desired file descriptor along. In XCB, this could be done by using the xcbtakesocket interface to temporarily hijack the protocol as Xlib does.

It’s the receiving side where things are messier. Because a bare read will discard any delivered file descriptor, we must make sure to use recvmsg whenever we want to actually capture the file descriptor.

Kludge X server fd receiving

Because a passed fd creates a barrier in the bytestream, when the X server reads requests from a client, the read will stop sending data after the message with the file descriptor is consumed.

Of course, this process consumes the passed file descriptor, and if that call isn’t made with recvmsg set up to receive it, the fd will be lost.

As a simple kludge, if we pass a meaningless fd with the X request and then the ‘real’ fd with a following XNoOperation request, the existing request reading code will get the request, discard the meaningless fd and then stop reading at that point due to the barrier. Once into the request processing code, recvmsg can be called to get the real file descriptor and the associated XNoOperation request.

I wrote a test for this that demonstrates how this works:

static void child(int sock) { uint8_t xreq[1024]; uint8_t xnop[4]; uint8_t req; int i, reqlen; ssize_t size, fdsize; int fd = -1, *fdp; int j; sleep (1); for (j = 0;; j++) { size = sock_fd_read(sock, xreq, sizeof (xreq), NULL); printf ("got %d\n", size); if (size == 0) break; i = 0; while (i < size) { req = xreq[i]; reqlen = xreq[i+1]; i += reqlen; switch (req) { case 0: break; case 1: if (i != size) { fprintf (stderr, "Got fd req, but not at end of input %d < %d\n", i, size); } fdsize = sock_fd_read(sock, xnop, sizeof (xnop), &fd); if (fd == -1) { fprintf (stderr, "no fd received\n"); } else { FILE *f = fdopen (fd, "w"); fprintf(f, "hello %d\n", j); fflush(f); fclose(f); close(fd); fd = -1; } break; case 2: fprintf (stderr, "Unexpected FD passing req\n"); break; } } } } int tmp_file(int j) { char name[64]; sprintf (name, "tmp-file-%d", j); return creat(name, 0666); } static void parent(int sock) { uint8_t xreq[32]; uint8_t xnop[4]; int i, j; int fd; for (j = 0; j < 4; j++) { /* Write a bunch of regular requests */ for (i = 0; i < 8; i++) { xreq[0] = 0; xreq[1] = sizeof (xreq); sock_fd_write(sock, xreq, sizeof (xreq), -1); } /* Write our 'pass an fd' request with a 'useless' FD to block the receiver */ xreq[0] = 1; xreq[1] = sizeof(xreq); sock_fd_write(sock, xreq, sizeof (xreq), 1); /* Pass an fd */ xnop[0] = 2; xnop[1] = sizeof (xnop); fd = tmp_file(j); sock_fd_write(sock, xnop, sizeof (xnop), fd); close(fd); } } Fixing XCB to receive file descriptors

Multiple threads may be trying to get replies and events back from the X server at the same time, which means the kludge of having the real fd follow the message will likely lead to the wrong thread getting the file descriptor.

Instead, I suspect the best plan will be to fix XCB to internally capture passed file descriptors and save them with the associated reply. Because the file descriptor message will form a barrier in the read stream, xcb can associate any received file descriptor with the last reply in the read data. The X server would then send the reply with an explicit sendmsg call to pass both reply and file descriptor together.

Next steps

The next thing to do is code up a simple fd passing extension and try to get it working, passing descriptors back and forth to the X server. Once that works, design of the rest of the DRM-Next extension should be pretty straightforward.

Categories: Aligned Planets

Colin Charles: The link between Yahoo!, Microsoft, Facebook, Nokia

October 4, 2012 - 11:43

Written 23 July 2012, but for some reason it never got posted. Better late than never I guess.

I tweeted (17 July 2012, 4:40am UTC+8): 

There’s an interesting link between Yahoo!, Microsoft, Bing, Facebook and Nokia. The bigger picture is competition against Google, Apple

This was literally moments after the news broke that Marissa Mayer resigned from Google to become the CEO of Yahoo!. I thought I’d expand on this link that I see.

Search is today not something that Yahoo! cares about. Its served by Bing from Microsoft. Bing is also the default on Windows Phone, the operating system that Nokia has taken a bet on (when in the USA, I use a Lumia Windows Phone and cannot complain). Search on Facebook is also powered by Bing thanks to a deal that Microsoft has with Facebook. Bing is a strong contender to Google’s search, and this space is clearly still getting investment (see how DuckDuckGo recently got VC funding too).

Yahoo! has mail that is very popular (it might still be the most popular out there). Microsoft has Hotmail. Facebook has “Facebook messages”. Nokia canned Ovi mail services. Yahoo!, Microsoft Messenger and Facebook Messenger also has instant messenger (IM) capabilities. Imagine a day when they all interconnect? It would be a straight fight against Google Chat.

Picasa is Google’s photo sharing site. Today the stream might be Google+. Yahoo! still has Flickr which is the Picasa equivalent, and for streaming? Imagine if there was a quick link to Facebook. Nokia can build in sharing to Flickr and Facebook quickly from their phones (they already have been doing this from time-to-time between phone releases including their MeeGo stint).

Videos seem to be missing from this big picture. Google has YouTube, and the rest of them have nothing with the exception of Facebook.

Maps? Nokia has got great mapping technology loaded on the Windows phone. It can supply this quite easily to everyone.

I haven’t once mentioned Apple yet. They use other search engines (and maybe the longer term strategy is something like what the Dolphin browser does: use Siri to search multiple search engines and aggregate the results so the user has no idea what search engine is being used). They have their own messenger service in iMessages. They have their own photo & video storage site – the iCloud. For maps, they are using OpenStreetMaps after having ditched Google Maps. I see Apple building their own ecosystem and going it alone.

What about developer appeal? I see many a developer hacking on a Mac OS X laptop or a Linux laptop. With the Apple ecosystem, it is obvious to develop on OSX. With the Google Android ecosystem and the rest of their toolkit, its clear you can be OS-agnostic (they support Mac, Linux, Windows). With the Microsoft/Nokia ecosystem? It seems like you need a Windows box, and that automatically turns me away quite quickly (though upcoming HTML5/CSS/JavaScript will allow more development on this platform, in an OS-agnostic sense). Facebook is OS-agnostic too.

It is an exciting time ahead. All of this is great for consumers! Ecosystems are a building and it is awesome to see alliances being built

Related posts:

  1. HTC, Android, Facebook
  2. Microsoft blackouts… Software Freedom
  3. A letter to the folk at Yahoo!

Categories: Aligned Planets

LCA2009 News: LCA2013 Earlybird Registrations Open

October 2, 2012 - 15:45
Let the Celebrations Begin!, one of the largest open source conferences in the southern hemisphere, has now opened registrations. For a strictly limited time, discounted 'early bird' tickets are available through the conference website at

The 2013 conference builds on a long tradition of sharing technical know-how between seasoned open source gurus and newcomers to the community. Since its inception in 1999, the conference has moved around Australia and New Zealand, most recently to Ballarat, Victoria, and Brisbane, Queensland. This year, the conference is in Canberra in celebration of our national capital’s centenary year. The conference was last hosted in Canberra in 2005, and it has grown significantly since then, bringing some unique challenges to the organising team.

In true open source style, the conference is run entirely by volunteers, who are often drawn from a local Linux user group. This year is no exception, with the core organising team all being long standing members of the Canberra Linux Users Group (CLUG), which hosts meetings at the Australian National University (ANU) once a month. CLUG and the ANU have been major supporters of for many years running, and are proud to be involved again this year.

Many of the original 2005 organisers have returned for the 2013 effort, including Michael Still, who has stepped into the shoes of Conference Director (and is affectionately referred to as “The Grand Catamaran” for reasons known only to the core organising team). Michael says that, while the role of Conference Director is time consuming and sometimes stressful, it also can also be very rewarding: "the opportunity to work with so many talented people, to rub shoulders with the open source elite, and of course to develop skills in new areas, is very valuable and also a whole lot of fun".

The current organising committee has been working together since mid-2011 in order to bring the 2013 conference together. There's a lot to do, with the conference running over six days, offering over 100 presentations (including four keynotes and twelve miniconferences), four formal social events, delegate accommodation, hundreds of giveaways, and moving over 500 potential delegates into and around the city. The group is as diverse as the tasks they need to complete, though, with highly experienced developers, systems administrators, engineers, and technical communicators amongst the team.

Perhaps the most important part of any conference is the speaker lineup. has broken with tradition and announced their conference programme much earlier than usual. Featured on the programme this year are open source luminaries such as Jonathan Oxer, Noirin Plunkett, and local developer Andrew Tridgell. The conference organisers, together with the papers committee, have gone to great effort to ensure that the programme is stocked with deep technical content. The focus this year is on what's coming on the technical horizon, from the latest developments in the the Linux kernel, to working with remote clusters and cloud technology. Still to be announced, however, are the four keynote speakers. Traditionally, conference keynotes are big names in the open source space, with previous years boasting such respected speakers as Jacob Applebaum and Vint Cerf.

The social events are also an important part of the experience for delegates, with the main conference dinner, called the 'penguin dinner', the highlight of the week. This year, delegates are being treated to a relaxed evening on Mount Stromlo, where they will be able to delight in some of the best views the city has to offer, and enjoy a relaxed 'backyard barbecue'-style dinner. The team are also promising some other events for the evening, just in case the view isn't quite exciting enough for you. The other highly anticipated event is the Professional Delegates' Networking Session (PDNS), which for the first time is being held as a breakfast, located in the breathtaking Gandel Hall at the National Gallery of Australia.

As an open source event, the conference is largely reliant on their sponsors. is overseen and managed by Linux Australia, who use the conference as their primary incubator for open source development throughout Australia and New Zealand. This year, is also supported by IBM, HP, Anchor Systems, Defence Signals Directorate, and Linux Magazine. Without the generous help of these partner organisations, there would be no

Canberra is expected to be in full party mode during 2013, with the ACT Government spending over $30 million to ensure that the city celebrates its 100th birthday in serious style, and 2013 will be no exception. Head on over to now and grab your discounted early bird ticket quickly while they last. Then go and put your party shoes in your suitcase, because you're going to need them.

About showcases the best of open source and community-driven software and hardware, and it’s coming to the Australian National University from 28 January to 2 February, 2013. The conference provides a great opportunity for open source developers, users, hackers, and makers to share their ideas and further improve their projects. More information and tickets are available from

Categories: Aligned Planets

Keith Packard: DRI-Next

September 29, 2012 - 06:08
Thoughts about DRI.Next

On the way to the X Developer’s Conference in Nuremberg, Eric and I chatted about how the DRI2 extension wasn’t really doing what we wanted. We came up with some fairly rough ideas and even held an informal “presentation” about it.

We didn’t have slides that day, having come up with the content for the presentation in the hours just before the conference started. This article is my attempt to capture both that discussion and further conversations held over roast pork dinners that week.

A brief overview of DRI2

Here’s a list of the three things that DRI2 currently offers.

Application authentication.

The current kernel DRM authentication mechanism restricts access to the GPU to applications connected to the DRM master. DRI2 implements this by having the application request the DRM cookie from the X server which can then be passed to the kernel to gain access to the device.

This is fairly important because once given access to the GPU, an application can access any flink’d global buffers in the system. Given that the application sends screen data to the X server using flink’d buffers, that means all screen data is visible to any GPU-accessing application. This bypasses any GPU hardware access controls.

Allocating buffers.

DRI2 defines a set of ‘attachment points’ for buffers which can be associated with an X drawable. An application needing a specific set of buffers for a particular rendering operation makes a request of the X server which allocates the buffers and passes back their flink names.

The server automatically allocates new buffers when window sizes change, sending an event to the application so that it knows to request the new buffers at some point in the future.

Presenting data to the user.

The original DRI2 protocol defined only the DRI2CopyRegion request which copied data between the allocated buffers. SwapBuffers was implemented by simply copy data from the back buffer to the front buffer. This didn’t provide any explicit control over frame synchronization, so a new request, DRI2SwapBuffers, was added to expose controls for that. This new request only deals with the front and back buffers, and either copies from back to front or exchanges those two buffers.

Along with DRI2SwapBuffers, there are new requests that wait for various frame counters and expose those to GL applications through the OMLsynccontrol extension

What’s wrong with DRI2?

DRI2 fixed a lot of the problems present with the original DRI extension, and made reliable 3D graphics on the Linux desktop possible. However, in the four years since it was designed, we’ve learned a lot, and the graphics environment has become more complex. Here’s a short list of some DRI2 issues that we’d like to see fixed.

  • InvalidateBuffers events. When the X window size changes, the buffers created by the X server for rendering must change size to match. The problem is that the client is presumably drawing to the old buffers when the new ones are allocated. Delivering an event to the client is supposed to make it possible for the client to keep up, but the reality is that the event is delivered at some random time to some random thread within the application. This leads to general confusion within the application, and often results in a damaged frame on the screen. Fortunately, applications tend to draw their contents often, so the damaged frame only appears briefly.

  • No information about new back buffer contents. When a buffer swap happens and the client learns about the new back buffer, the back buffer contents are always undefined. For most applications, this isn’t a big deal as they’re going to draw the whole window. However, compositing managers really want to reduce rendering by only repainting small damaged areas of the window. Knowing what previous frame contents are present in the back buffer allows the compositing manager to repaint just the affected area.

  • Un-purgable stale buffers. Between the X server finishing with a buffer and the client picking it up for a future frame, we don’t need to save the buffer contents and should mark the buffer as purgable. With the current DRI2 protocols, this can’t be done, which leaves all of those buffers hanging around in memory.

  • Driver-specific buffers. The DRI2 buffer handles are device specific, and so we can’t use buffers from other devices on the screen. External video encoders/cameras/encoders can’t be used with the DRI2 extension.

  • GEM flink has lots of issues. The flink names are global, allowing anyone with access to the device to access the flink data contents. There is also no reference to the underlying object, so the X server and client must carefully hold references to GEM objects during various operations.

Proposed changes for DRI.Next

Given the three basic DRI2 operations (authentication, allocation, presentation), how can those be improved?

Eliminate DRI/DRM magic-cookie based authentication

Kristian Høgsberg, Martin Peres, Timothée Ravier & Daniel Vetter gave a talk on DRM2 authentication at XDC this year that outlined the problems with the current DRM access control model and proposed some fairly simple solutions, including using separate device nodes—one for access to the GPU execution environment and a separate, more tightly controlled one, for access to the display engine.

Combining that with the elimination of flink for communicating data between applications and there isn’t a need for the current magic-cookie based authentication mechanism; simple file permissions should suffice to control access to the GPU.

Of course, this ignores the whole memory protection issue when running on a GPU that doesn’t provide access control, but we already have that problem today, and this doesn’t change that, other than to eliminate the global uncontrolled flink namespace.

Allocate all buffers in the application

DRI2 does buffer allocation in the X server. This ensures that that multiple (presumably cooperating) applications drawing to the same window will see the same buffers, as is required by the GLX extension. We suspected that this wasn’t all that necessary, and it turns out to have been broken several years ago. This is the traditional way in X to phase out undesirable code, and provides an excellent opportunity to revisit the original design.

Doing buffer allocations within the client has several benefits:

  • No longer need DRI2 additions to manage new GL buffers. Adding HiZ to the intel driver required new DRI2 code in the X server, even though X wasn’t doing anything with those buffers at all.

  • Eliminate some X round trips currently required for GL buffer allocation.

  • Knowing what’s in each buffer. Because the client allocates each buffer, it can track the contents of them.

  • Size tracking is trivial. The application sends the GL the of the viewport, and the union of all viewports should be the same as the size of the window (or there will be undefined contents on the screen). The driver can use the viewport information to size the buffers and ensure that every frame on the screen is complete.

Present buffers through DMA-buf

The new DMA-buf infrastructure provides a cross-driver/cross-process mechanism for sharing blobs of data. DMA-buf provides a way to take a chunk of memory used by one driver and pass it to another. It also allows applications to create file descriptors that reference these objects.

For our purposes, it’s the file descriptor which is immediately useful. This provides a reliable and secure way to pass a reference from an underlying graphics buffer from the client to the X server by sending the file descriptor over the local X socket.

An additional benefit is that we get automatic integration of data from other devices in the system, like video decoders or non-primary GPUs. The ‘Prime’ support added in DRI version 2.8 hacks around this by sticking a driver identifier in the driverType value.

Once the buffer is available to the X server, we can create a request much like the current DRI2SwapBuffers request, except instead of implicitly naming the back and front buffers, we can pass an arbitrary buffer and have those contents copied or swapped to the drawable.

We also need a way to copy a region into the drawable. I don’t know if that needs the same level of swap control, but it seems like it would be nice. Perhaps the new SwapBuffers request could take a region and offset as well, copying data when swapping isn’t possible.

Managing buffer allocations

One trivial way to use this new buffer allocation mechanism would be to have applications allocate a buffer, pass it to the X server and then simply drop their reference to it. The X server would keep a reference until the buffer was no longer in use, at which point the buffer memory would be reclaimed.

However, this would eliminate a key optimization in current drivers— the ability to re-use buffers instead of freeing and allocating new ones. Re-using buffers takes advantage of the work necessary to setup the buffer, including constructing page tables, allocating GPU memory space and flushing caches.

Notifying the application of idle buffers

Once the X server is finished using a buffer, it needs to notify the application so that the buffer can be re-used. We could send these notifications in X events, but that ends up in the twisty mess of X client event handling which has already caused so much pain with Invalidate events. The obvious alternative is to send them back in a reply. That nicely controls where the data are delivered, but causes the application to block waiting for the X server to send the reply.

Fortunately, applications already want to block when swapping buffers so that they get throttled to the swap buffers rate. That is currently done by having them wait for the DRI2SwapBuffers reply. This provides a nice place to stick the idle buffer data. We can simply list buffers which have become idle since the last SwapBuffers reply was delivered.

Releasing buffer memory

Applications which update only infrequently end up with a back buffer allocated after their last frame which can’t be freed by the system. The fix for this is to mark the buffer purgable, but that can only be done after all users of the buffer are finished with it.

With this new buffer management model, the application effectively passes ownership of its buffers to the X server, and the X server knows when all use of the buffer are finished. It could mark buffers as purgable at that point. When the buffer was sent back in the SwapBuffers reply, the application would be able to ask the kernel to mark it un-purgable again.

A new extension? Or just a new DRI2 version?

If we eliminate the authentication model and replace the buffer allocation and presentation interfaces, what of the existing DRI2 protocol remains useful? The only remaining bits are the other synchronization requests: DRI2GetMSC, DRI2WaitMSC, DRI2WaitSBC and DRI2SwapInterval.

Given this, does it make more sense to leave DRI2 as it is and plan on deprecating, and eventually eliminating, it?

Doing so would place a support burden on existing applications, as they’d need to have code to use the right extension for the common requests. They’ll already need to support two separate buffer management versions though, so perhaps this burden isn’t that onerous?

Categories: Aligned Planets

Colin Charles: Tax incentives for angel investors in Malaysia

September 29, 2012 - 03:08

Today there were some incentives for angel investors announced in Malaysia as part of Budget 2013.

Who qualifies as an angel investor? Your annual income must exceed RM180,000 per annum and you must be a tax resident to qualify for the deduction.

What do you get? Total investment as an angel will be allowed as a deduction against all income.

When is this valid? From Jan 1 2013 to Dec 31 2017, and you need to apply via the Ministry of Finance.

Some details: as an angel, you must hold at least 30% of the shares in the company you’re investing in for 2 years, and you must pay up for the shares in cash. The company needs to have at least 51% Malaysian ownership.

What do I think?

Quite simply, the qualification income is something I see some people complain about, but this is similar to what America calls an accredited investor. I have no issue with the RM180,000/annum income. Feel free to hit up all those people you know with Visa Infinite, World MasterCard, Premier banking, etc. ;-)

Application via the Ministry of Finance (MoF) seems a little dodgy. The potential of red tape here is high. This is definitely a turn-off.

Does this benefit startups? Angel investors shouldn’t be making a 30% investment in a company. It is ridiculous. Consider giving away 20% of the company in an angel round, sure, but with just one angel walking away with 30% of the shares for 2 years?!?

Angels in Malaysia typically make RM20-50k investments (for up to 20% on the high side from what I’ve gathered). Very rarely do they hit the RM100k mark. Most accelerators are taking up an average of 6-8% for about RM15-18k investment already for 3 founders.

Startup founders are also not going to want to give away 30% of the company for a small sum of money. Many believe they are worth more. I guess you have to thank the media hype cycle for this.

Alas, it is a good start for Malaysia to be looking out for such things. Possibility to help boost the startup ecosystem.

Update: I thought about this a little more and realised that I applied a very myopic view to this piece. Reason is simple: I focus on tech startups & the angels that go with them. In this day and age, software (be it mobile or web-based) doesn’t take much in terms of cash to prove yourself. In other industries like manufacturing, biotechnology, film making, etc. you might look at much higher investments for 30% or more, but it isn’t something I know much about.

Related posts:

  1. A few thoughts on the startup ecosystem in Malaysia
  2. On the term “go global”
  3. The chop space (digital loyalty cards) in Malaysia

Categories: Aligned Planets

Colin Charles: Offensive Facebook status update on Islam lands Malaysian man in hot soup

September 27, 2012 - 02:48

In today’s online beat, you’ll see reports of a 25 year old man who’s been picked up by the police for questioning on a Facebook post of his. The Star covers it. As does The Malaysian Insider.

Some facts that we know from the above two reports:

  1. Man made the posting in July 2012.
  2. Yesterday (Tuesday, 25 September) at 10pm, some 20 people visited his house and damaged it.
  3. 11.03pm on 25 September a police report was made.
  4. On Wednesday 26 September (today) at 11am the student had been picked up & a laptop confiscated.
  5. He was arrested under Section 4(1) of the Sedition Act and Section 298A of the Penal Code for causing disharmony, disunity, enmity, hatred or ill-will on grounds of religion.
  6. Man claims he had been hacked and his laptop had been stolen before.

How do we go from a Facebook posting to people finding his house? I decided to do a little sleuthing while sitting in the airport lounge.

The first post mentioning his name (Gopinath Jayaratnam) that Twitter search can find was made at 4.58pm on 25 September 2012. Its clear from his Facebook profile he lives in Klang. The first post providing information about where he lives came from Ariff Amran at 7.44pm on 25 September 2012. It also includes his identity card (IC) number. It didn’t take long before the masses were united under a hashtag: the KL traffic update hashtags #kltu & #klrb. First posting that was retweeted came at 9.35pm (this includes an image of the original Facebook posting which has since been removed – now all that exists is an apologetic message), followed by 9.57pm with his IC & home address.

At 10.09am today (26 September), a user has uploaded a photo of Gopinath’s damaged house. Its clear it was taken the night before. Another gem is at 8.58am today morning, they decided to talk about his car as well.

I find all these acts unwarranted and unjustified.

I don’t know what will happen in this scenario as its too early to tell. I am not going to comment on the law with the exception that I was under the impression that the Sedition Act was to be repealed. A lawyer in KL, Foong Cheng Leong was quick to jump on the fact that even though Gopinath claims he had been hacked, the new evidence act amendments, section 114A applies.

The Twitter stream has nothing but nasty comments towards Gopinath. There are Facebook posts that have 20,000 likes talking about him. At 25, I’m sure he has a bright future ahead of him. After all, I can think of many politicians that violate Section 298A of the Penal Code.

My advice to users of the web: be careful of your passwords. Be careful about being broken into. Be careful about having your personal devices stolen. Also be wary about your personal information that you have available on the Web. And never assume that Facebook status update is private.

Related posts:

  1. Malaysian censorship doesn’t cross borders but what if you’re a Malaysian startup?
  2. Pompous Malaysian Minister discourages immersion in Western-created sites such as Facebook, Twitter
  3. Air your thoughts via Facebook

Categories: Aligned Planets

Colin Charles: Google eventually blocks video in Malaysia

September 27, 2012 - 01:39

On the 15th I wondered what would Google do? On the 17th, it was clear that Google buckled and blocked the video to Malaysians. To be fair, it did the same in Singapore and many other nations. That did not stop angry protestors to hang out in front of the US Embassy in Kuala Lumpur on the 21st.

But on the Internet, one cannot stop the free flow of information.

This is something Malaysian censors have to come to grips with. After all, even the chief censor in Myanmar has decided to call it a day.

That’s why the offending clip is still online as reported on the 18th. People, citizens of the world, have made copies of the offending video (it is a no brainer to download the video from YouTube) and have re-uploaded it. So now it becomes a cat & mouse game to find the video for the Malaysian authorities and report it to Google. I have no doubt that at least 3.8 people in some government department is working on this task.

Only way for the Malaysian government to ensure that Malaysians never see this content? Block YouTube. I’m sure that would be hugely unpopular. Besides, isn’t there Vimeo and plenty of other services?

Malaysian Government: 0 Internet: 1

Related posts:

  1. Malaysian politicans need to focus on the economy, not power plays
  2. Digital Media Consumers
  3. Google Maps Malaysia launched

Categories: Aligned Planets

Colin Charles: my pre-upgrade iOS6 thoughts

September 24, 2012 - 22:25

My Twitter, Facebook and Google Plus streams are just filled with people complaining about iOS 6. The luddite that I am, I haven’t upgraded my phone nor my tablet. One thing I’ve learned about relying on my devices? Never ever do an upgrade until the kinks get fixed.

Most common complaint? Maps. Google Maps is gone and now there is a new, inaccurate maps app. A blog tracking it has been setup too. I presume that this is better in the long run — you’ll get better crowd sourced maps. Question is, will it go back directly to the source? I have no idea.

The YouTube app is now missing. This is easily fixed by downloading it.

What annoys me about iOS 6? The fact that it won’t run on my first generation iPad. I bought mine the first week of April in 2010 (2 years 5 months). This is just a little over two years old. The iPhone 3GS has been around since mid June 2009 (3 years 3 months and continuing). It receives the iOS 6 upgrade.

This isn’t a problem yet but when I can’t get apps on my iPad, I will start to get thoroughly annoyed. I know uber-iOS developers like Marco might drop newer Instapaper support in future releases, which will annoy me.

I after all have a 64GB iPad which I use to consume content mostly: read the NYTimes, Instapaper, Kindle, browse the web in Safari, watch videos in VLC, watch video podcasts. That’s pretty much all I really care about. There are games like Scrabble which I play with my family, and Plants vs Zombies which I finished a long time ago, but this isn’t its core usage. Oh, and the iPad “just works fine”.

I’ll eventually update my iPhone 4 (because I don’t plan to buy the amazing iPhone 5). I know a friend mentioned that there was no Siri on the iPhone 4. I don’t think Siri is a killer feature unless you’re living in the USA (with all its tie-ins to data sources).

Changing connectors? Application inconsistencies? In retaliation, I did pick up a Google Nexus 7 (its half the price of me upgrading to the new iPad 3 64GB size; and is cheaper than the 16GB iPad3 by RM500). Its 16GB size is too small for me to load up with movies, it comes with no casing, and the 7? screen size might be too small to watch TV on, but we’ll see.

Related posts:

  1. Upgrade to Snow Leopard
  2. Upgrade to Lion
  3. The iPad: Early-experience notes

Categories: Aligned Planets

Colin Charles: Gary Vaynerchuk: an entrepreneur’s life video

September 24, 2012 - 20:33

Watch An Entrepreneur’s Life: Gary Vaynerchuk. It is a little less than 8 minutes long, but it is awesome. Some quick points:

  • Live life in lifetime value. There’s a great anecdote on looking to hang on to good customers rather than having to find new customers. He cares about who wins the war not the battle (similar saying: it is a marathon, not a sprint).
  • Storytelling in business is underrated. Care about the way things get presented. Storytelling is important. Understand what the consumer wants, then backtrack. Tell a story and get them  there. This is the difference between marketing & sales. Steve Jobs was a good story teller.
  • Content is king. However, content is also a commodity.
  • During his Wine Library TV days, it is not just the 40 minutes a day he spent in front of the camera. It’s the 15 hours a week spent replying to every email, tweet, forum message. I guess this is the important thing about building community.
  • What drives Gary? The climb to the top of his goal (owning the NY Jets). The journey.

Related posts:

  1. Video cameras and Linux Redux – Canon MV920
  2. Video cameras and Linux
  3. Multiple parties video-conferencing with Skype and Global IP Video

Categories: Aligned Planets

Colin Charles: Faith in Bernama the national news agency wanes

September 21, 2012 - 17:22

I just read that Bernama has admitted to doctoring a photo with the Prime Minister. Of course they are crying sabotage and denying any previous edits. Stop and read that, its well worth it.

I’m not surprised. Neither should you be. Anything that comes from Bernama tends to be pro-government. I gave up trust in them since 2006, when I had a little issue with them stealing my photo without attribution which I’ll talk about in a bit.

Bernama is an independent body placed under the Ministry of Information, Culture & Communication, started by an act of parliament. Wikipedia’s Bernama entry isn’t half bad, and if you’re inclined, you can read the Bernama Act 1967. Its quite clear that beyond subscription income, they’re probably funded by the ministry (this isn’t a fact but a presumption – I have no time to dig this up).

So from a Nineteen Eighty-Four perspective, these folk are akin to the Ministry of Truth

What’s my beef with Bernama? They have no issue with using what’s not theirs, i.e. they don’t believe in proper attribution. They do not respect the Creative Commons licenses either. They didn’t in 2006, and they probably don’t in 2012.

Imagine my shock when a photo of mine was attributed to be a Bernamapic in an article? Besides a tighter crop, the news agency didn’t respect the attribution, non-commercial aspect of the CC license. Bernama charges up to RM500/month to access its newswire for blogs, and this cost is bound to go up for other print publications. Can’t afford a photographer?

Speaking to them, they claimed that they would investigate but naturally, nothing came of it. I had thought of taking legal action but decided against it as my life wasn’t in Malaysia.

Alas, I have never had much faith in them, and neither should you.

X-Mozilla-Status: 0001

X-Mozilla-Status2: 00800000

Message-ID: <>

Date: Mon, 30 Oct 2006 18:40:46 +1100

From: Colin Charles <>

User-Agent: Thunderbird (Macintosh/20060909)

MIME-Version: 1.0


Subject: Using pictures without attribution

Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Content-Transfer-Encoding: 7bit




We spoke on the phone recently


Here are the photos (sources):


It was used in the star:


And in the NST in a article titled “A taste of Malaysia in Melbourne”


Now, I don’t mind you using the photos, but you have to accept copyright 

and attribute it to where you got it from. Saying it came from Colin 

Charles, will be a start. (i.e. I’m not even asking for payment)


This is a sample of more pictures to come, from the event at:

(there’ll be a fiestamalaysia group on Flickr, if you’ve noticed from 

the above picture)


kind regards


Colin Charles,


Related posts:

  1. Fedora News Updates #10
  2. Fedora News Updates #7
  3. Fedora News Updates #8

Categories: Aligned Planets

LCA2009 News: Conference Programme Announced

September 20, 2012 - 14:23

This year, Australia’s premier open source conference, has broken with tradition and released their draft programme ( and partner’s programme ( schedules before registrations open on 1 October.

The conference will feature six streams of talks across five days. The first two days will be for miniconferences, with the rest of the conference dedicated to eighty-four talks and six tutorials, on topics ranging from software engineering to systems administration. This year, there is a heavy focus on deep technical content, including many talks on the Linux kernel, and various hardware platforms. The conference also boasts four keynotes from pivotal industry figures, which will be announced in the next few months.

The partner’s programme has become a traditional element of, but this is the first year to announce a draft schedule before tickets for the programme go on sale. The partner’s programme consists of a family friendly tour of tourist attractions around Canberra.

Conference Director Michael Still said “releasing the schedule for the conference is a significant milestone and I’m very pleased that we hit it ahead of our internal timeline. We are also proud to have a series of simply fantastic presenters this year, and expect to be presenting a solid conference that offers great value for money.”

Early bird registrations for the conference open on 1 October, and discounted tickets will be available until sold out. The number of early bird tickets is strictly limited, and they usually sell out very quickly. Delegates will need to get in quickly after 1 October to make sure they get the best deal.

About showcases the best of open source and community-driven software and hardware, and it’s coming to the Australian National University from 28 January to 2 February, 2013. The conference provides a great opportunity for open source developers, users, hackers, and makers to share their ideas and further improve their projects. Early bird registrations open 1 October, see for all the info.

Categories: Aligned Planets

Colin Charles: From consumption to creation

September 16, 2012 - 17:21

Via Mozilla Webmaker:

“Mozillians are people who make things. Moving people from consumption to creation is Mozilla’s goal.” - Mitchell Baker, Mozilla Chair and Chief Lizard Wrangler

This is a brilliant goal. To build a generation of webmakers. Getting people to create more than just consume.

It is widely stated that 1% create, 10% curate, the rest consume (quote from Fred Wilson). Imagine if the tables were turned.

Related posts:

  1. Piracy due to lack of legal options
  2. Does open source need to be “organic”?
  3. Gen Kanai from Mozilla speaks about localisation in Firefox and more

Categories: Aligned Planets

Colin Charles: Malaysian censorship doesn’t cross borders but what if you’re a Malaysian startup?

September 16, 2012 - 15:33

The White House did ask YouTube to check if there was a violation of terms of service for the recent video that’s causing the Muslim world to go up in storm. It seems like there isn’t, and the video continues to stay up. Good on Google, good on YouTube, and here’s a win to freedom of expression & speech.

Today I see Dr. Rais Yatim, Information Communication & Culture Minster of Malaysia ask for YouTube to remove the movie. Its just smart that he realizes that YouTube isn’t controlled & created in Malaysia so its not “without our technical capability” to remove it.

There are some problems with this line of thought.

  1. If you are a company in Malaysia, hosting user generated content, you may be subject to censorship. Will it make a difference if you’re an MSC status company as there is a bill of guarantees? Or does it not matter?
  2. Rais continues on that Malaysia is an Islamic nation. It is a secular nation with Islam as the religion of the federation. It is a great pity he chooses to skew facts on what is supposed to be Malaysia Day today.
  3. Censorship without due course. Malaysia has many obscure laws that are passed as acts of parliament while the current ruling regime has been in power since independence. They have been so used to just sending notices for removals that they’ve forgotten that they need to consult the law. And chances are there are many laws that affect freedoms of speech & expression, even though they may be constitutionally protected. Companies incorporating in Malaysia need to take this into consideration.

Its good that Google isn’t simply buckling under pressure (another):

Google Malaysia communications and public affairs head Zeffri Yusof said they received the official request from the Malaysian Communications and Multimedia Commission (MCMC) and that both parties were discussing the next course of action.

“Google adheres to the laws of the land in every country it has a domain in. So, (we) will act based on official complaints from the regulatory bodies,” he said.

Zeffri added, however, that the regulatory body had to cite the relevant laws or bylaws which were breached when making its complaint.

Now the onus is on the MCMC to show what laws the video contravenes so that YouTube can block it for all those coming from .my domainspace. 

What does this do to already poor investor sentiment? What does this mean for startups? What happens when some zealot finds a subversive message in Gangnam Style that may cause all the follow-ups to be deemed anti-religion?

YouTube has a message questioning if you should really be looking at the video. Adults should well, learn to behave like adults.

People to follow: Zeffri Yusof on Twitter is @zeffri. There’s also @GoogleMsia. Google+ account for +Google Malaysia.

Related posts:

  1. Job: Java developers for a startup
  2. Bloggers face draconian anti-terrorism laws in Malaysia
  3. Marina crying foul over censorship?

Categories: Aligned Planets

Mary Gardiner: Sunday Spam: toast and vegemite

September 16, 2012 - 12:59

This week, I feel the need to emphasise that linking does not imply uncritical endorsement!

Philip Roth and Wikipedia

There’s only one problem with this: Roth’s open letter is at best the (justifiably) aggrieved and confused ramblings of a man ignorantly discussing what he does not understand or remember, and at worst a deliberately malicious act inspired by nothing more than a misguided desire to flip us the Vs and maybe get paid by the New Yorker on the way.

In Response to Amanda Palmer

Is it noble to volunteer for a cash-rich for-profit enterprise? And what about when taking the gig means that you’re taking food from the mouths of people whose day job it is to play these kinds of high-pressure, high-profile concerts and ensure that the audience won’t be let down?

Is it noble to devalue the role of musicians by suggesting that their years of training and their tens of thousands of hours of practice is worth little more than a beer and a high-five?

Headspace withdraws support for RU OK? Day

In a statement released this afternoon, the organisation said it was uncomfortable about the support RU OK? Day was receiving from Gloria Jean’s because of the coffee chain’s $30,000 donation to the Australian Christian Lobby (ACL).

Girls gone Wilder

Rose Wilder Lane’s life story is arguably way more interesting than that of her mother, Laura Ingalls Wilder.

Owen Jones: William Hague is wrong… we must own up to our brutal colonial past

As India became increasingly crucial to British prosperity, millions of Indians died completely unnecessary deaths. Over a decade ago, Mike Davis wrote a seminal book entitled Late Victorian Holocausts: the title is far from hyperbole. As a result of laissez-faire economic policies ruthlessly enforced by Britain, between 12 and 29 million Indians died of starvation needlessly. Millions of tons of wheat were exported to Britain even as famine raged. When relief camps were set up, the inhabitants were barely fed and nearly all died.

Philosophy gender war erupts after call for larger role for women

It began with a private email last month from one established male philosopher to four others: Proceed with a Berlin-based conference that features 14 male speakers and no women, the writer said, and I will essentially launch a campaign to take you down professionally.

How Google Builds Its Maps—and What It Means for the Future of Everything

Or as my friend and sci-fi novelist Robin Sloan put it to me, “I maintain that this is Google’s core asset. In 50 years, Google will be the self-driving car company (powered by this deep map of the world) and, oh, P.S. they still have a search engine somewhere.”

Legal myths about the Assange extradition

Whenever the Julian Assange extradition comes up in the news, many of his supporters make various confident assertions about legal aspects of the case.

Some Assange supporters will maintain these contentions regardless of the law and the evidence – they are like “zombie facts” which stagger on even when shot down; but for anyone genuinely interested in getting at the truth, this quick post sets out five common misconceptions and some links to the relevant commentary and material.

The Joke’s on You

[Jon] Stewart and [Stephen] Colbert, in particular, have assumed the role of secular saints whose nightly shtick restores sanity to a world gone mad.

But their sanctification is not evidence of a world gone mad so much as an audience gone to lard morally, ignorant of the comic impulse’s more radical virtues. Over the past decade, political humor has proliferated not as a daring form of social commentary, but a reliable profit source. Our high-tech jesters serve as smirking adjuncts to the dysfunctional institutions of modern media and politics, from which all their routines derive. Their net effect is almost entirely therapeutic: they congratulate viewers for their fine habits of thought and feeling while remaining careful never to question the corrupt precepts of the status quo too vigorously.

Pawns in the War on Drugs

Informants are the foot soldiers in the government’s war on drugs. By some estimates, up to eighty per cent of all drug cases in America involve them, often in active roles like Hoffman’s. For police departments facing budget woes, untrained C.I.s provide an inexpensive way to outsource the work of undercover officers. “The system makes it cheap and easy to use informants, as opposed to other, less risky but more cumbersome approaches,” says Alexandra Natapoff, a professor at Loyola Law School in Los Angeles and a leading expert on informants. “There are fewer procedures in place and fewer institutional checks on their use.” Often, deploying informants involves no paperwork and no institutional oversight, let alone lawyers, judges, or public scrutiny; their use is necessarily shrouded in secrecy.

Categories: Aligned Planets

Colin Charles: The iPhone 5

September 15, 2012 - 21:33

I have been asked numerous times in the last few days: what do you think of the new iPhone 5? Will you recommend me to buy it?

Go, whet your appetite at the official iPhone page. It has a great design (thinner, lighter), it’s the same width but taller (4 inches now), comes with an awesome camera, has better battery life & comes with LTE connectivity. The feature list is impressive as are the tech specs.

Am I going to buy it? No, I’m happy with last year’s model. (ok, a little older – I’m using an iPhone 4 personally). It is a pity that I can no longer link to the site made by gina trapani & anil dash.

If you need to buy a new phone, my suggestion is of course to get the best & latest model, and that is the iPhone 5. If however your older iPhone 4S or 4 is working, I think my arguments work on why you don’t quite need to migrate yet. Put it plain & simple: the iPhone 4 I carry in my pocket “just works”. I have a mophie juice pack to extend its battery life. I have invested in the dock ecosystem tremendously (chargers for an office, two homes, as well as the travel kit; devices like a Withings BP-800 Blood Pressure Monitor, a whole lot more like music docks & those pesky things called in-car audio systems).

I wrote about the dock ecosystem a while back and Apple has decided to upgrade this, i.e. now with a Lighting connector. One has to buy a Lightning to 30-pin adapter. I understand that it was probably impossible to get the design to become much thinner, but we’re in a dilemma situation now especially when many people have i-devices, including an iPad. Gone is the ease of use of just having similar chargers. This transition period is going to be tough. Also, some countries get the adapter included for free, while others are forced to pay USD$30 for it.

Apple has decided to use a nano SIM (i.e. something smaller than a micro-SIM). People are still getting used to micro-SIM’s, and my travel kit even has a SIM cutter, because when you travel its pretty hard to find prepaid services that offer micro-SIM cards. Its impossible to cut a micro-SIM to a nano-SIM, so telcos have to support it by default. Apple doesn’t care so much about this because in their launch market (the USA), they have AT&T giving you international data roaming plans that don’t cost an arm & a leg. I have to pay anywhere between USD$12-19 to have data roaming per day.

No one knows if one of the major complaints about the iPhone is fixed – the dodgy home button. I know many iPhone users whom have owned a second phone turn on the accessibility functionality just so that they don’t have to press the home button. This is a workaround and does not work as expected. It is a disappointment for such a costly device that such things do not stand the test of time.

A lot of people sell the idea that its great to watch videos & movies on your iPhone. I’m sure many people do that, but I don’t. I watch movies on my iPad quite happily when mobile. Or on my huge LCD television when I’m home :-)

It comes with LTE. I’m sure LTE is meant to be awesome (in fact, I’ve use it regularly in South Korea, and it is fast, real fast), but my home carriers don’t support it yet. And it likely that by the time there is widespread support throughout the whole of Malaysia (heck, its still difficult to get reliable 3G access in the whole country if you step out of the Klang Valley) there will be a next generation iPhone, which is something I might pick up.

The camera on my iPhone 4 is sufficient. The camera on the 4S is awesome. And I bet the camera on the 5 will do wonders with easy panaromas, quicker photo capture, etc. It probably means I will find less need to carry a point & shoot, but this alone is not a good reason to upgrade.

I doubt that there will be much software that doesn’t run on the iPhone 4. iOS 6 will run on the iPhone 4. Apple continues to sell the iPhone 4, so it will be supported

So, am I compelled to upgrade? No. But if anything happened to my dear iPhone 4, I might consider the iPhone 5. Or with my investment in the dock connector ecosystem, I might just get an iPhone 4S :-) Happy not to be giving into the consumption economy!

Related posts:

  1. iPhone dock connector
  2. iOS Cards
  3. Getting the iPhone 3G in Malaysia

Categories: Aligned Planets

LCA2009 News: LCA2013 Programming Miniconfs Announced

September 15, 2012 - 11:45, Australia’s premier open source conference, have announced the final miniconferences for 2013, all of which address open source programming. Miniconfs are day-long sessions on a specific topic. As the name suggests, they are expected to be run as a miniature conference, with a formal schedule published ahead of time listing speakers and sessions for the day.

Underpinning all open source development is one single thing: programming. Open source programming tools are fast becoming the language of choice for many developers. According to one study*, Python is consistently listed within the top ten languages by popularity.

Open Programming: This miniconference provides an opportunity for application developers to share their techniques and practices for development with free and open source tools. It provides an opportunity to discuss programming techniques, best practices, and developer values across all open source programming languages.

Developer Automation and Continuous Integration: The Developer Automation miniconference discusses the current state of the art of open source developer tooling and testing automation. It will cover tools like Jenkins or Buildbot, build event triggers like Zuul or Tarmac, and code review systems like Gerrit or Launchpad.

Browser: The humble web browser is a key component of the modern internet. The browser miniconference is focused on the capabilities of browsers, and how to provide web developers with new and open technologies to deliver web users an experience like never before.

About showcases the best of open source and community-driven software and hardware, and it’s coming to the Australian National University from 28 January to 2 February, 2013. The conference provides a great opportunity for open source developers, users, hackers, and makers to share their ideas and further improve their projects. Early bird registrations open 1 October, see for all the info.

Categories: Aligned Planets

Keith Packard: Altos1.1

September 14, 2012 - 09:28
AltOS 1.1 — Bug fixes and some nice new features

Bdale and I are pleased to announce the release of AltOS version 1.1.

AltOS is the core of the software for all of the Altus Metrum products. It consists of cc1111-based micro-controller firmware and Java-based ground station software.

We’ve spent the last flying season chatting with people flying TeleMetrum and TeleMini boards and they came up with some great ideas to add to the system.

AltOS Firmware — Features and fixes

There are bug fixes in both ground station and flight software, so you should plan on re-flashing both units at some point. However, there aren’t any incompatible changes, so you don’t have to do it all at once.

New features:

  • Apogee-lockout timer. For situations where the normal apogee determination algorithm could be fooled, we’ve added a timeout value to prevent premature firing of the apogee charge. Normal flights won’t need this, but a couple of users asked for this feature.

  • RSSI value for Monitor Idle mode. The TeleDongle firmware has been updated to report signal strength information for data received from the altimeter. This allows the user to see how well the radio is working without having to switch to flight mode.

  • Force the radio to 434.550MHz. This is useful with TeleMini devices where the only way to talk to the device is through the radio. If you don’t know the frequency, it’s really hard to make that work.

Bug fixes:

  • Stale telemetry data reported when switching frequencies. TeleDongle would accidentally re-transmit old telemetry packets when the radio frequency was changed. This would be harmless except that when scanning to find the frequency used by an altimeter, you’d appear to get packets at every frequency.
AltosUI — Easier to use

AltosUI has also seen quite a bit of work for the 1.1 release. There aren’t any huge new features, but some activities are restructured to make them easier to navigate. And, of course, we’ve fixed a bunch of bugs.

New features:

  • Configure Ground Station activity. This provides a way to set the default radio frequency for each TeleDongle. This replicates the frequency menu present in the Monitor Flight activity, but doesn’t also bring up that giant window.

  • Support the apogee lockout timer. This just adds another entry in the dialog for configuring the altimeter to configure the new timer. By default, the timer is disabled, allowing the apogee detection code in the flight computer to operate normally.

  • Add imperial units option. When enabled, this uses imperial units (feet and miles) for all values on the screen and in the voice announcements.

User interface changes:

  • Make the look-n-feel configurable. Java offers many different user interface styles on each platform. This exposes the available set and lets the user pick one. By default, we continue to use the native platform appearance.

  • Add an ‘Age’ element to the Monitor Flight UI. This shows how long it has been since the last valid telemetry packet was received, making it easy to tell when communications are lost.

  • Change flight data downloading. Instead of selecting which to download and which to delete at the same time, the interface now has separate steps for downloading and then deleting files. This makes it easier to verify that the files were downloaded before deleting flights from the on-board memory.

  • Re-compute boost and landing times. Given the whole flight history, it’s easy to find the time when the rocket started and stopped flying. Having these get recomputed means the boost time, acceleration values and main descent rates are computed more accurately.

Bug fixes:

  • Wait for 10 valid GPS messages before marking GPS as ready. Before this fix, GPS was marked as ready when 10 valid packets were received from the flight computer after the first valid GPS data arrived. This waits for 10 valid GPS packets instead.

  • Fix Google Earth file export. The format requirements for Google Earth files became more strict in recent releases; this patch changes how the files are formatted to make them work again.

  • Make AltosUI run on Mac OS X “Lion”. Apple changed the default heap size for Java applications with this release, dramatically reducing the memory available to applications. This would cause map tiles to fail to load and other random problems.

  • Improve COM port handling on Windows. This eliminates the need to wait 5 seconds between closing and re-opening devices, and also eliminates other spurious errors when opening devices.

Categories: Aligned Planets

LCA2009 News: Papers, Papers, Papers!

September 9, 2012 - 16:30

It’s been a couple of weeks since we closed the for Call for Presentations, and the papers committee has been working really hard to review all of your submissions. We had well over 300 proposals to read, and even with a team of twenty people to review them all, there were some days where it just didn’t feel as though we would be able to make it. In the end, we did it, though. It took us four weeks, and we made over 3000 reviews all up. That’s a lot of reviews!

It turns out that that wasn’t even the hard part though. The hard part was where members of the papers committee came from all around Australia and New Zealand to do the final cut, and create a program. It was a long weekend, and everyone needed a beer or three once we were done, just to get over the shock of it all. But the good news is that we’ve come up with something that we think is really awesome. Like, REALLY awesome. LCA in Canberra next year is going to be AMAZING.

So now we’re busy contacting everyone who has been accepted to make sure that they can actually come and give their talk. This is happening in stages and it might take us a little while. So if you haven’t heard from us yet, DON’T PANIC. We’ll get through the list soon, and everyone will know if they’ve been accepted or not before too long. This is partly because we want to make sure our system doesn’t break down from overload, and partly so that our speaker liaisons don’t break down from overload and set the system on fire. Or something.

But, once all that has happened, and assuming nothing gets set on fire, we open early bird regos on 1 October and the real fun starts. So make sure you know where your party shoes are, you’re gonna need them real soon now ...

Read this post on our blog
Categories: Aligned Planets

David Woodhouse: 7 Sep 2012

September 8, 2012 - 06:41

Found myself shouting at the radio again today. These fucking retards with their petition to have opt-out filtering on Internet connections... obviously have no bloody clue what they're talking about. Everyone with a clue knows that the filtering doesn't work. You might as well legislate for the sun to shine in the middle of the night, or that ? = 3.

Anyone with half a clue can always get around the filters; it only really prevents you from stumbling over such stuff by accident. Which wasn't very likely in the first place. And to my knowledge there has never been a filtering system that hasn't suffered "feature creep" and been used to block access to things other than what it was originally purported to block. Like the one which blocked the whole of Wikipedia a year or two ago.

If you support this petition, that doesn't mean you're a bad person. Just stupidly naïve and clueless. It cannot work, and you make bad things happen by trying to persuade politicians to impose it. Please stop.

Categories: Aligned Planets

Colin Charles: Quotable on 10Gen+MongoDB

September 7, 2012 - 19:44

Via Pandodaily (an article you definitely should read):

The company has big plans. 10Gen’s vision is to build a software platform company akin to Redhat or Oracle, Schireson says. “That’s the type of company we want to build,” he says. “Those companies don’t get acquired.” — 10gen President, Max Schireson

I’m glad that this is the vision. This is something I’m very positive about. I hope that this vision is realized for Max & the rest of 10gen. This is a company that has raised five rounds of venture funding ($73 million), currently valued at over $550 million.

No related posts.

Categories: Aligned Planets