Awesome (and useless) trivia: Ubuntu’s first bug

I’m still not over the disappointment from my latest Ubuntu install but recently I found a bug which is quite remarkable:

Yes, Ubuntu’s #1 bug, reported by Shuttleworth himself, is “Microsoft too big”. I’m not too sure I agree with the bug’s resolution.


KSnapshot is getting smarter

I just noticed KSnapshot is smart. Too smart. If you save a snapshot to a folder with a bunch of files like “Snapshot_N_foo” it’ll name the next one “Snapshot_N+1_foo”. That already makes my computer smarter than some humans!

Some sane advice from Firefox’s console

Tinkering with Firefox’ JS console I had to copypaste some stuff. I got a really nice surprise when it wouldn’t let me:

Scam Warning: Take care when pasting things you don’t understand. This could allow attackers to steal your identity or take control of your computer.

That’s some really good advice coming from your browser’s console.

Code and Google translate: awesomeness

Some time ago I found out one of my articles was translated to another language (yay for that, woo for not letting me know about it). To understand what my own article said, I had to use Google translate on the site. Guess what? c++ and Google translate can produce hilarious results:
# The include "throw.h" the extern "the C" {void seppuku () {throw statement the Exception () ; }}
Another one I liked:
the struct the Exception {}; # ifdef __cplusplus the extern "the C" {# endif void seppuku (); # Ifdef __cplusplus} # endif
Now you know it. Next time you’re looking at some incomprehensible c++ code, run it through Google translate. It may improve it.

Human friendly c declarations

An appropriate use of typedef’s can transform 99% of c’s gruesome type declarations into a mostly maintainable and maybe even readable piece of code. For that remaining 1%, or if you got a legacy application from someone with a very twisted mind, you’ll probably need a way decode what “int (*(Foo::*foo)(void**))[3]” means.

To decipher weird c declarations go to and type your type. It works for most cases… good luck trying to figure out templates, though, for template metaprogramming you are on your own.

Some gratuitous MSVC bashing

Recently I found out Microsoft’s Visual Studio doesn’t support alternative tokens (ie “and” instead of “&&”). Even worse than that, apparently they don’t think it’s even necessary. And by the looks of this thread, the people working on MSVC need to take some time to actually READ the cpp standard. You know… it’s kind of like a spec for your product. It’s always good to take some time to understand the specs for your product…

I can only imagine how incredibly ugly their lexer must be to say it’s not a fixable problem.

An awareness test

Rant ahread: this is an old video, but it remains very instructive.

It’s amazing how easy it is to loose sight of a dancing bear (that sentence does make sense after viewing the video!). I wonder if that’s why I dislike Windows. Too many menus, whereas I have a single interface for pretty much anything with my CLI.

“The VM session was closed before any attempt to power it on”

Some times Virtualbox gets lazy and decides not to work, no explanation given (no, that cryptic message certainly doesn’t count as an explanation). I have no idea what causes this message, at the moment my best theory is an improper planet alignment, but in my experience detaching all media from a VM, running it and then attaching all media again seems to fix the problem.


CLI music FTW!

Does your music collection suck? Did you have to delete all your mp3 because you were facing a major lawsuit by the MPAA? Make your own console-music! Just open a terminal and type this for hours of endless fun:

cat /dev/urandom | aplay

Aditional tip: if you ever get tired of the random static, you can have fun playing your boot images like this:

cat /boot/initrd.img-3.0.0-12-generic | aplay

I wonder if that has copyrights….

Vacations are over

Long time without updates. I guess I needed vacations from the blog. It was not the first time and it probably won’t be the last one I take, but I’m back now with another truckload of C++ ramblings and misc stuff. Like this one: