From: "Guy N. Hurst" Date: 2000-11-07T17:48:52+09:00 Subject: [ruby-talk:6110] Re: What would a Ruby browser look like? Dave Thomas wrote: > > A comment I heard several times at OOPSLA was that Ruby could take > over the world if it had a good browser. > I was going to ask you how things went at that conference... > So, I've been thinking about what a Ruby browser would look like. > > I suspect everyone I talked with was anticipating something like a > classic 4 pane Smalltalk browser. But would that really work? > I have desired a browser for Ruby like Smalltalk has... and I brought it up to those on IRCnet. Some answers: OCT 17, 2000 ruby/gtk's maintainer had class browser implemented a while ago it's in archive for while, but he created new one. i lost url... :( NOV 04, 2000 well, ruby isn't written in ruby so... well, you can always read c source if you want but i guess it's not what you want... ok, what about methods/classes I define within ruby? can I view those from within the running app? for example, if I am running irb... not that i know of Being a web developer, I was envisioning something viewable from a web browser. Best I could do with that is perhaps just a sort of tree structure that dynamically figures out associated objects. Such a browser would mainly be used for ruby-based web apps, of course. I have gotten busy lately, though, and haven't taken it further. Otherwise, I do envision a non-web-based one to be like the Smalltalk browser. I have nothing else to compare it to. > How would we represent singleton classes, things like > > def a.fred > ... > end > > class < ... > end > > or even simple things such as our code extending a system class > > class Object > def defaultsTo > self > end > end > > I think that maybe we need a whole new way of looking at browser/IDE > interfaces. > > Am I making this too difficult? Anyone got any world-beating ideas? > I really like the idea, but until Ruby is written in Ruby, it will be tricky to view the "built-in" definitions... whether in a GUI or in text. Unless maybe special provisions were made. Conrad Schneiker asked in [ruby-talk:6105] why a browser might be needed. Well, The first thing would be for a sort of built-in documentation. But then, we do have the online reference and an english book now. Still, just yesterday I reached the point of 'needing' to see how a Ruby method was implemented 'in Ruby'. But, being built-in, that is not possible. Thirdly, while using IRB, I was interested in seeing what I had done so far. I mean, I can dynamically add method definitions to the String class, for example. I would like to be able to see a summary, in Ruby-source-format, of all the methods I have defined so far. As for a name, I think 'Laser', as suggested by Conrad, is nice. I also think 'Facets' or even 'Reflections' would be good. I am also interested in something similar to doc strings, maybe involving RD. Yashi came up with a quick hack to extend ruby at least partially. Using method objects was another approach. One question that he asked which could also be applied to the browser is what to do about extensions. I would be willing to participate in the browser project, but I think this issue with built-in/extended C code has to be addressed deep down. In any case, I plan to address the web-based browser for multiple versions of Ruby so one could view the classes etc. on the new ruby website I am developing. Guy N. Hurst -- HurstLinks Web Development http://www.hurstlinks.com/ Norfolk, VA - (757)623-9688 PHP/MySQL - Ruby/Perl - HTML/Javascript