[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

is it normal to be kicked out of irb?

Emmanuel Oga

7/3/2008 4:15:00 AM

Is it normal to be kicked off of irb when a Fatal error occurs ? I was
kicked of of it while testing this (kicked off != code halt with an
exception):

$ irb
irb(main):001:0> def is_prime?(n); ("1" * n) !~ /^1?$|^(11+?)\1+$/ ;
rescue NoMemoryError; puts "ouch"; end
=> nil
irb(main):002:0> is_prime?(2)
=> true
irb(main):005:0> is_prime?(100000000)
ouch
=> nil
irb(main):006:0> is_prime?(1000000000)
[FATAL] failed to allocate memory
$

p.s.: is_prime? method taken from
http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prim...
--
Posted via http://www.ruby-....

10 Answers

Bruce Dawkins

9/30/2007 9:52:00 PM

0

Nobody <not@home.anymore> wrote:
> danglingnoodle wrote:
>
>
> > I had a childhood acquaitance that joined with the US to go to
> > Vietnam.
>
> Probably bullshit but carry on.
>
>
I know a Marine who served in Vietnam back in the 1960's who has since been
recognized by being a recipient of the Carnegie Hero Fund Commission medal for
an act he performed a few years back, who doesn't like what's going on in Iraq,
and doesn't like Bush at all. He attacked and neutralized a guy who showed up
to his workplace and shot his colleague several times and killing him, one of
his hands was almost blown off by the gun the other guy had.

He's far from a murderous creep. The cretin he took down will never be free
again though.

Thinking that soldiers are killers by nature or are made so by their service is
an incredible leap of logic.

Nobody

9/30/2007 10:01:00 PM

0

Bruce Dawkins wrote:

> Nobody <not@home.anymore> wrote:
>> danglingnoodle wrote:
>>
>>
>> > I had a childhood acquaitance that joined with the US to go to
>> > Vietnam.
>>
>> Probably bullshit but carry on.
>>
>>
> I know a Marine who served in Vietnam back in the 1960's who has
> since been recognized by being a recipient of the Carnegie Hero
> Fund Commission medal for an act he performed a few years back,
> who doesn't like what's going on in Iraq, and doesn't like Bush at
> all. He attacked and neutralized a guy who showed up to his
> workplace and shot his colleague several times and killing him,
> one of his hands was almost blown off by the gun the other guy
> had.

Few suggest that all people in the military, past and present, MUST
like Bush.

> He's far from a murderous creep. The cretin he took down will
> never be free again though.

Danglingnoodle was suggesting that killing done while in the service
of the military is murder.

> Thinking that soldiers are killers by nature or are made so by
> their service is an incredible leap of logic.

It is one of the many 'leaps' danglingnoodle makes.



Bruce Dawkins

9/30/2007 10:27:00 PM

0

Nobody <not@home.anymore> wrote:
> Bruce Dawkins wrote:
>
> > Nobody <not@home.anymore> wrote:
> >> danglingnoodle wrote:
> >>
> >>
> >> > I had a childhood acquaitance that joined with the US to go to
> >> > Vietnam.
> >>
> >> Probably bullshit but carry on.
> >>
> >>
> > I know a Marine who served in Vietnam back in the 1960's who has
> > since been recognized by being a recipient of the Carnegie Hero
> > Fund Commission medal for an act he performed a few years back,
> > who doesn't like what's going on in Iraq, and doesn't like Bush at
> > all. He attacked and neutralized a guy who showed up to his
> > workplace and shot his colleague several times and killing him,
> > one of his hands was almost blown off by the gun the other guy
> > had.
>
> Few suggest that all people in the military, past and present, MUST
> like Bush.
>
>
That's for sure, but there is one picture of his that hit home. It was that of
an out door shower and him in it (from the waist up) in one of the base camps
and a very pesky VC sniper liked to use it as a target!

And, he was well into his late 50's when he took action that day at his
workplace.


I don't know how old you are, but being 50 myself, my father, my uncles, most
of my relatives and loads of their friends were in the second world war; along
with a great many of my friends parents as well.

When I grew up that was the "norm". When I was a kid, they'd prefer to drink
and talk about Glenn Miller music and the good times, not their adventures.
And none of them were poor sods suffering from PTSD.



Nobody

9/30/2007 11:17:00 PM

0

Bruce Dawkins wrote:

> Nobody <not@home.anymore> wrote:
>> Bruce Dawkins wrote:
>>
>> > Nobody <not@home.anymore> wrote:
>> >> danglingnoodle wrote:
>> >>
>> >>
>> >> > I had a childhood acquaitance that joined with the US to go
>> >> > to Vietnam.
>> >>
>> >> Probably bullshit but carry on.
>> >>
>> >>
>> > I know a Marine who served in Vietnam back in the 1960's who
>> > has since been recognized by being a recipient of the Carnegie
>> > Hero Fund Commission medal for an act he performed a few years
>> > back, who doesn't like what's going on in Iraq, and doesn't
>> > like Bush at all. He attacked and neutralized a guy who showed
>> > up to his workplace and shot his colleague several times and
>> > killing him, one of his hands was almost blown off by the gun
>> > the other guy had.
>>
>> Few suggest that all people in the military, past and present,
>> MUST like Bush.
>>
>>
> That's for sure, but there is one picture of his that hit home.
> It was that of an out door shower and him in it (from the waist
> up) in one of the base camps and a very pesky VC sniper liked to
> use it as a target!
>
> And, he was well into his late 50's when he took action that day
> at his workplace.

It is never too late to take action.

> I don't know how old you are, but being 50 myself, my father, my
> uncles, most of my relatives and loads of their friends were in
> the second world war; along with a great many of my friends
> parents as well.

I am over 50. Some of my relatives were in the wars also.

> When I grew up that was the "norm". When I was a kid, they'd
> prefer to drink and talk about Glenn Miller music and the good
> times, not their adventures. And none of them were poor sods
> suffering from PTSD.

Very true. It was always a bit tough getting anyone that was
actually 'there' to talk much about it. I have several friends that,
although Canadians, went to Vietnam as US Marines. They don't talk
much either. I tend to believe that the 'talkers' all seem to have
some sort of agenda.

Bruce Dawkins

10/1/2007 12:11:00 AM

0

Nobody <not@home.anymore> wrote:
> > When I grew up that was the "norm". When I was a kid, they'd
> > prefer to drink and talk about Glenn Miller music and the good
> > times, not their adventures. And none of them were poor sods
> > suffering from PTSD.
>
> Very true. It was always a bit tough getting anyone that was
> actually 'there' to talk much about it. I have several friends that,
> although Canadians, went to Vietnam as US Marines. They don't talk
> much either. I tend to believe that the 'talkers' all seem to have
> some sort of agenda.
>
True. You stole the words right out of my mouth.

dangdangdoodIe

10/1/2007 3:52:00 AM

0

In article <MPG.2169e46f1ff1e89c98993f@news.individual.net>,
Bruce Dawkins <bruce.dawkins022@excite.com> wrote:

> Nobody <not@home.anymore> wrote:
> > danglingnoodle wrote:
> >
> >
> > > I had a childhood acquaitance that joined with the US to go to
> > > Vietnam.
> >
> > Probably bullshit but carry on.
> >
> >
> I know a Marine who served in Vietnam back in the 1960's who has since been
> recognized by being a recipient of the Carnegie Hero Fund Commission medal for
> an act he performed a few years back, who doesn't like what's going on in Iraq,
> and doesn't like Bush at all. He attacked and neutralized a guy who showed up
> to his workplace and shot his colleague several times and killing him, one of
> his hands was almost blown off by the gun the other guy had.
>
> He's far from a murderous creep. The cretin he took down will never be free
> again though.
>
Well people get it into their heads from the media that "them bad, us good" and
everything has to fit through that filter or it doesn't reach the brain. So one
exception that proves their point disregards 5 others that disproves it.
Anyway, I'll be the murderous creep had a story as well.

> Thinking that soldiers are killers by nature or are made so by their service is
> an incredible leap of logic.


Oh, I thought the military taught soldiers to kill. Not sure where I got that
from.

.
--
the dang

Bruce Dawkins

10/1/2007 4:08:00 AM

0

dangdangdoodIe <notea-thanks@islandnet.com> wrote:
> In article <MPG.2169e46f1ff1e89c98993f@news.individual.net>,
> Bruce Dawkins <bruce.dawkins022@excite.com> wrote:
>
> > Nobody <not@home.anymore> wrote:
> > > danglingnoodle wrote:
> > >
> > >
> > > > I had a childhood acquaitance that joined with the US to go to
> > > > Vietnam.
> > >
> > > Probably bullshit but carry on.
> > >
> > >
> > I know a Marine who served in Vietnam back in the 1960's who has since been
> > recognized by being a recipient of the Carnegie Hero Fund Commission medal for
> > an act he performed a few years back, who doesn't like what's going on in Iraq,
> > and doesn't like Bush at all. He attacked and neutralized a guy who showed up
> > to his workplace and shot his colleague several times and killing him, one of
> > his hands was almost blown off by the gun the other guy had.
> >
> > He's far from a murderous creep. The cretin he took down will never be free
> > again though.
> >
> Well people get it into their heads from the media that "them bad, us good" and
> everything has to fit through that filter or it doesn't reach the brain. So one
> exception that proves their point disregards 5 others that disproves it.
> Anyway, I'll be the murderous creep had a story as well.
>
> > Thinking that soldiers are killers by nature or are made so by their service is
> > an incredible leap of logic.
>
>
> Oh, I thought the military taught soldiers to kill. Not sure where I got that
> from.
>
> .
>
Yes, they do. And when 60% of the midwest USA was flooded in the mid 1990s,
they were also saving lives. Firefighters are taught to put out fires, but
since they're more often than not, first responders, they put their lips on a
person and revive them. Most military pilots keep an eye out and find out
what is wrong, not drop bombs. Police? 90% of them never use their side arms
against people in their career, most of the time they talk to people.

How do you think?

penny

10/1/2007 5:15:00 AM

0

On Mon, 01 Oct 2007 03:52:22 GMT, dangdangdoodIe
<notea-thanks@islandnet.com> wrote:

>
>Oh, I thought the military taught soldiers to kill. Not sure where I got that
>from.


The US Army is now taught to "kill-kill" and not just "kill'.

The new US army kil-kill ethos , called the Warrior Ethos, was
introduced into the US Army in November 2003. It replaced the
Soldiers' Creed , a more humane ethos introduced in the post-Vietnam
era. It's led to the US army using excessive force in Iraq and
Afghanistan.

http://www.commondreams.org/headlines06/0...


Penny .

dangdangdoodIe

10/1/2007 3:02:00 PM

0

In article <MPG.216a3ca3307358ac98996a@news.individual.net>,
Bruce Dawkins <bruce.dawkins022@excite.com> wrote:

> dangdangdoodIe <notea-thanks@islandnet.com> wrote:
> > In article <MPG.2169e46f1ff1e89c98993f@news.individual.net>,
> > Bruce Dawkins <bruce.dawkins022@excite.com> wrote:
> >
> > > Nobody <not@home.anymore> wrote:
> > > > danglingnoodle wrote:
> > > >
> > > >
> > > > > I had a childhood acquaitance that joined with the US to go to
> > > > > Vietnam.
> > > >
> > > > Probably bullshit but carry on.
> > > >
> > > >
> > > I know a Marine who served in Vietnam back in the 1960's who has since been
> > > recognized by being a recipient of the Carnegie Hero Fund Commission medal for
> > > an act he performed a few years back, who doesn't like what's going on in Iraq,
> > > and doesn't like Bush at all. He attacked and neutralized a guy who showed up
> > > to his workplace and shot his colleague several times and killing him, one of
> > > his hands was almost blown off by the gun the other guy had.
> > >
> > > He's far from a murderous creep. The cretin he took down will never be free
> > > again though.
> > >
> > Well people get it into their heads from the media that "them bad, us good" and
> > everything has to fit through that filter or it doesn't reach the brain. So one
> > exception that proves their point disregards 5 others that disproves it.
> > Anyway, I'll be the murderous creep had a story as well.
> >
> > > Thinking that soldiers are killers by nature or are made so by their service is
> > > an incredible leap of logic.
> >
> >
> > Oh, I thought the military taught soldiers to kill. Not sure where I got that
> > from.
> >
> > .
> >
> Yes, they do. And when 60% of the midwest USA was flooded in the mid 1990s,
> they were also saving lives. Firefighters are taught to put out fires, but
> since they're more often than not, first responders, they put their lips on a
> person and revive them. Most military pilots keep an eye out and find out
> what is wrong, not drop bombs. Police? 90% of them never use their side arms
> against people in their career, most of the time they talk to people.
>
> How do you think?



Well there Bruce. I don't think we were talking about police and firemen now were we?
US.soldiers are taught not only to kill, but to kill-kill as Penny pointed out.

> > Thinking that soldiers are killers by nature or are made so by their service is
> > an incredible leap of logic.

Your statement denies reality.


--
the dang

Robert Dober

7/3/2008 10:29:00 AM

0

On Thu, Jul 3, 2008 at 6:15 AM, Emmanuel Oga <emmanueloga@gmail.com> wrote:
> Is it normal to be kicked off of irb when a Fatal error occurs ? I was
> kicked of of it while testing this (kicked off != code halt with an
> exception):
>
> $ irb
> irb(main):001:0> def is_prime?(n); ("1" * n) !~ /^1?$|^(11+?)\1+$/ ;
> rescue NoMemoryError; puts "ouch"; end
> => nil
> irb(main):002:0> is_prime?(2)
> => true
> irb(main):005:0> is_prime?(100000000)
> ouch
> => nil
> irb(main):006:0> is_prime?(1000000000)
> [FATAL] failed to allocate memory
> $
>
> p.s.: is_prime? method taken from
> http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prim...
> --
> Posted via http://www.ruby-....
>
>


It does not surprise me that IRB exits ungracefully in that case. BTW
it does not surprise me either that the backtracking regular
expression runs out of memory for such large numbers even if they are
even ;).

Cheers
Robert

--
http://ruby-smalltalk.blo...

---
AALST (n.) One who changes his name to be further to the front
D.Adams; The Meaning of LIFF