From: Axel Etzold Date: 2008-10-28T04:44:14+09:00 Subject: automatic code conversion from Ruby to C ? Dear all, I am looking for a (semi-)automatic conversion of a Ruby script to C or C++, so that readable source code for a human C/C++ programmer is produced. The program should read in text from a file as a string, split and search it using regular expressions, convert some numbers into floats and perform some calculations on them (the latter part is done using some existing C code). The text file to be read has this structure: -------------------- P1 P2 23 P4 27 -------------------- P2 P3 1 P5 457 P6 3 P377 56 -------------------- Thus, P1 is a starting point and the distance to point P2 is 23 etc. There is a varying number of entries in each of the parts separated by dashes. Is there some gem that would allow me to write a nice short Ruby script doing the above-mentioned manipulations and translate it for me into readable C/C++, such that I'd have to specify as few as possible size and variable type declarations ? I have about a hundred thousand points and relative distances, so speed could matter here ... and I'd have a hard time defending the use of a scripting language with the people I am collaborating here. Thank you very much! Best regards, Axel -- "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ... Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail