Ruby IDE

umm... you can use ri directly from IRb pretty easily.

···

On 12/17/06, David Vallner <david@vallner.net> wrote:

How easily can you look up
documentation for some element you see in the debugger or irb? I
consider a copy/paste operation as something that takes too long for this.

Find you a better place to work?

···

On 12/17/06, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

Actually, I think it's strongly on-topic! I don't typically use IDEs
because I work on small things that are for the most part well-defined
and self-contained. I consider the Windows or Linux desktop an IDE,
though -- I really *don't* use a coding pad any more. :slight_smile: But for the
command-line geeks out there, assume

1. a *large* multi-programmer pure Ruby project,
2. a *mandated* set of coding standards,
3. a *mandated* single IDE that everyone *must* use

Given that, what would that IDE need to be able to do?

Wilson Bilkovich wrote:

Actually, I think it's strongly on-topic! I don't typically use IDEs
because I work on small things that are for the most part well-defined
and self-contained. I consider the Windows or Linux desktop an IDE,
though -- I really *don't* use a coding pad any more. :slight_smile: But for the
command-line geeks out there, assume

1. a *large* multi-programmer pure Ruby project,
2. a *mandated* set of coding standards,
3. a *mandated* single IDE that everyone *must* use

Given that, what would that IDE need to be able to do?

Find you a better place to work?

Well ... perhaps. But the reference to the coding pad was only half in jest. It seems we all do our own keypunching now, and in a lot of cases our own system administration as well. Functions that used to be decidedly *not* part of a programmer's daily routine are now expected of us. And I'll paraphrase Igor Stravinsky -- an absolute freedom from constraints can mostly *inhibit* creativity rather than promote it.

So ... stick with the constraints. We have to do our own keypunching and our own system administration and we have to use the same language, coding standards and development environment. What does the part we type into need to have?

My own answers are probably expected:

1. It must know everything there is to know about the syntax and semantics of the language, in this case Ruby.
2. It must not allow us to write programs that violate the coding standards, and must help us via code generation wherever possible.
3. This is a biggie -- I want to spend my time developing the *product* using the IDE, *not* enhancing the IDE itself! That pretty much rules out the Squeak IDE. :slight_smile:

···

On 12/17/06, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

M. Edward (Ed) Borasky wrote:

My own answers are probably expected:

1. It must know everything there is to know about the syntax and
semantics of the language, in this case Ruby.

Syntax highlighting already exists in many editors. I use Kate, which
is actually used as the editor component in the KDevelop IDE. This is
about the most you can do with Ruby for the same reasons why
refactoring is so difficult.

2. It must not allow us to write programs that violate the coding
standards, and must help us via code generation wherever possible.

If you're typing repetitive Ruby code then you're doing something
wrong. Ruby can generate code for you at runtime using metaprogramming
techniques. E.g.:

class MyFancyBaseClass
  def self.supercomponent_accessor(component_name, managerator)
    managerator.register_component(component_name)

    define_method(component_name) do
      managerator.get_component(component_name)
    end

    define_method("#{component_name}=") do |value|
      value.perform_validity_checks
      managerator.set_component(component_name, value)
    end
  end
end

class MySuperThingy < MyFancyBaseClass
  MANAGERATOR = ComponentManagerator.new
  supercomponent_accessor :nose, MANAGERATOR
  supercomponent_accessor :foot, MANAGERATOR
end

This is only a small example of the power of Ruby. You can create
methods to generate any code you can dream up at runtime. Unfortunately
with this level of flexibility and the rather relaxed syntax used by
the language it is nearly impossible to automatically police coding
standards. Ruby is a language for humans, not computers and only a
human can properly understand it without actually running it.

3. This is a biggie -- I want to spend my time developing the *product*
using the IDE, *not* enhancing the IDE itself! That pretty much rules
out the Squeak IDE. :slight_smile:

Squeak tries to do things it shouldn't. When programming I want a set
of useful tools, not an operating system. In the same way, a full blown
IDE is usually overkill for Ruby code. A set of folders and policies
written in English is often the best way of managing Ruby code.

···

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

Timothy Goddard wrote:

M. Edward (Ed) Borasky wrote:
  

