[#18974] Perl/Python/Ruby common backend (Perl6) — ptkwt@...1.aracnet.com (Phil Tomson)

There is a thread about using .NET's CLR as a backend for Ruby, but how

17 messages 2001/08/01

[#19064] ANN: Code Amelioration Contest (presented by Ruby Conference 2001) — David Alan Black <dblack@...>

17 messages 2001/08/03
[#19184] Re: ANN: Code Amelioration Contest (presented by Ruby Conference 2001) — John Carter <john.carter@...> 2001/08/06

On Fri, 3 Aug 2001, David Alan Black wrote:

[#19185] Re: ANN: Code Amelioration Contest (presented by Ruby Conference 2001) — David Alan Black <dblack@...> 2001/08/06

Hello --

[#19186] Re: ANN: Code Amelioration Contest (presented by Ruby Conference 2001) — John Carter <john.carter@...> 2001/08/06

On Mon, 6 Aug 2001, David Alan Black wrote:

[#19125] My 1st look @ ruby: No prototypes and problem with String#gsub — stesch@... (Stefan Scholl)

My first ruby program:

23 messages 2001/08/04

[#19192] Some remarks from a nembie in Ruby — Renaud HEBERT <renaud.hebert@...>

After having read the book "Programming Ruby: The Pragmatic Programmer's

38 messages 2001/08/06

[#19269] Re: Perl/Python/Ruby common backend (Parrot, can Ruby play too?) — ptkwt@...1.aracnet.com (Phil Tomson)

In article <72X97.12093$9i1.972452@e420r-atl1.usenetserver.com>,

50 messages 2001/08/07
[#19349] Re: Perl/Python/Ruby common backend (Parrot, can Ruby play too?) — Mathieu Bouchard <matju@...> 2001/08/08

[#19456] Re: Perl/Python/Ruby common backend (Parrot, can Ruby play too?) — Harry Ohlsen <harryo@...> 2001/08/09

Ned Konz wrote:

[#19451] Re: Help! I'm still confused about threadin g in the ML — "Morris, Chris" <chris.morris@...>

> Is there an Outlook option to turn on In-Reply-To or References

14 messages 2001/08/09
[#19453] Re: Help! I'm still confused about threadin g in the ML — Dave Thomas <Dave@...> 2001/08/09

"Morris, Chris" <chris.morris@snelling.com> writes:

[#19506] the way class variables work — David Alan Black <dblack@...>

Hello --

51 messages 2001/08/10
[#19511] Re: the way class variables work — Chris Uzdavinis <chris@...> 2001/08/11

David Alan Black <dblack@candle.superlink.net> writes:

[#19524] order and freedom in Ruby (was: Re: Re: the way class variables work) — David Alan Black <dblack@...> 2001/08/11

Hello --

[#19517] Why not?: Assigning to self — furufuru@... (Ryo Furue)

Hi there,

55 messages 2001/08/11
[#19689] Re: Why not?: Assigning to self — Ron Jeffries <ronjeffries@...> 2001/08/14

On 13 Aug 2001 20:59:54 -0700, furufuru@ccsr.u-tokyo.ac.jp (Ryo Furue)

[#19694] Re: Why not?: Assigning to self — Ned Konz <ned@...> 2001/08/14

On Tuesday 14 August 2001 05:09 am, Ron Jeffries wrote:

[#19695] Re: Why not?: Assigning to self — ts <decoux@...> 2001/08/14

>>>>> "N" == Ned Konz <ned@bike-nomad.com> writes:

[#19696] Re: Why not?: Assigning to self — Ned Konz <ned@...> 2001/08/14

On Tuesday 14 August 2001 07:51 am, you wrote:

[#19697] Re: Why not?: Assigning to self — ts <decoux@...> 2001/08/14

>>>>> "N" == Ned Konz <ned@bike-nomad.com> writes:

[#19700] Re: Why not?: Assigning to self — Ned Konz <ned@...> 2001/08/14

On Tuesday 14 August 2001 08:27 am, you wrote:

[#19701] Re: Why not?: Assigning to self — ts <decoux@...> 2001/08/14

>>>>> "N" == Ned Konz <ned@bike-nomad.com> writes:

[#19703] Re: Why not?: Assigning to self — Ned Konz <ned@...> 2001/08/14

On Tuesday 14 August 2001 09:05 am, Guy Decoux wrote:

[#19704] Re: Why not?: Assigning to self — ts <decoux@...> 2001/08/14

>>>>> "N" == Ned Konz <ned@bike-nomad.com> writes:

[#19708] Re: Why not?: Assigning to self — Ned Konz <ned@...> 2001/08/14

On Tuesday 14 August 2001 09:27 am, you wrote:

[#19709] Re: Why not?: Assigning to self — ts <decoux@...> 2001/08/14

>>>>> "N" == Ned Konz <ned@bike-nomad.com> writes:

[#19713] Re: Why not?: Assigning to self — Ned Konz <ned@...> 2001/08/14

On Tuesday 14 August 2001 09:45 am, you wrote:

[#19750] Re: Why not?: Assigning to self — matz@... (Yukihiro Matsumoto) 2001/08/15

Hi,

[#19819] Re: Why not?: Assigning to self — Ned Konz <ned@...> 2001/08/15

On Tuesday 14 August 2001 08:14 pm, matz wrote:

[#19852] Re: Why not?: Assigning to self — matz@... (Yukihiro Matsumoto) 2001/08/16

Hi,

[#19857] Re: Why not?: Assigning to self — "Florian G. Pflug" <fgp@...> 2001/08/16

On Thu, Aug 16, 2001 at 11:05:59AM +0900, Yukihiro Matsumoto wrote:

[#19858] Re: Why not?: Assigning to self — matz@... (Yukihiro Matsumoto) 2001/08/16

Hi,

[#19867] Re: Why not?: Assigning to self — "Pit Capitain" <pit@...> 2001/08/16

Just a followup at (my) current end of the thread:

[#19550] Forced garbage collection — Lars Christensen <larsch@...>

14 messages 2001/08/11
[#19562] Re: Forced garbage collection — "Nat Pryce" <nat.pryce@...13media.com> 2001/08/12

From: "Lars Christensen" <larsch@cs.auc.dk>

[#19551] /.ed again — Tobias Reif <tobiasreif@...>

Ruy gets slasdotted again ;)

19 messages 2001/08/11

[#19650] Ruby Newbie mailing list — Michael Pence <mikepence@...>

Hello all.

14 messages 2001/08/13
[#19656] RE: Ruby Newbie mailing list — "Louis Brothers" <lcb134@...> 2001/08/13

We had a similar discussion on the OmniWeb Objective-C mailing list not to

[#19659] Re: Ruby Newbie mailing list — Michael Pence <mikepence@...> 2001/08/13

I appreciate your references to Objectionable-C ;-)

[#19685] Compiling Ruby with cygwin and Tk support — Manuel Zabelt <ng@...>

Hello!

13 messages 2001/08/14

[#19718] General (GUI/license) questions — Ryan Tarpine <rtarpine@...>

First: Kero commented in the description of his new Ruby Agenda program

18 messages 2001/08/14

[#19755] "new" returning nil: how to report the failure of object creation — furufuru@... (Ryo Furue)

Hi there,

14 messages 2001/08/15

[#19758] The GUI poll is in, and the results are surprising — Dave Thomas <Dave@...>

40 messages 2001/08/15
[#19774] Re: The GUI poll is in, and the results are surprising — Lars Christensen <larsch@...> 2001/08/15

On Wed, 15 Aug 2001, Dave Thomas wrote:

[#19784] Re: The GUI poll is in, and the results aresurprising — "Lyle Johnson" <ljohnson@...> 2001/08/15

> Please don't forget what Ruby is all about in this discussion! I think

[#19824] Ruby GUI — "Hal E. Fulton" <hal9000@...>

The concept of a new GUI is somewhat appealing,

16 messages 2001/08/15

[#20033] Ruby Article — Joshua Drake <jd.nospam@...>

Hello,

38 messages 2001/08/20

[#20127] Another Possible RCR - Wrappers via Mixins — Stephen White <spwhite@...>

The main difference between mix-ins and multiple inheritence is (to my understanding) that parent classes do not call child code, but mix-ins do.

15 messages 2001/08/22

[#20135] Bruce Eckel's criticism of Ruby — Ned Konz <ned@...>

Python.org links to http://www.mindview.net/Etc/notes.html#Ruby , saying

24 messages 2001/08/22

[#20183] ++ Operator — kamphausen@... (SKa)

Dear Community,

35 messages 2001/08/23
[#20234] Re: ++ Operator — Dave Thomas <Dave@...> 2001/08/24

matz@ruby-lang.org (Yukihiro Matsumoto) writes:

[#20236] Re: ++ Operator — matz@... (Yukihiro Matsumoto) 2001/08/24

Hi,

[#20209] In Ruby 0 is true but nil is false.. or how to shoot yourself?.. — Guillaume Cottenceau <gc@...>

I have a simple Audio-CD database (using CSV format). I was writing a

11 messages 2001/08/23

[#20254] File.readline(s) — Michael Husmann <michael.husmann@...>

I am reading a 55MB ASCII file by using File.readline(s) which takes on

14 messages 2001/08/24

[#20303] New Windows InstallShield version of Ruby — Andrew Hunt <andy@...>

19 messages 2001/08/24

[#20307] Backwards language — "Sean Middleditch" <elanthis@...>

Greetings,

30 messages 2001/08/24

[ruby-talk:19784] Re: The GUI poll is in, and the results aresurprising

From: "Lyle Johnson" <ljohnson@...>
Date: 2001-08-15 15:12:26 UTC
List: ruby-talk #19784
> Please don't forget what Ruby is all about in this discussion! I think
> that the basic principles and idioms of Ruby should be respected in the
> GUI that is made the "standard" for Ruby.

I absolutely agree.

> FXRuby is IMO only a wrapper around a reasonable C++ Gui interface. It
> isn't Ruby either. E.g. to declare message identifiers:
>
> ID_CANVAS, ID_CLEAR, ID_LAST = enum(FXMainWindow::ID_LAST, 3)
>
> That is plain C++ style (or something) coding. Too many techinal
> detais (not VHLL). Why not the Ruby way?:
>
> identifier :ID_CANVAS, ID_CLEAR

I see where you're coming from, but note that the message identifiers for
FOX aren't just randomly generated numbers. It is significant that when you
derive your class from (say) FXMainWindow, that your derived class's message
identifiers don't clash with those already defined in the base class; that's
why we usually start the numbering where the base class left off
(FXMainWindow::ID_LAST, or whatever).

> What about:
>
>     @contents = FXHorizontalFrame.new(self,
>       LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0)
>
> Yuck! What was that 5th zero about again?

Most of the constructor arguments for FOX widgets are *optional* (with
reasonable default values). For the case you mentioned (FXHorizontalFrame),
only the first argument (the parent container widget) is required:

    @contents = FXHorizontalFrame.new(self)

and the remaining arguments can either be left at their default values, or
specified in subsequent method calls:

    @contents = FXHorizontalFrame.new(self)
    @contents.setLayoutHints(LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y)

If some future version of Ruby supports keyword arguments, the situation
will be even better.

> Gtk, I think, it a little cleaner about mapping concepts to the Ruby
> Language. I can do "class MyApp < Gtk::Window". Gtk/Ruby uses
> assignment methods so that you can do "@buttonbox.border = 10". This is
> very intuitive, and its the Ruby way. It also has very few methods
> that takes more tthan 1 or 2 arguments. Most things are configured
> through methods.

You can do this with FXRuby, too:

    aLabel = FXLabel.new(parent, "Label Text")
    aLabel.text = "Different Text"
    aLabel.font = FXFont.new(getApp(), "Courier", 10)
    aLabel.justify = JUSTIFY_RIGHT

> Gtk is ported to windows. The Ruby/Gtk/Windows combo should be possible
> with a little effort.

Great! Would you tell me where I can download binaries for Ruby/GTK on
Windows that work with the latest Ruby installer (version 1.6.4-2) for
Windows?

> I wish for a GUI API that:
>
> - Assumes defaults for everything except the basic requirement. Everything
> else should be setable through methods. E.g. Label.new('Press me').
> Border, color, font, and everything else should not be arguments to
> constructors. Never.

FXRuby widgets' attributes are often passed in to their constructors, but
almost always as optional arguments (see above). In any case, those
attributes can be changed after the fact using method calls.

> - Uses Ruby concepts to the full extends. No win.set_border(40) when
> you can handle it with win.border = 40. Use of attribute declerator
> methods whenever applicable in the line of attr_*.

You can already do this with FXRuby. I went to a lot of trouble to make it
so.

> - Allows inheriting classes to create windows or other widgets with
> special keyboard/mouse handling.

You can do this with FXRuby. It's not very fancy, but see the "scribble"
program in the FXRuby distribution for one example of catching mouse events,
etc.

> For now, I think Gtk is the best canditate (having not tried Qt). In any
> case, I want pure ruby style interfaces before portability.  With matz
> have designed such a great language, it would be a shame to waste it on
> ugly APIs.  A lot of Java's success comes from it's coherent,
> comprehensible and consistent API. There is "one way" to do things, and
> they stick to it.  I'd like the same thing to happen in the Ruby world.

I think Ruby/GTK is a fine toolkit, too, but the Windows support (for GTK+
itself, not the Ruby interface to it) seems to be a little shaky. A lot of
the non-"facts" about FOX and FXRuby that you stated in your post indicate
that you're not very familiar with it.

FXRuby isn't "done" yet, by the way. I don't know if it's appropriate to
include it in the "standard" distribution or not, but I'll certainly help
out if I can. I agree whole-heartedly that a lot of the stuff that FXRuby
inherits from its C++ lineage is *very* out of place in Ruby, and I hope to
improve on that. The biggest eyesore (in my opinion) is the whole issue of
mapping messages (i.e. signals/events) to handlers (i.e. callbacks). I like
how it's done in Ruby/Tk and Ruby/GTK, where you can just attach a code
block, and it's a safe bet that FXRuby will move in this direction too.


In This Thread