Hi,
I made a command for the ruby texmate bundle that might be interesting.
What it does (on command-option-R): - It takes the selected text or the current line (= STDIN) - It finds a running IRB session in the Terminal.app. If you don't have one, it starts a new one. - It pastes your code in IRB and switches to the terminal.app.
It saves you from manually selecting, copying, switching and pasting to try out some code in irb. A poor man's SLIME if you will.
The command is a basic ruby script that uses the scripting bridge to drive Terminal.app. It can also be adopted to use other interactive consoles (python, clojure, ..) by changing the REPL_ constants at the top of the script. - REPL_CMD is the command to start the interactive console - REPL_PROCESS is the active process that ends up running in the terminal. - REPL_PROMPT is the prompt you get when you start the interactive console
See attachment for the command.
Greetings,
Jan Sabbe
Cool stuff Jan! Without realizing it I've been wanting this for a while now. Excellent idea =)
I like that it reuses the existing IRB session as well, smart.
- Joe
On Oct 3, 2008, at 10: 52AM, Jan Sabbe wrote:
Hi,
I made a command for the ruby texmate bundle that might be interesting.
What it does (on command-option-R):
- It takes the selected text or the current line (= STDIN)
- It finds a running IRB session in the Terminal.app. If you don't
have one, it starts a new one.
- It pastes your code in IRB and switches to the terminal.app.
It saves you from manually selecting, copying, switching and pasting to try out some code in irb. A poor man's SLIME if you will.
The command is a basic ruby script that uses the scripting bridge to drive Terminal.app. It can also be adopted to use other interactive consoles (python, clojure, ..) by changing the REPL_ constants at the top of the script.
- REPL_CMD is the command to start the interactive console
- REPL_PROCESS is the active process that ends up running in the
terminal.
- REPL_PROMPT is the prompt you get when you start the interactive
console
See attachment for the command.
Greetings,
Jan Sabbe <run_in_irb.patch.zip><Run in IRB.tmCommand.zip> _______________________________________________ textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 03.10.2008, at 17:03, Joseph Pecoraro wrote:
Cool stuff Jan! Without realizing it I've been wanting this for a while now. Excellent idea =)
I like that it reuses the existing IRB session as well, smart.
Only a tiny note. See:
http://www.nabble.com/Interactive-Shell-for-irb-to14455663.html
or
http://www.bibiko.de/irbdaemon.mov
It is possible to run IRB or python in an interactive mode inside of TextMate. I did this for R and it runs smoothy.
Thus if there is an interest I can provide a better starting package to run IRB inside of a TM document (w/o Terminal).
--Hans
Wow Hans, thats very cool as well. I'm absolutely interested in something like that.
I am sure that you, and many of the developers on this list are busy, but if you have the time and you're looking for something to do I can absolutely say that I am interested in this kind of stuff, so you are guaranteed to have an audience.
- Joe
On Oct 3, 2008, at 2: 35PM, Hans-Jörg Bibiko wrote:
On 03.10.2008, at 17:03, Joseph Pecoraro wrote:
Cool stuff Jan! Without realizing it I've been wanting this for a while now. Excellent idea =)
I like that it reuses the existing IRB session as well, smart.
Only a tiny note. See:
http://www.nabble.com/Interactive-Shell-for-irb-to14455663.html
or
http://www.bibiko.de/irbdaemon.mov
It is possible to run IRB or python in an interactive mode inside of TextMate. I did this for R and it runs smoothy.
Thus if there is an interest I can provide a better starting package to run IRB inside of a TM document (w/o Terminal).
--Hans
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 03.10.2008, at 21:05, Joseph Pecoraro wrote:
Wow Hans, thats very cool as well. I'm absolutely interested in something like that.
I am sure that you, and many of the developers on this list are busy, but if you have the time and you're looking for something to do I can absolutely say that I am interested in this kind of stuff, so you are guaranteed to have an audience.
Maybe this could work. I'm not so involved in the entire IRB stuff thus I could setup a main framework to run IRB in TM. Then some other people could go into the details to fine-tune it. Mainly one should know some basics of bash and Ruby scripting plus a bit language grammar.
Cheers,
--Hans