octave-maintainers
[Top][All Lists]
Advanced

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

Re: [PATCH #8316] Variable Editor


From: John W. Eaton
Subject: Re: [PATCH #8316] Variable Editor
Date: Mon, 24 Feb 2014 12:45:24 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

On 02/20/2014 02:00 AM, Daniel J Sebald wrote:

Yes, before continuing some words of caution.  I don't want to
discourage you from working on this, but at the same time it probably
would be best to hold off perfecting things until the issue of sending
data from one thread to another is worked out.

John Eaton made a good start on a variable editor, so you may want to
see if there is anything in common there at some point.

I thought my solution was quite clumsy and required way too much copying of data and translating data structures from things that Octave uses (octave_value, etc.) to things that Qt understands (QList or whatever).

In my view, I think that really all that is need is a way to process an
Octave command in the "background", i.e., the result doesn't appear in
the command window.  (And of course, the results are sent back to the
GUI via signal using octave_value pointer...I've don't this, removing
callbacks, seems to work.)  For example, when a file is opened in the
editor, the GUI could request in the background all the breakpoints for
that file.  There is such an Octave script/command already.

My original reason for going with the octave-qt-link thing was that I hoped to create an interface between Octave and a GUI that would say "provide these functions and your GUI will be fully functional". But I'm not sure that it's possible or even reasonable to try to enforce the requirements of a GUI this way. I agree that we need a way for the GUI to say "Hey, Octave, run this function and, optionally, return a result to me." Since Octave is not thread safe, we need a way to make these function calls in a safe way. Similarly, Octave may need to have a way to notify the GUI that something has changed when the GUI did not specifically request the change (current working directory, for example).

How should functions called through this mechanism pass data? The natural thing for Octave is octave_value and octave_value_list. But that means passing these objects across threads, doesn't it? If so, is Michael Goffioul's reference counting change the best solution?

Dan, now would probably be a good time to take another look at the changes you proposed last year. Can you tell me where they are again? I thought they were in the patch tracker but I don't see them now.

In the case of the variable editor, I think after the completion of a
command the editor just asks for the contents of the variable and
updates those that have changed, then that is all that is needed.  But I
would suggest to do so efficiently.  Rather than asking for all
variables, just ask for those displayed, e.g., x(6:30,17:25) if it is
only those that are displayed.

Agreed, because you can only display a small segment of a Matrix at once on any display, no matter how large. But we would still like to be able to edit variables with millions of elements.

jwe






reply via email to

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