Posted by Diego "Flameeyes" Pettenò
Wed, 30 Apr 2008 20:46:00 GMT
Both Ted Tso on Kernel Planet and LWN refer to an interview to Knuth, TeX author, in which he seems to criticise the choice of multi-core processors.
One quote which I find very short-sighted is:
Let me put it this way: During the past 50 years, I’ve written well over a thousand programs, many of which have substantial size. I can’t think of even five of those programs that would have been enhanced noticeably by parallelism or multithreading. Surely, for example, multiple processors are no help to TeX….
While I agree that it doesn’t help TeX, parallelism is implicit in almost all modern desktop uses (and for what concern servers, I think there is little doubt about its usefulness). Find me a modern desktop when someone is running just one thread that requires CPU time.
Most people (that I know of at least) tend to use their desktop for multiple tasks: reading mail, surfing the web, listening to music, watching videos. Some of these tasks are inherently well-suited for multithreading, but there is one other thing to consider: you usually do all these things at once.
Well, maybe not exactly as once, although it is true for multimedia as you rarely do that exclusively, but you leave mail loading while you surf. And you often leave multiple pages loading at once while you surf, thanks to tabbed browsing. Even when you’re writing something with (La)TeX, you usually have at least the editor and the TeX environment running at once.
Then start to consider other things. You’re connected to the network, almost always in some cases, you’ve got disks that need to be synced properly, you have processes running in background, keeping things in cache, working for you without you seeing them. And you’ve got a mouse that you use, which needs to move a cursor. And wonder what? Xorg is trying to make that take its own thread.
All these things leads me to one conclusion: even if your main applications are not designed to work in parallel, most of the time adding cores will make things running more smoothly. And I’m sure that in the future we’ll see more multithreaded applications anyway, as multithreading, while not suitable for text processing (by design), works pretty well for a lot of other fields.
Myself, I’m waiting for the new Ruby with actual multithreading to port my ruby-elf tools: most of that kind of processing can work in parallel. I’d just need a decent new box. I’m looking for an EU supplier carrying Opterons, but it seems to be difficult to find them, as a person rather than a company.
Posted in Technical, English | Tags Multithreading, Parallel, Ruby | 8 comments
Posted by Diego "Flameeyes" Pettenò
Tue, 29 Apr 2008 16:55:00 GMT
You know I always stress the point that it’s not autoconf (and automake) to be bad per-se, but rather the fact that it’s poorly documented and most people get the worst examples on how to do stuff.
One thing that I find totally misdesigned in autoconf though is the AC_CHECK_LIB macro. This macro is supposedly designed to look for certain functions in a library, to make sure that it’s linked upon if needed. The most simple case for this is using
AC_CHECK_LIB([dl], [dlopen])
to gather if the dlopen() function is in libdl or would be available directly from the C library. (Actually you usually use something more complex than this, but that’s another story).
What is the problem of this macro? Well, the problem comes when you check non-generic functions, because it has a side effect: if the function is found on the library, it is added to the LIBS variable, that is appended to every link line, causing the library to be linked in every target. This is fine when you only have one target, but it’s nasty in every other case.
This is one of the main cause of extra libraries being linked in on other libraries and executables, which are worked around with --as-needed (at least ELF side, as --as-needed does not help with libtool archives at all). It should really be avoided.
The easy way to avoid this is to reset the LIBS variable after AC_CHECK_LIB to the value it had before, it also helps if you set a new variable with the library you just detected, to use just where needed. A better way to handle this is to push on using pkg-config, which might not be the solution to all problems, but makes this problem quite easier to handle.
I know most people doing this mistake won’t be reading this, but at least I have it documented somewhere so that I can just point people at this post without repeating the reasoning. And yes, it’s problem like these that makes neon link against pam for no good reason.
Posted in Gentoo, English | Tags AsNeeded, autoconf, Libraries, libtool | 4 comments
Posted by Diego "Flameeyes" Pettenò
Tue, 29 Apr 2008 13:59:00 GMT
Visto che stanotte non ho dormito affatto, sono riuscito a vedermi un DVD che avevo ricevuto in omaggio qualche tempo fa, Wall Street di Oliver Stone.
Bel film, molto istruttivo, credo sia qualcosa che tutti gli italiani dovrebbero vedere almeno una volta nella vita, specie considerando il modo in cui non siamo stati informati sulla gente protagonista delle scalate, bancarie e non, di qualche anno fa.
Anche se è ambientato oltre vent’anni fa, il ragionamento esemplificato da Gekko (Michael Douglas) pare molto simile da quei finanzieri italiani protagonisti delle famose scalate, e credo farebbe concordare molti, se non tutti, su quanto sia assurdo che questa gente paghi meno tasse sui loro guadagni di un lavoratore o anche di un industriale.
Non ricordo di aver visto questo film in TV ultimamente, e con ultimamente dico in un bel po’ di tempo. Suppongo non sia nell’interesse di molti farlo vedere.
Se avete occasione, e non l’avete già visto, guardate il film. E la prossima volta che sentite parlare di scalate e di OPA, ricordatevi di questo film…
Posted in Italian | Tags Films, WallStreet | 3 comments
Posted by Diego "Flameeyes" Pettenò
Mon, 28 Apr 2008 10:54:00 GMT

