31 March 2008

DisplayLink for Mac OSX

Something work related for a change... As you can see from my profile I work for DisplayLink where we make USB display technology. Most people can't believe that it will be very good, but whenever anyone sees one of our docks or adapters in action are impressed by the quality and the ease of use.

Here at DisplayLink we have just released the Beta version of our Mac OSX software. This means you can now use our USB displays on Mac - which I imagine could be very nice for the MacBook Air if the monitor has an integrated USB hub.

You can get the Beta drivers here. The general download page is here. The Mac team have done a great job on this and it looks very impressive when you see it going. As it is a beta it is not perfect, but it is very functional and robust.

I've installed it on my MacBook Pro now, but I forgot to bring anything home to actually test it - duh!

30 March 2008

C++ Is Great

There is an interesting interview with Bjarne Stroustrop on DDJ. It covers mainly how to train people in C++ and the future of C++.

The most interesting part of the entire interview is the bit about the ISO standard committee and how it all works. People seem to complain C++ doesn't move fast enough (although the same people also complain there is too much as well). What interested me is that it is lacking in funds. Now I am pretty sure that every software company in the world has some C++ to varying degrees with most of them being critical to the company itself. Yet, there is no funding or involvement in what is an open process for the language, the most I have seen by some is some people write one of those whitepapers (for instance the EASTL) and then chuck it into the ether. It looks like it is a lot of hard work to really be serious about and to succeed at improving the language, and even Microsoft couldn't succeed in circumventing the process.

I know this could be considered pot calling the kettle black because I have no involvement and nor does my employer(or my previous employers), but I am still fresh at knowing exactly what is going on (even at the age of 30!).

I suppose in an ideal world there would be less Not-Invented-Here (NIH) Syndrome and more participation in helping to improve the libraries and the core language. I am not saying though that the people who use it are to blame as the committee should really have some form of outreach better than they currently have. Boost is being moderately successful in its outreach which is helped by the mailing lists/forums and website as well as participating in things like the Google Summer Of Code. Just imagine if the C++ Standards Committee could get the talented top 1% of C++ developers involved... As developers we could help shape the future of the language and provide real solutions, which is more than could be said for something that is commercially controlled (even if it is published as an open standard).

Boost 1.35 Released

A new version of the Boost Library for C++ has been released. Version 1.35 adds 12 new libraries as well as the usual improvements and bugfixes. Also there is a new look website which is a nice looking refinement with better access to the documentation. Boost is a great addition to any C++ developer's armament.

I think this is also the first release using all their new tools and processes (Subversion, Trac, website and other stuff) so I think it is possible that future releases will be more frequent with this framework in place, because I think the plan was originally to have a release twice a year. That might mean there is a possibility of the logging library by John Torjo being integrated soon as well as some others.

Some of the work brings the current libraries in line with the new C++ TR1 library standard - mainly to do with threads.

The new libraries are:

  • Asio: Portable networking, including sockets, timers, hostname resolution and socket iostreams, from Chris Kohlhoff.
  • Bimap: Boost.Bimap is a bidirectional maps library for C++. With Boost.Bimap you can create associative containers in which both types can be used as key, from Matias Capeletto.
  • Circular Buffer: STL compliant container also known as ring or cyclic buffer, from Jan Gaspar.
  • Function Types: Boost.FunctionTypes provides functionality to classify, decompose and synthesize function, function pointer, function reference and pointer to member types. From Tobias Schwinger.
  • Fusion: Library for working with tuples, including various containers, algorithms, etc. From Joel de Guzman, Dan Marsden and Tobias Schwinger.
  • GIL: Generic Image Library, from Lubomir Bourdev and Hailin Jin.
  • Interprocess: Shared memory, memory mapped files, process-shared mutexes, condition variables, containers and allocators, from Ion GaztaƱaga.
  • Intrusive: Intrusive containers and algorithms, from Ion GaztaƱaga.
  • Math/Special Functions: A wide selection of mathematical special functions from John Maddock, Paul Bristow, Hubert Holin and Xiaogang Zhang.
  • Math/Statistical Distributions: A wide selection of univariate statistical distributions and functions that operate on them from John Maddock and Paul Bristow
  • MPI: Message Passing Interface library, for use in distributed-memory parallel application programming, from Douglas Gregor and Matthias Troyer.
  • System: Operating system support, including the diagnostics support that will be part of the C++0x standard library, from Beman Dawes.

