[#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

[#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

[#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

[#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,

[#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:

[#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:

[#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

Re: Forward references?

From: Lloyd Zusman <ljz@...>
Date: 2004-08-02 13:31:51 UTC
List: ruby-talk #108073
"Robert Klemme" <bob.news@gmx.net> writes:

> "Lloyd Zusman" <ljz@asfast.com> schrieb im Newsbeitrag
> news:zn5dbwke.fsf@asfast.com...
>>
>> [ ... ]
>>
>> I refactored the code even more, based on our discussions and some ideas
>> of my own.  If you're interested, I can privately email you the latest
>> version.
>
> [x] interested  [ ] not interested

Here it is.  Let me know what you think.  And thank you for the useful
and interesting discussion in the mailing list.

#!/usr/local/bin/ruby

# Do a 'tail -f' simultaneously multiple files, interspersing their
# output.  Continue tailing any file that has been replaced by a new
# version, as in the following, over-simplified example:
#
#   while :
#   do
#     something >>something.log &
#     pid=$!
#     # ... time passes ...
#     rm -f something.log.old
#     mv something.log something.log.old
#     kill $pid
#   done
#
# See the 'usage' routine, below, for a description of the command
# line options and arguments.

require 'sync'
require 'getoptlong'

$program = File.basename($0)

$stdout.extend(Sync_m)
$stdout.sync = 1

$stderr.sync = 1

$waitTime = 0.25

$defColumns = 80
$defLines   = 80

$maxBlocksize = 1024

# Default values for flags that are set via the command line.
$tailf       = true
$fnamePrefix = false

$opts = GetoptLong.new(
  [ "--lines", "-l", GetoptLong::REQUIRED_ARGUMENT ],
  [ "--exit",  "-x", GetoptLong::NO_ARGUMENT       ],
  [ "--name",  "-n", GetoptLong::NO_ARGUMENT       ],
  [ "--help",  "-h", GetoptLong::NO_ARGUMENT       ]
)

# My list of threads.
$fileThreads = [].extend(Sync_m)

# Main routine
def rtail

  # Calculate the size of a screen so we can choose a reasonable
  # number of lines to tail.

  screenColumns = (ENV['COLUMNS'] == nil ? $defColumns : ENV['COLUMNS']).to_i
  if screenColumns < 1 then
    # In case ENV['COLUMNS'] was set to something <= 0
    screenColumns = $defColumns
  end

  screenLines = (ENV['LINES'] == nil ? $defLines : ENV['LINES']).to_i
  if screenLines < 1 then
    # In case ENV['LINES'] was set to something <= 0
    screenLines = $defLines
  end

  # One more full line than the maximum that the screen can hold ...

  $backwards = screenColumns * (screenLines + 1)


  # Parse and evaluate command-line options.  Temporarily change
  # $0 to be the basename prepended by a newline so that the error
  # message that GetoptLong outputs looks good in the case where
  # an invalid option was entered.

  oldDollar0 = $0
  $0 = "\n" + $program

  begin

    $opts.each do

      |opt, arg|

      case opt
      when "--exit"
	$tailf = false
      when "--lines"
	screenLines = arg.to_i + 0
      when "--name"
	$fnamePrefix = true
      when "--help"
	usage
	# notreached
      else
	usage
	# notreached
      end
    end

  rescue
    usage
    # notreached
  ensure
    $0 = oldDollar0 # just in case we need $0 later on
  end

  if ARGV.length < 1 then
    usage
    # notreached
  end

  # Signal handler.
  [ 'SIGHUP', 'SIGINT', 'SIGQUIT', 'SIGTERM' ].each {
    |sig|
    trap(sig) {
      abortThreads(Thread.list.reject {
	|t|
	t == Thread.main
      })
      raise "\n!!! aborted"
      # notreached
    }
  }

  # Start a thread to tail each file whose name appears on
  # the command line.  The threads for any file that cannot
  # be opened for reading will die and will be reaped in
  # the main loop, below.
  ARGV.each {
    |arg|
    $fileThreads.synchronize {
      $fileThreads << Thread.new(arg, $tailf, &$fileReadProc)
    }
  }

  # Main loop: reap dead threads and exit once there are no more
  # threads that are alive.
  loop {
    tcount = 0
    $fileThreads.synchronize {
      tcount = $fileThreads.length
    }
    if tcount < 1 then
      break
    else
      # Don't eat up too much of my CPU time
      waitFor($waitTime)
    end
  }

  # Bye-bye
  return 0
end

# This is a mixin for adding a textfile? method to a class that
# behaves like IO.  It also adds an externally callable 
# TextTester.text? method to test a block of data.

module TextTester

private
  # List of items that I want to treat as being normal text
  # characters.  The first line adds a lot of European characters
  # that are not normally considered to be text characters in
  # the traditional routines that distinguish between text and
  # binary files.  This is used within the 'textfile?' method.
  @@textpats = [ "^瘟逑洄蓐鴒粳阮ⅷ苟蘇羊收般燮痛榴廃/",
                 "^ -~",
                 "^\b\f\t\r\n" ]

public

  # This is my own, special-purpose test for text-ness.  I don't want to
  # treat certain European characters as binary.  If the 'testsize'
  # argument is non-nil, try to read a buffer of that size; otherwise,
  # calculate the buffer size here.  If the 'restorePosition' argument
  # is true, make sure that the the position pointer within the IO
  # handle gets repositioned back to its initial value after this test
  # is performed.
  #
  # This method is callable directly from outside the module.  Hence,
  # I define it as self.text? here.

  def self.text?(block, len = nil)
    if len.nil? then
      len = block.length
    end
    return (block.count(*@@textpats) < (len / 3.0) and block.count("\x00") < 1)
  end

  def textfile?(testsize = nil, restorePosition = true)
    begin
      if restorePosition then
	pos = self.pos
      else
	pos = nil
      end
      if testsize.nil? then
	testsize = [ self.stat.blocksize,
	             self.stat.bytesize,
	             $maxBlocksize ].min
      end
      block = self.read(testsize)
      len = block.length
      if len < 1 then
	return true # Provisionally treat a zero-length file as a text file.
      end

      # I need to call text? both inside and outside of this module.
      # Therefore, I have to define that method as self.text?, which
      # requires me to explicitly reference it off of TextTester here.
      result = TextTester.text?(block, len)
      unless pos.nil?
	self.seek(pos, IO::SEEK_SET)
      end
      return result
    rescue
      return false
    end
  end
end

# Add the test for a text file into the IO class.

class IO
  include TextTester
end


# Do a timed 'wait'.

def waitFor(duration)
  startTime = Time.now.to_f
  select(nil, nil, nil, duration)
  Thread.pass
  # We could be back here long before 'duration' has passed.
  # The loop below makes sure that we wait at least as long
  # as this specified interval.
  while (elapsed = (Time.now.to_f - startTime)) < duration
    select(nil, nil, nil, 0.001)
    Thread.pass
  end
  # Return the actual amount of time that elapsed.  This is
  # guaranteed to be >= 'duration'.
  return elapsed
end


# We make sure that $stdout is synchronized so that lines of
# data coming from different threads don't garble each other.

def syncwrite(text)
  begin
    $stdout.synchronize(Sync::EX) {
      $stdout.write(text)
    }
  rescue
    # Fall back to normal, non-sync writing
    $stdout.write(text)
  end
end


# Decide whether to output a block as is, or with a prefix
# at the beginning of each line.  In the "as is" case, just
# send the whole block to 'syncwrite'; otherwise, split into
# lines and prepend the prefix before outputting.  In other
# words, we only incur the cost of splitting the block when
# we absolutely have to.

def output(item)
  prefix, block = item
  if prefix.nil? or prefix.length < 1 then
    syncwrite(block)
  else
    block.split(/\r*\n/).each {
      |line|
      syncwrite(prefix + line + "\n")
    }
  end
end


# Remove a group of threads from the list and kill each one.

def abortThreads(tlist)
  $fileThreads.synchronize {
    tlist.each {
      |t|
      $fileThreads.delete(t)
      t.kill
    }
  }
end


# Remove myself from the thread list and kill myself.
def abortMyself
  abortThreads([Thread.current])
  # notreached
end


# Close the specified IO handle and kill the containing thread
# if this fails.

def closeOrDie(f)
  begin
    f.close()
  rescue
    output([nil, "!!! unable to close file: #{item}\n"])
    abortMyself()
    # notreached
  end
end


# This is the main thread proc for tailing a given file.

$fileReadProc = Proc.new do
  |item, follow|

  # Open the file, make sure it's a text file, read the last bit
  # at the end, and output it.  Kill the containing thread if any
  # of this fails.

  begin
    f = File.open(item, 'r')
  rescue
    output([nil, "!!! unable to open: #{item}\n"])
    abortMyself()
    # notreached
  end

  # Get some info about the open file
  begin
    f.sync = true
    bytesize = f.stat.size
    blocksize = f.stat.blksize
    inode = f.stat.ino
  rescue
    f.close
    output([nil, "!!! unable to stat: #{item}\n"])
    abortMyself()
    # notreached
  end

  # Blocksize will be nil or zero if the device being opened
  # is not a disk file.  Bytesize will also be nil in this case.
  if blocksize.nil? or blocksize < 1 or bytesize.nil? then
    f.close
    output([nil, "!!! invalid device: #{item}\n"])
    abortMyself()
    # notreached
  end

  # Test for text-ness using one blocksize unit, or the length
  # of the file if that is smaller.  This is done in two statements
  # because we need to use 'blocksize' by itself, further down in
  # this procedure.
  blocksize = [ blocksize, $maxBlocksize ].min
  testsize = [ blocksize, bytesize ].min
  unless f.textfile?(testsize, false) then
    f.close
    output([nil, "!!! not a text file: #{item}\n"])
    abortMyself()
    # notreached
  end

  # Set the optional output line prefix.
  if $fnamePrefix then
    prefix = File.basename(item) + ': '
  else
    prefix = nil
  end

  textTestLength = 0

  # Position to a suitable point near the end of the file,
  # and then read and output the data from that point until
  # the end.
  begin
    if bytesize > $backwards then
      pos = bytesize - $backwards
    else
      pos = 0
    end
    f.seek(pos, IO::SEEK_SET)
    if pos > 0 then
      f.gets # discard possible line fragment
    end
    readSoFar = f.read
    textTestLength = readSoFar.length
    output([prefix, readSoFar])
  rescue
  end

  # If we have made it here, we've read the last bit of the file
  # and have output it.  Now, if we're not in 'follow' mode, we
  # just exit.
  unless follow then
    f.close
    abortMyself()
    # notreached
  end

  # We only arrive here if we're in 'follow' mode.  In this case,
  # we keep looping to test if there is any more data to output.
  loop {
    #
    # The file might have been closed due to it having disappeared
    # or having changed names.  If so, reopen it.
    #
    if f.closed? then
      begin
	f = File.open(item, 'r')
	f.sync = true
	textTextLength = 0
	readSoFar = ''
	inode = f.stat.ino
	output([nil, "!!! reopened: #{item}\n"])
	# Fall through to the EOF test.
      rescue
	output([nil, "!!! disappeared: #{item}\n"])
	begin
	  f.close
	rescue
	end
	abortMyself()
	# notreached
      end
    else # file is not closed
      #
      # File was not previously closed, so we can test to see if it
      # has changed or disappeared.
      #
      # Get the current inode of the file.  This is needed to test
      # whether or not the file has disappeared and whether or not there
      # is a new file by the same name.  This is not 100-percent
      # conclusive, since a new file might accidentally end up with the
      # same inode of an older, deleted file.
      #
      begin
	newinode = File.stat(item).ino
	# Fall through to the EOF test.
      rescue
	# If we're here, the file has disappeared.  Close the handle,
	# wait a bit, and then try to reopen it.
	closeOrDie(f)
	waitFor($waitTime)
	redo # go back and iterate again
        # notreached
      end

      if newinode != inode then
	# If we're here, the file was replaced by a new file of 
	# the same name.  Close the handle, wait a bit, and then
	# try to reopen it.
	closeOrDie(f)
	waitFor($waitTime)
	redo # go back and iterate again
        # notreached
      end

    end # f.closed? ... else ...

    # The only way that we can get to this point is if the file is
    # properly open and it hasn't been deleted or replaced.

    if f.eof? then
      # If we're here, we're at EOF.  Reset the EOF indicator and
      # try again.
      f.seek(0, IO::SEEK_CUR)
      waitFor($waitTime)
      redo # go back and iterate again
      # notreached
    end

    # If we're here, we're not at EOF.

    if f.pos < f.stat.size then

      # If we're here, more data was added to the file since the last
      # time we checked.  Output this data, relinquish control to
      # other threads, and then repeat the loop.
      #
      # If we haven't yet tested a full block's worth of bytes
      # for text-ness, continue that test here.

      data = f.read
      if textTestLength < blocksize then
	len = data.length
	textTestLength += len
	readSoFar << data
	if len > 0 and not TextTester.text?(readSoFar) then
	  # If we're here, it's not a text file after all.
	  closeOrDie(f)
	  output([nil, "!!! not a text file: #{item}\n"])
	  abortMyself()
	  # notreached
	end
      end
      output([prefix, data])
      Thread.pass
      redo # go back and iterate again
      # notreached
    end

    # If we're here, the file hasn't changed since last time.
    # Wait a bit so as to not eat up too much CPU time.

    waitFor($waitTime)

  } # end of loop

end # end of thread proc


# Print a usage message and exit.
def usage
  raise <<EOD

usage: #{$program} [ options ] file [ ... ]

options:

  --help, -h            print this usage message

  --lines=<n>, -l <n>   tail <n> lines of each file (default #{$defLines})

  --exit, -x            exit after showing initial tail

  --name, -n            prepend file basename on each line that is output

EOD
  # notreached

end


# Run it
begin
  result = rtail
rescue Exception => e
  $stderr.puts(e)
  result = 1
end
exit(result)

__END__


-- 
 Lloyd Zusman
 ljz@asfast.com
 God bless you.


In This Thread