[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Suppress result output in irb?

Tom Pollard

10/5/2006 5:16:00 AM

Hi,

Is there a way to prevent irb from printing the result of a
expression to the terminal on a command-by-command basis? I'm trying
to use irb and soap4r to play around with a SOAP server and in many
cases the results are fairly long arrays; I'd like to be able to
prevent these from being displayed automatically. IPython, for
example, will suppress the output from a command if it's terminated
with a semicolon (';'). I was hoping for something similar in irb.

Thanks,

Tom

9 Answers

rickhg12hs

10/5/2006 5:27:00 AM

0

Tom Pollard wrote:
> Is there a way to prevent irb from printing the result of a
> expression to the terminal on a command-by-command basis? I'm trying
> to use irb and soap4r to play around with a SOAP server and in many
> cases the results are fairly long arrays; I'd like to be able to
> prevent these from being displayed automatically. IPython, for
> example, will suppress the output from a command if it's terminated
> with a semicolon (';'). I was hoping for something similar in irb.

For me, with irb 0.9.5(05/04/13) and ruby 1.8.5 (2006-08-25)
[i386-cygwin], a trailing semicolon _does_ suppress printing the result.

Tom Pollard

10/5/2006 5:44:00 AM

0

Tom Pollard asked:
> Is there a way to prevent irb from printing the result of a
> expression to the terminal on a command-by-command basis? I'm trying
> to use irb and soap4r to play around with a SOAP server and in many
> cases the results are fairly long arrays; I'd like to be able to
> prevent these from being displayed automatically. IPython, for
> example, will suppress the output from a command if it's terminated
> with a semicolon (';'). I was hoping for something similar in irb.

rickhg12hs responded:
> For me, with irb 0.9.5(05/04/13) and ruby 1.8.5 (2006-08-25)
> [i386-cygwin], a trailing semicolon _does_ suppress printing the
> result.

Thanks for the quick response.

When I try that (with the same version of irb, but ruby 1.8.4), irb
gives me the "waiting for you to finish the command" prompt.

>> 7+8
=> 15
>> 7+8;
?>

Are you sure that's not what you're getting, too?

Tom



Joel VanderWerf

10/5/2006 6:45:00 AM

0

Tom Pollard wrote:
> Hi,
>
> Is there a way to prevent irb from printing the result of a expression
> to the terminal on a command-by-command basis? I'm trying to use irb
> and soap4r to play around with a SOAP server and in many cases the
> results are fairly long arrays; I'd like to be able to prevent these
> from being displayed automatically. IPython, for example, will suppress
> the output from a command if it's terminated with a semicolon (';'). I
> was hoping for something similar in irb.

irb(main):002:0> "q"*1000; 0
=> 0

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Tom Pollard

10/5/2006 1:26:00 PM

0


On Oct 5, 2006, at 2:44 AM, Joel VanderWerf wrote:

> Tom Pollard wrote:
>> Hi,
>> Is there a way to prevent irb from printing the result of a
>> expression to the terminal on a command-by-command basis? I'm
>> trying to use irb and soap4r to play around with a SOAP server and
>> in many cases the results are fairly long arrays; I'd like to be
>> able to prevent these from being displayed automatically.
>> IPython, for example, will suppress the output from a command if
>> it's terminated with a semicolon (';'). I was hoping for
>> something similar in irb.
>
> irb(main):002:0> "q"*1000; 0
> => 0

Thanks. (I feel silly for not having thought of that last night.)
It's much better than nothing.

But, is there a good reason why irb itself couldn't suppress the
display of the results when you gave it a command with a trailing
semicolon? I don't see how that would break anything.

Tom

Gillard = Rudd in a frock

10/10/2012 6:36:00 PM

0

On Wed, 10 Oct 2012 18:41:52 +1100, "Farm1" <Here@there.sometimes>
wrote:

>"Gillard=Dudd in a frock." <flatulantdingo@deadspam.com> wrote in message
>news:mu1a78hetbp4vil1i5tbf3ihbi8g0shm7k@4ax.com...
>
>> http://tinyurl.c...
>
>Dud in a Dress, you might be interested in pedophilia but I am not. I do
>not care what sort of history history you end up as having in any number of
>search engines. I object very strongly to having the history of my viewing
>assoicated with pedophiles. I will not look at any future link you put up.

What you look at, or will not look at, is of no consequence whatsoever
to me.

Time you and bringnobrainalong rented a room together in a motel?
>
--

Where were the same "shocked and horrified" protesters when Bob Ellis,
ALP member and speech writer for Bob "Do Nothing" Carr said this about
Duck's Bum after her father's death?

"She fled an important conference, and a meeting with Vladimir Putin,
because her father had died at 83, and fled home weeping to Adelaide.

Leaving a battlefield because of a dear one's death is not what she
lets our soldiers do. They must stay, and fight to the battle's end.
Yet she thinks she is different somehow. She is allowed her girly
tears and her time off, playing hookey from her national obligations,
her duty".

And what about this scurrilous tweet from Bowen's wife, Rebecca
Mifsud?

"Alan Jones age 71. Avergae (sic) lifespan for an Australian male age
79. Patience my pretties #auspol bahahaha"

Farm1

10/11/2012 1:05:00 AM

0

"bringyagrogalong" <sofala@aapt.net.au> wrote in message
"Farm1" <H...@there.sometimes> wrote:
> "Gillard=Dudd in a frock." <flatulantdi...@deadspam.com> wrote:
>
> > http://tinyurl.c...
>
> Dud in a Dress, you might be interested in pedophilia but I am not. I do
> not care what sort of history history you end up as having in any number
> of
> search engines. I object very strongly to having the history of my viewing
> assoicated with pedophiles. I will not look at any future link you put up.

Well said!

Tranny's a weirdo.
__________________________

He's not the only one though. I live in the country in a relativley small
community, but there is more outward focus and knowledge of what is going on
in the wider world in my restricted community than I see from some posters
in this ng. If I had the energy, I'd wonder if they deliberately put on
blinkers or were just born thick, fixated or delusional.


Farm1

10/11/2012 3:47:00 AM

0

"Gillard=Dudd in a frock." <flatulantdingo@deadspam.com> wrote in message
news:rsfb78pmsucr0m443c8itva83mbqp7p18l@4ax.com...
> On Wed, 10 Oct 2012 18:41:52 +1100, "Farm1" <Here@there.sometimes>
> wrote:
>
>>"Gillard=Dudd in a frock." <flatulantdingo@deadspam.com> wrote in message
>>news:mu1a78hetbp4vil1i5tbf3ihbi8g0shm7k@4ax.com...
>>
>>> http://tinyurl.c...
>>
>>Dud in a Dress, you might be interested in pedophilia but I am not. I do
>>not care what sort of history history you end up as having in any number
>>of
>>search engines. I object very strongly to having the history of my
>>viewing
>>assoicated with pedophiles. I will not look at any future link you put
>>up.
>
> What you look at, or will not look at, is of no consequence whatsoever
> to me.

I am quite aware of that. If you had any considertion for others you would
not flaunt your obsessive interest in paedophilia so freely on usenet.
Personally I find your interest in it to be disgusting.


Gillard = Rudd in a frock

10/11/2012 8:13:00 PM

0

On Thu, 11 Oct 2012 14:46:58 +1100, "Farm1" <Here@there.sometimes>
wrote:

>"Gillard=Dudd in a frock." <flatulantdingo@deadspam.com> wrote in message
>news:rsfb78pmsucr0m443c8itva83mbqp7p18l@4ax.com...
>> On Wed, 10 Oct 2012 18:41:52 +1100, "Farm1" <Here@there.sometimes>
>> wrote:
>>
>>>"Gillard=Dudd in a frock." <flatulantdingo@deadspam.com> wrote in message
>>>news:mu1a78hetbp4vil1i5tbf3ihbi8g0shm7k@4ax.com...
>>>
>>>> http://tinyurl.c...
>>>
>>>Dud in a Dress, you might be interested in pedophilia but I am not. I do
>>>not care what sort of history history you end up as having in any number
>>>of
>>>search engines. I object very strongly to having the history of my
>>>viewing
>>>assoicated with pedophiles. I will not look at any future link you put
>>>up.
>>
>> What you look at, or will not look at, is of no consequence whatsoever
>> to me.
>
>I am quite aware of that. If you had any considertion for others you would
>not flaunt your obsessive interest in paedophilia so freely on usenet.
>Personally I find your interest in it to be disgusting.

LOL!

You sound as if you are just about ready to come out of the closet,
like your sock puppet, bringnobrainalong!

LOL!
>
--

Where were the same "shocked and horrified" protesters when Bob Ellis,
ALP member and speech writer for Bob "Do Nothing" Carr said this about
Duck's Bum after her father's death?

"She fled an important conference, and a meeting with Vladimir Putin,
because her father had died at 83, and fled home weeping to Adelaide.

Leaving a battlefield because of a dear one's death is not what she
lets our soldiers do. They must stay, and fight to the battle's end.
Yet she thinks she is different somehow. She is allowed her girly
tears and her time off, playing hookey from her national obligations,
her duty".

And what about this scurrilous tweet from Bowen's wife, Rebecca
Mifsud?

"Alan Jones age 71. Avergae (sic) lifespan for an Australian male age
79. Patience my pretties #auspol bahahaha"

Gillard = Rudd in a frock

10/11/2012 8:13:00 PM

0

On Wed, 10 Oct 2012 18:41:52 +1100, "Farm1" <Here@there.sometimes>
wrote:

>"Gillard=Dudd in a frock." <flatulantdingo@deadspam.com> wrote in message
>news:mu1a78hetbp4vil1i5tbf3ihbi8g0shm7k@4ax.com...
>
>> http://tinyurl.c...
>
>Dud in a Dress, you might be interested in pedophilia but I am not. I do
>not care what sort of history history you end up as having in any number of
>search engines. I object very strongly to having the history of my viewing
>assoicated with pedophiles. I will not look at any future link you put up.
>

Yes, you are a technical moron.

Use Internet Explorer, do you?

And that link was about a search for a pedophile, not pedophilia, you
moron.
--

Where were the same "shocked and horrified" protesters when Bob Ellis,
ALP member and speech writer for Bob "Do Nothing" Carr said this about
Duck's Bum after her father's death?

"She fled an important conference, and a meeting with Vladimir Putin,
because her father had died at 83, and fled home weeping to Adelaide.

Leaving a battlefield because of a dear one's death is not what she
lets our soldiers do. They must stay, and fight to the battle's end.
Yet she thinks she is different somehow. She is allowed her girly
tears and her time off, playing hookey from her national obligations,
her duty".

And what about this scurrilous tweet from Bowen's wife, Rebecca
Mifsud?

"Alan Jones age 71. Avergae (sic) lifespan for an Australian male age
79. Patience my pretties #auspol bahahaha"