On Feb 26, 2008, at 10:43 PM, Charlie Garrison wrote:

Good afternoon,

On 26/2/08 at 2:28 AM -0600, Aaron Hsu <[EMAIL PROTECTED]> wrote:

Does anyone know if it is possible to "pipe" output such as the contents of a file to another program? What I am doing is that I have a REPL that reads in code. What I want to be able to do is make changes to code in BBEdit, and then send it into a running instance of my environment, so that, for example, I can make changes to the code and have those changes take effect in the running instance without having to reload and re-execute everything. Is this possible?

What is REPL?

I guess that I should have explained a bit better what I was aiming for. REPL stands for “Read Eval Print Loop” and is something like a command line interface that allows interactive running of programs and functions. Specifically, this is for a Scheme system.

Anyway, I doubt that you can get BBEdit to reload code on behalf of another program. But it's easy enough to write a script (Perl, AppleScript, etc) that can tell the other program that it's time to re-read the code file. I do something similar with apache/mod_perl. After I make code changes I hit a command key which triggers a script (within BBEdit) to tell apache to reload.

Aaah, see, I would need to actually pipe the file or a selection of the file into the standard input of a currently running instance of the program.

As for how to have code changes take effect without reloading; that will depend on the program that is running the code. Does it support live code changes?


Live code changes come about as the result of re-evaluating code passed to the environment, in the same way that you would type new commands into the command line.

Aaron Hsu
Email/AIM: [EMAIL PROTECTED]
XMPP: [EMAIL PROTECTED]
Web: http://www.sacrideo.us


--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to