Hi all, I just started using TextMate (long time emacs user), and thought I would post to let people know that I'm developing a bundle for IDL (Interactive Data Language http://www.ittvis.com/idl/index.asp).
Current features : Syntax Highlighting : Keywords, builtin routines, system variables, system commands Folding Indenting Recognizes a program's function names and parameters IDL documentation search : open IDL's builtin HTML help libraries search IDL's builtin HTML help libraries run DOC_LIBRARY to build help files tab completion for common control forms new program template
I've posted it at http://aster.colorado.edu/software/IDL.tmbundle.zip and if I can get subversion access, I'll put it in the repository, or somebody else can, but I'm not done with it yet... which brings me to my next point...
I wonder if it is possible to keep a persistent process open in the background and send commands to it. I'm not sure how IDLWAVE http:// www.idlwave.org does this for emacs, I'm afraid that emacs runs a complete shell of its own... I suppose this could be done with a separate program that just passes information back and forth, but that seems inelegant (and more difficult than it needs to be). All I need to do is start a process, pass strings to it as standard in, and read standard out and error from it. I could see this kind of groundwork being useful to far more than just IDL, it should work with any interpreted language that has an interactive mode (ruby, matlab, ...), and many debuggers for that matter (gdb at least).
If this turns out to be relatively easy to do, I would also like to inquire about the status of a plugin API. The web page says more is likely to be done here, has anything been done? Eventually I might want to write a simple plugin that talks to the IDL process and highlights associated lines in the editor window (and possibly add a GUI for querying and displaying variables). Again, this seems like something that a wide array of programming languages would benefit from having a framework for (hint, hint :-) ).
Ethan
On 5/6/2006, at 20:40, Ethan Gutmann wrote:
[...] I wonder if it is possible to keep a persistent process open in the background and send commands to it. I'm not sure how IDLWAVE http://www.idlwave.org does this for emacs, I'm afraid that emacs runs a complete shell of its own... I suppose this could be done with a separate program that just passes information back and forth, but that seems inelegant (and more difficult than it needs to be). All I need to do is start a process, pass strings to it as standard in, and read standard out and error from it.
Conceptually this is possible using named pipes, e.g. we start by doing:
% mkfifo in && mkfifo out % bash -s <in &>out &
Now we have bash running in the background with stdin/out/err connected to named pipes.
So from somewhere else we can send ‘date’ to bash by doing:
% echo date >in
And then:
% read res <out && echo "$res" Tue Jun 6 13:06:25 CEST 2006
This reads a line from the output of the background bash process and prints it.
Though the above will close the named pipes after writing/reading to/ from them. I am not skilled in file descriptor joggling from shell, but at least I know that POSIX does provide the necessary API for reading/writing w/o closing and waiting for output etc.
[...] I would also like to inquire about the status of a plugin API. The web page says more is likely to be done here, has anything been done?
No, and it’s unlikely something I will find time for anytime soon. If you have small requests then I am however willing to listen.
Eventually I might want to write a simple plugin that talks to the IDL process and highlights associated lines in the editor window (and possibly add a GUI for querying and displaying variables)
You should be able to pull that off with the existing capabilities. Either using the ODB Editor Interface to highlight the lines, or the txmt URL scheme -- as for GUI, you can inject anything into the TM program space using the current plug-in loading capabilities, which includes full-blown interactive GUIs.