19 March 2008

Source Control - Subversion and TortoiseSVN 1.5

There is no official release date for Subversion 1.5 although Alpha 2 is currently available. I thought I'd post about the upcoming features that will be making their way into the release. there is also a little bit at the end about TortoiseSVN 1.5 features.

Merge Tracking

The most important feature in the upcoming 1.5. The initial concept is based on svnmerge.py but has gone far beyond that and is fully integrated into the repository format. This means it will be possible to see which revisions have yet to be merged or have already been done. For people with complex branching or regular merging it should be an indispensable feature.

Interesting links about it are here, here, and here. The functional spec is available here.

Sparse Checkouts

This allows for checking out portions of a larger repository. This means it is possible to specify the depth that the operations take into the directory structure.

Conflict Resolution

There are improvements to the conflict resolution for merges. It is now possible to use the command-line to perform the resolution and a better interface for graphical clients.

Changelists

It is possible to work on several sets of files on a single working copy. You can associate those files together with a name in order to work on more than one problem in a single working copy. I really needed this feature at work today trying to do more than one thing in a single working copy.

Externals Improvements

The improvements allow svn:externals to be pegged at a revision. Also they can use relative paths from the current directory (that will be really good in some instances with external deliverables) and if you use externals it makes managing a code tree much easier because it treats it like it is part of the current code tree.

Copy/Rename Improvements

There is an improvement in the behaviour on copy/renaming of files (not currently directories until version 1.6) by the client trying to be smarter. If a file has been renamed/copied then rather than the server sending the whole new file it does the copy operation so you should not lose the changes that had been made to the old file.

TortoiseSVN 1.5

This should be released not long after the main Subversion 1.5 release. The major changes will be the user interface work for merge tracking, changesets, and sparse checkouts. There are some other features that will be part of the 1.5 release:
* Client side hook scripts – You can run some scripts before or after committing - this should help people create better processes.
* If a program has done some file operations like renaming and deleting without using the Subversion interface (drag-right-click) then it is possible to fix the file relationships in the UI. This would be quite useful to inte3grate as an external tool in Visual Studio.
* Repository browser now has a two pane look like Windows Explorer with a tree-view and list of files. Apparently it is much faster.
* A new merge wizard rather than the dialog which improves the workflow for merging.

13 March 2008

GUI Toolkits - GTK+ 3.0

GTK+ is used by a large variety of programs on a decent number of platforms. It doesn't have the best reputation for certain bits and pieces, some fairly, some unfairly.

Discussions have begun on what will be the new version of GTK+ 3.0. The most important news is that they will be able to break the ABI which they have heroically maintained all through the 2.0 releases, this should mean lots of good stuff now they are let off the leash.

You can check out the start at this blog post.

The touchstones for the GUI toolkit will be to improve the theming abilities (which in theory will improve look and feel cross platform), animations for swishy interfaces, and proper canvas widget/window. It will be remaining C which is excellent news for the millions of easy language bindings.

It should be interesting to see what happens, hopefully only concentrating on the GUI rather than a lot of the other toolkits which are a bit "kitchen sink" will do for it.

Lucasarts - The Good Old Days

Now I am 30 I can get away with saying things were so much better in the olden days. Actually, no that is not even vaguely true, there is always probably the same good to crap ratio, but the marketing of the crap means you have to dig a little deeper and smarter.

Anyway in the olden days Lucasarts the gaming arm of all things Star Wars was actually astoundingly good at making games. They had the best and brightest and created some of the most unforgettable experiences a person could have on their computer. Their adventure games were masterclasses for scripting and game echanics.

