[#326447] Python to Ruby Tutorial (need collborators) — r <rt8396@...>

Hello all,

20 messages 2009/02/01

[#326520] Minor 1.8 <-> 1.9 performance comparison gotcha — Gregory Brown <gregory.t.brown@...>

Excited and inspired by the Ruby 1.9.1 release, I wrote a blog post

10 messages 2009/02/02

[#326548] Quicker finding strings? Alternative for array, hash, set? — Patrick Put <patrick.put@...>

I've been searching for this information already, but cannot really find

10 messages 2009/02/02

[#326553] Variable declarations on one line — Frisco Del rosario <friscodelrosario@...>

a="al", b="bob", c="carl"

11 messages 2009/02/02

[#326570] Native gem roundup! — Charles Oliver Nutter <charles.nutter@...>

I'm curious what native gems/extensions people are typically using. In

40 messages 2009/02/02
[#326654] Re: Native gem roundup! — Tom Cloyd <tomcloyd@...> 2009/02/02

Charles Oliver Nutter wrote:

[#326607] How to tell if one is running 32 or 64 bit Ruby on Mac OS X? — Wes Gamble <weyus@...>

All,

14 messages 2009/02/02

[#326646] Hash counting — Stuart Clarke <stuart.clarke1986@...>

I am trying to load some data into a hash and then count how many times

22 messages 2009/02/02
[#326655] Re: Hash counting — Robert Klemme <shortcutter@...> 2009/02/02

On 02.02.2009 21:43, Stuart Clarke wrote:

[#326665] Re: Hash counting — Stuart Clarke <stuart.clarke1986@...> 2009/02/02

Thanks Robert.

[#326669] Re: Hash counting — Stuart Clarke <stuart.clarke1986@...> 2009/02/02

I have worked out the problem but I am a little unsure how to solve it.

[#326717] Re: Hash counting — Robert Klemme <shortcutter@...> 2009/02/03

2009/2/3 Stuart Clarke <stuart.clarke1986@gmail.com>:

[#326756] Re: Hash counting — Stuart Clarke <stuart.clarke1986@...> 2009/02/03

Thanks for replying and sorry for the confusion.

[#326758] Re: Hash counting — Robert Klemme <shortcutter@...> 2009/02/03

2009/2/3 Stuart Clarke <stuart.clarke1986@gmail.com>:

[#326762] Re: Hash counting — Stuart Clarke <stuart.clarke1986@...> 2009/02/03

Ok I will get straight to the code causing the problem, so first off you

[#326680] Is there an 'offical' Ruby binary for Windows? — Heesob Park <phasis@...>

I know that there are at least three Ruby Windows distributions.

12 messages 2009/02/03

[#326703] A Tk window — Albert Schlef <albertschlef@...>

I have a program that run in the terminal. But once in a while I need it

22 messages 2009/02/03

[#326761] 1.9.1? — yuckysocks <alex.m.mcpherson@...>

Hi there,

26 messages 2009/02/03

[#326858] Using a Class (not an instance) into threads — Iñaki Baz Castillo <ibc@...>

Hi, i'm using Ragel parser generating Ruby code. The generated code

19 messages 2009/02/04

[#326897] Making object methods available externally — David Stanford <dthomas53@...>

Hi all,

14 messages 2009/02/04

[#326953] a simple command that splits up a string into numbers and letters — shawn bright <nephish@...>

Hey all,

10 messages 2009/02/05

[#326957] Watir is acting retarded — Daniel Waite <rabbitblue@...>

This...

13 messages 2009/02/05

[#327048] Full Ruport Book manuscripts now on Github — Gregory Brown <gregory.t.brown@...>

Hi folks,

14 messages 2009/02/05
[#327088] Re: [ANN] Full Ruport Book manuscripts now on Github — Robert Dober <robert.dober@...> 2009/02/06

On Thu, Feb 5, 2009 at 11:51 PM, Gregory Brown

[#327103] Re: [ANN] Full Ruport Book manuscripts now on Github — Gregory Brown <gregory.t.brown@...> 2009/02/06

On Fri, Feb 6, 2009 at 6:08 AM, Robert Dober <robert.dober@gmail.com> wrote:

[#327171] Re: [ANN] Full Ruport Book manuscripts now on Github — Rick DeNatale <rick.denatale@...> 2009/02/06

On Fri, Feb 6, 2009 at 8:50 AM, Gregory Brown <gregory.t.brown@gmail.com>wrote:

[#327172] Re: [ANN] Full Ruport Book manuscripts now on Github — Gregory Brown <gregory.t.brown@...> 2009/02/06

On Fri, Feb 6, 2009 at 4:46 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#327060] Method Precedence — Daly <aeldaly@...>

Hello all,

15 messages 2009/02/06

[#327126] Mathematical Image Generator (#191) — Daniel Moore <yahivin@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

11 messages 2009/02/06

[#327129] Special Hash Constructors — Robert Klemme <shortcutter@...>

15 messages 2009/02/06

[#327146] eval statement — Jonathan Wills <runningwild@...>

Trying to switch a project of mine from python to ruby. Love ruby so

26 messages 2009/02/06

[#327215] Module#=== vs Object#is_a? — Peter Fitzgibbons <peter.fitzgibbons@...>

HI All,

14 messages 2009/02/07

[#327223] cannot remove multiple spaces — Tom Cloyd <tomcloyd@...>

I'm baffled by this strange outcome - I cannot reduce multiple spaces

16 messages 2009/02/07

[#327224] Ruby vs Perl performance — Vetrivel Vetrivel <vetrivel.bksys@...>

I have downloaded perl and ruby program in net.I run both the

77 messages 2009/02/07
[#327260] Re: Ruby vs Perl performance — Igor Pirnovar <gooigpi@...> 2009/02/07

Vetrivel Vetrivel wrote:

[#327393] Re: Ruby vs Perl performance — Chad Perrin <perrin@...> 2009/02/09

On Sun, Feb 08, 2009 at 03:22:20AM +0900, Igor Pirnovar wrote:

[#327444] Re: Ruby vs Perl performance — Robert Klemme <shortcutter@...> 2009/02/09

Chad, I generally agree, however...

[#327471] Re: Ruby vs Perl performance — David Masover <ninja@...> 2009/02/09

Robert Klemme wrote:

[#327483] Re: Ruby vs Perl performance — Robert Klemme <shortcutter@...> 2009/02/09

On 09.02.2009 19:15, David Masover wrote:

[#327489] Re: Ruby vs Perl performance — David Masover <ninja@...> 2009/02/09

Robert Klemme wrote:

[#327564] Re: Ruby vs Perl performance — Robert Klemme <shortcutter@...> 2009/02/10

2009/2/9 David Masover <ninja@slaphack.com>:

[#327573] Re: Ruby vs Perl performance — David Masover <ninja@...> 2009/02/10

Robert Klemme wrote:

[#327306] ruby interpreter written in ruby.. — Eelco <catsquotl@...>

Hi there,

13 messages 2009/02/08

[#327332] calling random — Boris Schmid <borisschmid@...>

Apologies, I have been out of using ruby for a while, and ran into

12 messages 2009/02/08

[#327346] best way to protect class instance variables — Barun Singh <barunio@...>

Suppose I generate a class instance variable and create an accessor

10 messages 2009/02/08

[#327403] Ruby file to Executable file -- for all OS — jazzez ravi <jazzezravi@...>

Hi All,

13 messages 2009/02/09
[#327521] Re: Ruby file to Executable file -- for all OS — jazzez ravi <jazzezravi@...> 2009/02/10

[#327525] Re: Ruby file to Executable file -- for all OS — David Masover <ninja@...> 2009/02/10

jazzez ravi wrote:

[#327419] Which is the best development environment? Windows Vs Linux — priyankeshu <priyankeshu.parihar@...>

I just started learnign Rails and i think it's quite cool! I have just

14 messages 2009/02/09

[#327434] regexp problem — Joao Silva <rubyforum@...>

how i can extract:

21 messages 2009/02/09

[#327492] Got SystemStackError exception: stack level too deep — Bezan Kapadia <bezan99@...>

I have master Process that is forking 2 child processes in the

16 messages 2009/02/09
[#327494] Re: Got SystemStackError exception: stack level too deep — Tony Arcieri <tony@...> 2009/02/09

On Mon, Feb 9, 2009 at 4:12 PM, Bezan Kapadia <bezan99@gmail.com> wrote:

[#327498] Re: Got SystemStackError exception: stack level too deep — Bezan Kapadia <bezan99@...> 2009/02/10

I see ...

[#327510] Ruby GUI Survey: Results — Alex Fenton <alex@...>

The results of the survey of Ruby GUI programming carried out at the end

13 messages 2009/02/10

[#327522] a better way to do this job? — Zhenning Guan <g.zhen.ning@...>

topics.each do |f|

34 messages 2009/02/10
[#327532] Re: a better way to do this job? — Ryan Davis <ryand-ruby@...> 2009/02/10

[#327542] Re: a better way to do this job? — Julian Leviston <julian@...> 2009/02/10

First doesn't take an argument I'm ruby. It does

[#327560] Float in Spreadsheet — Jim Burgess <igsnhelp@...>

Hi,

15 messages 2009/02/10
[#327852] Re: Float in Spreadsheet — Jim Burgess <igsnhelp@...> 2009/02/12

Can no one help me?

[#327610] how to do the recursion — Li Chen <chen_li3@...>

Hi all,

14 messages 2009/02/11

[#327704] If you are unhappy with the direction of Ruby 1.8.7+, respond — Gregory Brown <gregory.t.brown@...>

I am setting up two threads in the hopes that we can see names

188 messages 2009/02/11
[#327721] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — "M. Edward (Ed) Borasky" <zznmeb@...> 2009/02/11

I've posted my opinions on Ruby-Core, but I'll summarize them here:

[#327756] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Rick DeNatale <rick.denatale@...> 2009/02/11

On Wed, Feb 11, 2009 at 12:10 PM, Gregory Brown

[#327769] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Pit Capitain <pit.capitain@...> 2009/02/11

2009/2/11 Rick DeNatale <rick.denatale@gmail.com>:

[#327774] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Gray <james@...> 2009/02/11

On Feb 11, 2009, at 3:42 PM, Pit Capitain wrote:

[#327892] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Stefan Lang <perfectly.normal.hacker@...> 2009/02/12

2009/2/11 James Gray <james@grayproductions.net>:

[#327897] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Coglan <jcoglan@...> 2009/02/12

>

[#327901] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Stefan Lang <perfectly.normal.hacker@...> 2009/02/12

2009/2/12 James Coglan <jcoglan@googlemail.com>:

[#327905] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Coglan <jcoglan@...> 2009/02/12

>

[#327910] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Stefan Lang <perfectly.normal.hacker@...> 2009/02/12

2009/2/12 James Coglan <jcoglan@googlemail.com>:

[#327914] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Ezra Zygmuntowicz <ezmobius@...> 2009/02/12

[#327918] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Gregory Brown <gregory.t.brown@...> 2009/02/12

On Thu, Feb 12, 2009 at 12:22 PM, Ezra Zygmuntowicz <ezmobius@gmail.com> wrote:

[#327954] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Pit Capitain <pit.capitain@...> 2009/02/12

2009/2/12 Gregory Brown <gregory.t.brown@gmail.com>:

[#327957] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Gregory Brown <gregory.t.brown@...> 2009/02/12

On Thu, Feb 12, 2009 at 1:59 PM, Pit Capitain <pit.capitain@gmail.com> wrote:

[#327919] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Rick DeNatale <rick.denatale@...> 2009/02/12

On Thu, Feb 12, 2009 at 12:22 PM, Ezra Zygmuntowicz <ezmobius@gmail.com>wrote:

[#328043] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — "William James" <w_a_x_man@...> 2009/02/13

James Coglan wrote:

[#328073] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — Rick DeNatale <rick.denatale@...> 2009/02/13

On Fri, Feb 13, 2009 at 4:53 AM, William James <w_a_x_man@yahoo.com> wrote:

[#328076] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — "David A. Black" <dblack@...> 2009/02/13

Hi --

[#328079] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Coglan <jcoglan@...> 2009/02/13

2009/2/13 David A. Black <dblack@rubypal.com>

[#328082] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — "David A. Black" <dblack@...> 2009/02/13

Hi --

[#328084] Re: If you are unhappy with the direction of Ruby 1.8.7+, respond — James Coglan <jcoglan@...> 2009/02/13

>

[#327705] If you are happy with the direction of Ruby 1.8.7+, respond — Gregory Brown <gregory.t.brown@...>

I am setting up two threads in the hopes that we can see names

31 messages 2009/02/11

[#327754] Array uniq — Stuart Little <stuart_clarke1986@...>

I am having some troubles with the uniq method for arrays. This is a

18 messages 2009/02/11

[#328065] Meaning of "<<"? — Chris Davies <chris-usenet@...>

Hi,

15 messages 2009/02/13

[#328140] Good GUI documentation — Ruby Student <ruby.student@...>

Hello all you happy GUIsher!

27 messages 2009/02/13

[#328261] Multidimensional hash - get all not blank keys — "Michael .." <xinu@...>

Hello.

13 messages 2009/02/15

[#328279] Iterating a changing Hash under 1.9.1 — Phrogz <phrogz@...>

The following code shows that Hash#each under 1.9.1p0 does not iterate

18 messages 2009/02/15

[#328320] invalid byte sequence in US-ASCII (ArgumentError) — Luther <lutheroto@...>

I'm having some trouble migrating from 1.8 to 1.9.1. I have this line of

20 messages 2009/02/16
[#328321] Re: invalid byte sequence in US-ASCII (ArgumentError) — Tim Hunter <TimHunter@...> 2009/02/16

Luther wrote:

[#328333] Re: invalid byte sequence in US-ASCII (ArgumentError) — Luther <lutheroto@...> 2009/02/16

On Mon, 2009-02-16 at 09:19 +0900, Tim Hunter wrote:

[#328349] Re: invalid byte sequence in US-ASCII (ArgumentError) — Tom Link <micathom@...> 2009/02/16

> but now I know my program will puke

[#328323] ffi-ncurses version 0.3.0 — "Sean O'Halpin" <sean.ohalpin@...>

ffi-ncurses version 0.3.0

10 messages 2009/02/16

[#328338] vim for ruby — Bharat Ruparel <bcruparel@...>

I am using Ubuntu 7.10. I installed vim-ruby package to get the ruby

19 messages 2009/02/16
[#328397] Re: vim for ruby — Bertram Scharpf <lists@...> 2009/02/16

Hi,

[#328345] What are your favorite Ruby features? — Tony Arcieri <tony@...>

I'm creating a new language which borrows heavily from Ruby, and I'm curious

71 messages 2009/02/16
[#328379] Re: What are your favorite Ruby features? — Robert Dober <robert.dober@...> 2009/02/16

On Mon, Feb 16, 2009 at 5:26 AM, Tony Arcieri <tony@medioh.com> wrote:

[#328382] Re: What are your favorite Ruby features? — "David A. Black" <dblack@...> 2009/02/16

Hi --

[#328395] Re: What are your favorite Ruby features? — Robert Dober <robert.dober@...> 2009/02/16

On Mon, Feb 16, 2009 at 12:36 PM, David A. Black <dblack@rubypal.com> wrote=

[#328400] Re: What are your favorite Ruby features? — "David A. Black" <dblack@...> 2009/02/16
[#328419] Re: What are your favorite Ruby features? — Robert Dober <robert.dober@...> 2009/02/16

On Mon, Feb 16, 2009 at 2:13 PM, David A. Black <dblack@rubypal.com> wrote:

[#328452] Re: What are your favorite Ruby features? — Brian Candler <b.candler@...> 2009/02/16

Tony Arcieri wrote:

[#328473] Re: What are your favorite Ruby features? — Tony Arcieri <tony@...> 2009/02/17

On Mon, Feb 16, 2009 at 1:31 PM, Brian Candler <b.candler@pobox.com> wrote:

[#328498] Re: What are your favorite Ruby features? — David Masover <ninja@...> 2009/02/17

Tony Arcieri wrote:

[#328523] Re: What are your favorite Ruby features? — Juan Zanos <juan_zanos@...> 2009/02/17

[#328532] Re: What are your favorite Ruby features? — Rick DeNatale <rick.denatale@...> 2009/02/17

On Tue, Feb 17, 2009 at 9:44 AM, Juan Zanos <juan_zanos@talkhouse.com>wrote=

[#328541] Re: What are your favorite Ruby features? — David Masover <ninja@...> 2009/02/17

Rick DeNatale wrote:

[#328596] Re: What are your favorite Ruby features? — Rick DeNatale <rick.denatale@...> 2009/02/18

On Tue, Feb 17, 2009 at 2:40 PM, David Masover <ninja@slaphack.com> wrote:

[#328600] Re: What are your favorite Ruby features? — Robert Dober <robert.dober@...> 2009/02/18

On Wed, Feb 18, 2009 at 2:38 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#328373] How to do this complicated logic in ruby — Valentino Lun <sumwo@...>

Dear all

10 messages 2009/02/16

[#328560] Tree structure - how do we link nodes together? — Aldric Giacomoni <"aldric[removeme]"@...>

I know I could just use rubytree, which looks quite nice, but I'd like

19 messages 2009/02/18

[#328702] literal syntax for array of arrays of strings — Joel VanderWerf <vjoel@...>

17 messages 2009/02/19

[#328775] How to do conditional compile for Ruby 1.9 in a C extension? — Jason Garber <jg@...>

I'm working on updating RedCloth for Ruby 1.9. Since the output of

14 messages 2009/02/19

[#328808] How does one generate a "main page" for rdoc documentation? — Kenneth McDonald <kenneth.m.mcdonald@...>

I tried

21 messages 2009/02/19
[#328814] Re: How does one generate a "main page" for rdoc documentation? — Rick DeNatale <rick.denatale@...> 2009/02/19

On Thu, Feb 19, 2009 at 4:24 PM, Kenneth McDonald <

[#328815] Re: How does one generate a "main page" for rdoc documentation? — Joel VanderWerf <vjoel@...> 2009/02/19

Rick DeNatale wrote:

[#328817] Re: How does one generate a "main page" for rdoc documentation? — Igor Pirnovar <gooigpi@...> 2009/02/19

Where did you get the syntax for your:

[#328825] Re: How does one generate a "main page" for rdoc documentation? — James Britt <james.britt@...> 2009/02/20

Igor Pirnovar wrote:

[#328833] Re: How does one generate a "main page" for rdoc documentation? — Tom Link <micathom@...> 2009/02/20

> > | rdoc --main maindocpage rex.rb |

[#328840] Re: How does one generate a "main page" for rdoc documentation? — James Britt <james.britt@...> 2009/02/20

Tom Link wrote:

[#328902] what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...>

hi there!

20 messages 2009/02/20
[#328947] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — Roger Pack <rogerpack2005@...> 2009/02/21

> isn't there any memory stable ruby version for windows?

[#329156] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...> 2009/02/23

Roger Pack wrote:

[#329172] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — Roger Pack <rogerpack2005@...> 2009/02/23

[#329275] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...> 2009/02/24

Roger Pack wrote:

[#329530] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — Roger Pack <rogerpack2005@...> 2009/02/25

neongrau __ wrote:

[#329592] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...> 2009/02/26

Roger Pack wrote:

[#329685] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — Roger Pack <rogerpack2005@...> 2009/02/26

> and don't have any compiler on my XP vmware installation yet.

[#329801] Re: what Ruby version to use on Windows for a 1.2.x RoR app? — neongrau __ <neongrau@...> 2009/02/27

i have no experience with git, i just did this:

[#328967] encoding problem with tr() and hash keys — Do One <do1@...>

Please help to understand solution to this problem (ruby 1.9.1):

17 messages 2009/02/21
[#329141] Re: encoding problem with tr() and hash keys — Brian Candler <b.candler@...> 2009/02/23

Do One wrote:

[#328981] How to call a module method dynamically — Adrian Klingel <adrian.klingel@...>

I know about object instantiation and the send method, but the methods I

11 messages 2009/02/21

[#329029] Nexus Programming Language — Avatar <acampbellb@...>

A new object-oriented programming language has been unofficially

133 messages 2009/02/21
[#329048] Re: Nexus Programming Language — Ken Bloom <kbloom@...> 2009/02/22

On Sat, 21 Feb 2009 15:37:34 -0800, Avatar wrote:

[#329136] Re: Nexus Programming Language — Chad Perrin <perrin@...> 2009/02/23

On Mon, Feb 23, 2009 at 01:09:34AM +0900, Ken Bloom wrote:

[#329138] Re: Nexus Programming Language — Eleanor McHugh <eleanor@...> 2009/02/23

On 23 Feb 2009, at 12:38, Chad Perrin wrote:

[#329177] Re: Nexus Programming Language — Chad Perrin <perrin@...> 2009/02/23

On Mon, Feb 23, 2009 at 09:48:44PM +0900, Eleanor McHugh wrote:

[#329183] Re: Nexus Programming Language — Eleanor McHugh <eleanor@...> 2009/02/23

On 23 Feb 2009, at 19:47, Chad Perrin wrote:

[#329184] Re: Nexus Programming Language — "M. Edward (Ed) Borasky" <zznmeb@...> 2009/02/23

On Mon, Feb 23, 2009 at 12:21 PM, Eleanor McHugh

[#329218] Re: Nexus Programming Language — Avatar <acampbellb@...> 2009/02/24

On Feb 23, 3:21=A0pm, Eleanor McHugh <elea...@games-with-brains.com>

[#329297] Re: Nexus Programming Language — Tom Cloyd <tomcloyd@...> 2009/02/24

Avatar wrote:

[#329365] Re: Nexus Programming Language — Eleanor McHugh <eleanor@...> 2009/02/25

On 24 Feb 2009, at 13:44, Tom Cloyd wrote:

[#329317] Re: Nexus Programming Language — pjb@... (Pascal J. Bourguignon) 2009/02/24

Gregory Brown <gregory.t.brown@gmail.com> writes:

[#329067] Improving hexadecimal escaping performance — Iñaki Baz Castillo <ibc@...>

Hi, I've a module with two methods (thanks Jeff):

11 messages 2009/02/23

[#329179] pointer and other questions — Daniel Schoch <trash@...>

Hi,

16 messages 2009/02/23
[#329182] Re: pointer and other questions — Robert Klemme <shortcutter@...> 2009/02/23

On 23.02.2009 21:00, Daniel Schoch wrote:

[#329187] Re: pointer and other questions — Daniel Schoch <trash@...> 2009/02/23

>

[#329330] Can Ruby interact with the shell sh ? — Raimon Fs <coder@...>

Hello,

12 messages 2009/02/24

[#329332] error trying to install ruby gems 1.3.1 — 7stud -- <bbxx789_05ss@...>

~/my_tar_extractions/rubygems-1.3.1$ sudo ruby setup.rb

12 messages 2009/02/24

[#329426] Where is splat implemented? / How does it work? — Mischa Fierer <f.mischa@...>

Hi --

12 messages 2009/02/25

[#329478] What is the Qur窶凖「n? — al albani <imanway123@...>

20 messages 2009/02/25

[#329532] Religious discussion — Julian Leviston <julian@...>

Hi all. I've thought quite a long time bout this, and I hope this is a

13 messages 2009/02/25
[#329657] Re: Religious discussion — Kyle Schmitt <kyleaschmitt@...> 2009/02/26

On Wed, Feb 25, 2009 at 4:19 PM, Julian Leviston <julian@coretech.net.au> wrote:

[#329554] Sample Chapter from "Ruby Best Practices" — Gregory Brown <gregory.t.brown@...>

== The short story

12 messages 2009/02/26

[#329671] Letter writing campaign to Jim — Aaron Patterson <aaron@...>

"Rake version 0.8.4 has been released!" is what you would be reading if

16 messages 2009/02/26
[#329683] Re: [ANN] Letter writing campaign to Jim — Gregory Brown <gregory.t.brown@...> 2009/02/26

On Thu, Feb 26, 2009 at 1:33 PM, Aaron Patterson

[#329710] Re: [ANN] Letter writing campaign to Jim — Aaron Turner <synfinatic@...> 2009/02/26

On Thu, Feb 26, 2009 at 11:37 AM, Gregory Brown

[#329715] Re: [ANN] Letter writing campaign to Jim — Aaron Patterson <aaron@...> 2009/02/26

On Fri, Feb 27, 2009 at 05:49:08AM +0900, Aaron Turner wrote:

[#329672] Any plans for a "OneClickInstaller for Ruby 1.9.1? — Ruby Student <ruby.student@...>

TWIMC,

10 messages 2009/02/26

[#329759] Setting the contents of a file to a variable? — Stefan Codrescu <fixxie.wits@...>

Ok so...

16 messages 2009/02/27
[#329766] Re: Setting the contents of a file to a variable? — Justin Collins <justincollins@...> 2009/02/27

Stefan Codrescu wrote:

[#330556] Re: Setting the contents of a file to a variable? — Stefan Codrescu <fixxie.wits@...> 2009/03/06

ok, thanks ill try that but i also found

[#330680] Re: Setting the contents of a file to a variable? — Brian Candler <b.candler@...> 2009/03/08

Stefan Codrescu wrote:

[#329804] How to find the specific row of CSV file. — Salil Gaikwad <salil@...>

I want to change or read only specific row of CSV file, i don't know how

18 messages 2009/02/27
[#329822] Re: How to find the specific row of CSV file. — James Gray <james@...> 2009/02/27

On Feb 27, 2009, at 8:19 AM, Salil Gaikwad wrote:

[#329883] Re: How to find the specific row of CSV file. — Salil Gaikwad <salil@...> 2009/02/28

My code is as follows

[#329905] Re: How to find the specific row of CSV file. — Craig Demyanovich <cdemyanovich@...> 2009/02/28

First, let's create a rough, high-level solution to your problem.

[#329985] Re: How to find the specific row of CSV file. — Salil Gaikwad <salil@...> 2009/03/01

thanx james & craig

[#329987] Re: How to find the specific row of CSV file. — Craig Demyanovich <cdemyanovich@...> 2009/03/01

On Sun, Mar 1, 2009 at 8:06 AM, Salil Gaikwad <salil@cipher-tech.com> wrote:

[#329990] Re: How to find the specific row of CSV file. — Salil Gaikwad <salil@...> 2009/03/01

thanx for quick reply

[#329871] Marshal.load does not create new instances? — Ian Trudel <ian.trudel@...>

Marshal does not seem to instantiate given class(es) on load. Moreover,

18 messages 2009/02/27
[#329875] Re: Marshal.load does not create new instances? — 7stud -- <bbxx789_05ss@...> 2009/02/28

Ian Trudel wrote:

[#329878] Re: Marshal.load does not create new instances? — Ian Trudel <ian.trudel@...> 2009/02/28

7stud -- wrote:

[#329900] Re: Marshal.load does not create new instances? — Pit Capitain <pit.capitain@...> 2009/02/28

2009/2/28 Ian Trudel <ian.trudel@gmail.com>:

[#329907] Re: Marshal.load does not create new instances? — Robert Klemme <shortcutter@...> 2009/02/28

2009/2/28 Pit Capitain <pit.capitain@gmail.com>:

[#329896] Hi..About Gsoc 2009 project ideas... — usw wickramasinghe <mastershield2007@...>

Hi,

15 messages 2009/02/28

[#329909] How to put multiple values into a variable. — Harry Nash <hjnash@...>

I am new to coding, I have tried to place a number of data strings into

11 messages 2009/02/28

[#329942] Priorities for JRuby 1.3 — Charles Oliver Nutter <charles.nutter@...>

With JRuby 1.2 almost out the door, we should talk a bit about where to

17 messages 2009/02/28

DRb::DRbBadScheme when using drbunix sockets, why?

From: John Stoffel <john@...>
Date: 2009-02-13 22:04:35 UTC
List: ruby-talk #328148
Hi,

I've been slowly hacking on my parallel recursive readdir()
implementation using a limited number of parallel processes, since as
you all know, Ruby threads are not truly parallel.

Anyway, I'm now getting wierd errors like the following:

  Starting DRb on server
  Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/stoffj-test_17986
  Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/stoffj-test_17986
  Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/stoffj-test_17986
  counter.count=1

And it's not really clear to my *why* I'm getting these errors, or how I
can trap them so I'm not bothered by them.  The basic code uses both DRb
and Slave libraries to make the interprocess communication simpler, and
to have a central counting server to regulate the number of
sub-processes I'll be using at any one point in time.

So, first off, here's a full set of output of my code on a test
directory.

Thanks for any hints or suggestions.  I *think* I need to use begin ...
rescue ... end blocks possibly, but it's not clear where.  Oh yeah, I'm
running this all on a CentOS 5.2 (RHEL5.2) Final system, against a small
350Mb test directory tree.

Thanks,
John

------------------------------- log ----------------------------------

$ ./readdir-drb.rb tmp
Starting DRb on server
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/stoffj-test_17986
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/stoffj-test_17986
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/stoffj-test_17986
counter.count=1
 Threaded!
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/slave_proc_537506070_17986_17988_0_0.125356081811465
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/slave_proc_537506070_17986_17988_0_0.125356081811465
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/slave_proc_537506070_17986_17988_0_0.125356081811465
 Threaded!
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/slave_proc_537512250_17988_17989_0_0.20115187038118
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/slave_proc_537512250_17988_17989_0_0.20115187038118
Exception `DRb::DRbBadScheme' at /usr/lib/ruby/1.8/drb/drb.rb:814 -
drbunix:///tmp/slave_proc_537512250_17988_17989_0_0.20115187038118
size = 372104960
size = 373477128
Exception `NameError' at /usr/lib/ruby/site_ruby/1.8/slave.rb:409 -
uninitialized constant Slave::DBb
Exception `RuntimeError' at /usr/lib/ruby/site_ruby/1.8/slave.rb:519 -
already shutdown
exit (SystemExit)
/usr/lib/ruby/site_ruby/1.8/slave.rb:265:in `exit'
/usr/lib/ruby/site_ruby/1.8/slave.rb:265:in `cling'
/usr/lib/ruby/site_ruby/1.8/slave.rb:259:in `call'
/usr/lib/ruby/site_ruby/1.8/slave.rb:259:in `on_cut'
/usr/lib/ruby/site_ruby/1.8/slave.rb:251:in `initialize'
/usr/lib/ruby/site_ruby/1.8/slave.rb:251:in `new'
/usr/lib/ruby/site_ruby/1.8/slave.rb:251:in `on_cut'
/usr/lib/ruby/site_ruby/1.8/slave.rb:265:in `cling'
/usr/lib/ruby/site_ruby/1.8/slave.rb:415:in `initialize'
/usr/lib/ruby/site_ruby/1.8/slave.rb:593:in `new'
/usr/lib/ruby/site_ruby/1.8/slave.rb:593:in `object'
./readdir-drb.rb:114:in `readdir'
./readdir-drb.rb:86:in `foreach'
./readdir-drb.rb:86:in `readdir'
./readdir-drb.rb:207

Total size: 373477128 B
Total size: 364723 KB
Total size: 356 MB
Total size: 0 GB
Exception `Errno::ENOENT' at /usr/lib/ruby/1.8/fileutils.rb:1281 - No
such file or directory -
/tmp/slave_proc_537506070_17986_17988_0_0.125356081811465
Exception `RuntimeError' at /usr/lib/ruby/site_ruby/1.8/slave.rb:519 -
already shutdown
rt3.taec.com:~/src/Tools/philesight-20081120$ Exception `NameError' at
/usr/lib/ruby/site_ruby/1.8/slave.rb:409 - uninitialized constant
Slave::DBb
Exception `Errno::ENOENT' at /usr/lib/ruby/1.8/fileutils.rb:1281 - No
such file or directory -
/tmp/slave_proc_537512250_17988_17989_0_0.20115187038118
Exception `IOError' at /usr/lib/ruby/1.8/drb/unix.rb:92 - stream closed
Exception `Errno::EBADF' at /usr/lib/ruby/1.8/drb/unix.rb:92 - Bad file
descriptor - ///tmp/slave_proc_537512250_17988_17989_0_0.20115187038118
/usr/lib/ruby/1.8/drb/unix.rb:92:in `close': Bad file descriptor -
///tmp/slave_proc_537512250_17988_17989_0_0.20115187038118
(Errno::EBADF)
        from /usr/lib/ruby/1.8/drb/unix.rb:92:in `close'
        from /usr/lib/ruby/1.8/drb/drb.rb:1433:in `run'
        from /usr/lib/ruby/1.8/drb/drb.rb:1427:in `start'
        from /usr/lib/ruby/1.8/drb/drb.rb:1427:in `run'
        from /usr/lib/ruby/1.8/drb/drb.rb:1347:in `initialize'
        from /usr/lib/ruby/1.8/drb/drb.rb:1627:in `new'
        from /usr/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
        from /usr/lib/ruby/site_ruby/1.8/slave.rb:396:in `initialize'
         ... 28 levels...
        from ./readdir-drb.rb:114:in `readdir'
        from ./readdir-drb.rb:86:in `foreach'
        from ./readdir-drb.rb:86:in `readdir'
        from ./readdir-drb.rb:207


--------------------------- source
--------------------------------------

And here's my source code, excuse my lack of Ruby knowledge, I'm a newb
to Ruby, though not to programming.  Hopefully that is shown.  :]

#!/usr/bin/ruby

require 'getoptlong'
require 'thread'
require 'slave'
require 'drb'
require 'drb/unix'

$VERSION = "v1.0";
$max_slaves = 3
$count = 50

# Local Socket - need to worry about multiple runs of this script, so
add on
# unique PID.
$URI = "drbunix:///tmp/stoffj-test_" + Process.pid.to_s

slave_cnt_mutex = Mutex.new

opts = GetoptLong.new(
                      [ "--help", "-h", GetoptLong::NO_ARGUMENT],
                      [ "--kids", "-k", GetoptLong::REQUIRED_ARGUMENT]
                      )

#---------------------------------------------------------------------
class Counter
  def initialize(max=1)
    @slaves = []
    @max = max
    @count = 1
    @count_mutex = Mutex.new
  end

  def count
    @count
  end

  def max
    @max
  end

  # Increment the count of slaves, returning 1 if incremented, 0 if not.
  def increment
    ok = nil
    @count_mutex.synchronize do
      if (@count < @max) then
        @count += 1
        ok = 1
      end
    end
    ok
  end

  # Decrement the count of slaves
  def decrement
    @count_mutex.synchronize do
      if (@count > 1) then
        @count -= 1
      end
    end
    @count
  end
end

#---------------------------------------------------------------------
class ReadDir
  def initialize(server)
    @server = server

    # Slave pool for this level of readdir() recursion.
    @kids = []

  end

  def readdir(dir)

    #puts "readdir(#{dir})"

    size_file = {}
    size_dir = {}
    size_total = 0

    # Traverse the directory and collect the size of all files and
    # directories

    begin
      Dir.foreach(dir) do |f|
        #print " #{f},"
        if(f != "." && f != "..") then
          f_full = addpath(dir, f)
          stat = File.lstat(f_full)

          if(!stat.symlink?) then

            if(stat.file?) then
              #puts "  File: #{f}"
              size = File.size(f_full)
              size_file[f] = size
              size_total += size
            end

            if(stat.directory?) then
              #puts "DIR= #{f}"
              if (@server.max <= 1) then
                puts " no threads."
                size = readdir(f_full)
                if (size > 0) then
                  size_dir[f] = size
                  size_total += size
                end
              else
                ok = @server.increment
                if (ok)
                  puts " Threaded!"
                  @kids << Slave.object(:async => true) {
                    size = readdir(f_full)
                    puts "size = #{size}"
                    # Duh... return the size from the slave properly
                    size
                  }
                else
                  #puts " no free threads, do anyway"
                  size = readdir(f_full)
                  if(size > 0) then
                    size_dir[f] = size
                    size_total += size
                  end
                end
              end
            end
          end
        end
      end
    end

    @kids.each { |kid|
      size_total += kid.value
    }

    #Puts "Dir: #{dir} = #{size_total}"
    return size_total
  end

end

#---------------------------------------------------------------------
# Read a directory and add to the database; this function is recursive
# for sub-directories


#---------------------------------------------------------------------
def usage
  puts
  puts "usage: readdir-drb [--kids NUM] <dir>"
  puts "  defaults to #{$max_kids} children"
  puts
  puts "  version: #{$version}"
  puts
end

#---------------------------------------------------------------------
def addpath(a, b)
  return a + b if(a =~ /\/$/)
  return a + "/" + b
end



#---------------------------------------------------------------------
# Main
#---------------------------------------------------------------------
$DEBUG = true

opts.each do |opt,arg|
  case opt
  when "--kids"
    $max_slaves = arg.to_i
  else
    usage
    exit
  end
end

if ARGV.length != 1
  puts "Missing dir argument (try --help)"
  exit 0
end

dir = ARGV.shift

# Start the DRb service.
puts "Starting DRb on server"
DRb.start_service $URI, Counter.new($max_slaves)

# Child
# Fire up the first slave process which will do the work of readdir()

DRb.start_service
counter = DRbObject.new_with_uri $URI

puts "counter.count=#{counter.count}"

# Fire up a new Kid Class readdir.
kid = ReadDir.new(counter)

# Now let's try to do a recursive readdir() algorith with threads.

size = kid.readdir(dir)

sizekb = size / 1024;
sizemb = sizekb / 1024;
sizegb = sizemb / 1024;

puts ""
puts "Total size: #{size} B"
puts "Total size: #{sizekb} KB"
puts "Total size: #{sizemb} MB"
puts "Total size: #{sizegb} GB"
-- 
Posted via http://www.ruby-forum.com/.

In This Thread

Prev Next