A
Axel Etzold
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
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