justinNEE has asked for the wisdom of the Perl Monks concerning the following question:

About a year ago aufrank began asking around about experiment generation in perl. I am wondering if anyone else out there is using perl for this type of thing? In that old thread there are suggestions of modules for use to deal with timing and database issues.

What suggestions do monks have for terminals? Here is the situation:
  • WinXP
  • Must be able to display passages in a "dos like" mode.
  • Must be able to play audio files in sync with the passage. (i.e., I must be able to tell when the audio is done playing)

    I checked out Win32::Console and its pretty impressive except that I can't control things like font face (from the program).

    I think perl is a good tool for experiment generation. Has anyone ever used directx in perl? If the ease of processing (with perl) was ever combined with the purrty output of directx, perl would be the perfect tool for the job. Is it worth the hassle?

    Thanks for any advice!
  • Replies are listed 'Best First'.
    Re: Experiment Generation in perl
    by Courage (Parson) on Mar 15, 2003 at 07:17 UTC
      DirectX is overkill here, use just any simple GUI. For example perl+Tk, or may be simple Tk, because:
      • DirectX has no good bindings to Perl (AFAIK), you will need a lot of C coding, and probably such soultion could be better written in C at all.
      • DirectX is not portable

      Courage, the Cowardly Dog

        with the timing issues brought up earlier in the thread it seems like Tk might be hard to get good button-press timings. i have a thought that SDL might be usefull. SDL being a C binding to whatever sub-libs providing a popular cross platform game development layer.

        it might be a good way to minimalize things. screen, timing and font and joystick functions all in one place.

    Re: Experiment Generation in perl
    by BrowserUk (Patriarch) on Mar 15, 2003 at 05:09 UTC

      Maybe I'm the only one who doesn't quite get what you are asking, but maybe I'm not:)

      Could you clarify what you mean by "experiment generation"?


      Examine what is said, not who speaks.
      1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
      2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
      3) Any sufficiently advanced technology is indistinguishable from magic.
      Arthur C. Clarke.
        If it helps the node by aufrank he is talking about is Experiment Design. I believe he is doing something very similar. We have talked about it before, but I don't remember all the specifics.

        use Confession qw(free voluntary);
    Re: Experiment Generation in perl
    by justinNEE (Monk) on Mar 16, 2003 at 04:59 UTC
      Software used to generate experiments? :> There are alot of programs specifically marketed as tools for creating experiments. (two popular packages are eprime http://www.pstnet.com/eprime and psyscope http://psyscope.psy.cmu.edu. But because each company targets people doing a particular type of experiment, they are gernally inconvenient.

      I don't know if other people are using perl, but I would like to try. The available tools handle GUI and timing issues well, but everything else poorly. All I am trying to do at this point is:
    • Display text (and be able to control font face/size/color/position)
    • Play audio (and be able to control playback)
    • guarentee reasonably accurate timing

      I originally imagined a "dos like" mode, but I will give Tk, Win32::GUI, SDL a try. Thanks for your help guys.