[#108045] Favorite Ruby Editors (or IDE) — "H. Simpson" <nospam@...>

What is your favorite editor or IDE for programming in Ruby?

26 messages 2004/08/02
[#108077] Re: Favorite Ruby Editors (or IDE) — David Morton <mortonda@...> 2004/08/02

H. Simpson wrote:

[#108090] Re: Favorite Ruby Editors (or IDE) — David Ross <drossruby@...> 2004/08/02

> Quanta Plus and Kate both use the same KDE editing

[#108059] Macros in Ruby — George Moschovitis <gm@...>

Hello everyone,

96 messages 2004/08/02
[#108355] Re: Macros in Ruby — Jesse Jones <jesjones@...> 2004/08/05

In article <161164987028.20040805090540@soyabean.com.au>, Gavin

[#108382] Re: Macros in Ruby — Paul Brannan <pbrannan@...> 2004/08/05

On Thu, Aug 05, 2004 at 12:31:30PM +0900, Jesse Jones wrote:

[#108385] Re: Macros in Ruby — "Ara.T.Howard" <ahoward@...> 2004/08/05

On Thu, 5 Aug 2004, Paul Brannan wrote:

[#108101] Request for two methods in Array class — Mike Hall <mghallNO@...>

23 messages 2004/08/02
[#108150] Re: Request for two methods in Array class — matz@... (Yukihiro Matsumoto) 2004/08/03

Hi,

[#108326] Amazing GUI toolkit with visual designer & Ruby Integration — "H. Simpson" <nospam@...>

Checkout these video tutorials (in shockwave):

46 messages 2004/08/04
[#108384] Re: Amazing GUI toolkit with visual designer & Ruby Integration — Jamey Cribbs <cribbsj@...> 2004/08/05

H. Simpson wrote:

[#108408] Re: Amazing GUI toolkit with visual designer & Ruby Integration — "H. Simpson" <nospam@...> 2004/08/05

While I'm grateful for Fox-Toolkit and FXRuby too, I cannot use it due

[#108411] Re: Amazing GUI toolkit with visual designer & Ruby Integration — Richard Lyman <lymans@...> 2004/08/05

Would you mind me asking what changes had to be made that required

[#108414] Re: Amazing GUI toolkit with visual designer & Ruby Integration — Lothar Scholz <mailinglists@...> 2004/08/05

Hello Richard,

[#108433] Re: Amazing GUI toolkit with visual designer & Ruby Integration — Lyle Johnson <lyle.johnson@...> 2004/08/05

On Fri, 6 Aug 2004 02:51:39 +0900, H. Simpson

[#108445] Re: Amazing GUI toolkit with visual designer & Ruby Integration — "H. Simpson" <nospam@...> 2004/08/05

Lyle Johnson wrote:

[#108435] Sets are not extensional — Csaba Henk <csaba@..._for_avoiding_spam.org>

(FYI: the phenomena described in the sequel were seen produced by the following

18 messages 2004/08/05

[#108486] %w for symbols — Caio Chassot <k@...2studio.com>

Is there any similar notation to %w[ word word2 word3 ] that returns an

22 messages 2004/08/06
[#108506] Re: %w for symbols — Austin Ziegler <halostatue@...> 2004/08/06

On Fri, 6 Aug 2004 16:00:32 +0900, Caio Chassot <k@v2studio.com> wrote:

[#108491] rpa-base 0.2.0 — Mauricio Fern疣dez <batsman.geo@...>

12 messages 2004/08/06

[#108522] I want to use ruby, but I don't think I can... help — Michael Hale <michael@...>

This email is sort of a public cry for help. As a language I really

12 messages 2004/08/06

[#108589] ANN: Iowa 0.9 Released — "Kirk Haines" <khaines@...>

A new version of the Iowa web application framework has been released. This

12 messages 2004/08/07

[#108661] FirstEachLast, an extension to the Enumerable module. — John Carter <john.carter@...>

I know somewhere is a collection of extensions to the enumerable module.

30 messages 2004/08/09

[#108689] stupid question: Object#name — Benny <linux@...>

hi all,

22 messages 2004/08/09

[#108798] Singleton class methods — Kyle Putnam <kyle@...>

Hello,

22 messages 2004/08/10
[#108802] Re: Singleton class methods — Gennady <gfb@...> 2004/08/10

Kyle Putnam wrote:

[#108814] Re: Singleton class methods — "David A. Black" <dblack@...> 2004/08/10

Hi --

[#108865] Ruby and Mono — Hal Fulton <hal9000@...>

Tim,

13 messages 2004/08/11

[#108937] What are people using Ruby for? — jmh <j_m_h@...>

I'm not currently a Ruby user but have heard about it for a

22 messages 2004/08/12

[#108954] Random variable library? — "Gavin Sinclair" <gsinclair@...>

Folks,

21 messages 2004/08/12

[#109001] gem remote installation does not work — Thomas Uehlinger <th.uehlinger@...>

Hello

14 messages 2004/08/12

[#109071] RubyForge project and gem distriubtion — James Britt <jamesUNDERBARb@...>

I seem to recall a mention at some point that if a project on rubyforge

94 messages 2004/08/13
[#109072] Re: RubyForge project and gem distriubtion — Richard Kilmer <rich@...> 2004/08/13

Release the file like you would any file (in the Files tab). RubyForge

[#109073] Re: RubyForge project and gem distriubtion — James Britt <jamesUNDERBARb@...> 2004/08/13

Richard Kilmer wrote:

[#109075] Re: RubyForge project and gem distriubtion — David Ross <drossruby@...> 2004/08/13

Heres food for thought..

[#109076] Re: RubyForge project and gem distriubtion — Richard Kilmer <rich@...> 2004/08/13

Should we remove your rubyforge account now?

[#109079] Re: RubyForge project and gem distriubtion — David Ross <drossruby@...> 2004/08/13

Heh, I didn't say I was going to do it. I was thinking

[#109097] Re: RubyForge project and gem distriubtion — Jim Weirich <jim@...> 2004/08/13

David Ross wrote:

[#109100] Re: RubyForge project and gem distriubtion — Mauricio Fern疣dez <batsman.geo@...> 2004/08/13

On Fri, Aug 13, 2004 at 04:17:06PM +0900, Jim Weirich wrote:

[#109136] Re: RubyForge project and gem distriubtion — Dave Thomas <dave@...> 2004/08/13

[#109143] Re: RubyForge project and gem distriubtion — Alexander Kellett <ruby-lists@...> 2004/08/13

On Fri, Aug 13, 2004 at 09:14:25PM +0900, Dave Thomas wrote:

[#109160] Re: RubyForge project and gem distriubtion — "Curt Hibbs" <curt@...> 2004/08/13

Alexander Kellett wrote:

[#109167] Re: RubyForge project and gem distriubtion — vruz <horacio.lopez@...> 2004/08/13

> Same point as above, rpa could provide those advantage as a layer over

[#109175] Re: RubyForge project and gem distriubtion — "Curt Hibbs" <curt@...> 2004/08/13

vruz wrote:

[#109181] Re: RubyForge project and gem distriubtion — vruz <horacio.lopez@...> 2004/08/13

> > The fact that a given person opts to have a low-profile personality

[#109187] Re: RubyForge project and gem distriubtion — James Britt <jamesUNDERBARb@...> 2004/08/13

vruz wrote:

[#109189] Re: RubyForge project and gem distriubtion — Chad Fowler <chadfowler@...> 2004/08/13

On Sat, 14 Aug 2004 00:42:48 +0900, James Britt

[#109206] Re: RubyForge project and gem distriubtion — James Britt <jamesUNDERBARb@...> 2004/08/13

Chad Fowler wrote:

[#109211] next RubyConf [was RE: RubyForge project and gem distriubtion] — "Curt Hibbs" <curt@...> 2004/08/13

James Britt wrote:

[#109217] Re: next RubyConf [was RE: RubyForge project and gem distriubtion] — stevetuckner <stevetuckner@...> 2004/08/13

Curt Hibbs wrote:

[#109218] Re: next RubyConf [was RE: RubyForge project and gem distriubtion] — Chad Fowler <chadfowler@...> 2004/08/13

On Sat, 14 Aug 2004 03:49:46 +0900, stevetuckner

[#109161] Re: RubyForge project and gem distriubtion — vruz <horacio.lopez@...> 2004/08/13

> I don't understand why the rpa folks had to reinvent the packaging

[#109078] Re: RubyForge project and gem distriubtion — Chad Fowler <chadfowler@...> 2004/08/13

On Fri, 13 Aug 2004 12:50:50 +0900, David Ross <drossruby@yahoo.com> wrote:

[#109092] About ruvi — "Gavin Sinclair" <gsinclair@...>

[Aimed at Alexander, but I'm sure others will be interested.]

53 messages 2004/08/13
[#109093] Re: About ruvi — Martin DeMello <martindemello@...> 2004/08/13

Gavin Sinclair <gsinclair@soyabean.com.au> wrote:

[#109107] Re: About ruvi — Alexander Kellett <ruby-lists@...> 2004/08/13

On Fri, Aug 13, 2004 at 03:36:08PM +0900, Martin DeMello wrote:

[#109103] Re: About ruvi — Alexander Kellett <ruby-lists@...> 2004/08/13

On Fri, Aug 13, 2004 at 02:52:16PM +0900, Gavin Sinclair wrote:

[#109260] Re: About ruvi — Gavin Sinclair <gsinclair@...> 2004/08/14

On Friday, August 13, 2004, 6:17:10 PM, Alexander wrote:

[#109265] Re: About ruvi — Alexander Kellett <ruby-lists@...> 2004/08/14

On Sat, Aug 14, 2004 at 03:19:54PM +0900, Gavin Sinclair wrote:

[#109266] Re: About ruvi — Gavin Sinclair <gsinclair@...> 2004/08/14

On Saturday, August 14, 2004, 7:26:08 PM, Alexander wrote:

[#109273] Re: About ruvi — Alexander Kellett <ruby-lists@...> 2004/08/14

On Sat, Aug 14, 2004 at 06:43:38PM +0900, Gavin Sinclair wrote:

[#109404] Re: About ruvi — Hans Fugal <hans@...> 2004/08/16

Alexander Kellett wrote:

[#109423] Re: About ruvi — vruz <horacio.lopez@...> 2004/08/16

Gavin and Hans, welcome to the Ruby Gestapo.

[#109425] Re: About ruvi — Hal Fulton <hal9000@...> 2004/08/16

vruz wrote:

[#109428] Re: About ruvi — Alexander Kellett <ruby-lists@...> 2004/08/16

On Tue, Aug 17, 2004 at 04:04:01AM +0900, vruz wrote:

[#109435] Re: About ruvi — Hal Fulton <hal9000@...> 2004/08/16

Alexander Kellett wrote:

[#109141] Where is memoize? — Michael Neumann <mneumann@...>

Hi,

14 messages 2004/08/13

[#109204] timeouts with threads and SIGALRM — Eric Schwartz <emschwar@...>

Following advice in an old ruby-talk thread (can't remember which one,

12 messages 2004/08/13

[#109215] Question: A method for summing several variables — "Harry Truax" <htruax@...>

Hi everyone,

13 messages 2004/08/13

[#109274] Opinion on ClassInherit Include — "T. Onoma" <transami@...>

So I want to include a module and have methods become part of the class, not

17 messages 2004/08/14

[#109326] Test::Unit feature request - regexp pattern of tests to run — Simon Strandgaard <neoneye@...>

It would be awesome if I could say

15 messages 2004/08/15

[#109389] Rubish Way of extracting elements — Daniel Vkerts <dvoelkerts@...>

I started written a little script to analyse my syslogs. The development

13 messages 2004/08/16

[#109445] Recursive install-stub for gems? — Robert Feldt <feldt@...>

Hi,

17 messages 2004/08/16
[#109460] Re: Recursive install-stub for gems? — Chad Fowler <chadfowler@...> 2004/08/17

On Tue, 17 Aug 2004 06:47:26 +0900, Robert Feldt <feldt@ce.chalmers.se> wrote:

[#109475] Re: Recursive install-stub for gems? — Gavin Sinclair <gsinclair@...> 2004/08/17

On Tuesday, August 17, 2004, 10:52:48 AM, Chad wrote:

[#109494] Re: Recursive install-stub for gems? — Robert Feldt <feldt@...> 2004/08/17

Gavin Sinclair wrote:

[#109483] Q: Shifting a hash anf and array — Meino Christian Cramer <Meino.Cramer@...>

Hi,

19 messages 2004/08/17
[#109503] Re: Q: Shifting a hash anf and array — "Robert Klemme" <bob.news@...> 2004/08/17

[#109550] multiple regexp matches — "Kevin Howe" <khowe@...>

I want to get multiple results of a regexp pattern match, offsets included.

28 messages 2004/08/17
[#109554] Re: multiple regexp matches — "Kevin Howe" <khowe@...> 2004/08/17

"Zach Dennis" <zdennis@mktec.com> wrote in message

[#109557] Re: multiple regexp matches — Zach Dennis <zdennis@...> 2004/08/17

According to rdoc you are mistaken.

[#109559] Re: multiple regexp matches — "David A. Black" <dblack@...> 2004/08/17

Hi --

[#109555] WEBrick deadlock under Cygwin — Mark Probert <probertm@...>

15 messages 2004/08/17
[#109567] Re: WEBrick deadlock under Cygwin — "Kirk Haines" <khaines@...> 2004/08/17

On Wed, 18 Aug 2004 04:40:57 +0900, Mark Probert wrote

[#109564] One-Click Ruby Installer 1.8.2-14 RC8 for Windows — "Curt Hibbs" <curt@...>

This release candidate of the One-Click Installer for Windows

22 messages 2004/08/17

[#109595] Google "programming language" and look at the #1 rank ;) — "Mehr, Assaph (Assaph)" <assaph@...>

17 messages 2004/08/18
[#109652] Re: Google "programming language" and look at the #1 rank ;) — Sascha Ebach <se@...> 2004/08/18

Hi,

[#109674] When to use parentheses around method args? — Richard Dale <Richard_Dale@...>

On Patrick Logan's blog he gives a ruby example in discussing design

22 messages 2004/08/18

[#109678] Why not a DBIAdapter? — djberg96@... (Daniel Berger)

Hi all,

16 messages 2004/08/18
[#109681] Re: [RAILS] Why not a DBIAdapter? — David Heinemeier Hansson <david@...> 2004/08/18

> Well, since the rails mailing list idea was rejected, and since I

[#109699] Re: [RAILS] Why not a DBIAdapter? — "Jim Weirich" <jim@...> 2004/08/18

[#109701] RSS Aggregators (Was [RAILS] Why not a DBIAdapter?) — Jamis Buck <jgb3@...> 2004/08/18

David Heinemeier Hansson said:

[#109713] way too slow... — David Morton <mortonda@...>

I'm having a heck of a time justifying ruby/rails dues to speed issues.

35 messages 2004/08/18
[#109722] Re: [RAILS] way too slow... — David Heinemeier Hansson <david@...> 2004/08/18

> That makes it 10 times slower than static. Obviously, it will be

[#109732] Re: [RAILS] way too slow... — David Heinemeier Hansson <david@...> 2004/08/18

>> That makes it 10 times slower than static. Obviously, it will be

[#109740] Re: [RAILS] way too slow... — David Morton <mortonda@...> 2004/08/18

David Heinemeier Hansson wrote:

[#109741] Re: [RAILS] way too slow... — Wes Moxam <wildwildwes@...> 2004/08/18

On Thu, 19 Aug 2004 06:24:55 +0900, David Morton <mortonda@dgrmm.net> wrote:

[#109746] Re: [RAILS] way too slow... — David Morton <mortonda@...> 2004/08/18

Wes Moxam wrote:

[#109751] Re: [RAILS] way too slow... — Wes Moxam <wildwildwes@...> 2004/08/18

On Thu, 19 Aug 2004 06:55:43 +0900, David Morton <mortonda@dgrmm.net> wrote:

[#109837] Re: [RAILS] way too slow... — David Morton <mortonda@...> 2004/08/19

Wes Moxam wrote:

[#109768] Rubyforge really slow? — Carl Youngblood <carl.youngblood@...>

I haven't seen anyone mention this during the last couple of days, but

15 messages 2004/08/19
[#109774] Re: Rubyforge really slow? — Wes Moxam <wildwildwes@...> 2004/08/19

On Thu, 19 Aug 2004 13:00:10 +0900, Carl Youngblood

[#109890] Re: Rubyforge really slow? — ptkwt@... (Phil Tomson) 2004/08/19

In article <BD4A299C.10AA5%rich@infoether.com>,

[#109809] Ruby Conference hotel sold out — Tim Hunter <cyclists@...>

I just tried to make a reservation at the Ruby Conference hotel only to

19 messages 2004/08/19

[#109852] Idea: Webshare — Michael Neumann <mneumann@...>

Hi,

47 messages 2004/08/19
[#109888] Re: Idea: Webshare — Patrick May <patrick@...> 2004/08/19

Hello,

[#109996] Re: Idea: Webshare — David Heinemeier Hansson <david@...> 2004/08/20

> How about a common basic framework, that includes all this stuff? Of

[#109866] Ruby's Killer App - every language has one — Ruby Script <nospam@...>

Which ruby app is so compelling that people who don't even intend on

22 messages 2004/08/19

[#109993] Rails 0.6.5 (AR 0.9.4, AP 0.8.0): Release of Contributors! — David Heinemeier Hansson <david@...>

I gather that most people are now familar with the RoR suite, so I'm

17 messages 2004/08/20
[#110008] Re: [ANN] Rails 0.6.5 (AR 0.9.4, AP 0.8.0): Release of Contributors! — "T. Onoma" <transami@...> 2004/08/20

On Friday 20 August 2004 01:08 pm, David Heinemeier Hansson wrote:

[#110026] ruby, actors, continuations, Kernel#callcc — zuzu <sean.zuzu@...>

reading carl hewitt's seminal paper on the actor model:

15 messages 2004/08/20

[#110067] Package requests for the prelim. Ruby Production Archive — Mauricio Fern疣dez <batsman.geo@...>

23 messages 2004/08/21
[#110069] Re: Package requests for the prelim. Ruby Production Archive — Dave Thomas <dave@...> 2004/08/21

[#110072] Re: Package requests for the prelim. Ruby Production Archive — Mauricio Fern疣dez <batsman.geo@...> 2004/08/21

On Sun, Aug 22, 2004 at 03:06:29AM +0900, Dave Thomas wrote:

[#110073] Re: Package requests for the prelim. Ruby Production Archive — Dave Thomas <dave@...> 2004/08/21

[#110078] Re: Package requests for the prelim. Ruby Production Archive — Mauricio Fern疣dez <batsman.geo@...> 2004/08/21

On Sun, Aug 22, 2004 at 04:07:07AM +0900, Dave Thomas wrote:

[#110086] Re: Package requests for the prelim. Ruby Production Archive — Richard Kilmer <rich@...> 2004/08/21

[#110118] Re: Package requests for the prelim. Ruby Production Archive — Mauricio Fern疣dez <batsman.geo@...> 2004/08/22

On Sun, Aug 22, 2004 at 05:20:28AM +0900, Richard Kilmer wrote:

[#110143] Re: Package requests for the prelim. Ruby Production Archive — James Britt <jamesUNDERBARb@...> 2004/08/22

I just tried to install rpa-base-0.2.0b on a Win2K machine, with no luck.

[#110214] How to check syntax — Graham Nicholls <graham@... (spam_filtered)>

Apologies if its a FAQ, but is there a way I can check my syntax for errors

16 messages 2004/08/23

[#110292] OpenStruct respond_to? problem — Jamis Buck <jgb3@...>

I blindly assumed that OpenStruct would handle respond_to? properly, but

18 messages 2004/08/24

[#110298] Re: *with* block? — "Daniel Sheppard" <daniels@...>

If you're just after configuring the instance variables, you might go

20 messages 2004/08/24
[#110300] Re: *with* block? — "David A. Black" <dblack@...> 2004/08/24

Hi --

[#110325] Re: *with* block? — Mauricio Fern疣dez <batsman.geo@...> 2004/08/24

On Tue, Aug 24, 2004 at 11:15:26AM +0900, David A. Black wrote:

[#110354] POLS - exception comparisons — "Ara.T.Howard" <Ara.T.Howard@...>

15 messages 2004/08/24

[#110363] Ruby, WebDAV, and Mozilla Sunbird inquiry — James Britt <jamesUNDERBARb@...>

I recently downloaded Sunbird [0], the calendar application from the

17 messages 2004/08/24

[#110377] Find the number of open files — Charles Mills <cmills@...>

Is there an easy way to find out the number of open files held by a

12 messages 2004/08/24

[#110453] Ruby interpreter as client-server — MiG <mig@1984.cz>

15 messages 2004/08/25

[#110564] python generators to ruby closures, help — zuzu <sean.zuzu@...>

can anyone help me decode the following python example using

13 messages 2004/08/26

[#110595] performance comparison — Boris Glawe <boris@...>

Hi,

98 messages 2004/08/26
[#110685] Re: performance comparison — George Ogata <g_ogata@...> 2004/08/27

Boris Glawe <boris@boris-glawe.de> writes:

[#110690] Re: performance comparison — James Edward Gray II <james@...> 2004/08/27

On Aug 27, 2004, at 1:55 PM, George Ogata wrote:

[#110700] Re: performance comparison — David Ross <drossruby@...> 2004/08/27

[#110710] Re: performance comparison — Alexey Verkhovsky <alex@...> 2004/08/27

On Fri, 2004-08-27 at 22:57, David Ross wrote:

[#110736] Re: performance comparison — Lothar Scholz <mailinglists@...> 2004/08/27

Hello Alexey,

[#110741] Re: performance comparison — David Ross <drossruby@...> 2004/08/27

[#110750] Re: performance comparison — Charles Mills <cmills@...> 2004/08/27

On Aug 27, 2004, at 3:34 PM, David Ross wrote:

[#110754] Re: performance comparison — Alexey Verkhovsky <alex@...> 2004/08/27

On Sat, 2004-08-28 at 01:14, Lothar Scholz wrote:

[#110759] Re: performance comparison — Lothar Scholz <mailinglists@...> 2004/08/27

Hello Alexey,

[#110771] Typos (Was: performance comparison) — Alexey Verkhovsky <alex@...> 2004/08/28

On Sat, 2004-08-28 at 02:59, Lothar Scholz wrote:

[#110800] Re: Typos (Was: performance comparison) — Gavin Sinclair <gsinclair@...> 2004/08/28

On Saturday, August 28, 2004, 11:25:43 AM, Alexey wrote:

[#110807] Re: Typos (Was: performance comparison) — Lothar Scholz <mailinglists@...> 2004/08/28

Hello Gavin,

[#110876] Re: Typos (Was: performance comparison) — Alexey Verkhovsky <alex@...> 2004/08/29

On Sat, 2004-08-28 at 12:55, Lothar Scholz wrote:

[#110828] Re: Typos (Was: performance comparison) — Kristof Bastiaensen <kristof@...> 2004/08/28

On Sat, 28 Aug 2004 18:55:55 +0900, Lothar Scholz wrote:

[#110892] Re: Typos (Was: performance comparison) — Mark Probert <probertm@...> 2004/08/29

David Ross <drossruby@yahoo.com> wrote:

[#110612] CVS question — Jamis Buck <jgb3@...>

Sorry to post this question here, but it IS marginally Ruby-related...

17 messages 2004/08/27

[#110617] How to parse network traffic from tcpdump in ruby? — mkcon@... (Martin Kahlert)

Hi!

17 messages 2004/08/27

[#110622] package glade files — Roeland Moors <roelandmoors@...>

I'm creating a project with ruby/gtk.

17 messages 2004/08/27

[#110664] Subtle bug in bignum.c — Markus <markus@...>

All --

12 messages 2004/08/27

[#110682] Compilation fails for Altix (IA64) — Bil Kleb <Bil.Kleb@...>

During compile of the 08-26-2004 stable snapshot, I get a warning:

18 messages 2004/08/27
[#110777] Re: Compilation fails for Altix (IA64) — nobu.nokada@... 2004/08/28

Hi,

[#110808] Re: Compilation fails for Altix (IA64) — Bil Kleb <Bil.Kleb@...> 2004/08/28

nobu.nokada@softhome.net wrote:

[#111279] Update: Compilation fails for Altix (IA64) — Bil Kleb <Bil.Kleb@...> 2004/09/02

Bil Kleb wrote:

[#111280] Re: Update: Compilation fails for Altix (IA64) — ts <decoux@...> 2004/09/02

>>>>> "B" == Bil Kleb <Bil.Kleb@NASA.Gov> writes:

[#110683] Gentoo Ruby — Charles Comstock <cc1@...>

Anyone know if it's possible for the gentoo ebuild for ruby to include

14 messages 2004/08/27

[#110725] Install to bin dir? — "T. Onoma" <transami@...>

I know there's probably a ready made solution for this. And I know its been

16 messages 2004/08/27

[#110758] Perldoc Equivalent? — James Edward Gray II <james@...>

Does Ruby have a bundled documentation reader?

20 messages 2004/08/27
[#110763] Re: Perldoc Equivalent? — James Britt <jamesUNDERBARb@...> 2004/08/28

James Edward Gray II wrote:

[#110764] Re: Perldoc Equivalent? — James Edward Gray II <james@...> 2004/08/28

On Aug 27, 2004, at 7:34 PM, James Britt wrote:

[#110929] Ruby Web Hosts — "T. Onoma" <transami@...>

Please recommend Ruby-supporting web hosts. I am currently looking at the

61 messages 2004/08/30
[#110933] Re: Ruby Web Hosts — Matt Lawrence <matt@...> 2004/08/30

On Mon, 30 Aug 2004, T. Onoma wrote:

[#110963] Re: Ruby Web Hosts — David Ross <drossruby@...> 2004/08/30

[#110973] Re: Ruby Web Hosts — Andreas Schwarz <usenet@...> 2004/08/30

David Ross wrote:

[#110974] Re: Ruby Web Hosts — David Ross <drossruby@...> 2004/08/30

[#110975] Re: Ruby Web Hosts — Mikael Brockman <mikael@...> 2004/08/30

David Ross <drossruby@yahoo.com> writes:

[#110976] Re: Ruby Web Hosts — David Ross <drossruby@...> 2004/08/30

hush linux bitch. I don't even have time for people

[#110996] Re: Ruby Web Hosts — Dick Davies <rasputnik@...> 2004/08/30

* David Ross <drossruby@yahoo.com> [0817 18:17]:

[#111005] Re: Ruby Web Hosts — Lloyd Zusman <ljz@...> 2004/08/30

David Ross <drossruby@yahoo.com> writes:

[#111041] Group visuals — Carl Youngblood <carl.youngblood@...>

Incidentally, and totally off-topic: has anyone else besides myself

14 messages 2004/08/31

[#111083] Ruby for system administration — Martin DeMello <martindemello@...>

I was talking to a sysadmin friend, who was shopping around for a

23 messages 2004/08/31

python generators to ruby closures, help

From: zuzu <sean.zuzu@...>
Date: 2004-08-26 18:16:39 UTC
List: ruby-talk #110564
can anyone help me decode the following python example using
generators into The Ruby Way using closures?

thanks,
-z

http://c2.com/cgi/wiki?GeneratorsInPython

You can emulate the unix-style shell piping with generators.

    from __future__ import generators

    class GenPipe?:
        def __init__(self, generator):
            self.gen = generator #sanity check omitted
        def __or__(self,nextPipe):
            self.gen=nextPipe._run(self.gen)
            return self
        def __iter__(self):
            return self.gen



    class PipeFilter?:
        def __init__(self):
            self._followingPipes=[]
        def __or__(self,nextPipe):
            self._followingPipes+=(nextPipe,)
            return self
        def _run(self,gen):
            gen=self.run(gen)
            while self._followingPipes:
                gen=self._followingPipes[0].run(gen)
                self._followingPipes.pop(0)
            return gen
        def run(self,gen):
            raise NotImplementedError?



    class Test(PipeFilter?):
        def __init__(self,test):
            PipeFilter?.__init__(self)
            self.test=test
        def run(self,gen):
            for x in gen:
                if self.test(x):
                    yield x



    class Quit(PipeFilter?):
        def __init__(self,test):
            PipeFilter?.__init__(self)
            self.test=test
        def run(self,gen):
            for x in gen:
                if self.test(x): 
                    raise StopIteration?
                else:
                    yield x



    class Count(PipeFilter?):
        def __init__(self,n):
            PipeFilter?.__init__(self)
            self.n=n
        def run(self,gen):
            for x in gen:
                yield x
                self.n -= 1
                if self.n == 0 :
                    break 



    def Ints():
        n = 0
        while 1:
            yield n
            n += 1



    def Files( start ):
        import os
        for file in os.listdir( start ):
            file = os.path.join( start, file )
            if os.path.isfile( file ): yield file
            elif os.path.isdir(file):
                for more in Files( file ):
                    yield more



    >>> odd = Test(lambda x:x % 2)
    >>> notDivBy3 = Test(lambda x: x % 3 )
    >>> oddNotDivBy3 = odd|notDivBy3
    >>> firstTen= Count(10)
    >>> result=GenPipe?(Ints())|firstTen|oddNotDivBy3
    >>> for each in result:
    >>>     print each



    >>> oddLowerThanTen=odd|Quit(lambda y:y>=10)
    >>> p3=GenPipe?(Ints())|oddLowerThanTen|notdiv3



    >>> isPyFile=Test(lambda s:s.split('.')[-1].lower()=='py')
    >>> tenPyFiles=GenPipe?(Files('/'))|isPyFile|Count(10)
    >>> for each in tenPyFiles:
    >>>     print each

-- JuneKim

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/21900

Subject: [ruby-talk:21900] Re: Python generators
From: Will Conant <WillC webmiles.com>
Date: Tue, 2 Oct 2001 08:18:10 +0900

Generators are a nifty feature for Python 2.2, but they are a solution to
Python problems... problems that Ruby doesn't have.

In Ruby, it is trivial to pass a closure that interacts with the scope that
created it to another function. Thus, callbacks in Ruby are sufficiently
useful to solve the problems that Python generators were designed to solve.

The example that I read somewhere on the Python site was the tokenizer
problem. The original approach to the tokenizer problem was to have a
function that took two parameters as input: the text source and a function
pointer to a callback that processed the tokens. The problem with this
approach was that the callback function, designed by the user, didn't have a
very good way of keeping state between calls. It could use globals, but that
would suck.

The other approach was to write a tokenizer object that kept its state and
had a "nextToken" function that looked for the next token in the stream and
returned it to the caller. This solution hoisted the state problem off on
the tokenizer instead of the user. Still a problem especially considering
the difficulty of unrolling very complex loops of logic.

For Python, where closures aren't that easy to use, the generator is the
ideal solution. This way, you write your tokenizer function as if were to
use a callback so you don't have to unroll your loop. However, your function
gets wrapped up in an iterator object, so the user uses it as if it were
implemented as a Tokenizer object with a "nextToken" function.

In Ruby, you could probably emulate this behavior directly, but you really
wouldn't need to. Instead, you would just write your tokenizer to use a
callback, and your callback method would be a local closure with local state
persistant between calls. Problem solved.

Anyway, that's the story. Generators are a whitespace friendly solution to a
few of the problems that Ruby's super-duper closure mechanism solves just
fine.

-Will Conant

In This Thread

Prev Next