From: "M. Edward (Ed) Borasky" Date: 2006-09-10T03:12:57+09:00 Subject: Re: DRAW 1280, 1024 Benjohn Barnes wrote: > 20 years ago, the subject line would have drawn me a line across one of > my screen's diagonals. Ruby is awesomely more powerful than BBC BASIC, > but why no trivial graphics support? > > My two requirements are that it should be really easy to draw, and it > should be possible to do so interactively (from irb). > > I've looked unsuccessfully in the past, but if this is a solved problem > then I'd really like to know. Otherwise, does anyone have a suggestion > of where to start? > > Personally, I'm on a Mac. If there is a solution for my world, that > would do for me. Something global would rock though. > > Hope you have a lovely weekend, > Benjohn > > > > Well ... the closest to "global" that you're likely to get is Ruby/Tk, which is a port of Perl/Tk. There are some hints about getting started with it in the Pickaxe book, but you'll end up wanting a good Perl/Tk book to learn everything that it can do. As far as global is concerned, it at least runs on Windows, Mac and Linux. I'm sure it works on AIX, Tru64 and Solaris and can be made to work on HP-UX :). Another source of inspiration/guidance is to install a full Tcl/Tk distribution. It's available on all the major Linux distributions and from ActiveState (www.activestate.com) for Windows. It's probably available for MacOS if not installed by default. The worst case is that you need to build it from source. Inside the Tcl/Tk distribution is a rather nifty collection of demos -- really cool things like drag and drop, sketchpads, etc. The source code is in the Tcl scripting language, but is easily translated into Perl, Python or Ruby. If you're really adventurous, you might try Rails and Ajax. Most of the common GUI things, including drag and drop, are available in libraries. Hmmmm ... there's an interesting Ruby quiz/ smallish educational project ... write a translator that converts the Tcl scripts in the Tcl/Tk demo package to Ruby/Tk.