Add-Ons & Services
The POCO C++ Libraries Blog

Archive: March, 2008

SVN Changes

Filed under: News by alex at 23:40

There were three significant changes to the SVN trunk and sandbox recently:

  • Data keywords (use, into, et al.) were moved into Poco::Data::Keywords namespace.
  • All the IO stuff (both sync and async) was moved from Foundation and Net to IO and IO::Socket
  • All the Serial stuff was moved from IO to IO::Serial

All these changes do break code. We never take that lightly, but when being tidy weighs more than being 100% backward compatible we do not hesitate to do it.

The last commit was whopping 180 files. VS71 and VS90 files are not updated yet. Please bear with us and report any problems and/or errors.


MySQL Data Connector

Filed under: News by alex at 03:49

Sergey Kholodilov was kind enough to share his work with us and now we have MySQL Data connector for POCO. At this time, it is only available from SVN and tested with 1.3.3 branch code on Windows, FreeBSD and Linux.

POCO community very much appreciates your contribution, Sergey.

SD West 2008

Filed under: News by alex at 19:00

Earlier this week, I have attended Stroustrup and Sutter on C++ session at the SD West 2008 conference in Santa Clara, CA. As usual, session was packed with information mainly focused on the upcoming standard, the multi-core revolution we are are just starting to witness and a healthy dose of humor from both speakers and audience.

So, what’s making it in the standard? Many good things, some still in the working. If I’d have to single out my favorite, it was to learn that lambdas were voted in last week, so we’ll be able to do things like this:

void f(vector& v)
auto p = find_if(v.begin(), v.end(), [](int x){return x<7;});

This is important for two reasons:

  • it makes a very powerful (and underused) portion of STL – algorithms – much more convenient to use
  • it is very much in sync with recent surge of interest in functional languages, so (once again) C++ remains in the mainstream

There are many things coming in, too many to mention all here. For the curious reader, WG21 page is the best source of information. Anything expected that won’t make it into the standard? Yes – garbage collection. The committee could not reach consensus on it.

Herb Sutter gave few remarkable talks and demonstrations about the brave new multi-core world we are living in. More cores means faster, right? Well, maybe. Having multiple cores can actually slow you down in some scenarios. Yes, you add cores and run slower than you did with single core. And then, less CPU cycles means shorter time, right? Well, it depends. In a multi-core universe, as it turns out, sometimes less is more. Or more is less, whichever way you want it. So, in a well-intentioned and naive attempt to optimize, you get rid of some code and you end up running – slower. If you are surprised, welcome to the club. Herb demonstrated it convincingly on a live system. Again, since I can not do it justice in this frame, details are out of scope here, but let me just mention it has to do with multi-level caches. If you follow Herb’s articles, you’ll learn about it. He’s also putting out a book on the subject later this year. No doubt it’ll make for a good bedtime reading.

Worth mentioning here is the issue of thread interruption. Quite some time ago, we’ve had a heated discussion on the topic with a Java user demanding adamantly that we put it in. I have to admit that, at the time, I was not completely familiar with the exact mechanism how Java (or C#) actually do this. However, intuitively, I knew that there can not be any magic there. It is simply a bad idea and Herb has confirmed it in one of his talks. As it turns out, Java and C# had to learn it the hard way. As for the request originator, I must be fair here and say that he recently apologized for his manners and we have gladly accepted his apology.

It was interesting to learn how concepts allow to get rid of significant chunks of iterators documentation and those clumsy traits. I was also curious and took this opportunity to ask the creator of C++ what is his position on coding activity, i.e. whether programming computers is building/construction or rather a design activity. His answer was: “When you are programming, you are designing. But more than anything else, you are learning.” I have to agree.

I have noticed that the room was packed full this time, compared to maybe ~2/3 last year. Bjarne Stroustrup confirmed that his speaking invitations are significantly on the rise in the last few years. He is also working on popularizing C++ in education and will publish a C++ textbook for novice programmers later this year.

And then, on the lighter side, Herb brought in a synthesizer, put together some geek lyrics adjusted to well known tunes, such as Bohemian Rhapsody (“Mama, just killed a thread …”) and the Cheers theme tune (“Where everybody locks the same …”). He needed support performing, so he managed to talk few clowns into singing with him in front of about 300 people. Don’t tell anyone, but your humble correspondent was one of them. Now I live in a constant state of fear hoping the thing does not somehow find its way to YouTube ;-)

The bottom line? Good conference, speakers as competent as humanly possible, a lot of useful information. In a nutshell: C++ is alive and well.

Stroustrup, Sutter and Fabijanic

The Future of the Wiki and Forums

Filed under: Uncategorized by guenter at 14:15

As everyone probably already knows, registration in the Wiki and Forums is broken. Today I tried to upgrade Tiki (the underlying software) to the latest revision, but that did not fix the registration issue, creating new issues instead. Now that I’m sick and tired of this big and ugly whatever named Tiki, I’d like to get rid of it as soon as possible.

I propose the following alternatives:

  • get rid of the forums and replace the wiki part of Tiki with MediaWiki (or something else that seems to work well). From my experience with other projects, MediaWiki seems to work well, so I’d like to go that route. Instead of the Forums, people should use the mailing list (which works for other open source projects as well, so why not for us).
  • keep both the Wiki and the Forums, and find reasonable alternatives for both (e.g., MediaWiki + phpBB). Problem: converting all the existing forum data to the new forum, which is a nontrivial task.
  • have someone (definitely not me) fix our Tiki installation.

Any opinions?