benjohn / fysh.org wrote:

> I just noticed this project (went to the summer of code while looking in
> to mkmf). I was wondering how it's coming along? Reading up on it, it
> seems like a great deal of the project intention is to be able to
> visualise ruby's objects really nicely; a representation of the code
> with "click to place a break point", and also a better irb are other
> goals.

I'm not quite as far with the project as I'd like to be, but I think I 
can still get finished with it on schedule. Until now I've mostly been 
working on making ruby-breakpoint easier to maintain in the future, 
fixing bugs in it, writing unit tests and so on. Next on my TODO is 
adding stepping and polluting objects less when you set breakpoints. 
(Right now breakpoints can actually *cause* bugs in your application!)

> It's struck me quite a few times (and there was a post a few days ago on
> this subject) that a promising approach to visualising Ruby's objects,
> and probably also interacting with them, could be created using an
> embedded web server. If you want a ruby script to provide inspection of
> objects at run time, then you include the relevent library and start up
> serving HTML on some port.
> 
> At it's simplest, it would just have to create some HTML from an Object
> instance. You could use style sheets to pretty up and customise the
> representation. I can then imagine that it would be advantageous to be
> able to customise the HTML output on a class by class (and included
> module) basis (enumerables show their content, for instance, and the
> result of known "accessor" methods are displayed too).

Hm, I've thought about visualizing the objects by using a HTML widget 
before. I think this might be way easier than drawing into a canvas and 
detecting clicks and so on. I'm just not yet sure how powerful GTK2's 
HTML widgets are.

> While making it web based imposes some restrictions, it seems to me to
> also give some pretty neat bonusses. Who doesn't have a browser, or
> means of rendering HTML these days? It would be very portable. Also, it
> offers an easy entry in to remote debugging.

Regarding a pure web client: I think this is a great idea actually and 
_why's work on TryRuby might serve as a base for it. There would be 
interesting benefits with integrating it into Rails.

I still think that a real GUI client will be able to do things that are 
hard to do with a web one, though, so I'll focus on the GUI one first. 
Maybe I'll work on the web one myself one day, but if you are interested 
in doing this then definitely do so! Something like this would be very 
welcome and I'd really like to include it with ruby-breakpoint. Please 
contact me off-list if there is anything I can do to make this easier 
for you.

Kind regards,
Florian Gross

-- 
http://flgr.0x42.net/