There are several things wrong. IRB will not use a stringIO as an output_method. Your thread is not a native thread so it's blocking.
I think what you are attempting to do is great, that's what I want people to be able to do. But in the current implementation that will not work. Lastly, I don't think Shoes should be doing the work here, Shoes should just be a window for a ruby backend. Also, I feel that the solution would be trivial is native threads were an option. On Tue, Nov 18, 2008 at 6:14 PM, Devyn Cairns <[EMAIL PROTECTED]> wrote: > Okay, I got this code, but it won't work for me... Someone please look at it? > http://gist.github.com/26375 > > On Tue, Nov 18, 2008 at 5:58 PM, Devyn Cairns <[EMAIL PROTECTED]> wrote: >> Hey, take a look at IRB::Irb#new! >> http://ruby-doc.org/core/classes/IRB/Irb.html#M004550 >> >> On Tue, Nov 18, 2008 at 5:09 PM, Justin Catalana >> <[EMAIL PROTECTED]> wrote: >>> Here is a proof on concept. I tried using multiple threads to do this >>> with no luck. But because this can be implemented using two >>> applications and a file to communicate through, I really hope it is >>> doable as one shoes app. >>> >>> how to use: get both of the scripts save them to one direcotry run the >>> terminal script, run the shooes app type into the terminal. >>> >>> http://pastie.org/318347 >>> http://pastie.org/318346 >>> >>> I think this is a good direction to head, as long as we can get irb >>> running in a seperate thread and communicating through stringIO versus >>> this silly implementation with two scripts and a file. >>> >>> best >>> On Mon, Nov 17, 2008 at 4:49 PM, _why <[EMAIL PROTECTED]> wrote: >>>> On Mon, Nov 17, 2008 at 02:52:30PM -0800, Justin Catalana wrote: >>>>> I feel that the current expert-irb.rb is inadequate for a couple >>>>> reasons, including the inability to execute an infinite loop (I think >>>>> this is because it attempts to evaluate the entire loop, and runs out >>>>> of memory), and lack of a true "shell" feel. >>>> >>>> Sure, expert-irb.rb is just a sample, it's not designed to be really >>>> great or anything. I have a different shell with syntax highlighting >>>> for Hackety Hack. However, having played with Small Basic a bit, I >>>> can see the usefulness of their intellisense and reference pane. >>>> >>>> Having an independent Shoes shell for people would be great and I >>>> like your ideas. I think once I've got Shoes running quicker, I'll >>>> have some brainroom to help come up with ideas. >>>> >>>> _why >>>> >>> >> >> >> >> -- >> |-------\ |--------- \ / \ / |\ | >> | \ |_____ \ / \ / | \ | >> | / | \ / \___/ | \ | >> |-------/ |--------- \_/ | | \| >> > > > > -- > ~devyn >
