tag:blogger.com,1999:blog-43320743032769125572024-02-20T02:11:16.708+00:00Gustavo J. A. M. CarneiroGustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.comBlogger68125tag:blogger.com,1999:blog-4332074303276912557.post-9401435747175493022012-08-25T13:03:00.001+01:002012-08-25T13:03:46.621+01:00PyBindGen boost::shared_ptr support landed in trunk<div dir="ltr" style="text-align: left;" trbidi="on">
PyBindGen trunk now has support for boost::shared_ptr. It's really simple to use, you just register a C++ class with a "memory policy" parameter of type <span style="font-family: Courier New, Courier, monospace;">pybindgen.cppclass.BoostSharedPtr</span>. From then on, the C++ class is wrapped in a Python object structure containing a <span style="font-family: Courier New, Courier, monospace;">boost::shared_ptr</span> object instead of a raw pointer, and type handlers for <span style="font-family: Courier New, Courier, monospace;">boost::shared_ptr<myclass></myclass></span> are registered instead of <span style="font-family: Courier New, Courier, monospace;">MyClasss*</span>. Enjoy. Here's an example:<br />
<br />
<a href="http://bazaar.launchpad.net/~gjc/pybindgen/trunk/files/head:/examples/boost_shared_ptr/">http://bazaar.launchpad.net/~gjc/pybindgen/trunk/files/head:/examples/boost_shared_ptr/</a><br />
<br />
P.S.: I am looking for an engineering job near London, I have great Python and C++ skills *hint* ;-)<br />
<br /></div>
Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-26525981720705189232011-12-16T10:32:00.000+00:002011-12-16T10:32:55.898+00:00Fix Mic input in UbuntuThese modprobe.conf options make the Mic input work for my Toshiba Satellite:<br />
<br />
<pre>options snd-hda-intel model=auto
options snd slots=snd-hda-intel
</pre>Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com1tag:blogger.com,1999:blog-4332074303276912557.post-10035956434069522772011-02-10T18:02:00.000+00:002011-02-10T18:02:22.552+00:00waf 1.6.2 cflags and pkgconfig toolsI have a couple of useful tools for waf that have just now ported to work with waf 1.6.2. Get them <a href="http://telecom.inescporto.pt/~gjc/waf-1.6.2-tools/">here</a>. If you don't know what I'm talking about, nevermind.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-65105410013168042442010-10-19T15:36:00.004+01:002010-10-21T11:20:52.023+01:00C++ STL containers: memory experimentations<div>For future reference (mainly for myself), here's how some C++ STL containers behave in terms of memory consumption.<br />
</div><div>g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5<br />
</div><div>64-bit (i'm sure the values will be different in 32-bit)<br />
Compiled with -O3.<br />
</div><div>E is number of elements in the container<br />
</div><div>std::vector:<br />
</div><div>24 bytes + 1*E (but memory is allocated in chunks: 0, 16, 32, ... *bytes* (not elements))<br />
</div><div>std::list:<br />
</div><div>16 bytes + { 128 (char) || 128 (one int or long) || 192 (3 longs) 256 (4 longs) || 256 (5 longs) || 320 (6 longs) } * E<br />
</div><div>So, it appears std::list allocates 16 bytes (one pointer), but then allocates, per element, always a multiple of 64 bytes!<br />
</div><div>In any case surprises to be expected. std::vector allocates 24+16 = 40 bytes for a vector with only one "char". An std::list of char's appears to need 128 bytes to store each char!<br />
<br />
<div style="font-family: serif; margin: 0px;"><div style="margin: 0px;">Update:</div></div><div style="font-family: serif; margin: 0px;"><div style="margin: 0px;"><br />
</div></div><div style="font-family: serif; margin: 0px;"><div style="margin: 0px;">std::set of int*<int*><int*><int*>: 48 bytes + 192*E</int*></int*></int*></div><div><int*><br />
</int*></div></div><br />
</div><br />
<div>Update2:<br />
</div><div>I have measured the previous values using MAX RSS of the process (/usr/bin/time). Running with massif, I am obtaining a value of 40 bytes for each element of a std::list<int*>. But still, theoretical value would be 24 bytes (3 pointers), not 40. And massif is a simulator, not a real implementation. What matters is the memory occupied by a process in a real system, and for that MAX RSS is a more accurate measure.<br />
</div>Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-12611294756989040092010-01-19T18:59:00.000+00:002010-01-19T18:59:33.880+00:00Linux swap: an adviceIn the olden days, the Linux enthusiasts would recommend that you should create a SWAP partition that has twice the size of your RAM. Nobody knew why, but it just a rule we all followed. In those days, computers had something like 32 MB of RAM. Using 64 MB of disk space as SWAP seemed OK.<br />
<br />
Today I opened a complex diagram in PDF format, generated by a computer program, with the Ubuntu PDF reader, Evince. The last setting Evince used for that file was with a very high zoom level, and so Evince tried to render the PDF page with that zoom level. After a few seconds I lost control of the computer due to <i>thrasing</i>. How can this be? The software security guys keep a constant watch on program flaws that make DoS attacks possible when opening a malicious file. I have generated a DoS attack to myself?!<br />
<br />
When I regained control of the computer I discovered I had 3 GB of swap space installed. When a program is buggy and tries to allocate huge chunks of memory, of course it will bring the system to its knees.<br />
<br />
My solution: reduce the swap space to 512 MB. Now Evince just fails to allocate memory and does not render the page. But I regain control and can switch to a different zoom level and finally render my page. A lesson learnt.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com4tag:blogger.com,1999:blog-4332074303276912557.post-46130988553296010132009-12-23T18:01:00.002+00:002009-12-23T18:03:45.105+00:00PyBindGen benchmarksPyBindGen benchmarks, against Boost.Python and SWIG, <a href="http://telecom.inescporto.pt/~gjc/pybindgen-benchmarks/">posted</a>. PyBindGen mostly beats the other two, but not always.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-37854203878603005392009-09-19T12:55:00.003+01:002009-09-19T12:57:49.814+01:00Purity is overrated<blockquote>'Have you done this before?'<br />'Of course. Hundreds of times - well, scores of times anyway.'<br />[...]<br />'Listen. The more men you've had, the more I love you. Do you understand?'<br />'Yes, perfectly.'<br />'I hate purity. I hate goodness! I don't want any virtue to exist anywhere. I want everyone to be corrupt to the bones.'<br />'Well, then, I ought to suit you, dear. I'm corrupt to the bones.'<br />'You like doing this? I don't mean simply with me: I mean the thing itself?'<br />'I adore it.'<br /><br /></blockquote>"Ninteteen Eighty-Four", George Orwell.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-45665378591782406402009-09-11T17:58:00.002+01:002009-09-11T18:08:07.328+01:00Flattery<blockquote>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.<br /></blockquote><br />Fyodor Dostoevsky, "Crime and Punishment".Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com1tag:blogger.com,1999:blog-4332074303276912557.post-45095119294096222792009-08-31T22:21:00.004+01:002009-08-31T22:33:46.575+01:00On not finding a topic of conversation<blockquote>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, <span style="font-style: italic;">c'est de rigeur!</span><span> -- but people of the neuter kind, like us, are easily embarrassed and have trouble talking . . . the thinking ones, I mean.</span> 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.</blockquote><br /><br />Crime and Punishment, Dostoevsky.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com1tag:blogger.com,1999:blog-4332074303276912557.post-6747557116172688212009-08-31T12:00:00.003+01:002009-08-31T12:02:27.459+01:00'hg update' and subdirectories?<pre><br />$ hg clone ns-3-dev ns-3-foo<br />updating working directory<br />948 files updated, 0 files merged, 0 files removed, 0 files unresolved<br />$ cd ns-3-foo/<br />$ ls<br />AUTHORS CHANGES.html examples/ ns3/ regression/ RELEASE_NOTES scratch/ utils/ waf* wscript<br />bindings/ doc/ LICENSE README regression.py samples/ src/ VERSION waf.bat* wutils.py<br />$ rm -rf *<br />$ hg up<br />11 files updated, 0 files merged, 0 files removed, 0 files unresolved<br />$ ls<br />AUTHORS CHANGES.html LICENSE README regression.py RELEASE_NOTES VERSION waf* waf.bat* wscript wutils.py<br /></pre><br /><br />Where did all the subdirectories go? How can I get them back?Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com2tag:blogger.com,1999:blog-4332074303276912557.post-34767188610357890082009-08-31T00:07:00.002+01:002009-08-31T00:29:43.573+01:00About Horns<blockquote>"[...]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?..."<br /></blockquote>Dostoevsky, "Crime and Punishment" (the book I am currently reading).<br /><br />So, remember folks, if your wife gives you horns, she "will merely be proving how much she respects you"! :DGustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com1tag:blogger.com,1999:blog-4332074303276912557.post-58975653613828356022009-08-27T10:49:00.003+01:002009-08-27T10:55:37.086+01:00Fam'art EnsembleIf 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 <a href="http://sites.google.com/site/famartensemble/">Fam'art Ensemble</a>!Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-87081117707801943192009-07-16T13:17:00.002+01:002009-07-16T13:22:49.113+01:00Paper with 100 citations!This is a significant milestone for me. A <a href="http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1295732">paper</a> I wrote was 5 years ago published in IEEE Wireless Communications, and has recently reached <a href="http://scholar.google.pt/scholar?q=cross+layer+design+in+4g+terminals&hl=en&lr=&btnG=Search">100 citations</a>! This is huge!<br /><br />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.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-24365600314513630532009-07-06T00:20:00.004+01:002009-07-06T00:55:19.354+01:00Teatro Municipal de Vila do CondeHoje fui a uma sessão de curtas metragens, no <a href="http://artecapital.net/recomendacoes_ev.php?ref=32">"17º Curtas Vila do Conde"</a>, 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?!<br /><br />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<br /><br />Fotos de qualidade duvidosa (nokia 5200, I hate you!):<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGLLqwHsaNfst81yagbPCIggpOKlBxpq7hfT2h200PUfwKxylAluV9IahZntBWbcht6cfInLQmaQZxpGQrLTigwJi7Kcr-l0apIYakj1_zISg7thyphenhyphenh9xn157N4Z6EZn2PCLcKt1NkgUqun/s1600-h/Img015.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGLLqwHsaNfst81yagbPCIggpOKlBxpq7hfT2h200PUfwKxylAluV9IahZntBWbcht6cfInLQmaQZxpGQrLTigwJi7Kcr-l0apIYakj1_zISg7thyphenhyphenh9xn157N4Z6EZn2PCLcKt1NkgUqun/s400/Img015.jpg" alt="" id="BLOGGER_PHOTO_ID_5355122548413008466" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfJUWOv5kKeZCDIwhJudAOscMkAvWyuWsRHEJhFfK7qiNkfI4amDcN0gJa0FImta6QfTrHkdkzxMMCQLDAlFPekeYG1iVV8SxiW8qjPgzoXDoJvqbCx_rtSpOvpYpd_yKA7gk4XWXrSRkV/s1600-h/Img014.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfJUWOv5kKeZCDIwhJudAOscMkAvWyuWsRHEJhFfK7qiNkfI4amDcN0gJa0FImta6QfTrHkdkzxMMCQLDAlFPekeYG1iVV8SxiW8qjPgzoXDoJvqbCx_rtSpOvpYpd_yKA7gk4XWXrSRkV/s400/Img014.jpg" alt="" id="BLOGGER_PHOTO_ID_5355122548943205314" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCEL8GAdKHwtfP4OyP2n2LgWhR-kEardrmws9GMfUcA56fdD3VWWzjUe4v6psvU3zn5393GrdhZdIR5NtFzr7y3Xx2REw3AyjUTgakJewTjdiObWdSUy-DQqOmw5a9RrmBXE6lXeGSefCr/s1600-h/Img013.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCEL8GAdKHwtfP4OyP2n2LgWhR-kEardrmws9GMfUcA56fdD3VWWzjUe4v6psvU3zn5393GrdhZdIR5NtFzr7y3Xx2REw3AyjUTgakJewTjdiObWdSUy-DQqOmw5a9RrmBXE6lXeGSefCr/s400/Img013.jpg" alt="" id="BLOGGER_PHOTO_ID_5355122543361627954" border="0" /></a>Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-3260222816453946952009-06-23T15:53:00.002+01:002009-06-23T15:58:09.901+01:00RTCM, lunch at "Círculo Universitário"Today is <a href="http://rtcm.inescporto.pt">RTCM</a> 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.<br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1EbI_jT6c84bdnUagd6SwSoj4uOuPMB-bIX7vj5S5vJtqz42ilTECSFrm0IoYGBdme1xmg5BKBKmlYxs6B7B8nnXK9mS3vafusnScqyS5PHwz1B-SCOZKZaRw7fEFu8bHmnNQwNL3vlh_/s1600-h/Img009.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1EbI_jT6c84bdnUagd6SwSoj4uOuPMB-bIX7vj5S5vJtqz42ilTECSFrm0IoYGBdme1xmg5BKBKmlYxs6B7B8nnXK9mS3vafusnScqyS5PHwz1B-SCOZKZaRw7fEFu8bHmnNQwNL3vlh_/s400/Img009.jpg" alt="" id="BLOGGER_PHOTO_ID_5350536521404519586" border="0" /></a>Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com1tag:blogger.com,1999:blog-4332074303276912557.post-52630567616566880772009-06-16T11:15:00.005+01:002009-06-16T11:24:01.011+01:00Photos on my cellphoneSome photos I found on my cellphone. Crappy quality as usual, but...<br /><br /><br />Last sunday (2009-06-14), at Porto-Rio, Esquizofrénicos:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis-1ZQHquH-b8A061dRjlU9e0vz-OmwbW6gBhm2WXpBH0-9u0FIbaarUWko-vExsUBiUh_n2w-foV3J6cvLrJK-T37y7ldWHUDaAqQW6IpHlXzTK2QyV2ta1UqZ75SkNqhMG5-HuMkLwtb/s1600-h/Img001.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis-1ZQHquH-b8A061dRjlU9e0vz-OmwbW6gBhm2WXpBH0-9u0FIbaarUWko-vExsUBiUh_n2w-foV3J6cvLrJK-T37y7ldWHUDaAqQW6IpHlXzTK2QyV2ta1UqZ75SkNqhMG5-HuMkLwtb/s400/Img001.jpg" alt="" id="BLOGGER_PHOTO_ID_5347867864131354050" border="0" /></a><br /><br />"Serralves em Festa" (May 2009):<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivLWnP1f_bzbbZJGITrjMnbFM7J57_YakIFV1rvAGYxxWK1NRbgHhnKRSTdOI29yzxOpvwNpuHQjplnifAescsgIWaYr9ejcjLQff54BdCbsFHHZrwyZDiDJU0W3BgILOyrlKsP3sCC1ki/s1600-h/Img011.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivLWnP1f_bzbbZJGITrjMnbFM7J57_YakIFV1rvAGYxxWK1NRbgHhnKRSTdOI29yzxOpvwNpuHQjplnifAescsgIWaYr9ejcjLQff54BdCbsFHHZrwyZDiDJU0W3BgILOyrlKsP3sCC1ki/s400/Img011.jpg" alt="" id="BLOGGER_PHOTO_ID_5347868166266528018" border="0" /></a><br /><br />View from my window, when it snowed this last winter:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-vAwkl8vJhNVSODAEfeM7B0Eh3Jy7WC__Lx-F7sVrJjtaXUaI73W3qA2vJpc0cL-bplaQrXJTA2l_N8nQ_AH_xzvq9ycxxofS9yHw1vAAAySyrgVR8HKC0UmmSMwhq6kuhMTCG5J7nbS7/s1600-h/Img007.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-vAwkl8vJhNVSODAEfeM7B0Eh3Jy7WC__Lx-F7sVrJjtaXUaI73W3qA2vJpc0cL-bplaQrXJTA2l_N8nQ_AH_xzvq9ycxxofS9yHw1vAAAySyrgVR8HKC0UmmSMwhq6kuhMTCG5J7nbS7/s400/Img007.jpg" alt="" id="BLOGGER_PHOTO_ID_5347868578411787394" border="0" /></a>Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-62718722708877614502009-06-13T14:53:00.002+01:002009-06-13T14:56:16.080+01:00TwitterI am experimenting with Twitter: <a href="http://twitter.com/gjcarneiro">http://twitter.com/gjcarneiro</a><br />I decided to twitter mostly in Portuguese.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-87424002643689058512009-06-12T14:24:00.005+01:002009-06-13T14:50:18.370+01:00Stephen 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.<br /><br />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).<br /><br />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.<br /><br />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.<br /><br />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.<br /><br />This was a very good book, but very long, and very dark, definitely not for everyone.<br /><br />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.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-9837609400251366562009-06-11T11:05:00.002+01:002009-06-11T11:11:43.679+01:00Pronounce TupleHeh, nice to find out I am not the only one confused about <a href="http://www.velocityreviews.com/forums/t354344-how-do-you-pronounce-tuple.html">how to pronounce the work 'tuple'</a>! Or 'route', for that matter! I think I will stick to 'toople' and 'rooter', as the European that I am, thank you very much :-)Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-7756230062245121792009-05-20T12:00:00.002+01:002009-05-20T12:08:54.102+01:00RTCMKind of old, but back in February, I made a presentation about <a href="http://www.nsnam.org/">NS-3</a> in <span style="font-style: italic;">"9º Seminário da RTCM, 13 Fev 2009 Anfiteatro Verde da Faculdade de Ciências da Saúde, Universidade da Beira Interior, Covilhã". </span><a href="http://rtcm.inescporto.pt/">RTCM</a><span style="font-style: italic;"> </span>is a portuguese group for <span style="font-style: italic;">mobile communications</span> researchers. I have just discovered some embarassing <a href="http://rtcm.inescn.pt/index.php?id=577&tx_jmgallery_pi1%5BalbumUid%5D=4&tx_jmgallery_pi1%5Bpage%5D=0">photos</a> of me presenting. Yes, I look silly, I know.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-35039686491896962082009-05-05T15:21:00.003+01:002009-05-05T15:23:29.266+01:00Anathema concertI already have my ticket for tomorrow's Anathema concert. /me happy :-)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvKBtRnox0s39zNeYN041ie9PaY0wZQ4YrxgQGWbzeJr_aQzHWOZh-SuGKT6NCuVg3G1HVs6N6a4hhkb-V6OPQHGxx70oJICEtsSzkDNPcw1U7F5yNbzurcqi9QTTkEUgADAMpQ50U5FoA/s1600-h/Bilhete-Anathema.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 184px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvKBtRnox0s39zNeYN041ie9PaY0wZQ4YrxgQGWbzeJr_aQzHWOZh-SuGKT6NCuVg3G1HVs6N6a4hhkb-V6OPQHGxx70oJICEtsSzkDNPcw1U7F5yNbzurcqi9QTTkEUgADAMpQ50U5FoA/s400/Bilhete-Anathema.jpg" alt="" id="BLOGGER_PHOTO_ID_5332345027974260786" border="0" /></a>Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-73485474545364211772009-04-26T12:46:00.002+01:002009-04-26T12:49:59.618+01:00Ubuntu 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 <a href="https://bugs.launchpad.net/ubuntu/+source/linux-backports-modules-2.6.28/+bug/318360">this bug report</a>, and a simple solution: install the module <span style="font-weight: bold;">linux-backports-modules-jaunty</span>.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-50451278841878000302009-04-01T14:10:00.002+01:002009-04-01T14:16:43.902+01:00NS-3 and Packet::CopyGrr! 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.<br /><br /><pre><br /> for (std::set<NodeId>::const_iterator poaI = binding.oldPoas.begin ();<br /> poaI != binding.oldPoas.end (); poaI++)<br /> {<br /> NS_LOG_LOGIC ("Terminal " << terminal << " associated; sending BU (terminal=" << terminal<br /> << ", newPoA=" << bu.newPoa << ") to " << *poaI);<br />- m_buAgent->SendBu (packet, *poaI, msg.GetMessageSequenceNumber (), bu.terminal);<br />+ m_buAgent->SendBu (packet->Copy (), *poaI, msg.GetMessageSequenceNumber (), bu.terminal);<br /> } <br /><br /></pre><br /><br />Note to self: in the future, when ever transmitting a packet inside a for-loop, make sure to Copy each transmitted packet!Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-39500133395651893102009-03-31T10:40:00.002+01:002009-03-31T10:44:07.824+01:00Python will switch to Mercurial (Hg)<a href="http://mail.python.org/pipermail/python-dev/2009-March/087931.html">Python will switch to Mercurial.</a><br /><br />I like bazaar only slightly better, but good thing GIT is out of the picture!<br /><br />Note: Mercurial is the DVCS what <a href="http://www.nsnam.org/">NS-3</a> has been using since the beginning.Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0tag:blogger.com,1999:blog-4332074303276912557.post-5165081455781181202009-03-29T13:01:00.002+01:002009-03-29T14:36:34.466+01:00Proof that GIT is more difficult to useProof that GIT is more difficult to use than other alternatives:<br /><br />1. <a href="http://git.freeradius.org/">Instructions</a> to checkout the stable branch of freeradius:<br /><pre class="config">"""<br /> $ git clone git://git.freeradius.org/freeradius-server.git <em>radiusd</em><br />$ git fetch origin stable:stable<br />$ git checkout stable<br />"""<br /></pre>2. <a href="https://code.launchpad.net/%7Emysql/mysql-server/mysql-6.0">Instructions</a> to get the 6.0 branch of mysql:<br /><br />"""<br /> Get this branch: <tt>bzr branch lp:mysql-server/6.0</tt><br />"""<br /><br />Why most GNOME developers chose to use GIT instead of bazaar or mercurial is beyond me... *sigh*Gustavo Carneirohttp://www.blogger.com/profile/13985211986952998750noreply@blogger.com0