Anyway on to the point of this post - some linkage - two great articles about Lucsart classics, from the very beginning and the very end of their work in adventure games:
* Grim Fandango - Walk Don't Run
* Maniac Mansion - Lucasarts Secret history

And also another completely unrelated gaming article is the excellent retrospective of a game developer starting his commercial career with Donkey Kong on the Atari platform. Check out the post here.

SPA Talks - Continuous Integration and Type Driven Testing

In the space of two weeks there have been two BCS SPA Cambridge talks organised by Mark Dalgarno.

Continuous Integration by Ivan Moore

The second talk by Ivan Moore after his interactive talk about Test-Drive-Development (which was a crash course on Java as well). This time it was not as interactive but just as practical. In addition to the slides he actually demonstrated his own continuous integration system (available from Sourceforge) build-o-matic. It has some interesting features like pictures to show the guilty parties when thebuild or tests break. It also is quite a simple build system which means you can more or less build anything with it.

He was preaching to the converted as most of the audience were practicing continuous integration anyway. I think the main lesson to take away from the talk is to not compromise at any point on the builds or the tests even in with a heavy workload.

Type Driven Development in Haskell by Simon Peyton-Jones

This talk was really about how to write more robust programs in functional programming. The talk involved more of a discussion of functional languages and their benefits as well as how to write tests that more define the concepts and rules for inputs and the outputs.

Mostly the testing part reminded me of the static assertions that are available in the C++ Boost Library. I think that there must be a bridge to utilise more aspects of functional programming in a library like fashion because of the interesting optimisations that can be made. Also mathematical correctness is a bonus.

The lecture itself was interesting and certainly animated. The sign of a good talk is that it makes you think, and I am certainly thinking about functional languages and their applications (after all templates can be used in that fashion but it does put a lot of strain on the compiler). I can certainly see some useful applications in the field of CAD/CAM - shame I left hat field...

06 March 2008

iPhone SDK

After nearly a decade of avoiding having a mobile phone the iPhone was the device that made me change my mind. It is a great device that means I use my laptop a lot less because I can surf the 'Net and get my imap gmail on it in a very seamless fashion.

Today Apple announced the iPhone SDK (the website has completely crashed for me....). It will give a whole new ease of life to an already excellent product. One of the greatest aspects of the iPhone is that it is constantly updated with new features like a full computer.

There is a comprehensive write-up on Engadget and Ars Technica of all the announcements today including proper Exchange support.

The SDK gives access via Objective-C to the OS features. You get access to the accelerometers and multi-touch when writing your apps. XCode provides the environment to develop in and there is an iPhone simulator. The features you have access to are:
* Keychain
* Bonjour
* SQLite
* Core Location
* Quicktime media layer
* Core Audio
* Core Image
* Core Animation
* PDF rendering
* OpenAL
* OpenGL ES

The games look pretty damn good on the iPhone fromt he presentation from Super Monkey Ball to Spore to the specially designed Touch Fighter. It looks like a Wii style changing of the game by using the advantages that the device offers rather than dwelling on what is now missing in comparison to gaming systems.

Also the apps created will be distributed by the App Store that will be run by Apple. If you develop free or open-source apps Apple will host them and distribute them for free.

Also there is a leak of the BBC iPlayer for the iPhone mentioned in this comment on Engadget.

05 March 2008

More STL - uSTL and stdcxx

Thanks to a commenter on the RDESTL post I made yesterday, they pointed me at the uSTL (I assume pronounced micro-STL).

It is a partial implementation of the STL specification. It reduces code size by making memory allocation a non-templated base class. As far as I can tell this reduces executable size because of less template bloat. Whether it is faster or smaller in memory for the containers is another matter. I suppose by reducing the executable size cache coherency could be improved leading to some interesting speed-ups.

It is for POSIX-based systems, and there is no maintained Windows port (a choice of the developer) although some peole have got it to work on Windows with differing levels of success.

