MattEvans 473 Veteran Poster Team Colleague Featured Poster

What kind of music do "geeks" listen to, while performing their geeky duties?

As a half-geek, I prefer rolling trancey bass-like techno-esque outings by bands such as the Prodigy, and hella-hardcore pulse techno like Angerfist. However, I may be caught enjoying a bit of evokative ultra-cheese pop, by the likes of Apoptygma Berzerk and Echo Image. At times, I may listen to re-jigged techno-classical. And sometimes, hard-rock/metal; System of a Down, Stratovarius, maybe even Cradle-of-Filth.

As a favorite, it's gotta be techno-dash-trance, but, it's gotta be just right...

Cast your votes.

mattyd commented: cool +1
MattEvans 473 Veteran Poster Team Colleague Featured Poster

I've never seen segmentation faults in Perl apps, so I'd guess the problem is between the inline CPP code and the CPP program itself.

The "best debugger" is assuming everything's going to go wrong before you start and making adequate provision for real-time/recorded logging throughout your code.

Break the program apart and test the CPP application from command line/within a C environment; if it works as expected, the problem is in the inline CPP perl module/with your usage of the module.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

If you need results in real time:

If, from Perl, the C++ spawn call is syncronous, you'll have to spawn the C++ app hundreds or more times, losing your speed advantage, and outputing the result in Perl each time. Alternatively, you'll need two SEPARATE Perl apps, one to launch the C++ app, and one to read in the data, in order to simulate asynchronisity.

If the call is asynchronous, you'll have to find a way from the C++ process to connect back to the Perl process; there is an easy way, named pipes. I've never experimented with them in Perl, the standard named piping package doesn't work in Windows apparently.

But the concept is simple; you have a named filehandle, that is connected at one end to the C++ program and at the other end to the Perl program, all data written by the C++ program can be read into the Perl program and outputted.

Effectively, it's polling a virtual file that is closed and opened very frequently; and that's the easiest way I can think to simulate it in a Windows environment. From the C++ app, open the file (watching for errors), write some data, close the file; if you hit errors, try to open it and write until no errors. At the same time, in the Perl app, in a loop, open the file (ignoring errors), if there's data, output it, then clear the file and close it. You may end up with some …

sut commented: good points and advice all around +1