2009-12-23
PyBindGen benchmarks
PyBindGen benchmarks, against Boost.Python and SWIG, posted. PyBindGen mostly beats the other two, but not always.
2009-09-19
Purity is overrated
'Have you done this before?'"Ninteteen Eighty-Four", George Orwell.
'Of course. Hundreds of times - well, scores of times anyway.'
[...]
'Listen. The more men you've had, the more I love you. Do you understand?'
'Yes, perfectly.'
'I hate purity. I hate goodness! I don't want any virtue to exist anywhere. I want everyone to be corrupt to the bones.'
'Well, then, I ought to suit you, dear. I'm corrupt to the bones.'
'You like doing this? I don't mean simply with me: I mean the thing itself?'
'I adore it.'
2009-09-11
Flattery
There is nothing in the world more difficult than candor, and nothing easier than flattery. If there is even one hundredth part of a false note in candor, there is immediately a dissonance, and then ﹘ scandal. But with flattery, even if everything is false down to the last little note, it is still agreeable and is listened to not without pleasure; crude though the pleasure may be, it is still a pleasure. And however crude the flattery may be, at least half of it is sure to seem true. And that is so for all levels of development and strata of society. Even a vestal virgin can be seduced by flattery. Not to mention ordinary people.
Fyodor Dostoevsky, "Crime and Punishment".
2009-08-31
On not finding a topic of conversation
And have you noticed, Rodion Romanovich, that among us -- that is, in our Russia, sir, and most of all in our Petersburg circles -- if two intelligent men get together, not very well acquainted yet, but, so to speak, mutually respecting each other, just like you and me now, sir, it will take them a whole half hour to find a topic of conversation -- they freeze before each other, they sit feeling mutually embarrassed. Everybody has topics for conversation, ladies for instance . . . worldly men, for instance, of a higher tone, always have a topic for discussion, c'est de rigeur! -- but people of the neuter kind, like us, are easily embarrassed and have trouble talking . . . the thinking ones, I mean. Why do you suppose that is, my dear? Do we have no social interests, or is it that we're too honest and don't want to deceive each other, I don't know.
Crime and Punishment, Dostoevsky.
'hg update' and subdirectories?
$ hg clone ns-3-dev ns-3-foo
updating working directory
948 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd ns-3-foo/
$ ls
AUTHORS CHANGES.html examples/ ns3/ regression/ RELEASE_NOTES scratch/ utils/ waf* wscript
bindings/ doc/ LICENSE README regression.py samples/ src/ VERSION waf.bat* wutils.py
$ rm -rf *
$ hg up
11 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ ls
AUTHORS CHANGES.html LICENSE README regression.py RELEASE_NOTES VERSION waf* waf.bat* wscript wutils.py
Where did all the subdirectories go? How can I get them back?
About Horns
"[...]Horns are simply the natural consequence of every legal marriage, its correction, so to speak, a protest, so that in this sense they are not humiliating in the least... And--absurd as it is to think of it--if ever I wind up in a legal marriage, I will even be glad of your thrice-cursed horns; in that case I'll say to my wife: 'My friend, before now I have only loved you, but now I respect you, because you've been able to protest!' You laugh? That's because you're not strong enough to tear yourself free of prejudices! Devil take it, don't I know precisely what makes it so unpleasant when you're deceived in the legal sort? But that is merely the base consequence of a base fact, in which both parties are humiliated. But when the horns are given openly, as in civil marriage, then they no longer exist, they are unthinkable, and lose even the name of horns. On the contrary, your wife will merely be proving how much she respects you, by considering you incapable of opposing her happiness and developed enough not to take revenge on her for her new husband. Devil take it, I sometimes dream that if I were given into marriage--pah!--if I were to marry (civilly or legally, it makes no difference), I think I'd bring my wife a lover myself, if she was too slow in taking one. 'My friend', I'd say, 'I love you, but beyond that I wish you to respect me--here!'. Is it right, is it right what I'm saying?..."Dostoevsky, "Crime and Punishment" (the book I am currently reading).
So, remember folks, if your wife gives you horns, she "will merely be proving how much she respects you"! :D
2009-08-27
Fam'art Ensemble
If you live in the north region of Portugal and wish to have a classical band playing at a cerimony (like wedding), checkout my sister's cool outfit Fam'art Ensemble!
2009-07-16
Paper with 100 citations!
This is a significant milestone for me. A paper I wrote was 5 years ago published in IEEE Wireless Communications, and has recently reached 100 citations! This is huge!
I would like to thank my co-authors for the help, in particular prof. Manuel Ricardo, my advisor, whose help was instrumental to the success of the paper.
I would like to thank my co-authors for the help, in particular prof. Manuel Ricardo, my advisor, whose help was instrumental to the success of the paper.
2009-07-06
Teatro Municipal de Vila do Conde
Hoje fui a uma sessão de curtas metragens, no "17º Curtas Vila do Conde", festival de curtas metragens. Fantástico ambiente, imensa multidão (sala 1 de 550 completamente lotada!), e muito bons filmes exibidos. Não estava de todo à espera de tanta gente para ver curtas metragens. Será que o povo de Vila do Conde é muito mais cinéfilo que o de Famalicão?!
Mas o que mais me surpreendeu foi o recentemente estreado anfiteatro. Com aspecto verdeiramente luxuoso. Todo forrado a madeira, envernizada e trabalhada. Iluminação impecável. Mete o grande auditório da Casa das Artes de V. N. de Famalicão num bolso :P
Fotos de qualidade duvidosa (nokia 5200, I hate you!):
Mas o que mais me surpreendeu foi o recentemente estreado anfiteatro. Com aspecto verdeiramente luxuoso. Todo forrado a madeira, envernizada e trabalhada. Iluminação impecável. Mete o grande auditório da Casa das Artes de V. N. de Famalicão num bolso :P
Fotos de qualidade duvidosa (nokia 5200, I hate you!):
2009-06-23
RTCM, lunch at "Círculo Universitário"
Today is RTCM day, at Faculdade de Ciências da Universidade do Porto. We had lunch at a place called "Círculo Universitário", which is simply amazing.
2009-06-16
Photos on my cellphone
2009-06-13
I am experimenting with Twitter: http://twitter.com/gjcarneiro
I decided to twitter mostly in Portuguese.
I decided to twitter mostly in Portuguese.
2009-06-12
Stephen King's 'It'
At nearly 1400 pages, this is easily the largest book I ever read. It took me so long to read it (especially because English is not my native language), that I might as well write a sort of review about it.
The book is centered a group of 7 friends, in a small American town called Derry (I think it's fictitious). Two parallel stories are told: one in which they are young boys (and girl), aged 10-12 IIRC, in 1958; the other one is about them 27 years later (1985).
In 1958, a series of mysterious murders of children have been occurring. While this happens, each one of our 7 protagonists, who do not know each other at first, have to struggle against a vicious group of bullies. Their struggle against these bullies is eventually what draws the 7 friends together. They will eventually call themselves the Losers Club. At the same time, each one of the 7 children has an encounter with a monster that assumes a physical form from each one's worst nightmares. They manage to survive this monster, which they refer to simply as It. The remainder of the book relates how they struggle to defend themselves against the bullies and It.
The highlevel story in this book is rather predictable, and not so complex. Then why 1400 pages? Well, the book has 7 main characters, each of them with many stories. Each character has a deep characterisation. We have Bill, a boy with a bad stuttering, who will become their leader. Ben, who is fat and geeky type of character, but very skilled at engineering even as a boy. Richie is a funny boy who likes to do voice immitations of famous people or ethnicities. Stan is a quiet boy who knows all about birds and likes to do bird watching and take pictures. Mike is a black and poor boy in a small town that is rather racist, with a knack to become historian or librarian. Beverly is a girl in a poor neighborhood who does not fit in with the other rich girls, and whose father frequently beats her up. Finally, Eddie is an asthmatic boy, whose mother is overprotective and so he hardly ever left the house or played with others before the events in the book. And of course we have many strands from each character: 1) 1958 stories, 2) 1985 stories, 3) how each one encounters It and survives, 4) how each one is being bullied. There are also background stories about dreadful events that took place in Derry going back to the 19th century.
I was deeply moved essencially by the story of how the seven friends, "Losers Club", get together, to overcome their fears and, as a group, become much stronger than they could ever be if they hadn't met.
This was a very good book, but very long, and very dark, definitely not for everyone.
My next reading will be back to SciFi. The thankfully short Isaac Asimov's "The God Themselves", considered by many to be one of his greatest masterpieces.
The book is centered a group of 7 friends, in a small American town called Derry (I think it's fictitious). Two parallel stories are told: one in which they are young boys (and girl), aged 10-12 IIRC, in 1958; the other one is about them 27 years later (1985).
In 1958, a series of mysterious murders of children have been occurring. While this happens, each one of our 7 protagonists, who do not know each other at first, have to struggle against a vicious group of bullies. Their struggle against these bullies is eventually what draws the 7 friends together. They will eventually call themselves the Losers Club. At the same time, each one of the 7 children has an encounter with a monster that assumes a physical form from each one's worst nightmares. They manage to survive this monster, which they refer to simply as It. The remainder of the book relates how they struggle to defend themselves against the bullies and It.
The highlevel story in this book is rather predictable, and not so complex. Then why 1400 pages? Well, the book has 7 main characters, each of them with many stories. Each character has a deep characterisation. We have Bill, a boy with a bad stuttering, who will become their leader. Ben, who is fat and geeky type of character, but very skilled at engineering even as a boy. Richie is a funny boy who likes to do voice immitations of famous people or ethnicities. Stan is a quiet boy who knows all about birds and likes to do bird watching and take pictures. Mike is a black and poor boy in a small town that is rather racist, with a knack to become historian or librarian. Beverly is a girl in a poor neighborhood who does not fit in with the other rich girls, and whose father frequently beats her up. Finally, Eddie is an asthmatic boy, whose mother is overprotective and so he hardly ever left the house or played with others before the events in the book. And of course we have many strands from each character: 1) 1958 stories, 2) 1985 stories, 3) how each one encounters It and survives, 4) how each one is being bullied. There are also background stories about dreadful events that took place in Derry going back to the 19th century.
I was deeply moved essencially by the story of how the seven friends, "Losers Club", get together, to overcome their fears and, as a group, become much stronger than they could ever be if they hadn't met.
This was a very good book, but very long, and very dark, definitely not for everyone.
My next reading will be back to SciFi. The thankfully short Isaac Asimov's "The God Themselves", considered by many to be one of his greatest masterpieces.
2009-06-11
Pronounce Tuple
Heh, nice to find out I am not the only one confused about how to pronounce the work 'tuple'! Or 'route', for that matter! I think I will stick to 'toople' and 'rooter', as the European that I am, thank you very much :-)
2009-05-20
RTCM
Kind of old, but back in February, I made a presentation about NS-3 in "9º Seminário da RTCM, 13 Fev 2009 Anfiteatro Verde da Faculdade de Ciências da Saúde, Universidade da Beira Interior, Covilhã". RTCM is a portuguese group for mobile communications researchers. I have just discovered some embarassing photos of me presenting. Yes, I look silly, I know.
2009-05-05
2009-04-26
Ubuntu 9.04 (Jaunty)
I upgraded my laptop to Ubuntu 9.04. Upgrade went smoothly. But to my horror, the laptop would no longer power down when I shutdown Ubuntu. A little research and I found this bug report, and a simple solution: install the module linux-backports-modules-jaunty.
2009-04-01
NS-3 and Packet::Copy
Grr! I have lost track of how many times I forgot that I need to packet->Copy () some packet. Or how many wasted hours of work. Clearly the worst design decision in NS-3, ever.
Note to self: in the future, when ever transmitting a packet inside a for-loop, make sure to Copy each transmitted packet!
for (std::set::const_iterator poaI = binding.oldPoas.begin ();
poaI != binding.oldPoas.end (); poaI++)
{
NS_LOG_LOGIC ("Terminal " << terminal << " associated; sending BU (terminal=" << terminal
<< ", newPoA=" << bu.newPoa << ") to " << *poaI);
- m_buAgent->SendBu (packet, *poaI, msg.GetMessageSequenceNumber (), bu.terminal);
+ m_buAgent->SendBu (packet->Copy (), *poaI, msg.GetMessageSequenceNumber (), bu.terminal);
}
Note to self: in the future, when ever transmitting a packet inside a for-loop, make sure to Copy each transmitted packet!
2009-03-31
Python will switch to Mercurial (Hg)
Python will switch to Mercurial.
I like bazaar only slightly better, but good thing GIT is out of the picture!
Note: Mercurial is the DVCS what NS-3 has been using since the beginning.
I like bazaar only slightly better, but good thing GIT is out of the picture!
Note: Mercurial is the DVCS what NS-3 has been using since the beginning.
2009-03-29
Proof that GIT is more difficult to use
Proof that GIT is more difficult to use than other alternatives:
1. Instructions to checkout the stable branch of freeradius:
"""
Get this branch: bzr branch lp:mysql-server/6.0
"""
Why most GNOME developers chose to use GIT instead of bazaar or mercurial is beyond me... *sigh*
1. Instructions to checkout the stable branch of freeradius:
"""2. Instructions to get the 6.0 branch of mysql:
$ git clone git://git.freeradius.org/freeradius-server.git radiusd
$ git fetch origin stable:stable
$ git checkout stable
"""
"""
Get this branch: bzr branch lp:mysql-server/6.0
"""
Why most GNOME developers chose to use GIT instead of bazaar or mercurial is beyond me... *sigh*
2009-03-10
Books, reading
I finished reading David Palmer's "Emergence". Interesting and original writing style, intelligent writing, but all too familiar post-apocalyptic, and save-the-world plot themes.
Now reading Jack McDevit's "Seeker". More space archeology, searching for lost civilizations through the galaxy. I love the Alex Benedict character. Both "A Talent For War" and "Polaris" were excellent novels.
Yesterday I mail ordered four new books: William Gibson's "Neuromancer", Juliet Marillier's "Wolfskin", Stephen King's "It", and Isaac Asimov's "The Gods Themselves". So, mostly SciFi, with a sprinkle of fantasy (Marillier) and horror (King). It's good to vary reading style slightly, once in a while ;-)
Now reading Jack McDevit's "Seeker". More space archeology, searching for lost civilizations through the galaxy. I love the Alex Benedict character. Both "A Talent For War" and "Polaris" were excellent novels.
Yesterday I mail ordered four new books: William Gibson's "Neuromancer", Juliet Marillier's "Wolfskin", Stephen King's "It", and Isaac Asimov's "The Gods Themselves". So, mostly SciFi, with a sprinkle of fantasy (Marillier) and horror (King). It's good to vary reading style slightly, once in a while ;-)
2009-02-25
Interactive Python Shell in NS-3 PyViz
With ns-3-pyviz, one of my patterns of debugging simulations was to run "ipython -gthread myscript.py". This would run the gtk main loop in a thread and allow me to interact with the IPython shell and inspect a live simulation, to find out what is going on.
Since ipython -gthread stopped working in recent versions, I decided to just follow a recipe for embedding an IPython shell into an existing pygtk program. It has been pretty easy to do, thanks to reusing the work of others (Eitan Isaacson, in this case); thank you, open source! :-)
Since ipython -gthread stopped working in recent versions, I decided to just follow a recipe for embedding an IPython shell into an existing pygtk program. It has been pretty easy to do, thanks to reusing the work of others (Eitan Isaacson, in this case); thank you, open source! :-)
Subscribe to:
Posts (Atom)