Antwort: Re: Power of Interpreted Languages

Sawfish is plenty fast – faster than Metacity, often, which is written
in C alone.

I’d love to see many apps written in Ruby/Gnome2, or at least large
sections. A word processor with the logic written in Ruby would be easy
to hack, easy to fix. Same for other apps. In my experience, it’s fast
enough.

(This is why Emacs is popular, too…)
Ohyea

But, would you implement a game with ruby?

But, would you implement a game with ruby?

MUD, yes, first person shooter? Probably not without coding critical
sections in Objective C.

Ari

Received: Tue, 11 Nov 2003 01:21:15 +0900
And lo, Aredridel wrote:

But, would you implement a game with ruby?

MUD, yes, first person shooter? Probably not without coding critical
sections in Objective C.

I see no reason Ruby can’t be a good gaming platform for even graphic-intense games. All it really needs is a /well polished/ game to pave the way. Perl has Frozen Bubble. Python has PyDance… etc.

All that is really needed to go beyond that, such as an FPS, is to have a compiled C library with the most intense graphics routines - Blitting, managing (large) images. With Ruby doing the logic and manipulating a compiled game core doing the graphics, I’d probably be willing to pit that against Java (which is interpreted bytecode, after all).

There is more to a game than graphics routines. Animations, networking,
movers, etc. are all very time-sensitive. You couldn’t really do much of
that in Ruby; not well enough for a game (unless you just wanted to say “hey,
look, it works!”). You could, however, script various components with Ruby
to make different variations of the game, and to handle certain parts of the
game such as menuing and option dialogs. I can see using Ruby where Unreal
Tournament used UnrealScript. But not for a game engine itself.

In that vein, you could say that Unreal Tournament was written in UnrealScript
because the game itself is just a collection of components provided by the
game engine. UnrealScript did the actual work, throwing up options dialogs,
launching games, providing the game actions, etc. The game engine itself was
pretty much incapable of playing a Deathmatch, Assault or Domination game;
UnrealScript did all that.

So: yes and no, I think. =)

Sean O'Dell
···

On Monday 10 November 2003 09:28 am, Gregory Millam wrote:

Received: Tue, 11 Nov 2003 01:21:15 +0900

And lo, Aredridel wrote:

But, would you implement a game with ruby?

MUD, yes, first person shooter? Probably not without coding critical
sections in Objective C.

I see no reason Ruby can’t be a good gaming platform for even
graphic-intense games. All it really needs is a /well polished/ game to
pave the way. Perl has Frozen Bubble. Python has PyDance… etc.

All that is really needed to go beyond that, such as an FPS, is to have a
compiled C library with the most intense graphics routines - Blitting,
managing (large) images. With Ruby doing the logic and manipulating a
compiled game core doing the graphics, I’d probably be willing to pit that
against Java (which is interpreted bytecode, after all).

Hi,

I’m playing with Ruby/Tk and I’ve got the Perl/Tk book and some other
text/online documentation to go along with. I am wondering if there is a
major difference between TkRoot and TkWindow and it might be. In all of the
ruby examples folks use TkRoot and assign all widgets to it, but the
TkWindow still exists. So why use one over the other?

Any input is greatly appreciated.

Thanks!

Zach

Hi,

···

From: “Zach Dennis” zdennis@mktec.com
Subject: Ruby/Tk Some Basic Questions
Date: Tue, 11 Nov 2003 03:50:25 +0900
Message-ID: AKEKIKLMCFIHPEAHKAAIEEDDGNAA.zdennis@mktec.com

I am wondering if there is a
major difference between TkRoot and TkWindow and it might be. In all of the
ruby examples folks use TkRoot and assign all widgets to it, but the
TkWindow still exists. So why use one over the other?

TkWindow class is an abstract class.

                              Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

If you’ll forgive another newbie question:

What is an abstract class?

I think of classes as abstract already, and objects as concrete. Maybe
an abstract class is one that never gets instantiated, but is always
further specified / subclassed before being used?

David

···

On Monday, November 10, 2003, at 08:49 PM, Hidetoshi NAGAI wrote:

