At Navetas we're enjoying great success using the new features in C++11. Lambda's are probably the office favourite but range based loops, initializer lists, auto and the rest are being brought to bear to write high performance C++ that reads like Scala.
We do a lot of data processing, crunching through data structures filled with electrical measurements, and we've found that the Scala Collections API leads to beautiful, elegant code. We want the same but faster, so we have put together and released the Escalator library to bring the spirit of the Scala Collections API to C++.
It's early days yet but we're already using the Escalator library in our main product codebase to great effect. Here's an example:
You can also lift mutable collections, infinite streams and collections of non-copyables. The API isn't fixed yet but we're definitely open to pull requests!
It's been great fun, and a real learning experience, working on this with Alex Wilson. Thanks Alex!
GitHub Enterprise is a version of GitHub that you can run locally on a company network. It comes as a virtual machine image in Open Virtualization Format and GitHub support it running on the VirtualBox and VMWare hypervisors. At Navetas we use the KVM hypervisor so I have recently been looking at how to convert the GitHub Enterprise VM image to run under KVM.
- Download the GitHub Enterprise VM Image in Open Virtualization Archive (.ova) format.
- Extract the contents of the archive with:
This will give you a set of files:
tar -xf github-enterprise-11.10.270-i386.ova
- github-enterprise-11.10.270-i386-disk1.vmdk - The disk image
- github-enterprise-11.10.270-i386.ovf - An XML description of the virtual machine
- github-enterprise-11.10.270-i386.mf - Hashes of the other two files
- Install VMWare Workstation to get the vmware-vdiskmanager tool.
- Convert the GitHub disk image to use a preallocated virtual disk (watch out - this file will be 10GB!):
vmware-vdiskmanager -r github-enterprise-11.10.270-i386-disk1.vmdk -t 2 github-enterprise-11.10.270-i386-disk1-preallocated.vmdk
- Convert the preallocated VMWare disk image to qcow2 format with qemu-img:
qemu-img convert -O qcow2 github-enterprise-11.10.270-i386-disk1-preallocated-flat.vmdk github-enterprise-11.10.270-i386-disk1-preallocated-flat.qcow2
- You can now create a KVM virtual machine using the generated qcow2 disk image as a boot disk!
It's worth noting that GitHub do not support running GitHub Enterprise under the KVM hypervisor.
Expanding Disk Image (added 2012/07/20)
The disk image can also be converted to RAW format with qemu-img, and then written directly to an LVM volume (using dd), then the virtual machine can boot off that. If more space is required in the GitHub machine then you can:
- Copy the 10GB RAW image into a Volume Group that is bigger - say 100GB
- Boot up GitHub & log in with SSH
- Run ghe-grow-root -d /dev/vda6
This should make GitHub use all the available disk space.