My own answers are probably expected:

1. It must know everything there is to know about the syntax and
semantics of the language, in this case Ruby.
    
Syntax highlighting already exists in many editors. I use Kate, which
is actually used as the editor component in the KDevelop IDE. This is
about the most you can do with Ruby for the same reasons why
refactoring is so difficult.
  

I've played a bit with KDevelop. If I'm hacking on a huge, mixed-language open source project, it's probably what I'd use. But I don't do a lot of that. I suspect when all the smoke clears, though, the same gotchas that caused David Vallner to displace Eclipse with IDEA would apply to KDevelop for really big projects.

Also, my stipulation of mandated coding standards was intended to "help" the IDE get around some of the "it's the most you can do, given the nature of Ruby" excuses.

  

2. It must not allow us to write programs that violate the coding
standards, and must help us via code generation wherever possible.
    
If you're typing repetitive Ruby code then you're doing something
wrong. Ruby can generate code for you at runtime using metaprogramming
techniques. E.g.:

[snip]

This is only a small example of the power of Ruby. You can create
methods to generate any code you can dream up at runtime. Unfortunately
with this level of flexibility and the rather relaxed syntax used by
the language it is nearly impossible to automatically police coding
standards. Ruby is a language for humans, not computers and only a
human can properly understand it without actually running it.
  

Nonsense! A human can not possibly understand arbitrary Ruby code without running it, any more than a Ruby interpreter can solve the halting problem. A human *programmer* can only *hope* to understand what the coder's *intention* was for the code to do, even if he or she wrote said code!

  

3. This is a biggie -- I want to spend my time developing the *product*
using the IDE, *not* enhancing the IDE itself! That pretty much rules
out the Squeak IDE. :slight_smile:
    
Squeak tries to do things it shouldn't. When programming I want a set
of useful tools, not an operating system. In the same way, a full blown
IDE is usually overkill for Ruby code. A set of folders and policies
written in English is often the best way of managing Ruby code.
  

I realize now that my third requirement also rules out Forth. That strengthens my belief it should be there. :slight_smile: However, the situation I described also rules out a simple set of folders and written policies. You haven't even included a version control system! :slight_smile: To paraphrase somebody, "God must have loved version control systems -- He made so many of them." :slight_smile:

So ... right now my "Ruby IDE" is a Linux desktop (Windowmaker, if that matters), with a bunch of XTerms running vim (with Ruby syntax highlighting), an XTerm running irb, a Firefox window, an Acroread window and of course rake, rspec and soon hoe, ZenTest and some other tools. Version control is either CVS or SVN. It works fine for the little things I do, although one of the projects I'm working on is probably too big for that. But then, that project *is* in a very real sense an IDE. :slight_smile:

But the thought that any of this magic has to work on Windows is accompanied mostly by expletives and prayer. :slight_smile:

···

  

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.
    
--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

M. Edward (Ed) Borasky wrote:

So ... right now my "Ruby IDE" is a Linux desktop (Windowmaker, if that
matters), with a bunch of XTerms running vim (with Ruby syntax
highlighting), an XTerm running irb, a Firefox window, an Acroread
window and of course rake, rspec and soon hoe, ZenTest and some other
tools. Version control is either CVS or SVN. It works fine for the
little things I do, although one of the projects I'm working on is
probably too big for that. But then, that project *is* in a very real
sense an IDE. :slight_smile:

