Ruby in a box

I've been thinking about the minimal feature set a beginner-friendly
ruby development/learning environment should have. I feel the
following are essential:

1. An editor pane

2. A drracket-style repl, that can reset itself and reload all the
definitions from the editor pane

3. The ability to run the program from within the IDE

4. Built-in docs (possibly via launching a browser window, though I
note that drracket took a definite hit in how friendly it felt when it
went that route)

* How close can we come to this with the current tools out there?

1. The editor pane is of course what every IDE is built around

2a. It's not too hard to embed a repl in a text pane. I experimented
with it a bit a couple of years ago
[https://github.com/martindemello/guirb/] and jruby has jirb_swing.

2b. Given that an IRB session is accessible as an object, it shouldn't
be too hard to have it reread definitions from the editor pane. There
are already projects that go one better and attach an irb session to a
running program as a debug tool

4. Right clicking on a word and bringing up its help in an ri pane
should be doable, especially if your editor is written in ruby.

3. This is possibly hard to do portably, as it requires the ability to
run the program as a separate process, and either launch a terminal or
embed a terminal emulator. dragonconsole
[http://code.google.com/p/dragonconsole/] looks like a promising
cross-platform terminal emulator (it would require a java-based ide,
of course), or there could just be per-platform code to
fork/CreateProcess a terminal.

* Would this be a useful thing to have?

I think so - at the very least on windows, opening up a terminal
window to run stuff is not a natural thing to do, and I'm sure there
are lots of linux and mac users who would prefer a nice integrated
environment within which to learn ruby.

* Should it be written in ruby?

It would definitely be a nice-to-have, and would make things like irb
and ri integration a lot easier to do. Possible starting points:

- redcar (java/jruby based. Could potentially have its functionality
extended with existing widgets written in any jvm-based language)
- arcadia (ruby/tk. Not sure how easy it is to extend with existing
tcl/tk widgets)

The other point of view is that it might be better a to take a mature
ide with a large userbase and a powerful plugin system, and write
ruby-specific plugins for it. One huge plus is that it would bring
along version control integration for free.

Possible candidates there:

- eclipse or netbeans:
pro: very powerful
con: they have their own learning curve. not sure how easy it would be
to present a pared-down, ruby-specific interface.

promising lightweight, cross-platform ides with plugin systems include:
- jedit: plugins written in java. there is already a ruby development
plugin and a console plugin
- code::blocks: plugins written in c++ and squirrel (lua-inspired
dynamic oop scripting language)
- geany: plugins written in c or c++, seems like it currently has less
of a rich plugin ecosystem than the other two

Thoughts? Ideas?

martin

I've been thinking about the minimal feature set a beginner-friendly
ruby development/learning environment should have. I feel the
following are essential:

1. An editor pane

2. A drracket-style repl, that can reset itself and reload all the
definitions from the editor pane

3. The ability to run the program from within the IDE

4. Built-in docs (possibly via launching a browser window, though I
note that drracket took a definite hit in how friendly it felt when it
went that route)

* How close can we come to this with the current tools out there?

There's also a "lightweight" variant:

1. any text editor with syntax highlighting and code indention for
Ruby (gvim?) - maybe there's also a standalone code formatter.

2. IRB, pry

3. Terminal

4. ri

I do not know how good this works on Windows since I only use self
compiled Ruby on cygwin.

* Would this be a useful thing to have?

I think so - at the very least on windows, opening up a terminal
window to run stuff is not a natural thing to do, and I'm sure there
are lots of linux and mac users who would prefer a nice integrated
environment within which to learn ruby.

Right, it might reduce the learning curve. But wouldn't it then also
need features to easily built graphical user interfaces?

* Should it be written in ruby?

It could as well be written in HTML - meaning: proper documentation.
The benefit would be that people get along on more different systems
(i.e. without the overhead of installing an IDE and even without a
graphical UI at all). It might be a bit more rough than a single
installer which throws everything (Ruby, IDE...) on the system. But
then again, if it's software, maintenance efforts are higher.

Kind regards

robert

···

On Mon, May 21, 2012 at 10:24 AM, Martin DeMello <martindemello@gmail.com> wrote:

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

While it doesn't cover all the things you've asked for, I think Hackety Hack comes pretty close in most areas. Have you taken a look at it?

http://hackety.com/

Wayne

···

On May 21, 2012, at 3:24 AM, Martin DeMello wrote:

I've been thinking about the minimal feature set a beginner-friendly
ruby development/learning environment should have. I feel the
following are essential:

This sounds a lot like Kid's Ruby, except for the REPL: http://kidsruby.com/

Might be a good starting point.

-Justin

···

On 05/21/2012 01:24 AM, Martin DeMello wrote:

I've been thinking about the minimal feature set a beginner-friendly
ruby development/learning environment should have. I feel the
following are essential:

1. An editor pane

2. A drracket-style repl, that can reset itself and reload all the
definitions from the editor pane

3. The ability to run the program from within the IDE

4. Built-in docs (possibly via launching a browser window, though I
note that drracket took a definite hit in how friendly it felt when it
went that route)

Yes, I considered hackety hack, but while I think it is an excellent
resource for learning to program, my experiences with shoes lead me to
believe it is not a good ruby ide. I've only glanced briefly at HH,
but I've done a fair bit of shoes programming when it first came out,
and I found that there was an impedance mismatch between shoes and
ruby that (at least in my opinion) you need to be a reasonably
experienced ruby programmer to work around. Shoes changes ruby's
scoping rules fairly drastically (the change is easy to state, but is
felt everywhere), and that means that at some point you run into
fiddly behaviour when you want to mix shoes code with other ruby code.

martin

···

On Mon, May 21, 2012 at 1:51 AM, Wayne Brissette <wbrisett@att.net> wrote:

On May 21, 2012, at 3:24 AM, Martin DeMello wrote:

I've been thinking about the minimal feature set a beginner-friendly
ruby development/learning environment should have. I feel the
following are essential:

While it doesn't cover all the things you've asked for, I think Hackety Hack comes pretty close in most areas. Have you taken a look at it?

http://hackety.com/

There's also a "lightweight" variant:

1. any text editor with syntax highlighting and code indention for
Ruby (gvim?) - maybe there's also a standalone code formatter.

2. IRB, pry

3. Terminal

4. ri

Have you used drracket? It's *really* pleasant to have everything
integrated and working together, particularly when you're learning. I
think it would be a nice experience to bring to the ruby world.

I do not know how good this works on Windows since I only use self
compiled Ruby on cygwin.

The windows CMD terminal is pretty painful to use (I'm not sure if
anything better ships with more modern versions of windows).

* Would this be a useful thing to have?

I think so - at the very least on windows, opening up a terminal
window to run stuff is not a natural thing to do, and I'm sure there
are lots of linux and mac users who would prefer a nice integrated
environment within which to learn ruby.

Right, it might reduce the learning curve. But wouldn't it then also
need features to easily built graphical user interfaces?

I thought about that, but I'd say building GUIs is, at least in the
ruby world, a fairly advanced thing to do. Also, for some reason,
there just doesn't seem to be a large community of people developing
gui desktop apps in ruby. On the other hand, there are *lots* of other
areas where ruby is a very heavily-used and useful tool, both in the
console-based data processing and automation, and in webapps. It would
probably be a greater bang for the buck to include a sinatra + webrick
quickstart plugin.

* Should it be written in ruby?

It could as well be written in HTML - meaning: proper documentation.
The benefit would be that people get along on more different systems
(i.e. without the overhead of installing an IDE and even without a
graphical UI at all). It might be a bit more rough than a single
installer which throws everything (Ruby, IDE...) on the system. But
then again, if it's software, maintenance efforts are higher.

Yeah, that's true, but it could also be more useful if done right.

martin

···

On Mon, May 21, 2012 at 1:46 AM, Robert Klemme <shortcutter@googlemail.com> wrote:

That looks really interesting! I've never heard of it before, thanks
for the pointer.

martin

···

On Mon, May 21, 2012 at 11:23 AM, Justin Collins <justincollins@ucla.edu> wrote:

On 05/21/2012 01:24 AM, Martin DeMello wrote:

I've been thinking about the minimal feature set a beginner-friendly
ruby development/learning environment should have. I feel the
following are essential:

1. An editor pane

2. A drracket-style repl, that can reset itself and reload all the
definitions from the editor pane

3. The ability to run the program from within the IDE

4. Built-in docs (possibly via launching a browser window, though I
note that drracket took a definite hit in how friendly it felt when it
went that route)

This sounds a lot like Kid's Ruby, except for the REPL: http://kidsruby.com/

Might be a good starting point.

Yes, I considered hackety hack, but while I think it is an excellent
resource for learning to program, my experiences with shoes lead me to
believe it is not a good ruby ide.

You're right, and after re-reading your initial message, I realized you really were asking for more of an IDE. (Maybe look at RubyMine? While commercial, it brings a lot to the table for somebody starting out, and for the seasoned programmer who wants to peek at things under the hood.)

Shoes changes ruby's
scoping rules fairly drastically (the change is easy to state, but is
felt everywhere), and that means that at some point you run into
fiddly behaviour when you want to mix shoes code with other ruby code.

It certainly adds things, there is no getting around that, you suddenly have stacks which only appear in Shoes. But isn't that more or less the case anytime you start adding GUI elements into a language? But you're right again, for what you're asking Shoes/Hackety Hack isn't exactly what you are after.

Wayne

···

On May 21, 2012, at 3:59 AM, Martin DeMello wrote:

There's also a "lightweight" variant:

1. any text editor with syntax highlighting and code indention for
Ruby (gvim?) - maybe there's also a standalone code formatter.

2. IRB, pry

3. Terminal

4. ri

Have you used drracket?

No.

It's *really* pleasant to have everything
integrated and working together, particularly when you're learning. I
think it would be a nice experience to bring to the ruby world.

On one hand I agree. On the other hand I'm grumpy today and think
editor and command line aren't too bad even though it's a bit more
effort. Maybe I'm also old fashioned and believe that things are
better remembered if you need to work harder for them. :slight_smile:

I do not know how good this works on Windows since I only use self
compiled Ruby on cygwin.

The windows CMD terminal is pretty painful to use (I'm not sure if
anything better ships with more modern versions of windows).

That's why I use cygwin. :slight_smile:

Right, it might reduce the learning curve. But wouldn't it then also
need features to easily built graphical user interfaces?

I thought about that, but I'd say building GUIs is, at least in the
ruby world, a fairly advanced thing to do. Also, for some reason,
there just doesn't seem to be a large community of people developing
gui desktop apps in ruby. On the other hand, there are *lots* of other
areas where ruby is a very heavily-used and useful tool, both in the
console-based data processing and automation, and in webapps. It would
probably be a greater bang for the buck to include a sinatra + webrick
quickstart plugin.

Good point!

* Should it be written in ruby?

It could as well be written in HTML - meaning: proper documentation.
The benefit would be that people get along on more different systems
(i.e. without the overhead of installing an IDE and even without a
graphical UI at all). It might be a bit more rough than a single
installer which throws everything (Ruby, IDE...) on the system. But
then again, if it's software, maintenance efforts are higher.

Yeah, that's true, but it could also be more useful if done right.

Absolutely.

Kind regards

robert

PS: Sorry for the grumpiness.

···

On Mon, May 21, 2012 at 11:12 AM, Martin DeMello <martindemello@gmail.com> wrote:

On Mon, May 21, 2012 at 1:46 AM, Robert Klemme > <shortcutter@googlemail.com> wrote:

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

http://visualruby.net/

Henry