Let’s start with a flower – Photo of mine
Sometimes it’s necessary to stand by your choices even when they are controversial. We all know that by now. One nice thing of volunteer Free Software is that if you don’t like a controversial decision, you can just leave, or fork, or in any case get away from who made the decision you don’t like.
I left when a decision was made that I didn’t like, I came back when the situation was, to my eyes, corrected. It was and is my freedom.
It so happens that the council made a decision, probably the only real decision since the Council was formed, the first time the council actually grew balls to do something even if that wasn’t going to please everyone.
Am I happy about the decision? Well not really, as it seems to me somewhat silly that we had to go down the road of actually making this decision. But I’m not displeased by the outcome. I think we should have taken this decision a long time ago actually.
To stop speaking like an abstract class in C#, the decision was to retire a number of developers, that for what the Council could gather and upon on are all considered poisonous to the project. Poisonous does not mean they have zero contribution, just that their contribution is shaded by disruption to the wellness of the project. This disruption comprises of a lot of actions, not just one or two. They might even not be huge by themselves, but if they are a lot, well, the size of them starts not to count (the so-called death of a thousand cuts).
This is not meant as a signal that you shouldn’t be criticising Gentoo. Critics are welcome if they are constructive. You can also work in parallel on competing products (hell, Greg KH is listed as a Gentoo Developer but works for Novell!), just as long as you don’t start to use your rights as a Gentoo developer to force people to move on something else, I’d suppose.
It doesn’t even related only to actions on Forums, as our Forums Admins are able to tackle those problems on their own (and I do trust with it). It relates to a lot of small things once again.
In general, the signal that we’re trying to bring through is “don’t poison your contribution to Gentoo”. You can criticise, you can joke, but if the people you joke upon don’t laugh with you at the joke, then apologise and stop it! Otherwise you’re just walking poison and we’re going to get rid of you, sooner or later. Hopefully sooner next time, before developers resign or reduce their involvement because of your actions.
For the Italian readers who read my political rant from yesterday (for those who can’t read Italian it’s a piece talking about job politics, what Italian unionists and politicians do and how it harms the system), you can see a slightly similitude between the two issues. In both cases you have to get rid of some people to avoid leaving everybody out at one point.
Oh and if we wanted to get rid of people working on Paludis, you can expect all of them to be gone, so no that’s not the cause either. It’s just incidental.
And for what it’s worth, nobody is trying to get rid of everybody they disagree with. Otherwise me and Donnie would be trying to get rid of each other ;) As I said before we don’t always agree on how to proceed with things, and we can be often found on opposite sides of an argument. Still we work together, and I’d say we do that quite happily, because of our difference in views: it usually stops us from going with the extremes. But you’ll never find me and Donnie exchanging snide comments, or insulting each other.
In Italy it officially seems spring, this spring cleaning was long due.
Posted in Gentoo, English | Tags Flickr, Poison, Politics, SpringCleaning | 21 comments
Posted by Diego "Flameeyes" Pettenò
Sun, 27 Apr 2008 12:24:00 GMT
MI dispiace annoiare ancora un po’ i miei lettori che seguono il blog anche in italiano, ma a volte è necessario sfogarsi.
Una cosa che mi lascia perplesso ogni volta che la vedo, e questo succede relativamente spesso, è il modo in cui vengono gestiti i licenziamenti in Italia. A quanto vedo, anziché preservare il diritto generale al lavoro, in Italia si tende a preservare l’anzianità del lavoro.
Con un po’ di logica, se un’azienda è in crisi per una flessione del lavoro, ad essere licenziati per primi dovrebbero essere quelli che hanno mansioni sacrificabili (segretari, aiuti vari, …) non quelli che fanno il lavoro della ditta. Invece mi pare che spesso e volentieri, vuoi per i sindacati, vuoi per altre ragioni, ad essere licenziati sono quelli che osno stati assunti da meno tempo, anche quando questi sono gli unici a lavorare.
So già che molti parlerebbero di solidarietà sociale e del fatto che le persone più anziane farebbero più fatica a trovare un nuovo posto di lavoro, ma se questo può funzionare guardando solo al singolo lavoratore, trovo sia miope nel grande schema.
Riprendiamo l’esempio della ditta in crisi. Mettiamo che questa ditta si occupi di sviluppo software. Mettiamo che abbia una cinquantina di dipendenti, tra cui cinque segretarie e dieci programmatori, di questi programmatori due sono “vecchio stampo”, e non riescono a scollarsi da tecnologie Microsoft, per esempio.
Andando per anzianità, i programmatori vecchio stampo che sono là da una vita avrebbero un’anzianità tale da impedire il loro licenziamento, ma potrebbero essere un costo tale per l’azienda che il loro licenziamento potrebbe essere la chiave per poter tornare in attivo. In questo caso, sarebbe preferibile pure licenziare loro due piuttosto delle segretarie, no?
Dove voglio andare a parare? Beh in realtà non lo so neppure io. So solo che parlando in giro pare che per molti quello che devono fare i sindacati è evitare qualsiasi tipo di licenziamento. A mio avviso è un’idea completamente errata. Sicuro devono evitare licenziamenti indiscriminati e infondati, ma impedire qualsiasi tipo di licenziamento è un qualcosa che va ad intaccare l’interesse di tutti, lavoratori compresi. Se un’azienda in passivo non può licenziare qualcuno per tentare di alleggerirsi e tornare in attivo finirà col fallire e lasciare a casa tutti i dipendenti, non solo una parte.
Non lo so, forse sono strano io, ma penso che l’idea di fondo dovrebbe essere tentare di dare lavoro a più persone possibile, non evitare che le persone si ritrovino mai a dover imparare a fare qualcosa di nuovo. Forse sarò cattivo, ma chi si fossilizza è perduto. Non sto dicendo che una persona che ha passato la vita a fare l’operaio dovrebbe imparare a programmare per trovare un lavoro. Ma per esempio un programmatore non può dire che ha passato trent’anni a lavorare in COBOL e oggi deve poter lavorare solo in COBOL.
E pur non essendone contento, seguendo questo mio ragionamento capisco le aziende che decidono di assumere il meno possibile e piuttosto utilizzare eserciti di precari con contratti a termine. Almeno una volta finito il contratto non hanno il peso di dover tenersi dentro un fossile inutile o, peggio, dannoso.
Posted in Italian | Tags Lavoro, Politica | 2 comments
Posted by Diego "Flameeyes" Pettenò
Sat, 26 Apr 2008 10:55:00 GMT
I’m not good with graphics. At all. I mostly hate it, either analog or digital. In school I wasn’t able to draw a straight line even with the ruler, and when we had lab, I used AutoCAD (LT) through CLI rather than mouse interface – which my teacher hated, to the point of detaching the keyboard from my computer once.
From time to time, I need some graphic job done, most of the time I try to contact one of my friends who is a graphic. Sometimes I just need to put down some things for a diagram, so I tend to use inkscape to do the job.
Two days ago a friend of mine asked me for an easy to fill in form, for his business.. of course the easy solution is to make it a PDF form and let him print it after filling it in. So I ended up looking for a way to do so, and seems like Scribus does that.
I installed Scribus with the default USE flags I get on my system, which means USE=-cairo. It comes up with a tremendously corrupted page view, with vertical lines all over it. Easy to guess, the cairo USE flag is needed.
Even after the rebuild with cairo enabled, though, using Scribus looks quite clumsy to me. I know I’m no expert on the field, but I can usually get my hands around similar software, after all I was able to use FreeHand back in ‘98…
Probably the stuff I missed is there, just in a different place, but I couldn’t find how to enable snap to grid (having a grid and not snapping to it seems quite pointless to me, although I’m sure that people who love graphic work could probably like it better this way), or how to align multiple objects together.
At the end I decided to do the design with Inkscape, which I grew used to use by now. The only problem I found with Inkscape was the inability to use the font chooser on the toolbar, but at least I just had to get out the font selection dialog (which is permanent!), and the problem was solved.
I start to wonder if I could find an SVG rendering libraries for .NET, in which case I could probably just present a C# software to my friend and get it to use the SVG crated by Inkscape without passing through PDF – no I’m not going to try a cross-platform software for him just yet, and I’m not going to bother with C++, otherwise I know I could use Qt4. But at the very worse, I will use Scribus just to add the PDF form fields, and then export it.
I sincerely start to miss things like Migrografx Windows Draw (there’s no Wikipedia article about it… which feels strange to me as I didn’t think it wasn’t that well known at its time), and software of the like. LaTeX totally replaced OpenOffice Writer for me (I dislike it a lot), but trying to get a form created with it is a biiiit of a problem, I think…
Oh well…
Posted in English | Tags Commentary, DesktopPublishing, Inkscape, LaTeX, Scribus | 3 comments
Posted by Diego "Flameeyes" Pettenò
Mon, 21 Apr 2008 16:28:00 GMT
If you have read the article I wrote about distribution-friendly projects at LWN (part 1 and part 2, part 3 is still to be published at the time I write this), I tried to list some of the problems that distributions face when working with upstream projects.
One interesting thing that I did oversee, and I think was worth an article on its own, or even a book on its own, finding the time, is how to handle interaction between projects. All the power-users expect that the developers don’t try to reinvent the wheel every time, or if they do they do it for a bloody good reason. Unfortunately this is far from true, but beside this fact, when sharing code between projects it’s quite common that mistakes end up propagating in quite a huge area.
A very good example of this is the current state of Gentoo’s ~arch tree. At the moment there are quite a few things that might lead to build-failure because different projects are interleaved:
- GCC 4.3 changes will cause a lot of build failures in C++ software because the headers dependencies were cleaned up; similar changes happen every GCC minor release;
- autoconf 2.62 started catching bad errors in configure scripts, especially related to variable names; similar changes happen every autoconf release;
- libtool 2.2 stopped calling C++ and Fortran compilers check by default, so packages have to take care of what they do use;
- curl 7.18 is now stricter in the way options are set in its easy interface, requiring boolean options to be explicitly provided;
- Qt 4.4 is being split in multiple packages, and dependencies has thus to be fixed.
There are probably more problems thatn these, but these are probably the main ones. Unfortunately the solution to similar problems by a few projects is not to start a better symbiotic relationship between the various project, is to require the user to use a given version for their dependencies… which might be different from the version that the user is told to use for another project… or even worse, they import a copy of the library they use and use that.
Interestingly enough, it seems expat is really a good example of library imported all over, and less understandable than zlib (which is quite small on its own, although it has its share of security issues built-in). I’ve found a few before, and some of them are now fixed in the tree, but in the last two days I found at least four more. Two are in Python itself, returned from the death (yeah two of them, one in celementtree and one in pyexpat), one is – probably, not sure though – in Firefox, and thus in other Mozilla products, I suppose, and the last one is in xmlrpc-c, which has one of the worst build-systems I ever seen and thus makes it quite hard to fix the issue entirely.
Maybe one day we’ll have just one copy of expat in any system, and that would be shared by everybody.. maybe.
Posted in Gentoo, English | Tags autoconf, curl, Development, Expat, GCC, libtool, Problems, xmlrpcc | no comments
Posted by Diego "Flameeyes" Pettenò
Mon, 21 Apr 2008 14:43:00 GMT
I wrote about autoconf 2.62 problems as soon as I found one, and I did expect more to come. As it happens, I wasn’t that wrong, and while the tracker is still filling up, problems arose. Some of which didn’t even pass through bugzilla – if a package of mine fails, I tend to fix it without documenting it in the Bugzilla, I know it’s wrong, I probably should, for reference.
For those who are interested in the problems that can arise with autoconf 2.62, I can list a few:
- variable names are validated, which means that variables like
FONTCONFIG-LIBS will make autoconf fail; note that this was an error before, too, it just wasn’t caught, the results of it can be quite strange; just make sure the name is valid by replacing - with _; if the package is doing something like AC_SUBST( ALSA_CFLAGS ) (which is what kenvy24gui did), remove the whitespace in the parenthesis, or the trailing whitespace will be considered part of the variable name!
- the way
_GNU_SOURCE is defined has changed, not sure exactly how, the most prominent thing I can see is that the order of the defines in the generated config.h file is different, and that can cause problems if you have #include directives in your template file, like Linux-PAM had; I don’t have a solution, but you often can workaround it by adding append-flags -D_GNU_SOURCE to the ebuild, not a nice thing though;
- cached values are now checked to contain the cv string in them so that they can safely be cached, this causes crapload of warnings on software using very old libtool.m4 macros, which means almost everything using KDE’s build system, it’s not fatal though, not yet at least.
Additionally, you might have failures in autoconf when you’re using libtool 2.2, as it (finally!) doesn’t check for C++ and Fortran compilers every time – which by the way means that re-running autotools to use the new libtool macros is something that might actually save time rather than wasting it. There exists software that expected libtool to do the checking, and didn’t actually require for instance AC_PROG_CXX to look for the C++ compiler. In that case you just have to add the macro to the configure.ac file.
And again, please don’t revbump your package to add these fixes, people not updating to gcc 4.3 don’t want to rebuild their packages just because!
Posted in Gentoo, English | Tags autoconf, autotools, fixes, libtool | no comments
Posted by Diego "Flameeyes" Pettenò
Fri, 18 Apr 2008 00:02:00 GMT
Come Luca, non sono contento del risultato delle elezioni. Ma tant’è, capita anche di questo in Italia.
Una cosa su cui vorrei far soffermare un po’ tutti però è il modo in cui un po’ tutti i politici provano a infinocchiare la gente con l’idea di ridurre le tasse. Che poi spesso non sono tasse ma imposte, ma questi sono dettagli per chi ha studiato diritto.
Pare che tutti siano pronti con una medicina per ridurre gli introiti dello Stato e vivere felici. La realtà a chiunque possieda un po’ di logica è un po’ diversa. Poiché non viviamo in un mondo utopico in cui tutto capita per la sola necessità che qualcosa capiti – non siamo ancora nella Federazione dei Pianeti – servono soldi per fornire servizi. Quindi per ridurre le tasse indistintamente, o si aumenta il debito pubblico, già alle stelle secondo le indicazioni di tutte le parti in causa, o si tagliano i servizi.
La soluzione con un po’ di logica sarebbe far pagare le tasse a tutti, togliendo per esempio gli sgravi fiscali alla Chiesa – che in fondo di soldi ne prende abbastanza per pagarlo, o no? – e spostando la pressione fiscale verso le categorie più limitate che di soldi ne hanno già tanti. Tanto tempo fa c’era un’aliquota IVA apposita per i beni di lusso, per esempio, e avrebbe ancora la sua utilità, perché deve avere la stessa aliquota un qualcosa di basilare come la carta igienica e una pelliccia di visone?
Non mi si voglia fraintendere, credo che in questo tutti gli schieramenti della politica italiana stiano sbagliando. Anche il nostro ex-ministro Bersani non sono state interamente sensate. Togliere il costo di ricarica? Okay ottimo, ma allora perché c’è ancora la tassa di concessione governativa per gli abbonamenti? I contratti ricaricabili sono un ottimo modo per fornire soldi anticipati alle compagnie di telefonia – lasciamo perdere per un attimo che il costo della telefonia è un costo puramente virtuale – quello dovrebbe essere tassato, non i contratti in abbonamento, se si vuole facilitare gli utenti finali perlomeno.
Devo dire che comincio veramente a sentirmi preso in giro, come effettivamente siamo tutti, ma la cosa peggiore è che mi rendo conto che la maggior parte della gente non lo vede neanche!
Parlando con la gente, pare che l’intera economia italiana dipenda dai produttori di scarpe e di alta moda, che si sentono minacciati dalla Cina, o dalla Ferrari, sentendo Montezemolo postulare di tanto in tanto. Qualcuno ha mai guardato alle aziende italiane che producono davvero? Nel Triveneto perlomeno vedo, senza neanche spendere troppo tempo cercando un posto fisso attivamente, diverse realtà di aziende nel campo elettronico/elettrotecnico. Anche marchi che molti in Italia potrebbero aver sentito almeno di striscio, come Vimar (di Pordenone) e Elvox (di Padova). Non credo che questi si sentano tremendamente minacciati dalla Cina, anzi, credo che la Cina la stiano sfruttando.
Mi dispiace se qualche persona che legge questo blog possa trovare questo mio sfogo politico stupido, totalmente errato, o un insulto ai suoi ideali. Si tratta solo di quella che per me è è semplice logica. E parlo da precario, figlio di operaio, che ha votato sinistra a lungo, ma che ora non si sente rappresentato né da una parte né dall’altra. Non mi vergogno a dire che Lunedì ho votato Italia dei Valori, almeno Di Pietro pare avere una buona considerazione di etica.
D’altro canto, credo che possa essere interessante cominciare certe cose in piccoli ambiti. Un esempio molto banale sono i mezzi pubblici. Non prendo spesso l’autobus, perché non c’è una fermata nella mia zona, ma quelle volte che l’ho preso per andare o tornare da scuola mi è capitato molto spesso di non avere il biglietto, e sentirmi ridere dietro da i miei compagni perché chiedevo se qualcuno ne avesse uno. In qualche modo ho trovato quasi sempre (mea culpa una o due volte) qualcuno che me ne desse uno. La maggior parte degli altri che non avesse l’abbonamento non faceva il biglietto a meno che non salisse il controllore. Sarebbe più giusto che quelli che l’abbonamento ce l’hanno, e che il biglietto lo fanno, prendessero e facessero scendere quelli che il biglietto non lo fanno e l’abbonamento non ce l’hanno. Peccato che sia anche difficile capirlo, visto che la gente sale abbastanza a caso e le obliteratrici stiano in mezzo – almeno negli autobus che ho preso io qua a Venezia.
Se tutti pagassero, probabilmente non avremmo bisogno di autobus tappezzati di pubblicità, che mi danno il voltastomaco quelle volte che li vedo.
Probabilmente, se tutti pagassero le licenze del software che usano, vedremmo anche molti più utenti di Software Libero, visti i costi impressionanti – ed assurdi – che tanti software che in molti usano “gratis” hanno. Tutto collegato direi.
Sono contento di sapere che da luglio saranno a disposizione tessere RFID per gli abbonamenti dell’autobus che dovrebbero anche permettere l’acquisto di X “biglietti”, farò richiesta di una appena possibile, così da avere sempre qualche “biglietto” a disposizione, senza aver bisogno di un abbonamento.
Per ora mi fermo qua, dovevo tirarmi fuori questo rospo che avevo in gola da quando ho visto i risultati elettorali.
Posted in Italian | Tags IdV, IVA, Politica | 5 comments
Posted by Diego "Flameeyes" Pettenò
Thu, 17 Apr 2008 17:44:00 GMT
I’m staying in bed most of the day in the past week or so because I have a terrible flu, I’ll try to return to my libtool-using packages hacking in the next days, as soon as I feel better.
There are at the moment at least three things that might require you to add a build fix: gcc 4.3 series, autoconf 2.62 and libtool 2.2. Whichever of the three is causing your problems, you shouldn’t be revbumping in normal cases.
Exceptional cases can be the ones for critical libraries that are now stable, very complex patches that might break a stable ebuild, and probably nothing else.
If you just have to remove -Werror to let a package build with GCC 4.3, doing a revision bump will only require more work for the arch teams to mark it stable, more load for the CVS server to keep track of new files, and will require users to rebuild a library they don’t need to rebuild.
Similarly happens for autoconf 2.62 fixes, as most of the times are really minor issues; libtool fixes might be a bit more complex, so I would say most of them do require a revbump.
If you want you can merge the fix together with a version bump if you don’t want to change the stable version, or just apply the fix to the latest version available.
I know this should be common knowledge, but as I do see this happening, I thought it would be nicer to remember this to all.
Posted in Gentoo, English | Tags autoconf, fixes, GCC, libtool | no comments