I’ve put off upgrading my XBMC media center forever, as it has Just Worked for years, and I was using an old hw raid box that newer kernels didn’t like.

Then a drive in my raid went bad, and I realized I’d better upgrade or die. I started by copying the system to a second drive and trying to reboot off of that. But the root was ext3 and the second drive was ext4 and it wasn’t going to work without some tweaking, which is hard on an oooold system. So it was “put up or shut up” time…

Here are the adventures of me brutalizing my old gentoo box into upgrading (let’s see you do THAT with any other three-year-old distro)… (continued…)

A new release of Hang The DJ (v 0.8.2) is available on Sourceforge.

Features:

  • mobile client can stream your collection to you on all mobile platforms
  • desktop client UI makes it easy to add and remove new DJs and get your songs rated fast
  • multiple user and multiple server support makes sharing easy

Send me an email if you want help trying it out.

Mobile_Playlist

c++11 containers
sorted_vector use when doing lots of unsorted insertions and maintaining constant sort would be expensive
map sorted binary search tree; always sorted by key; you can walk through in sorted order
multimap same as map but allows dupe keys; need for this should be pretty rare
unordered_map hashmap; always sorted by key; additional bucket required for hash collisions; no defined order when walking through
unordered_multimap same as map but allows dupe keys; dupes are obviously in the same bucket, and you can walk just the dupes if needed
set
multiset
unordered_set
unordered_multiset
sets are just like maps, except the key is embedded in the object, great idea
but… they are ruined by the constraint that contained items must be const
but… then redeemed by mutable
You can use mutable on the variable that are not part of the key to remove the const!
This changes the constness of the object from binary (completely const) to logical (constness is defined by the developer)
so… set is an excellent way to achieve both encapsulation and logical const

Final note: using object pointers is the ultimate solution.
The entire object can be dereferenced and accessed then without const issues.
Two requirements: you must make sure yourself that you do not change the key values;
you must create sort functors that dereference the pointers to sort using object contents if needed
(the default sorting will be by pointer address).
The arguably biggest advantage, as a result, is that you can create multiple sets
to reference the same group of objects with different sort funtors to create multiple indices.
OH YEAH! 🙂