From: Paul K. <pki...@us...> - 2004-04-24 02:53:50
|
Mark, tk_octave is mostly unsupported. The biggest issue was that it required a version of octave compiled with pthreads, which would make deployment of my package more troublesome. Instead I investigated other solutions. For now I'm using sockets with listen and extra/soctcl from octave-forge. This is adequate for my needs, but is considerably slower than it could be. If you decide to pursue tk_octave, please bear in mind that the code is not safe as it is currently written. Since octave's reference counting classes do not use semaphores, there is a small window in which a task switch could delete an array in octave while tcl wanted to access it. The simplest solution to this problem would be to use a separate namespace for shared variables which have proper threaded access semantics. You may want to consider unifying soctcl and tk_octave syntax. That way you can use network transparency if needed, but use threads and shared memory for speed. The soctcl interface is not as good as it could be. I find that from tcl, I want some variables in octave to be scoped according to the current function scope in Tcl (and possibly persistent), and others to be global. Some sort of namespace parameter for the octave eval command would do wonders. It would be easy enough to implement in octave by associating a symbol table with each namespace. An alternative to tk_octave is to embed octave in tcl. A lot of the mechanics of this are already available. Fundamentally this is no different from embedding tcl in octave, but in practice it is easier to extend tcl/tk with numeric support than it will be to extend octave with gui support. As a bonus, making octave embeddable in tcl will remove the cygwin dependency in windows. Paul Kienzle pki...@us... On Apr 22, 2004, at 11:45 AM, Mark P. Esplin wrote: > I tried out tk_octave and noticed a couple of problems. First on my > system > the tk_matrix demo wouldn't work until I added: > > set auto_path "$auto_path /usr/lib" > > to tk_matrix.tcl so that it could find the BLT package. "wish" > doesn't have > any trouble finding the BLT package. > > When I start the tcl/tk interpreter from octave with tk_interp my CPU > free > time drops to 0. This is before I do any other commands. Why does the > interpreter require so much CPU time? > > tk_entry.m doesn't work. Line 100 is "@@ -98,6 +98,7 @@" which looks > like it > must of gotten left over from a patch attempt. > > The document string on tk_end says "See also: tk_start, ..." which > must have > supposed to have been tk_interp. > > -Mark Esplin > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Octave-dev mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octave-dev > |