From: Martin DeMello Date: 2012-05-21T17:24:02+09:00 Subject: 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