bzr 1.0 out now
The bzr guys just released 1.0 yesterday. Congrats guys! bzr is truly awesome, as in just works, and for the past 1 or 2 years have been been working really good for MMS.
Archive for the ‘ My Media System ’ Category
The bzr guys just released 1.0 yesterday. Congrats guys! bzr is truly awesome, as in just works, and for the past 1 or 2 years have been been working really good for MMS.
New release of the stable branch of MMS. As with all the other releases in the 1.0.8 series, the upgrade should be perfectly safe. No config changes has been made and the focus has been on fixing bugs instead of introducing them (aka. adding features
)
In the quest for improving the quality of the MMS code in 1.1.0 I’ve done several things, one of which was to convert all the source to the boost foreach statement. Since I liked the result of the foreach cleanup so much, I decided to see what other libraries could be of use. I quickly found the function and bind library which allowed me to remove the internal function pointers framework we have currently been using. While converted I was surprised to see how cleaner the code became. The bind function is truly easy to use and read and made it possible to remove several helper classes which only purpose was to capture state to create a uniform interface.
So instead of:
class FP
{
std::list numbers;
FP(std::list n)
: numbers(n)
{}
call(int t)
{
int total;
foreach (int i, numbers)
total += i*t;
return total;
}
};
(I saved the part of actually creating the function pointer object). One gets:
call(int t, std::listnumbers) { int total; foreach (int i, numbers) total += i*t; return total; } boost::bind(&call, _1, list_of_numbers);
Voila. Now if only the wordpress code formatting didn’t suck so much
Really wanted to make navigating MMS on the nokia easier so I implemented mouse input which is luckily also what a touch screen is. Yay!
Having been coding in c# for some time now, what is really nice about the language compared to c++ is the foreach statement. The syntax is really natural and easy to read:
foreach (string s in strings)
Compare this to the standard c++ notation:
for (vector::const_iterator i = strings.begin(),
iend = strings.end(); i != iend; ++i)
So I decided there must be something easier and vague remembered that boost had something for this. And low and behold they had. So now instead of writing that horrible for line, one can just write:
foreach (const string& s, strings)
It’s not quite as nice as i c# since one can’t have a pair on the leftside of the comma, so one needs to be using typedefs to fix that. And one must also remember the & as to not create unneeded copies of the string.
And the best part is that it’s written as a bunch of templates and macro’s so one can just include a header and of it goes. Doesn’t even have to change the Makefile
I’ve converted the whole MMS 1.1.0 code base to the new syntax and it’s really so much easier to read. Especially because I tend to use better names for the loop variable than i
A long time ago, Rett D. Walters created a console frontend for Xine so that we could use that in MMS. I’ve since the last release created quite a few patches for it, and because Rett wasn’t actively maintaining it anymore I decided to roll all my patches into a new release:
Finally, after god knows how many hours of development we have a version of 1.1.0 ready for a public consumption, albeit for now in the form of an alpha release.
A new stable release of MMS is out. This is a bugfix release and so 15 bugs have been fixed and no new features implemented. Upgrading is recommended.