Hi,

From: “Zach Dennis” zdennis@mktec.com

I am wondering if there is a
major difference between TkRoot and TkWindow and it might be. In all
of the
ruby examples folks use TkRoot and assign all widgets to it, but the
TkWindow still exists. So why use one over the other?

TkWindow class is an abstract class.

                              Hidetoshi NAGAI 

(nagai@ai.kyutech.ac.jp)

I think that is a good question!!

I know an abstract class in Java, and I just figured the same thing applied
here in a ruby-ish way, but I was pondering the exact same question! What is
an abstract class in Ruby?

Zach

···

-----Original Message-----
From: David D’Andrea [mailto:david.dandrea@sympatico.ca]
Sent: Tuesday, November 11, 2003 1:05 PM
To: ruby-talk ML
Subject: Re: Ruby/Tk Some Basic Questions

If you’ll forgive another newbie question:

What is an abstract class?

I think of classes as abstract already, and objects as concrete. Maybe
an abstract class is one that never gets instantiated, but is always
further specified / subclassed before being used?

David

On Monday, November 10, 2003, at 08:49 PM, Hidetoshi NAGAI wrote:

Hi,

From: “Zach Dennis” zdennis@mktec.com

I am wondering if there is a
major difference between TkRoot and TkWindow and it might be. In all
of the
ruby examples folks use TkRoot and assign all widgets to it, but the
TkWindow still exists. So why use one over the other?

TkWindow class is an abstract class.

                              Hidetoshi NAGAI

(nagai@ai.kyutech.ac.jp)

Hi,

···

From: David D’Andrea david.dandrea@sympatico.ca
Subject: Re: Ruby/Tk Some Basic Questions
Date: Wed, 12 Nov 2003 03:05:00 +0900
Message-ID: 6840897E-1472-11D8-95C1-003065F62D66@sympatico.ca

What is an abstract class?
I think of classes as abstract already, and objects as concrete. Maybe
an abstract class is one that never gets instantiated, but is always
further specified / subclassed before being used?

Sorry. I’ll have to say it differently.
As you know, Ruby cannot define abstruct classes in the true sense of
the term. TkWindow class is treated as an abstruct class. Therefore,
instances of the class don’t work as widget objects. In this sence,
it is a bug that TkWindow objects can be created. I commited the patch
to raise an exception when calling TkWindow.new.

                              Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

David D’Andrea wrote:

If you’ll forgive another newbie question:

What is an abstract class?

I think of classes as abstract already, and objects as concrete. Maybe
an abstract class is one that never gets instantiated, but is always
further specified / subclassed before being used?

Yes, your guess is correct. Abstract base classes are never themselves
instantiated, but rather provide a set of basic functionality that their
(concrete) subclasses use.

I got this reply from Lyle Johnson (thanks), so just in case anyone
else was wondering:

Yes, your guess is correct. Abstract base classes are never themselves
instantiated, but rather provide a set of basic functionality that
their
(concrete) subclasses use.

I suppose there’s no way to enforce the non-instantiation of these
abstract classes, you just don’t unless you’re feeling perverse.

(me never, really!)

David

···

On Tuesday, November 11, 2003, at 01:44 PM, Zach Dennis wrote:

I think that is a good question!!

I know an abstract class in Java, and I just figured the same thing
applied
here in a ruby-ish way, but I was pondering the exact same question!
What is
an abstract class in Ruby?

Zach

-----Original Message-----
From: David D’Andrea [mailto:david.dandrea@sympatico.ca]
Sent: Tuesday, November 11, 2003 1:05 PM
To: ruby-talk ML
Subject: Re: Ruby/Tk Some Basic Questions

If you’ll forgive another newbie question:

What is an abstract class?

I think of classes as abstract already, and objects as concrete. Maybe
an abstract class is one that never gets instantiated, but is always
further specified / subclassed before being used?

David

On Monday, November 10, 2003, at 08:49 PM, Hidetoshi NAGAI wrote:

Hi,

From: “Zach Dennis” zdennis@mktec.com

