[#296620] linux: getting the "load" values without using "top" — James Dinkel <jdinkel@...>

I would like to get some of the information provided by the "top"

12 messages 2008/04/01

[#296625] should I use a database or a flat file? — James Dinkel <jdinkel@...>

I need to store some information with my ruby program and I am not sure

23 messages 2008/04/01
[#296628] Re: should I use a database or a flat file? — "Robert Klemme" <shortcutter@...> 2008/04/01

2008/4/1, James Dinkel <jdinkel@gmail.com>:

[#296633] Re: should I use a database or a flat file? — James Dinkel <jdinkel@...> 2008/04/01

[#296646] Re: should I use a database or a flat file? — "Todd Benson" <caduceass@...> 2008/04/01

On Tue, Apr 1, 2008 at 10:32 AM, James Dinkel <jdinkel@gmail.com> wrote:

[#296654] Does Ruby support exception wrapping (exception chaining)? — "Hartin, Brian" <Brian.Hartin@...>

I could not find any information about this, except regarding DRb.

16 messages 2008/04/01

[#296832] confused by 'test'.gsub(/.*/,'x') — Wybo Dekker <wybo@...>

Why do I get "xx" instead of "x" in the following:

14 messages 2008/04/02

[#296849] ruby constructor return value? — Brendan Stennett <brendan6@...>

How do I alert an error if it occurs in an object's constructor?

13 messages 2008/04/02

[#296984] using a range as a key — Michael Linfield <globyy3000@...>

I'm trying to achieve the effect of having a range of integers as a hash

14 messages 2008/04/03

[#297004] Using a string as executable code — Peter Marks <petertmarks@...>

I need to store one line method calls as strings in my db and then apply

14 messages 2008/04/04

[#297105] The ||= assignment operator — Belorion <belorion@...>

It was my understanding that the ||= assignment operator assigned the value

34 messages 2008/04/04
[#297114] Re: The ||= assignment operator — Chris Shea <cmshea@...> 2008/04/04

On Apr 4, 1:30 pm, Paul Mucur <mu...@waferbaby.com> wrote:

[#297141] Re: The ||= assignment operator — Pe, Botp <botp@...> 2008/04/05

From: Chris Shea [mailto:cmshea@gmail.com]=20

[#297234] Is possible to define various methods at same time? — Iñaki Baz Castillo <ibc@...>

Hi, is possible to define various methods in a single declaration? somethin=

17 messages 2008/04/06

[#297268] Do arrays use up alot of memory space? — Clement Ow <clement.ow@...>

I just started ruby not too long ago and I'm really new to the language.

16 messages 2008/04/07

[#297365] Ruby’s not ready - an indepth essay — "Song Ma" <songmash@...>

F.Y.I

83 messages 2008/04/08
[#297369] Re: Ruby’s not ready - an indepth essay — "Avdi Grimm" <avdi@...> 2008/04/08

2008/4/7 Song Ma <songmash@gmail.com>:

[#297375] Re: Ruby’s not ready - an indepth essay — "Song Ma" <songmash@...> 2008/04/08

Interesting. But what I am thinking about is not the attitude of the author,

[#297417] Re: Ruby’s not ready - an indepth essay — "Rob Sanheim" <rsanheim@...> 2008/04/08

2008/4/7 Song Ma <songmash@gmail.com>:

[#297430] Re: Ruby’s not ready - an indepth essay — "M. Edward (Ed) Borasky" <znmeb@...> 2008/04/08

Rob Sanheim wrote:

[#297437] Re: Ruby’s not ready - an indepth essay — Phillip Gawlowski <cmdjackryan@...> 2008/04/08

-----BEGIN PGP SIGNED MESSAGE-----

[#297441] Re: Ruby’s not ready - an indepth essay — Dave Thomas <dave@...> 2008/04/08

[#297444] Re: Ruby’s not ready - an indepth essay — "Jeremy McAnally" <jeremymcanally@...> 2008/04/08

I agree about the API docs. There has been talk recently about

[#297446] Re: Ruby’s not ready - an indepth essay — Dave Thomas <dave@...> 2008/04/08

[#297472] Re: Ruby’s not ready - an indepth essay — "Jeremy McAnally" <jeremymcanally@...> 2008/04/08

Someone has suggested that but I haven't looked at it. I haven't

[#297479] Re: Ruby’s not ready - an indepth essay — "s.ross" <cwdinfo@...> 2008/04/08

On Apr 8, 2008, at 12:05 PM, Jeremy McAnally wrote:

[#297484] Re: Ruby’s not ready - an indepth essay — "Kyle Schmitt" <kyleaschmitt@...> 2008/04/08

Php's docs are good, really good. But I always felt that it's because

[#297386] heavy loop functions slow — Michael Linfield <globyy3000@...>

Alright so I was playing with my large amounts of data and ran into yet

13 messages 2008/04/08

[#297471] capitalizing words — Peter Bailey <pbailey@...>

Hi,

17 messages 2008/04/08

[#297512] output of a method to file? — Zoe Phoenix <dark_sgtphoenix@...>

Can anybody tell me how to take the output of a method and save it to a

16 messages 2008/04/08
[#297516] Re: output of a method to file? — Phillip Gawlowski <cmdjackryan@...> 2008/04/08

-----BEGIN PGP SIGNED MESSAGE-----

[#297518] Re: output of a method to file? — Zoe Phoenix <dark_sgtphoenix@...> 2008/04/09

Maybe it would help if I posted the code, I'm not sure I understand...

[#297522] Re: output of a method to file? — Phillip Gawlowski <cmdjackryan@...> 2008/04/09

-----BEGIN PGP SIGNED MESSAGE-----

[#297526] Re: output of a method to file? — Zoe Phoenix <dark_sgtphoenix@...> 2008/04/09

hm, let me re-phrase... I only have 9 items in that array, right? How

[#297633] My error or bug in "attr_reader" ? — Hexren <me@...>

Hi guys.

13 messages 2008/04/09

[#297638] FXRuby versus Tk — Alex DeCaria <alex.decaria@...>

I've done some GUI program with Ruby/Tk, and am able to use it fairly

16 messages 2008/04/09

[#297724] OT: "Unix" in Japanese — Chad Perrin <perrin@...>

Since I figure there are probably a few Japanese Unix hackers on this

13 messages 2008/04/10

[#297819] RubyGems 1.1.1 — Eric Hodel <drbrain@...7.net>

Release 1.1.1 fixes some bugs.

21 messages 2008/04/11

[#297827] how to create random object to a particular ruby object ? — Pokkai Dokkai <bad_good_lion@...>

how to create random object to a particular ruby object ?

22 messages 2008/04/11
[#297839] Re: how to create random object to a particular ruby object ? — "Robert Klemme" <shortcutter@...> 2008/04/11

2008/4/11, Pokkai Dokkai <bad_good_lion@yahoo.com>:

[#297845] Re: how to create random object to a particular ruby object ? — "Robert Dober" <robert.dober@...> 2008/04/11

On Fri, Apr 11, 2008 at 1:16 PM, Robert Klemme

[#297844] How to duplicate a object changing the class without attributes memory copy — "Iñaki Baz Castillo" <ibc@...>

SGksIEknbSBkb2luZyBhIHNlcnZlciBhbmQgd2FudCB0byBhdm9pZCBtZW1vcnkgaW5uZWNlc2Fy

12 messages 2008/04/11

[#297884] delete_if, select and (lack of) delete_if!, self.POLS == false — Saku Ytti <saku@...>

Hey everyone,

24 messages 2008/04/11
[#297887] Re: delete_if, select and (lack of) delete_if!, self.POLS == false — "David A. Black" <dblack@...> 2008/04/11

Hi --

[#297890] Re: delete_if, select and (lack of) delete_if!, self.POLS == false — Saku Ytti <saku@...> 2008/04/11

On (2008-04-12 01:32 +0900), David A. Black wrote:

[#297892] Re: delete_if, select and (lack of) delete_if!, self.POLS == false — "Robert Dober" <robert.dober@...> 2008/04/11

On Fri, Apr 11, 2008 at 6:46 PM, Saku Ytti <saku@ytti.fi> wrote:

[#297899] Re: delete_if, select and (lack of) delete_if!, self.POLS == false — Saku Ytti <saku@...> 2008/04/11

On (2008-04-12 02:08 +0900), Robert Dober wrote:

[#297900] Re: delete_if, select and (lack of) delete_if!, self.POLS == false — Saku Ytti <saku@...> 2008/04/11

On (2008-04-12 02:26 +0900), Saku Ytti wrote:

[#297914] Re: delete_if, select and (lack of) delete_if!, self.POLS == false — "Robert Dober" <robert.dober@...> 2008/04/11

On Fri, Apr 11, 2008 at 7:31 PM, Saku Ytti <saku@ytti.fi> wrote:

[#297915] Re: delete_if, select and (lack of) delete_if!, self.POLS == false — Saku Ytti <saku@...> 2008/04/11

On (2008-04-12 04:04 +0900), Robert Dober wrote:

[#297917] Re: delete_if, select and (lack of) delete_if!, self.POLS == false — "David A. Black" <dblack@...> 2008/04/11

Hi --

[#297928] How to check record duplication before saving? — Frank Tsao <shuhao.tsao@...>

Hi, everyone,

26 messages 2008/04/11
[#297932] Re: How to check record duplication before saving? — Phillip Gawlowski <cmdjackryan@...> 2008/04/11

-----BEGIN PGP SIGNED MESSAGE-----

[#297933] Re: How to check record duplication before saving? — Dave Thomas <dave@...> 2008/04/11

[#297936] Re: How to check record duplication before saving? — "RubyTalk@..." <rubytalk@...> 2008/04/11

If you are using Rails and migrations

[#297939] Re: How to check record duplication before saving? — Frank Tsao <shuhao.tsao@...> 2008/04/11

RubyTalk@gmail.com wrote:

[#297948] Re: How to check record duplication before saving? — "Todd Benson" <caduceass@...> 2008/04/11

On Fri, Apr 11, 2008 at 6:01 PM, Frank Tsao <shuhao.tsao@gmail.com> wrote:

[#297998] Re: How to check record duplication before saving? — "Todd Benson" <caduceass@...> 2008/04/12

On Fri, Apr 11, 2008 at 6:43 PM, Todd Benson <caduceass@gmail.com> wrote:

[#298017] Re: How to check record duplication before saving? — "ara.t.howard" <ara.t.howard@...> 2008/04/12

[#298027] Re: [OT] Re: How to check record duplication before saving? — "Todd Benson" <caduceass@...> 2008/04/13

On Sat, Apr 12, 2008 at 3:55 PM, ara.t.howard <ara.t.howard@gmail.com> wrote:

[#298031] Re: [OT] Re: How to check record duplication before saving? — "Todd Benson" <caduceass@...> 2008/04/13

On Sat, Apr 12, 2008 at 7:14 PM, Todd Benson <caduceass@gmail.com> wrote:

[#297935] Looking for Hidden Gems — James Gray <james@...>

I'm hunting for some gems that are under loved, off the beaten path,

13 messages 2008/04/11

[#298122] How to reliably setup require path — Christian Johansen <chrisjoha@...>

I'm writing my first Ruby command line application (beyond a simple

12 messages 2008/04/14

[#298145] noob 'why doesn't this work' question — Vincent Angeloni <nospam7272@...>

Hi and greetings to all group members!

17 messages 2008/04/14

[#298193] Is there a One True Postgres interface? Is Ruby-postgres maintained? — John Carter <john.carter@...>

Is there a One true Ruby Interface to Postgres?

53 messages 2008/04/14
[#298200] Re: Is there a One True Postgres interface? Is Ruby-postgres maintained? — Reid Thompson <reid.thompson@...> 2008/04/14

John Carter wrote:

[#298203] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — John Carter <john.carter@...> 2008/04/14

On Tue, 15 Apr 2008, Reid Thompson wrote:

[#298205] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — John Carter <john.carter@...> 2008/04/14

On Tue, 15 Apr 2008, John Carter wrote:

[#298223] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — Chad Perrin <perrin@...> 2008/04/15

On Tue, Apr 15, 2008 at 08:44:31AM +0900, John Carter wrote:

[#298231] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — John Carter <john.carter@...> 2008/04/15

On Tue, 15 Apr 2008, Chad Perrin wrote:

[#298339] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — Jeff Davis <ruby@...> 2008/04/15

On Tue, 2008-04-15 at 08:41 +0900, John Carter wrote:

[#298381] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — "M. Edward (Ed) Borasky" <znmeb@...> 2008/04/15

Jeff Davis wrote:

[#298387] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — Phillip Gawlowski <cmdjackryan@...> 2008/04/16

-----BEGIN PGP SIGNED MESSAGE-----

[#298484] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — Thomas Kellerer <YQDHXVLMUBXG@...> 2008/04/16

Phillip Gawlowski, 16.04.2008 02:08:

[#298488] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — Phillip Gawlowski <cmdjackryan@...> 2008/04/16

-----BEGIN PGP SIGNED MESSAGE-----

[#298534] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — Jeff Davis <ruby@...> 2008/04/16

On Wed, 2008-04-16 at 08:49 +0900, M. Edward (Ed) Borasky wrote:

[#302685] Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? — Peter Booth <pbooth@...> 2008/05/23

I can see Jeff's point. If both libpq and the Postgres JDBC drivers

[#302687] Yup, it's call SQLite! :-)) Re: Is there a One True Postgresinterface? Is Ruby-postgresmaintained? — John Carter <john.carter@...> 2008/05/23

Having started this huge thread on PostgresSQL, I found...

[#298266] Ada vs Ruby — Marc Heiler <shevegen@...>

Hi,

101 messages 2008/04/15
[#298275] Re: Ada vs Ruby — Michael Neumann <mneumann@...> 2008/04/15

Marc Heiler wrote:

[#298383] Re: Ada vs Ruby — Eleanor McHugh <eleanor@...> 2008/04/15

On 15 Apr 2008, at 13:28, Michael Neumann wrote:

[#298400] Re: Ada vs Ruby — "Rick DeNatale" <rick.denatale@...> 2008/04/16

On Tue, Apr 15, 2008 at 7:54 PM, Eleanor McHugh

[#298403] Re: Ada vs Ruby — Phillip Gawlowski <cmdjackryan@...> 2008/04/16

-----BEGIN PGP SIGNED MESSAGE-----

[#298472] Re: Ada vs Ruby — Eleanor McHugh <eleanor@...> 2008/04/16

On 16 Apr 2008, at 03:40, Phillip Gawlowski wrote:

[#298476] Re: Ada vs Ruby — Phillip Gawlowski <cmdjackryan@...> 2008/04/16

-----BEGIN PGP SIGNED MESSAGE-----

[#298513] Re: Ada vs Ruby — Eleanor McHugh <eleanor@...> 2008/04/16

On 16 Apr 2008, at 14:42, Phillip Gawlowski wrote:

[#298522] Re: Ada vs Ruby — Phillip Gawlowski <cmdjackryan@...> 2008/04/16

-----BEGIN PGP SIGNED MESSAGE-----

[#298641] Re: Ada vs Ruby — "Rick DeNatale" <rick.denatale@...> 2008/04/17

On Wed, Apr 16, 2008 at 12:57 PM, Phillip Gawlowski

[#298651] Re: Ada vs Ruby — Phillip Gawlowski <cmdjackryan@...> 2008/04/17

-----BEGIN PGP SIGNED MESSAGE-----

[#298540] Re: Ada vs Ruby — fburton@... (Francis Burton) 2008/04/16

In article <5E300D89-09B9-4788-9E43-C2517C0E0A3C@games-with-brains.com>,

[#298577] Re: Ada vs Ruby — Eleanor McHugh <eleanor@...> 2008/04/17

On 16 Apr 2008, at 19:40, Francis Burton wrote:

[#298626] Re: Ada vs Ruby — "Eivind Eklund" <eeklund@...> 2008/04/17

On Thu, Apr 17, 2008 at 3:21 AM, Eleanor McHugh

[#298267] checking connection to server:port [socket] — Kr Alfabeta <kristis@...>

hi,

17 messages 2008/04/15

[#298279] at_exit handlers and Process.kill — Daniel Berger <djberg96@...>

Hi all,

22 messages 2008/04/15

[#298318] Hash or bidimensional Array when key is case insensitive? — "Iñaki Baz Castillo" <ibc@...>

SGksIEkndmUgdG8gdGFrZSBhIGRlY2lzc2lvbiBhYm91dCB1c2luZyBhbiBiaWRpbWVuc2lvbmFs

8 messages 2008/04/15

[#298369] Windows, Net::SSH: how do I use a private key (w / password) — James Dinkel <jdinkel@...>

Private key authentication works with this user, I know because I use it

11 messages 2008/04/15

[#298386] Check if remote server exists — Jeff Miller <loadeddesigns@...>

Hello,

11 messages 2008/04/16

[#298408] Parallel for loop — Fredrik <fredjoha@...>

There doesn't seem to be any EASY way of doing a parallel computation

24 messages 2008/04/16

[#298589] Ruby Hero Awards — Gregg Pollack <GreggPollack@...>

Hey guys,

16 messages 2008/04/17

[#298608] thread question — Zoe Phoenix <dark_sgtphoenix@...>

Okay, I took someone's advice in an earlier post I made on how to poison

13 messages 2008/04/17

[#298629] How to "break" a "case-when" ? — "Iñaki Baz Castillo" <ibc@...>

SGksIGlzIG5vdCBwb3NzaWJsZSB0byB0ZXJtaW5hdGUgdGhlIGJvZHkgb2YgYSAid2hlbiIgc3Rh

16 messages 2008/04/17
[#298633] Re: How to "break" a "case-when" ? — "Stefan Lang" <perfectly.normal.hacker@...> 2008/04/17

2008/4/17, I=F1aki Baz Castillo <ibc@aliax.net>:

[#298635] Re: How to "break" a "case-when" ? — "Iñaki Baz Castillo" <ibc@...> 2008/04/17

MjAwOC80LzE3LCBTdGVmYW4gTGFuZyA8cGVyZmVjdGx5Lm5vcm1hbC5oYWNrZXJAZ21haWwuY29t

[#298711] system(ping) — Heinrich Piard <linux@...>

Hi,

15 messages 2008/04/17

[#298715] When are lambdas needed? — Stedwick <philip.brocoum@...>

I have seen many tutorials on the Internet explaining where lambdas

26 messages 2008/04/17

[#298739] forkoff - parallel processing for ruby enumerables — ara howard <ara.t.howard@...>

23 messages 2008/04/18

[#298883] why doesn't ruby have generics? — thufir <hawat.thufir@...>

Is it because Ruby is dynamic, or something else?

18 messages 2008/04/19

[#298915] Triangle Area (#160) — Matthew Moss <matthew.moss@...>

Apologies for the latest... Some busy stuff this week in "real life."

22 messages 2008/04/19

[#298982] Counting Program — "Will Mueller" <will.liljon@...>

I recently actually started "studying" ruby again and attempted to

18 messages 2008/04/20
[#298983] Re: Counting Program — Phillip Gawlowski <cmdjackryan@...> 2008/04/20

-----BEGIN PGP SIGNED MESSAGE-----

[#299006] Re: Counting Program — Dan Diebolt <dandiebolt@...> 2008/04/21

>it's as simple as ...

[#298986] A couple of questions regarding class design — "Michael W. Ryder" <_mwryder@...>

I am part way through implementing a Rational math class to further my

35 messages 2008/04/20
[#299079] Re: A couple of questions regarding class design — "Robert Dober" <robert.dober@...> 2008/04/21

On Sun, Apr 20, 2008 at 11:45 PM, Michael W. Ryder

[#299083] Re: A couple of questions regarding class design — "Michael W. Ryder" <_mwryder@...> 2008/04/21

Robert Dober wrote:

[#299112] Re: A couple of questions regarding class design — Robert Klemme <shortcutter@...> 2008/04/22

On 21.04.2008 23:28, Michael W. Ryder wrote:

[#299170] Re: A couple of questions regarding class design — "Michael W. Ryder" <_mwryder@...> 2008/04/22

Robert Klemme wrote:

[#299175] Re: A couple of questions regarding class design — "Robert Dober" <robert.dober@...> 2008/04/22

On Tue, Apr 22, 2008 at 9:15 PM, Michael W. Ryder

[#299194] Re: A couple of questions regarding class design — "Michael W. Ryder" <_mwryder@...> 2008/04/22

Robert Dober wrote:

[#299202] Re: A couple of questions regarding class design — "Robert Dober" <robert.dober@...> 2008/04/22

On Tue, Apr 22, 2008 at 10:55 PM, Michael W. Ryder

[#299234] Re: A couple of questions regarding class design — Robert Klemme <shortcutter@...> 2008/04/23

On 23.04.2008 00:44, Robert Dober wrote:

[#299012] Accessing Windows actions(Shutdow.Restart) — Raveendran Perumalsamy <jazzezravi@...>

Hi All,

14 messages 2008/04/21
[#299043] Re: Accessing Windows actions(Shutdow.Restart) — "Gordon Thiesfeld" <gthiesfeld@...> 2008/04/21

On Mon, Apr 21, 2008 at 1:25 AM, Raveendran Perumalsamy

[#299068] Barby 0.1 - Ruby barcode generator that doesn't suck (that much) — Tore Darell <toredarell@...>

This is something I released a while ago, but I thought I'd announce

10 messages 2008/04/21

[#299204] Extending Hast class with custom [] []= methods — Iñaki Baz Castillo <ibc@...>

Hi, I'd like to extend Hash class [] and []=3D methods in order to find a k=

12 messages 2008/04/22

[#299222] Extract date from filenames using regex — Clement Ow <clement.ow@...>

I have my code which looks like this:

13 messages 2008/04/23
[#299228] Re: Extract date from filenames using regex — "Daniel Finnie" <dan@...> 2008/04/23

Hi,

[#299239] Re: Extract date from filenames using regex — Clement Ow <clement.ow@...> 2008/04/23

Daniel Finnie wrote:

[#299273] HTTP::Post - HTTP::Get (Can someone help me?) — Fred <nospam@...>

Hello,

18 messages 2008/04/23
[#299318] Re: HTTP::Post - HTTP::Get (Can someone help me?) — darren kirby <bulliver@...> 2008/04/23

quoth the Fred:

[#299387] Re: HTTP::Post - HTTP::Get (Can someone help me?) — Fred <nospam@...> 2008/04/24

Thanx Darren for the info

[#299407] Re: HTTP::Post - HTTP::Get (Can someone help me?) — Fred <nospam@...> 2008/04/24

resp.body is a php page => purpose is to see of step 1 is working

[#299408] Re: HTTP::Post - HTTP::Get (Can someone help me?) — Fred <nospam@...> 2008/04/24

The First step is to insert javascript into PHP page.

[#299360] Email/SMTP::NET Problems — Brantley Shields <brantley_shields@...>

Greetings,

26 messages 2008/04/24

[#299463] Pointer concept in Ruby ? — "Iñaki Baz Castillo" <ibc@...>

SGksIEknZCBsaWtlIHRvIGhhdmUgYSB2YXJpYWJsZSBwb2ludGluZyB0byBhIEhhc2gvQXJyYXkg

16 messages 2008/04/24

[#299479] Function appends same value to string based on number of function calls — vannuys@...

Hi Guys,

9 messages 2008/04/24

[#299508] pretty folder tree script — John <john.d.perkins@...>

Hola,

20 messages 2008/04/24

[#299531] Is there any nomenclature for private methods? — Iñaki Baz Castillo <ibc@...>

Hi, I don't like the way of declaring publi and private methods since it's =

12 messages 2008/04/24

[#299585] Ruby Minimalism — aidy <aidy.lewis@...>

Hi,

16 messages 2008/04/25

[#299608] Array inject function problem — Inbroker Adams <dadravu@...>

Hello Rubyists,

19 messages 2008/04/25

[#299701] help re recording/replaying (i.e. automating) HTTP interactions to a web-site??? — "Greg Hauptmann" <greg.hauptmann.ruby@...>

Hi,

13 messages 2008/04/26
[#299705] Re: help re recording/replaying (i.e. automating) HTTP interactions to a web-site??? — Peter Szinek <peter@...> 2008/04/26

Greg,

[#299749] Re: help re recording/replaying (i.e. automating) HTTP interactions to a web-site??? — "Greg Hauptmann" <greg.hauptmann.ruby@...> 2008/04/26

sounds good, it support:

[#299750] Re: help re recording/replaying (i.e. automating) HTTP interactions to a web-site??? — "Greg Hauptmann" <greg.hauptmann.ruby@...> 2008/04/26

PS. 4th question Peter I forgot:

[#299714] All occurances of a character in a string — Raghu Go <rgowka1@...>

Hi - I am trying to figure out the ruby way of printing all occurances

14 messages 2008/04/26

[#299742] Typed ruby — Joe K <jkauzlar@...>

I realize there is a holy war attached to this subject, but it would be nice

15 messages 2008/04/26

[#299768] Transpose a large file(>2GB) — Ams Lo <rgowka1@...>

Hi -

18 messages 2008/04/27

[#299798] Ruby For Hackers — Luka Lukako <dezertir@...>

Anybody know how to writing Keyloggers in ruby, or trojans or other

21 messages 2008/04/27
[#299805] Re: Ruby For Hackers — Tim Hunter <TimHunter@...> 2008/04/27

Luka Lukako wrote:

[#299863] Apache2 conf and mod_ruby (mac os x 10.4.11) — unbewusst.sein@... (Une B騅ue)

15 messages 2008/04/28

[#299946] Array#first is not Array#[0] — Fredrik <fredjoha@...>

I made a class that is a subclass of Array :

19 messages 2008/04/29

[#300023] rails is a mess! — jOhn <netcam@...>

I have to say that rails is such a mess right now. Notta working and it

15 messages 2008/04/29

[#300077] Levenshtein_distance and recreate the string — Ams Lo <rgowka1@...>

Hi -

12 messages 2008/04/30

[#300078] What are the weaknesses in Ruby? — tenxian <hi.steven.tu@...>

What are the disadvantages of Ruby?

18 messages 2008/04/30

[#300135] How to create "def method(item)= (value)" ? — "Iñaki Baz Castillo" <ibc@...>

SGksIGlzIGl0IG5vdCBwb3NzaWJsZSB0byBjcmVhdGUgYSBtZXRob2QgdG8gdXNlIGluIHRoaXMg

28 messages 2008/04/30
[#300140] Re: How to create "def method(item)= (value)" ? — Phillip Gawlowski <cmdjackryan@...> 2008/04/30

-----BEGIN PGP SIGNED MESSAGE-----

[#300141] Re: How to create "def method(item)= (value)" ? — "David A. Black" <dblack@...> 2008/04/30

Hi --

[#300144] Re: How to create "def method(item)= (value)" ? — Phillip Gawlowski <cmdjackryan@...> 2008/04/30

-----BEGIN PGP SIGNED MESSAGE-----

[#300157] Search string for occurneces of words stored in array — John Butler <johnnybutler7@...>

Hi,

15 messages 2008/04/30

Re: WeakRef -- excessive memory usage?

From: David Beswick <"david mail"@...>
Date: 2008-04-16 09:40:08 UTC
List: ruby-talk #298452
Thanks for your help Rick.

I didn't realise irb was a bad tool to test memory usage. I've written a 
standard ruby program. Comments about the memory usage I observed at 
each step are included. This program indicates to me that the WeakRef 
implementation does require more memory than I'd assumed they would.



require 'WeakRef'

s = 'Hello'
a = []

GC.start

puts 'Start'
gets
   # Memory Usage: 2,652K

100.times do
   a << WeakRef.new(s)
end

GC.start

puts '100 WeakRef instances in array'
gets
   # Memory Usage: 53,360K

GC.start

puts 'Additional GC (ensure temporary data incurred by WeakRef instances 
is released)'
gets
   # Memory Usage: 53,360K

a = nil
GC.start

puts 'Array GCed'
gets
   # Memory Usage: 19,128K

GC.start

puts 'Additional GC (ensure release of WeakRefs)'
gets
   # Memory Usage: 18,996K

GC.start

puts '2nd Additional GC (ensure release of WeakRefs)'
gets
   # Memory Usage: 18,996K



Here's all I can think of that might be consuming memory in the WeakRef 
implementation:

WeakRef
1. Standard ruby object instance overhead
2. "Int" instance var (object_id of target)
3. Hash entry (WeakRef -> object_id of target)
4. Hash entry + array entry (object_id of target -> array of weakrefs)

It doesn't look like a look of data. But WeakRef also inherits from 
Delegator, maybe it's this class that's pushing up memory usage?

As a quick test I modified weakref.rb so that it no longer inherited 
from "Delegator," and I ran my test program again. The memory usage 
hardly moved from the value taken at startup. So I think "Delegator" is 
the culprit.

I can only guess at what might be causing it for now, but I've got a 
feeling it's the "eval" block in Delegator::initalize, which looks like 
it makes a new class method for each method in "obj" not belonging to an 
ancestor. Still, even if this is executed every time WeakRef is 
instantiated, I'd expect the data associated with the existing methods 
to be discarded every time the eval block executed again. Unless, maybe 
a new metaclass is created each time the methods are 'overridden' by the 
instantiation of the new WeakRef instance?

There's my ideas!

David



Rick DeNatale wrote:
> 2008/4/15 mail"@ruby-lang.org David Beswick <"david>:
>> Thanks for your reply Derek. I can definitely see that the intepreter is
>>  freeing memory over the course of the run.
>>
>>  In my original example, I made sure to add WeakRefs to an array to
>>  ensure that they wouldn't get garbage collected. The reason I still
>>  think WeakRef is using an unusual amount of memory is that when I assign
>>  that array reference to nil on the completion of the run and call
>>  GC.start, memory usage goes down from around 150mb to 20mb (for example).
>>
>>  So, I can see that ruby hasn't completely shrunk its heap back down to
>>  the original size (as you say, it must reserve the memory as per its
>>  memory management algorithm). But this also means that the WeakRef
>>  objects were using a large amount of the heap, since the majority of the
>>  heap was released once the references to the WeakRefs were released.
>>
>>  What it is about WeakRef's implementation that might cause this?
> 
> A few observations:
> 
> 1) The job of the GC is to preserve any reachable objects while
> reclaiming the space taken up by non-reachable objects.  The first
> part of this is a bit more important than the second, since freeing a
> referenced object can lead to mysterious errors when a reference is
> followed.
> 
> 2) Irb is not a good tool for doing experiments with GC. The reason is
> that it has references itself which can cause objects to hang around
> which you might not expect.
> 
> 3) WeakRefs themselves take up space.  In the 1.8 implementation each
> WeakRef is a ruby object which will have a class pointer, and an
> instance variable hash to hold it's one instance var which hangs on to
> the object id of the object it's referenceing.  Then there are two
> class variables which point to hashes.  One hash has an entry for each
> WeakRef object and maps it to the id of the object it references, the
> other hash maps the object id of each object referenced by a WeakRef
> to an array of WeakRefs referring to that object.  The entries in
> those hashes are set when the WeakRef is created, and manipulated by a
> finalizer, which deletes the appropriate entries in each of the hashes
> when a weakly referenced object is GCed.  I haven't added it all up
> but I suspect that each WeakRef takes more storage than your string
> "Hello"
> 

In This Thread

Prev Next