[#1649] Re: New Ruby projects — Yukihiro Matsumoto <matz@...>
The following message is a courtesy copy of an article
[#1672] Re: Ruby 1.4 stable manual bug? — Yukihiro Matsumoto <matz@...>
The following message is a courtesy copy of an article
[#1673] Re: Possible problem with ext/socket in 1.5.2 — itojun@...
[#1694] Conventions for our Ruby book — Dave Thomas <Dave@...>
[#1715] Install postgresql support — Ikhlasul Amal <amal@...>
Hi all,
Hi,
[#1786] Is this a bug? — Clemens Hintze <clemens.hintze@...>
(mailed & posted)
[#1814] Objects nested sometimes. — Hugh Sasse Staff Elec Eng <hgs@...>
I am attemptiong to write a package which consists of a workspace
[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>
Hi all,
Hi,
Yukihiro Matsumoto writes:
Hi,
Hi,
[#1834] enum examples? — Hugh Sasse Staff Elec Eng <hgs@...>
Has anyone any examplse of using the Enumerable module? I've had a
[#1844] Minor irritation, can't figure out how to patch it though! — Hugh Sasse Staff Elec Eng <hgs@...>
I was considering how difficult it would be to patch Ruby to accept
[#1889] [ruby-1.5.3] require / SAFE — ts <decoux@...>
[#1896] Ruby Syntax similar to other languages? — "David Douthitt" <DDouthitt@...>
From: Yukihiro Matsumoto <matz@netlab.co.jp>
[#1900] Enumerations and all that. — Hugh Sasse Staff Elec Eng <hgs@...>
Thank you to the people who responded to my questions about Enumerated
Hugh Sasse Staff Elec Eng <hgs@dmu.ac.uk> writes:
On 16 Mar 2000, Dave Thomas wrote:
[#1929] Re: Class Variables — "David Douthitt" <DDouthitt@...>
| "David Douthitt" <DDouthitt@cuna.com> writes:
[#1942] no Fixnum#new ? — Quinn Dunkan <quinn@...>
Ok, I can add methods to a built-in class well enough (yes I know about succ,
[#1989] English Ruby/Gtk Tutorial? — schneik@...
Hi,
[#2022] rb_global_entry — ts <decoux@...>
[#2036] Anonymous and Singleton Classes — B_DAVISON <Bob.Davison@...>
I am a Ruby newbie and having some problems getting my mind around certain
[#2069] Ruby/GTK+ question about imlib --> gdk-pixbug — schneik@...
[#2073] Re: eval.rb fails — "Dat Nguyen" <thucdat@...>
The doc is fine, this happens only if you try to execute 'until' block
On Wed, 22 Mar 2000, Dat Nguyen wrote:
[#2084] Scope violated by import via 'require'? — Clemens Hintze <c.hintze@...>
Hi,
[#2104] ARGF or $< — Hugh Sasse Staff Elec Eng <hgs@...>
Has anyone any examples of how to use ARGF or $< as I cannot find much
Hi.
[#2165] Ruby strict mode and stand-alone executables. — "Conrad Schneiker" <schneiker@...>
Some people want Ruby to have a strict compile mode.
[#2203] Re: parse bug in 1.5 — schneik@...
[#2212] Re: Ruby/Glade usage questions. — ts <decoux@...>
>>>>> "m" == mrilu <mrilu@ale.cx> writes:
[#2241] setter() for local variables — ts <decoux@...>
[#2256] Multiple assignment of pattern match results. — schneik@...
[#2267] Re: Ruby and Eiffel — h.fulton@...
[#2309] Question about attribute writers — Dave Thomas <Dave@...>
Clemens Hintze <c.hintze@gmx.net> writes:
[ruby-talk:02145] Re: Scripting and OO -- thought question
>From: Dave Thomas <Dave@thomases.com> >Reply-To: ruby-talk@netlab.co.jp >To: ruby-talk@netlab.co.jp (ruby-talk ML) >Subject: [ruby-talk:02144] Re: Scripting and OO -- thought question >Date: 24 Mar 2000 13:48:56 -0600 > >h.fulton@att.net writes: > > > In his words, "If I were going to write a 60,000 line chess program > > or something, I wouldn't do it in Perl or any other script; I'd use > > Java or C++ or something. And if I were doing something like a > > filter, like 'munging' a text file, I wouldn't really need OO." > >Well, I guess I'd first say that it would clearly be his choice. > >I think I'd then ask him what differentiates a scripting language from >any other. Clearly it's not the fact that it's interpreted, as he >accepts Java as a "real" language. I'd point to the many successful >implementations using Smalltalk and Lisp as examples of the successful >use of technologies such as Ruby. > >Then I think I'd discuss the nature of development itself. Take his >chess program. It sounds to me that there'd have to be a lot of >exploratory work before you got a program that played effectively. >When I'd doing that kind of exploration, I need an environment that >gets out of my way, and lets me express myself as directly as >possible. C doesn't do that--I have to provide too much infrastructure >stuff. Java doesn't do it--there's too much scaffolding required. C++? >Nah. > >However, in Ruby, I can express myself very close to the problem >domain. The combination of functional programming, linear code and >object orientation is potent. The fact that the language can be >extended at run-time let's me defer decisions to the ultimate >point. And the fact that there's no edit/compile/run cycle is >tremendous. Within emacs, I even get some of the benefits of the >Smalltalk browser environment--I can highlight a block of code and >execute in on the spot. > >Then there's the issue of using OO for munging. I don't agree. >One of the main benefits of OO is encapsulation---managing >dependencies in a controlled way. I used to script in Perl. I'd write >big scripts---filters with many thousands of lines. They'd start of >clean and tidy, but gradually they'd start to decay. Perl makes it >hard to encapsulate both data and code, so people tend not to do too >good a job of it. With Ruby, such encapsulation is natural. Even >simple scripts are easier to understand and to maintain. > >Then I'd talk about performance. Sure Ruby is slower than C. But >mostly the economics of development make that irrelevant. For a >one-off program, it's often cheaper to buy a faster machine than pay >me for the extra time to write in Java. The difference between a >400MHz x86 and a 600 Mhz one is probably a small number of hours of my >time. > >However, there will be times when performance is a real issue. This is >where the ability to extend Ruby comes in. Build the framework of your >application quickly, in Ruby. Show it to the client, and make sure it >does what they want. Then see if there _are_ performance issues. >Isolate them, and then recode just the required sections in C. Ruby >makes this easy. This is the approach Andy and I are taking in a >current project, where we're writing portions of an X11 window manager >in Ruby. > >However, probably the only thing that will _really_ convince someone >is to try it, and that's quite a large step to take. > >Let us know if we can help. > > >Regards > > >Dave > > > > >___________________________________________________________________________ >| The Pragmatic Programmers, LLC | http://www.pragmaticprogrammer.com >| >| Read "The Pragmatic Programmer" | www.pragmaticprogrammer.com/ppbook/ >| > >--------------------------------------------------------------------------- Many things said above would also be true when replacing 'Ruby' with 'Python'. For those subjects like chess whose solutions already widely researched, the implementors can afford to do it in a "low" High Level language like C or C++ for performance reason. For problems whose solutions are still vague and performance issues can be postponed, it's more effective and economic to do it in a "high" High Level language like Ruby (or Python). With Ruby (or Python) one can focus on finding the solution rather than debugging a memory leak. Dat ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com