Is it possible to run Ruby IRB ver a named pipe, so I can send commands and get results remotely?
Generally I would like to utilize the IRB engine, while have a different UI (probably written with .Net).
Is it possible to run Ruby IRB ver a named pipe, so I can send commands and get results remotely?
Generally I would like to utilize the IRB engine, while have a different UI (probably written with .Net).
I believe so - this worked for me (mac os x):
in terminal 1:
mkfifo rpipe
in terminal 2:
tail -f rpipe | irb
in terminal 1:
echo "puts 'hi'" > rpipe
in terminal 2 (output):
puts 'hi'
hi
nil
Kinda annoying that the original command is output as well, but close...
It seems to be (I just tried it); just pipe the I/O through your named ppipe and you're good.
But I gotta ask, why?
Specifically, why don't you just run it as a subprocess?