You might want to try VimMate (http://vimmate.rubyforge.org/\). It adds
the most useful IDE features to Vim -- namely a file-system browser with
optional SVN integration.

Also, speaking of having multiple XTerms open, it must be annoying to
manually arrange your windows and switch back and forth between them
(when they overlap). Have a look at Tiling Window Managers, such as wmii
(see http://wmii.suckless.org/ and
http://eigenclass.org/hiki.rb?wmii+ruby\), sometime. I've been using wmii
for the past two years and I absolutely love it.

···

--
Posted via http://www.ruby-forum.com/\.

Suraj Kurapati wrote:

Have a look at Tiling Window Managers, such as wmii
(see http://wmii.suckless.org/ and
http://eigenclass.org/hiki.rb?wmii+ruby\), sometime. I've been using wmii
for the past two years and I absolutely love it.

I forgot to mention _my_ wmii configuration,
which is kind of interesting in its own right:

http://www.soe.ucsc.edu/~snk/2006-07-01-wmii-3.1-configuration-in-ruby.html

···

--
Posted via http://www.ruby-forum.com/\.

Suraj Kurapati wrote:

M. Edward (Ed) Borasky wrote:
  

So ... right now my "Ruby IDE" is a Linux desktop (Windowmaker, if that
matters), with a bunch of XTerms running vim (with Ruby syntax
highlighting), an XTerm running irb, a Firefox window, an Acroread
window and of course rake, rspec and soon hoe, ZenTest and some other
tools. Version control is either CVS or SVN. It works fine for the
little things I do, although one of the projects I'm working on is
probably too big for that. But then, that project *is* in a very real
sense an IDE. :slight_smile:
    
You might want to try VimMate (http://vimmate.rubyforge.org/\). It adds the most useful IDE features to Vim -- namely a file-system browser with optional SVN integration.

Also, speaking of having multiple XTerms open, it must be annoying to manually arrange your windows and switch back and forth between them (when they overlap). Have a look at Tiling Window Managers, such as wmii (see http://wmii.suckless.org/ and http://eigenclass.org/hiki.rb?wmii+ruby\), sometime. I've been using wmii for the past two years and I absolutely love it.
  

I actually did have a "Window Manager/Desktop" bakeoff a few months ago. The gory details can be found on my blog at

http://borasky-research.blogspot.com/2006/04/more-about-linux-desktops.html

Back then, I had pretty much settled on XFCE4.4, but I managed to get WindowMaker to work after that post, so that's what I'm on now. I did try wmii and couldn't make it work -- too many "Vulcan Nerve Pinches" for my taste. And switching between windows is a job for Alt-Tab. :slight_smile: WindowMaker allows an unlimited number of "desktops", so that's another option. It's nowhere near as cool as Enlightenment in that respect, however.

But, since I've "admitted" I'm building my own IDE, at some point I plan to test it with "twm" and see if it's usable. I suspect it will be, at least with a 3-button/wheel mouse, which is what I use. I'm not even remotely interested in Windows compatibility at this point -- this is as pure an open source project as I can make it.

···

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.

Or you could just use gnu screen if you don't want to switch gui
environments.

···

On 12/18/06, Suraj Kurapati <snk@gna.org> wrote:

Suraj Kurapati wrote:
> Have a look at Tiling Window Managers, such as wmii
> (see http://wmii.suckless.org/ and
> http://eigenclass.org/hiki.rb?wmii+ruby\), sometime. I've been using wmii
> for the past two years and I absolutely love it.

I forgot to mention _my_ wmii configuration,
which is kind of interesting in its own right:

Baskin School of Engineering – Baskin Engineering provides unique educational opportunities, world-class research with an eye to social responsibility and diversity.

--
Posted via http://www.ruby-forum.com/\.

In the Rails world, the most popular editor seems to be TextMate. It
doesn't give you full IDE features, but it has stuff like syntax
coloring and project management (not Gantt charts but code separation
etc).

I'm a dyed-in-the-wool vi user, I'm hoping playing with Smalltalk will
give me a taste of how the other half lives, but if you're into IDEs,
I think there's an Eclipse plugin for Rails which probably is pretty
good for general Ruby use. That's pure speculation on my part, take it
with a grain of salt, but it's called RadRails. I haven't used it but
I did see a presentation on it from the creator and it did seem like
the software was good and the creator was smart. These are always
things to look for.

I used Eclipse on a Java project, and the one great thing about it for
me personally was being able to get method definitions etc.
automatically, and being able to jump to them from anywhere in the
codebase. I've heard there's a way to do something similar in vi with
a Unix utility called ctags. Apparently what you do is run ctags on
your codebase and then vi gets autoloaded with method definition
locations and the ability to hop to them. I haven't taken that for a
test drive either, though, so again, ymmv.

Hope this helps.

···

--
Giles Bowkett
http://www.gilesgoatboy.org


http://gilesgoatboy.blogspot.com