std::async, and copies – gotcha!

Disclaimer: I love C++11! It’s the best thing that happened to C++ since I’m using it (mid-90’s). I’ve been hoping for lambda‘s in C++ since I discovered and started using Lisp. Elisions and move semantics – together with unique and shared pointers – pretty much free you from thinking about memory management! It’s just amazing! Check out “Going Native” talks on YouTube, incl. amazing talks by the likes of Stroustrup, Sutter, Lavavej, et al.

If you don’t want to read my rant, here’s the point – function objects are objects – they can get copied, unless you specify otherwise, so beware that you’re working on a copy, or pass std::ref.

Continue reading

The audacious’ problem “playlist_entry_get_filename assertion failed”

I’m very fond of audacious player (audacious2 to be precise) – light-weight, fast, and follows the WinAmp (2) path. Neat 🙂

Few days ago I’ve got the following error message on audacious start-up:

** (audacious2:2348): CRITICAL **: playlist_entry_get_filename: assertion `entry != NULL' failed
Segmentation fault

Reinstallation and re-configuration didn’t help; but the fix is quite trivial:

  • Start the audacious as root: $ sudo audacious2 ; this should work just fine, unlike when starting as normal user.
  • Add anything to the playlist, just so it’s not empty.
  • Close the player.
  • Now start the player as normal user; all should work now.

That’s it. Hope this helps!

IE Certificate Error with Signed Certificate

So, you’ve got your shiny new certificate, and your good old server. You’ve installed the certificate, chain or intermediate certificate, and all is nice and clean in FireFox, Chrome, Chromium, etc.

Then, your boss opens up his IE, and gets Certificate Error – “not issued by trusted certificate authority” and/or “issued for a different website’s address”. Of course, that’s a major pain, as IE – however bad, buggy and crappy it is – still holds majority of browsers market, as most computer users are incapable of installing a better browser.
Continue reading