...making Linux just a little more fun!


This month's answers created by:

[ Ben Okopnik, Faber Fedor, René Pfeiffer, Raj Shekhar, Rick Moen, Thomas Adam, Thomas Bonham ]
...and you, our readers!

Our Mailbag

Vectors vs. dynamic arrays

Jimmy O'Regan [joregan at gmail.com]

Thu, 7 Aug 2008 17:35:21 +0100

My C++ sucks, so I need a second opinion :)

We have a user who's using some oddball compiler that doesn't support C99 type arrays, so I'm wondering if it's ok to replace this code:

  double classes_ocurrences[M]; //M = Number of ambiguity classes
  double classes_pair_ocurrences[M][M];
  double tags_estimate[N]; //N = Number of tags (states)
  double tags_pair_estimate[N][N];

with this:

  vector <double> classes_ocurrences(M); //M = Number of ambiguity classes
  vector <vector <double> > classes_pair_ocurrences(M, vector<double>(M));
  vector <double> tags_estimate(N); //N = Number of tags (states)
  vector <vector <double> > tags_pair_estimate(N, vector<double>(N));

As far as I know, it's functionally equivalent, and this test:

#include <vector>
#include <iostream>
using namespace std;
int main ()
        int N = 2;
        int a[N][N];
        vector < vector <int> > b (N, vector<int>(N));
        a[0][0] = 1;
        a[0][1] = 2;
        a[1][0] = 3;
        a[1][1] = 4;
        b[0][0] = 1;
        b[0][1] = 2;
        b[1][0] = 3;
        b[1][1] = 4;
        cout << "a: " << a[0][0] << " b: " << b[0][0] << endl;
        cout << "a: " << a[0][1] << " b: " << b[0][1] << endl;
        cout << "a: " << a[1][0] << " b: " << b[1][0] << endl;
        cout << "a: " << a[1][1] << " b: " << b[1][1] << endl;
        return 0;


a: 1 b: 1
a: 2 b: 2
a: 3 b: 3
a: 4 b: 4

as expected. I'm just wondering if there's some subtle nuance I'm missing.

[ Thread continues here (3 messages/3.91kB) ]

Followup: [Apertium-stuff] Google patent

Jimmy O'Regan [joregan at gmail.com]

Sun, 17 Aug 2008 15:37:58 +0100

Google have patented their 'Suggest a better translation' feature.

http://tinyurl.com/59b3v3 (TinyURL of a US Patent and Trademark Office URL)

"one aspect of the subject matter described in this specification can be embodied in a method that includes a method for first receiving an indication of when a user-manipulable cursor is positioned in proximity to a first presentation of first text in a graphical user interface (GUI), the first text being in a first language"

or, in other words, use 'onMouseOver' to display the original text. That's patentable?

Most of the rest of the details described are automatic techniques for determining how useful the submitted translation is.

[ Thread continues here (10 messages/17.92kB) ]

One moment in TAG mail administration

Rick Moen [rick at linuxmafia.com]

Wed, 30 Jul 2008 11:59:40 -0700

Readers of the TAG mailing list may recall a 419 (advance-money fraud) spam that hit the mailing list from a "vds2000.com" IP address. Rather than immediately consign the offender to the nether realms, I sent a copy with full headers to the relevant abuse@ address, saying "419 fraud from your IP".