I am wondering if there is a
major difference between TkRoot and TkWindow and it might be. In all
of the
ruby examples folks use TkRoot and assign all widgets to it, but the
TkWindow still exists. So why use one over the other?

TkWindow class is an abstract class.

                              Hidetoshi NAGAI

(nagai@ai.kyutech.ac.jp)

I’m having bind problems with TkRoot. I want to detect a window resize. Here
is what I am attempting:

root.bind( ‘Configure’ ){
p “Window has been resized”
}

When I attempt to run it I get the follow error:

abnormal program termination
Exit Code: 3

Any ideas? Thanks,

Zach

I’m having problems determine where the last mouse click / button press /
button release was. I would am trying to determine what line the cursor is
at in a TkText widget. Any help is greatly appreciated. Thanks

Zach

Hi,

Subject:
Message-ID: 001901c3a8e6$18952d80$6501a8c0@Laptop

I’m having bind problems with TkRoot. I want to detect a window resize. Here
is what I am attempting:

I cannot reproduce your problem.

ruby 1.8.1 (2003-11-07) [i686-linux] & Tcl/Tk8.4.4

Please tell me your environment (ruby version, tcl/tk version,
platform, and so on).

···

From: “Zach Dennis” zdennis@mktec.com
Date: Wed, 12 Nov 2003 12:28:52 +0900

                              Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Please ignore my last post, I found it! =)

Zach

···

-----Original Message-----
From: Zach Dennis [mailto:zdennis@mktec.com]
Sent: Tuesday, November 11, 2003 4:04 PM
To: ruby-talk ML
Subject: Ruby/Tk Cursor Selection Question

I’m having problems determine where the last mouse click / button press /
button release was. I would am trying to determine what line the cursor is
at in a TkText widget. Any help is greatly appreciated. Thanks

Zach

I am running

Ruby 1.8.0
Tcl/Tk 8.3
Windows 2000

Zach

···

----- Original Message -----
From: “Hidetoshi NAGAI” nagai@ai.kyutech.ac.jp
To: “ruby-talk ML” ruby-talk@ruby-lang.org; zdennis@mktec.com
Sent: Tuesday, November 11, 2003 7:51 PM

Hi,

From: “Zach Dennis” zdennis@mktec.com
Subject:
Date: Wed, 12 Nov 2003 12:28:52 +0900
Message-ID: 001901c3a8e6$18952d80$6501a8c0@Laptop

I’m having bind problems with TkRoot. I want to detect a window resize.
Here
is what I am attempting:

I cannot reproduce your problem.

ruby 1.8.1 (2003-11-07) [i686-linux] & Tcl/Tk8.4.4

Please tell me your environment (ruby version, tcl/tk version,
platform, and so on).

                              Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Message-ID: 007301c3a8ea$49a4da20$6501a8c0@Laptop

I am running
Ruby 1.8.0
Tcl/Tk 8.3
Windows 2000

Maybe your problem depends on “Tcl/Tk’s vwait problem”.
Could you try the recent version of tcltklib.c?
There are many changes between between yours and the current CVS.

ruby-1.8.0/ext/tcltklib/tcltklib.c : 1253 lines

Ruby-CVS/ruby/ext/tcltklib/tcltklib.c : 2396 lines

···

From: “Zach Dennis” zdennis@mktec.com
Subject: Re:
Date: Wed, 12 Nov 2003 12:58:51 +0900

                              Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

It’s late I think I am thinking off base at the moment. Thanks for your help
Hidetoshi. I’m heading to bed and I’ll update tomorrow on any progress.

Zach

···

----- Original Message -----
From: “Hidetoshi NAGAI” nagai@ai.kyutech.ac.jp
To: “ruby-talk ML” ruby-talk@ruby-lang.org; zdennis@mktec.com
Sent: Tuesday, November 11, 2003 8:18 PM
Subject: Re:

From: “Zach Dennis” zdennis@mktec.com
Subject: Re:
Date: Wed, 12 Nov 2003 12:58:51 +0900
Message-ID: 007301c3a8ea$49a4da20$6501a8c0@Laptop

I am running
Ruby 1.8.0
Tcl/Tk 8.3
Windows 2000

