benjohn
9/9/2006 8:41:00 AM
On 9 Sep 2006, at 09:20, Paul Lutus wrote:
> 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?
>
> Because there is no trivial way to make graphics facilities
> platform-independent. You may notice that Ruby has native libraries
> for
> graphic interfaces, but these are also not platform-independent.
> Through
> those graphic interfaces, you can make drawings, but you then
> cannot run
> the program anywhere but on the original platform (with some
> exceptions).
It may not be trivial, but it's hardly difficult. There must be
dozens of Ruby modules that have varying implementation by platform
(sockets, for example)? Ruby itself pulls the feat of quite nicely
too. Note that I'm not talking about taking full control of graphics
hardware and exploiting all features. It's just really basic drawing
support that would be good.
>> My two requirements are that it should be really easy to draw, and it
>> should be possible to do so interactively (from irb).
>
> Well, "irb" has a special purpose, and being a user interface for a
> drawing
> program isn't the purpose.
I'm not suggesting that irb needs changing. I'm suggesting that the
design of the graphics API I'm hoping for should be "irb friendly",
which I believe it will be if well designed. Thus, using irb, I
should be able to issue a commands and see the result. I shouldn't
have to create contexts and windows, program up call backs, cache my
drawing commands somewhere ready for a re-paint and string the lot
together.
>> 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.
>
> Global, there's the rub. I am sure there are libraries on the Mac
> that allow
> graphic interfaces to Ruby programs, but they aren't likely to be
> portable.
I've not even found something that merely works on the Mac, yet alone
globally!
I apologise if I sound exasperated Paul, and thank you for replying.
It's not like I'm asking for a flying car here though: I just want my
bicycle back.