That resulted in my being informed of a "trouble ticket"... and... let's just jump to the end of the story, two days further on -- my closing entry at https://help.thehostgroup.com/index.php?_m=tickets&_a=postreply&ticketid=28748 :

  Just so we're really clear about this, and review:  I'm a system
  administrator who brought to your attention in ticket #28621 an episode
  of 419 fraud mail from your IP,, possibly through exploit of
  a buggy PHP page.  Ticket #28621 was immediately closed without any
  indication of resolution, and then (briefly) reopened when I asked what
  the resolution was. 
  One day later, I find that my ticketing system login no longer has
  access to that ticket.  I ask what's going on, resulting in this ticket
  (#28748) -- which ticket I find has now also been closed without
  So, I will now be setting all systems I administer to 550-reject mail
  from your company's IPs.  Have a nice eternity.

[ Thread continues here (4 messages/7.50kB) ]


Deividson Okopnik [deivid.okop at gmail.com]

Sat, 2 Aug 2008 10:54:44 -0300

Hello everyone.

I'm starting a paper here on Virtualization for my post-graduation, and I'm wondering if any of you use virtualization professionally, for what, what software you use to do it and with what host/guest OS's

[ Thread continues here (8 messages/9.41kB) ]

Followup: Apertium in 'The Guardian'

Jimmy O'Regan [joregan at gmail.com]

Fri, 15 Aug 2008 18:41:30 +0100

There was an article about our Welsh translator in yesterday's Guardian: http://www.guardian.co.uk/technology/2008/aug/14/freeourdata.opensource

"Flummoxed by a document in Welsh? Now you can get a free translation at cymraeg.org.uk. The Apertium-cy software, described as the first free automatic translator from Welsh to English, is the fruit of a multilingual effort involving developers in Spain, Wales and Ireland pushing forward the possibilities of open-source software and, they hope, free public-sector data."

The focus of the article is on how we weren't able to use public data compiled by the Welsh Language Board:

'When we contacted the Welsh Language Board, however, it said the Apertium team couldn't be more wrong. "We welcome re-use," it said. Although the small print forbids unauthorised reproduction, the board says it would be delighted to consider requests. Where feasible, it will make products available under what it says would be "a suitable free non-commercial agreement".'

Well, if they had ever returned any of my phone calls, maybe we could have used their data. Maybe they'll give me an answer now :)

[ Thread continues here (5 messages/9.19kB) ]

Eml to tiff converter

Smile Maker [britto_can at yahoo.com]

Fri, 1 Aug 2008 04:44:58 -0700 (PDT)


Do we have any tool in linux which converts eml files to tiff images format


[ Thread continues here (11 messages/11.28kB) ]

doubt in accessing serial port

vasavi s [vasavi.naga at gmail.com]

Fri, 29 Aug 2008 12:56:58 +0530


I have a problem in accessing the serial port. I am trying to send data to another system using null modem. When we are using the program in loopback method it's working fine like we are able to transmit data and receive the data on a pc. But when trying to communicate between two systems based on linux (using c code) we are not getting the output. When writing to the port it is showing that it has written the data to the port. But on other side (i.e., on another system) we couldn't read the data which we have sent from first system. What to do? Tried h/w flow control & sftware flowcontrol but no use. Till now it was showing error like " error no.11,Could not read , the resourcet is temporarily unavailable. Now It's saying like reading the port successfully. But the number of bytes it's showing is zero. We could nt understand if the data we are writing in first system is reaching the second system with null modem and the other system is having a problem in reading the data or what ? Kindly suggest where the problem could be?

Thanks & Regards, vasavi

[ Thread continues here (2 messages/2.68kB) ]

learning linux

[aldoagresti at optonline.net]

Tue, 26 Aug 2008 13:47:39 +0000 (GMT)

I am completely new to linux and am looking for a good resource. It could be a book or a website. If there is a difference in running linux on a PC versus an embedded application, I would be more interested in the latter. Thanks, Aldo

[ Thread continues here (2 messages/1.99kB) ]

Delivery Status Notification (Failure)

Rick Moen [rick at linuxmafia.com]

Sun, 24 Aug 2008 18:07:19 -0700

Quoting Mail Delivery System (MAILER-DAEMON@mk-outboundfilter-5.mail.uk.tiscali.com):

> The following message to <dirtur@academ01.zac.itesm.mx> was undeliverable.
> The reason for the problem:
> 5.1.2 - Bad destination host 'DNS Hard Error looking up academ01.zac.itesm.mx (MX):  NXDomain'

Wow, this is what we might call "epic fail" on the part of a Italian / UK Internet company, "tiscali.com" Tiscali (S.p.A.). They were sending a bounce message in response to a transparently forged spam message that they received from IP address "", which was claiming in the envelope header to be "from "tag@lists.linuxgazette.net" (and also an internal "From:" line that claimed that the sender was "vendeporinternet <tag@lists.linuxgazette.net>".

They evidently believed that forged information -- and also didn't bother to check our SPF record in our DNS. So, they spammed us, the innocent party whose address had been forged, with their misdirected rejection message.

I guess I'm going to have to blackhole the tiscali.com sending domain, since their mail system seems to be run by incompetent morons who backscatter-spam innocent third parties. Sorry, Tiscali customers! Quoting their Web page:

   Tiscali S.p.A. (Borsa Italiana, Milan: TIS) is one of the leading 
   alternative telecommunications operators in Europe. With one of 
   the broadest and most interconnected IP technology-based networks 
   worldwide, Tiscali supplies a wide range of services to its customers, 
   both private individuals and companies, namely: Internet access through 
   dial-up and ADSL as well as voice, VoIP, media, added-value services 
   and other technologically advanced products.

Say hullo to Tiscali S.p.A.! Now, say good bye to Tiscali S.p.A.

Followup: [Apertium-stuff] Par iaith newydd: apertium-cy-en / New language pair: apertium-cy-en

Jimmy O'Regan [joregan at gmail.com]

Fri, 1 Aug 2008 18:26:29 +0100

---------- Forwarded message ----------

From: Francis Tyers <ftyers@prompsit.com>
Date: 2008/8/1
Subject: [Apertium-stuff] Par iaith newydd: apertium-cy-en / New
language pair: apertium-cy-en
To: apertium-stuff@lists.sourceforge.net
Cc: Dafydd Jones <dafyddj@gmail.com>, "John D. Phillips"

(Saesneg isod / English below)

Rydem newydd ryddhau par iaith newydd ar gyfer Cymraeg i Saesneg, apertium-cy-en. Y bwriadau penodol ar gyfer y fersiwn yma oedd:

* I alluogi i ddysgwyr canfod beth yw testun newyddion cyffredinol. * I alluogi canfod pwy ddywedodd be wrth bwy. * I alluogi gwahaniaethu a yw eitem benodol yn ddigon diddorol i gael ei chyfieithu'n iawn. * Dylai brawddegau o tua 5 o eiriau cael ei gyfieithu'n weddol dda o Gymraeg i Saesneg.

Mi rydem yn meddwl ein bod wedi rhagori'r bwriadau yma cryn lawer ac yr ydym yn eitha hapus efo'r canlyniadau. Mae Cymraeg i Saesneg yn par iaith gymhleth gan nad yw'r ieithoedd yn perthyn yn agos, felly tra nad yw'r canlyniadau ddim beth mae pobl yn ei ddisgwyl gan barau iaith Apertium, rydem yn meddwl ein bod yn curo'r gystadleuaeth ac wedi gwneud rhywbeth a fydd pobl yn weld yn ddefnyddiol.

Hwn yw'r par iaith gyntaf i ddibynnu ar ddefodaeth Cyfyngiad Gramadeg VISL ar gyfer rhannol-diamwys o destun a ddadansoddir yn forffolegol. Gellir cael y ffynhonnell ar gyfer hyn yma: http://beta.visl.sdu.dk/download/vislcg3/ mi rydwyf hefyd wedi paratoi pecyn Debian ar gyfer hwn yma:


Mae pecyn Debian ar gyfer y par iaith a'r fersiwn newydd o lttoolbox ac Apertium hefyd ar gael yma:

http://xixona.dlsi.ua.es/~fran/debian/apertium-cy-en/ http://xixona.dlsi.ua.es/~fran/debian/lttoolbox/ http://xixona.dlsi.ua.es/~fran/debian/apertium/

Mi fyddai'n cael rhain i Debian mor gynted a sydd bosibl ar ôl yr arhosiad.

Derbynnir unrhyw ymatebion, profi, cwestiynnau, a sylwadau. Gwnawn ddatganiad i'r wasg hwyrach ymlaen ond ar y foment dyma ychydig o ystadegau isod:




Wicipedia Cymraeg[1] (615,238 o eiriau): 84.8% PNAW[2] (11,338,509 o eiriau): 95.7% Newyddion BBC[3] (127,948): 91.2%


Dadansoddydd Cymraeg: 10,497 lemata Geiriadur dwyieithog: 11,083 gohebyddion


Cam 1 (chunk): 72 Cam 2 (inter-chunk): 31 Cam 3 (post-chunk): 9


1. http://cy.wikipedia.org/ 2. http://xixona.dlsi.ua.es/corpora/UAGT-PNAW/ 3. http://news.bbc.co.uk/welsh/


[ ... ]

[ Thread continues here (3 messages/11.68kB) ]

Talkback: Discuss this article with The Answer Gang

Copyright © 2008, . Released under the Open Publication License unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 154 of Linux Gazette, September 2008