Nicolás Brailovsky


A modern blog

Archive for the ‘Uncategorized’ Category

Fixing some annoying GTK Warnings

author Posted by: nico on date Nov 22nd, 2011 | filed Filed under: Uncategorized

So, new Buguntu upgrade, new problems. The usual deal. I don’t like Unity so I installed the usual gnome desktop. Now when I start gVim I get a bunch of errors like this:

  1. (gvim:7189): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"

OK, not errors, just warnings. I don’t like them anyway, so I did this to fix it:

  1. sudo apt-get install gtk2-engines-pixbuf

Now it works. One problem less, NaN to go… time to move back to Debian?

Cool C++0X features VI: A variadic wrapper

author Posted by: nico on date May 17th, 2011 | filed Filed under: C++0x, Templates, Uncategorized

Let’s work on the last variadic exercise, a wrapper. Say you have something like this:

  1.  
  2. #include <iostream>
  3.  
  4. void do_something() { std::cout << __PRETTY_FUNCTION__ << "\n"; }
  5.  
  6. int main() {
  7.         do_something();
  8.         return 0;
  9. }
  10.  

And you want to wrap do_something with something else (Remember __PRETTY_FUNCTION__?). This is a solution, the worst one though:

  1.  
  2. #include <iostream>
  3.  
  4. void do_something() { std::cout << __PRETTY_FUNCTION__ << "\n"; }
  5.  
  6. void wrap() {
  7.         std::cout << __PRETTY_FUNCTION__ << "\n";
  8.         do_something();
  9. }
  10.  
  11. int main() {
  12.         wrap();
  13.         return 0;
  14. }
  15.  

Why is it so bad? Let’s say you don’t control do_something, you just control the wrapper. You may not even control main(), it may be beyond your scope. That means each time do_something changes, or adds an overload, you have to change your code. That’s ugly and you should already know how to set up a variadic function to forward the arguments to do_something. Give it a try, next time the solution.

Level up!

author Posted by: nico on date May 23rd, 2010 | filed Filed under: Uncategorized

Today it’s been 756864000 seconds of uptime since I was promoted from Release Candidate to V1.0. Hope none of you remember I made this same post 31536000 seconds ago.

.

I’m a pirate!

author Posted by: nico on date May 2nd, 2010 | filed Filed under: Uncategorized

Buguntu family album

author Posted by: nico on date Apr 30th, 2010 | filed Filed under: Uncategorized

This is a very cool family album: http://blog.nizarus.org/2010/04/ubuntu-the-family-album

Can’t wait to upgrade to 10.04, my current install (9.10) is working like crap.

D.A.T.A.E

author Posted by: nico on date Oct 27th, 2009 | filed Filed under: Uncategorized

Damn Acronyms, They Are Everywhere. I’m working on a project which is named as an acronym (IWC) of acronyms (IW CWMP) of acronyms (IW CPE WAN Management Protocol). You need a parser just to understand the project’s name. Gotta love it.

Your money or your life!

author Posted by: nico on date Oct 5th, 2009 | filed Filed under: Uncategorized

assalto_en

The sad truth

Ubuntu Day

author Posted by: nico on date Sep 28th, 2009 | filed Filed under: Uncategorized

Spanish only: GNU/Linux, Guía de Supervivencia – Versión Ubuntu Day

Released under WTFPL if you care to know. Source code to be available soon too.

CM WTF

author Posted by: nico on date Sep 28th, 2009 | filed Filed under: Uncategorized

Seen on a cablemodem’s configuration page:

  1. <form action="http:/loginData.htm" method="GET">
Long version: The other day, while stranded on a CLI (using ssh) I did a wget $IP, to see a modem’s status web page. I’d have thought an electronic device (which, obviously, is much more difficult to upgrade than a software product, and that’s difficult enough as it is) is a little bit better tested than that. I should have known better by now. comcast_cablemodem

“Good Linux users don’t talk about Microsoft”

author Posted by: nico on date Aug 27th, 2009 | filed Filed under: Uncategorized

I don’t usually post links, I’d rather write something myself, but check out this quote:

You don’t see me calling Linux users tux turds, penguin poopers or GUI-challenged, do you?

http://www.pcmech.com/article/good-linux-users-dont-talk-about-microsoft/

Enjoy