octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave gui & mingw


From: John Swensen
Subject: Re: octave gui & mingw
Date: Thu, 09 Feb 2006 07:32:47 -0700
User-agent: Thunderbird 1.5 (Macintosh/20051201)

Sebastian,

A couple of years ago (before I knew a lot about programming) I tried to use QT to implement a UI for octave. Given that I was way less experienced, my problems may have been due to that. I tried using the QProcess class and redirecting STDIN, STDOUT, and STDERR to talk with an instance of Octave. The problem lied in the fact that I couldn't get it to work right and it would inevitably hang because of some issue with how they read/write to the STD* channels. I also had to reimplement a large portion of the same funtionality that readline already provides because the QT STD* redirection didn't handle arrow keys and such by default. Needless to say, I switch to GTK and am using the VTE widget and haven't had a single hiccup.

I have been working on an Octave GUI with GTK for about a year now, but with a day job, progress has been slow. A friend is willing to host a a trac/subversion wiki for me but I haven't got everything checked in yet. My implementation uses X, so it works fine on OSX, Linux, and Cygwin (runing Xwindows). Now that cygwinports is up and running again, it is pretty trivial to get all the dependencies met. There are native versions of GTK (e.g. used in Gimp) so I wouldn't necessarily count it out as an option.

Regardless of which toolkit is chosen for the "standard" octave UI, I think the first step would be to design a good interface control document (ICD) that defines the data that is passed between the octave core and the UI. A mechanism also needs built into the octave sources that provides a level of thread safety. I did this by putting a hook into the main execution loop such that each time a command is not executing, variable information and command history are copied into a semaphore-protected buffer for retrieval by the UI at regular intervals. With this hook in place, I ran the benchmark.m script from the sciviews.org web site and in ~200 seconds, the additional overhead was only ~200 ms. I don't know if you were planning on compiling the UI in as part of the actual application, but my implementation uses sockets and seems to work quite well. This interface needs to define things like (my current code only implements about half of these):
 - Debugging information
    - Signal when a breakpoint is hit
    - Add/remove/modify breakpoints
 - Variable information
    - List of variables in scope
    - Ability to request detailed variable information
 - Command history information
 - Others
    - Comments????

Just my $0.02


John Swensen


Sebastien Loisel wrote:
Hello,

I'm probably going to write a GUI for octave using QT4 under MinGW. David Bateman gracefully sent me a tarball to build under MinGW, and suggested I announce my intention here because there are other octave GUI projects.

I've googled for octave IDE's, but I haven't found very many active projects or projects that would run in Windows. If you are aware of active IDE projects, let me know.

Cheers,

Sébastien Loisel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]