And another STL implementation I stumbled across is the Apache stdcxx. The project was started from a code donation by Rogue Wave who decided to open-source their commercial offering.

At the end of 2007 stdcxx made it to an Apache Top-Level Project which means it should be well supported. And apparently performance s quite good as well.

04 March 2008

STL-related : rdestl

A while back I blogged about the EASTL - Electronic Arts Standard Template Library.

It is an interesting look at how EA have internally implemented their own STL with their own improvements/changes specific to their problem domain.

Maciej Sinilo has spent some time putting together a small subset of the STL changed for some game development requirements called the RDESTL. The related blog posts can be read here, here and here. It provides some basic containers (vector, etc), a string class, and some additional container types like intrusive containers. It also provides the EASTL outlook on allocators (which I don't agree with but that is another story).

It is definitely interesting to see the code as it is quite readable. I do wonder whether it achieved part of the EASTL goal which was allowing the compiler to optimise more aggressively because the code is simpler with less indirection.

Also, here is a link to someone else who is replacing the STL. Link via the excellent warpedvisions (with an excellent biting comment).

Upcoming SPA Cambridge Talk - Type-driven testing in Haskell

Simon Peyton Jones of Microsoft Research is doing the upcoming BCS SPA talk in Cambridge. The subject is "Type-driven testing in Haskell" so people who have an interest in functional languages should like it. As usual the talk is free and there is a light buffet.

Sign up through this link.

Synopsis:

One of the joys of functional programming is that code is so much more testable. For a start, testing pure functions is much easier than testing side-effecting procedures. Better still the auto-generation of test cases can be done by a library, without any external tools. And where we want exhaustive testing, it is possible to use lazy evaluation to cut the search space dramatically. I’ll explain these idea using demos from Quickcheck and Lazy Smallcheck, two popular libraries.

While the focus of this talk is testing, I’ll introduce functional programming as I go along, so that you don’t already have to know Haskell to make sense of the ideas. I’ll also try to give a flavour of why I think you’ll be seeing a lot more crossover of functional programming ideas into the mainstream, over the next few years.

Simon Peyton Jones

Simon Peyton Jones, MA, MBCS, CEng, graduated from Trinity College Cambridge in 1980. After two years in industry, he spent seven years as a lecturer at University College London, and nine years as a professor at Glasgow University, before moving to Microsoft Research (Cambridge) in 1998.

His main research interest is in functional programming languages, their implementation, and their application. He has led a succession of research projects focused around the design and implementation of production-quality functional-language systems for both uniprocessors and parallel machines. He was a key contributor to the design of the now-standard functional language Haskell, and is the lead designer of the widely-used Glasgow Haskell Compiler (GHC). He has written two textbooks about the implementation of functional languages.

More generally, he is interested in language design, rich type systems, software component architectures, compiler technology, code generation, runtime systems, virtual machines, and garbage collection. He is particularly motivated by direct use of principled theory to practical language design and implementation -- that's one reason he loves functional programming so much.

His home page is at http://research.microsoft.com/~simonpj.

GUI Toolkits - Mythos

A while back I blogged about some ideas for GUI toolkits, not that I ever managed to get off my backside and do something about it.

Well someone has done a great job with a DSEL (domain specific embedded language) with a toolkit called Mythos. To quote the website "Mythos is a GUI library written in C++ using modern C++ techniques." It does state on the website that it is more of a proof of concept than a fully-blown attempt.

Still, it looks really interesting and has a few different components that make it up. There is khaos which does the low level windowing bits and pieces. nyx is the window layout library with a DSEL that lets you define the ayout in the C++ files. iris does the event handling with another DSEL for associating events and actions. gaia is the widget abstraction.

Overall it looks like a very interesting use of modern C++ applied to GUI toolkits. It is a different approach to something like Adobe's ASL (adam and eve) but I think if the use of the code generation available through templates should be used to take the legwork out of defining user interfaces. Mythos, which is the work of one person as far as I can tell (Benaka Moorthi) is a pretty neat accomplishment.