[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Optimizing Programs And Code them with Ruby way

serbulentu@gmail.com

3/11/2006 10:07:00 AM

Hi,

I am a newbie in Ruby. I wrote 2 small programs. Both are running with
no errors.

For the first program it simulates a service queue in the variables
musteri means customer and memur means worker of the bank. I would like
to know how can i write it in Ruby way and more optimized.

For the second one i try to read system process table log it and then
try to point programs which are using a lot of cpu and kill them. I use
ps and awk except Ruby. I would like to know how can i do it with pure
Ruby (without ps and awk ) and also with Ruby way. Thanks for all
answers

ps: Comments of the code are in turkish but i suppose codes is enough
for you. If it will be a problem i can translate them into english.

Serbulent UNSAL

1. http://nightwalkers.blogspot.com/2006/03...

2. http://nightwalkers.blogspot.com/2006/03/ruby-...

2 Answers

Clint

3/12/2006 12:04:00 AM

0

serbulentu@gmail.com wrote:
> Hi,
>
> I am a newbie in Ruby. I wrote 2 small programs. Both are running with
> no errors.
>
> For the first program it simulates a service queue in the variables
> musteri means customer and memur means worker of the bank. I would like
> to know how can i write it in Ruby way and more optimized.

Have you tried running it with 'ruby -rprofile'?

> For the second one i try to read system process table log it and then
> try to point programs which are using a lot of cpu and kill them. I use
> ps and awk except Ruby. I would like to know how can i do it with pure
> Ruby (without ps and awk ) and also with Ruby way. Thanks for all
> answers
>
> ps: Comments of the code are in turkish but i suppose codes is enough
> for you. If it will be a problem i can translate them into english.
>
> Serbulent UNSAL
>
> 1. http://nightwalkers.blogspot.com/2006/03...
>
> 2. http://nightwalkers.blogspot.com/2006/03/ruby-...

Mike

Heinrich

9/25/2013 6:27:00 PM

0

In article <hia649lbmmrt87osncqtqt4hlbadj4deni@4ax.com>,
The Revd <peeling@degenerate.Griks> wrote:

> What 'forgeries'?

we ask the questions you englissh pig

now go suck the queen's rectum