Cum să scapi de “propagandişti”

November 29, 2007

(you know what I mean…)

Nu voi discuta aici motive, ci metode. Cei cu motivele GTFOOH :evil:

Se împart în 3 categorii:

  • Dacă vrei să-i enervezi (are sens uneori; use at your own risk):
    • Râde-le în faţă.
    • Trimite-i direct în ****
    • Acceptă publicaţia pe care ţi-o împing; fă câţiva paşi şi arunc-o / rupe-o / dă-o unei alte persoane / las-o pe trotuar etc.
    • Arată-le vreun tatuaj cu simboluri oculte.
  • Dacă vrei să râzi de ei:
    • Întreabă-i cine îi plăteşte / cât, şi priveşte-i cum se chinuie să te convingă că banii sunt din donaţii voluntare.
    • Întreabă-i vreun detaliu “obscur” din cartea aia mare şi veche, să vezi că o ştiu cam la fel de bine ca şi câinele din cartier ;)
    • Zi-le că te grăbeşti să donezi sânge şi nu vrei să întârzii. Observă dacă reacţionează “ca la carte.”
    • Întreabă-i în câte ţări activează organizaţia lor şi vezi dacă îşi ştiu cifrele.
  • Dacă vrei să-ţi pui la încercare abilităţile de dezbatere:
    • Întreabă-i cum explică existenţa unei suprafiinţe care ne iubeşte, când există pe lume copii nevinovaţi care mor de sete / foame (sau orice alt exemplu.)
    • Întreabă-i cum explică faptul că suprafiinţa este “modelată” aşa de asemănător omului (adică: răzbunătoare, care pedepseşte, care vrea dovezi de fidelitate etc.)

Porunca lui George Carlin: Thou shalt keep thy religion to thyself.

PS. Sugestiile sunt binevenite :)


Die, DOS, die!

November 21, 2007

I hatedislike programming on the school computers using Windows, the DJGPP compiler and no decent terminal. One of the most annoying problems is that you can only see the last ~25 lines of your program’s output. gdb doesn’t catch assertion failures for some reason, so you’re left dealing with your bugs with bare hands… talk about dirty work!

This reminded me of the old “DOS” way of waiting for a key press every now and then. Here’s one of my latest quick-and-dirty-and-not-properly-tested tricks:

#define assert(a) if(!(a)) { printf(“MyAssert(%s) failed\n”, #a); \
freopen(“con“, “r”, stdin); \
getchar(); \
abort(); }

If stdin is freopen‘d to some file, the getchar() will not accomplish its job of waiting for a keyboard stroke. That’s why the freopen is there. (Remember how you could crash Win9x by running ‘c:\con\con‘?)

So now, instead of crashing with a useless stack trace and no clue to which assert failed in only 25 lines, it gracefully shows:

MyAssert(the::world.isFlat()) failed

waits for you to read the message and press Enter, and then aborts. Problem solved 8-)


Tu

November 4, 2007

Noiembrie. E dimineaţă.
Şi gândul mi-l inunzi din nou.
Nu ştiu de e extaz ori greaţă
Ori ecou.

De frică mut sunt când te văd,
Lovit de-un invizibil zid.
Şi în tăcerea mea arăt
Stupid.

Mâinile noastre-s Nord şi Sud,
Dar tot nu se-ntâlnesc.
Nu ştiu nici dacă te detest
Sau te iubesc.

Săruturi mii mintea-mi croieşte
Pe al parfumului tău rug.
Ochii se-nchid. E prea fantastic.
Fug.

Din amalgamul de emoţii
Ce simt încerc să distilez.
Şi tot ce vreau e să îmi spui
Că nu visez.


Playing with Qt/KDE

November 3, 2007

justwrite.pngSpeed writing means dumping the contents of your brain as fast as you can without stopping to think or check grammar. The small program I wrote today pretends to help you do it by launching a full-screen window to cover all distractions. It also keeps track of time for you and counts how many lines, words, and letters you’ve written. Here’s the source code (rename to .tar.bz2).

It uses the KDE4 libs, and the preposterous colors are the result of my experimenting with Qt style sheets.

PS. Bonus points if you find a way to crash it! (I know there is at least one)