Maybe your problem depends on “Tcl/Tk’s vwait problem”.
Could you try the recent version of tcltklib.c?
There are many changes between between yours and the current CVS.

ruby-1.8.0/ext/tcltklib/tcltklib.c : 1253 lines

Ruby-CVS/ruby/ext/tcltklib/tcltklib.c : 2396 lines


Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Things aren’t going so well with Ruby’s 1.8.1 source and VisualStudio6. Once
we get to the line:

H:\ruby-1.8.1\win32>nmake DESTDIR=temp install

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

    .\miniruby.exe ./../instruby.rb "--dest-dir=temp"  "--make=NMAKE"

“–mf
lags=” "–make-flags= "
install -c -p -m 0755 ruby.exe temp/bin/ruby.exe
install -c -p -m 0755 rubyw.exe temp/bin
install -c -p -m 0755 msvcrt-ruby18.dll temp/bin
install -c -p -m 0755 msvcrt-ruby18.lib temp/lib
install -c -p -m 0644 msvcrt-ruby18-static.lib temp/lib
install -c -p -m 0644 config.h temp/lib/ruby/1.8/i386-mswin32
install -c -p -m 0644 rbconfig.rb temp/lib/ruby/1.8/i386-mswin32
install -c -p -m 0755 bin/erb temp/bin/erb
H:/ruby-1.8.1/lib/fileutils.rb:402:in initialize': No such file or directory - temp/bin/erb (Errno::ENOENT) from H:/ruby-1.8.1/lib/fileutils.rb:402:in open’
from H:/ruby-1.8.1/lib/fileutils.rb:402:in copy_file' from H:/ruby-1.8.1/lib/fileutils.rb:401:in open’
from H:/ruby-1.8.1/lib/fileutils.rb:401:in copy_file' from H:/ruby-1.8.1/lib/fileutils.rb:645:in install’
from H:/ruby-1.8.1/lib/fileutils.rb:641:in fu_each_src_dest' from H:/ruby-1.8.1/lib/fileutils.rb:641:in install’
from H:/ruby-1.8.1/lib/fileutils.rb:815:in install' from ./../instruby.rb:59:in install’
from ./…/instruby.rb:128
from ./…/instruby.rb:121:in `each’
from ./…/instruby.rb:121
NMAKE : fatal error U1077: ‘.\miniruby.exe’ : return code ‘0x1’
Stop.

Any help greatly appreciated.

Zach

P.S. - if borlands’ install for ruby is smoother then vc++ then i will use
that. =)

···

-----Original Message-----
From: Zach Dennis [mailto:zdennis@mktec.com]
Sent: Tuesday, November 11, 2003 11:38 PM
To: ruby-talk ML
Subject: Re:

It’s late I think I am thinking off base at the moment. Thanks for your help
Hidetoshi. I’m heading to bed and I’ll update tomorrow on any progress.

Zach

----- Original Message -----
From: “Hidetoshi NAGAI” nagai@ai.kyutech.ac.jp
To: “ruby-talk ML” ruby-talk@ruby-lang.org; zdennis@mktec.com
Sent: Tuesday, November 11, 2003 8:18 PM
Subject: Re:

From: “Zach Dennis” zdennis@mktec.com
Subject: Re:
Date: Wed, 12 Nov 2003 12:58:51 +0900
Message-ID: 007301c3a8ea$49a4da20$6501a8c0@Laptop

I am running
Ruby 1.8.0
Tcl/Tk 8.3
Windows 2000

Maybe your problem depends on “Tcl/Tk’s vwait problem”.
Could you try the recent version of tcltklib.c?
There are many changes between between yours and the current CVS.

ruby-1.8.0/ext/tcltklib/tcltklib.c : 1253 lines

Ruby-CVS/ruby/ext/tcltklib/tcltklib.c : 2396 lines


Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Hi,

···

At Thu, 13 Nov 2003 00:10:08 +0900, Zach Dennis wrote:

H:\ruby-1.8.1\win32>nmake DESTDIR=temp install

You have to specify DESTDIR as absolute path.


Nobu Nakada