# Funniest Thing Evar!

**URL:** <https://rubytalk.org/t/funniest-thing-evar/18994>\
**Category:** ruby-talk\
**Created:** [15 June 2005 22:48 UTC](https://rubytalk.org/t/funniest-thing-evar/18994 "2005-06-15T22:48:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikolai\_Weibull](https://avatars.discourse-cdn.com/v4/letter/n/ce7236/32.png) [@Nikolai\_Weibull](https://rubytalk.org/u/Nikolai_Weibull)\
**Post date:** [15 June 2005 22:48 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/1 "2005-06-15T22:48:52Z")

</div>

% python  
Python 2.3.5 (#1, Apr 28 2005, 14:11:32)  
[GCC 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1,  
ssp-3.3.5.20050130-1, pie- on linux2  
Type "help", "copyright", "credits" or "license" for more information.

> > > quit  
> > > 'Use Ctrl-D (i.e. EOF) to exit.'

%

Man, seriously. That’s so fucking funny. Can’t we make irb do  
something similar? I really hate that irb quits on me when I write  
“quit” at the prompt. I’d much rather have it exit on me on ^D only. I  
especially like how they take the time to explain that ^D is EOF,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nikolai

> **···**
>
> --  
> Nikolai Weibull: now available free of charge at [http://bitwi.se/\](http://bitwi.se/%5C)!  
> Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.  
> main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

---

<div class="post-metadata">

**Author:** ![Bill\_Kelly](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@Bill\_Kelly](https://rubytalk.org/u/Bill_Kelly)\
**Post date:** [15 June 2005 23:06 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/2 "2005-06-15T23:06:38Z")

</div>

> % python  
> Python 2.3.5 (#1, Apr 28 2005, 14:11:32)  
> [GCC 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1,  
> ssp-3.3.5.20050130-1, pie- on linux2  
> Type "help", "copyright", "credits" or "license" for more information.  
> \>\>\> quit  
> \>\>\> 'Use Ctrl-D (i.e. EOF) to exit.'  
> \>\>\>  
> %
> 
> Man, seriously. That’s so fucking funny. Can’t we make irb do  
> something similar? I really hate that irb quits on me when I write  
> “quit” at the prompt. I’d much rather have it exit on me on ^D only. I  
> especially like how they take the time to explain that ^D is EOF,

I never understood that. 🙂 Let's find out what a lot of users naturally  
want to do, and add code to inform them they're wrong, rather than  
do what the user wanted.

That was one of my very first experiences with Python a few years  
back, and I quickly concluded the culture of There Really Is Only One  
Way To Do It was probably not for me... \<grin\>

Regards,

Bill

> **···**
>
> From: "Nikolai Weibull" \<mailing-lists.ruby-talk@rawuncut.elitemail.org\>

---

<div class="post-metadata">

**Author:** ![Charles\_Steinman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@Charles\_Steinman](https://rubytalk.org/u/Charles_Steinman)\
**Post date:** [15 June 2005 23:45 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/3 "2005-06-15T23:45:32Z")

</div>

Nikolai Weibull wrote:

> % python  
> Python 2.3.5 (#1, Apr 28 2005, 14:11:32)  
> [GCC 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1,  
> ssp-3.3.5.20050130-1, pie- on linux2  
> Type "help", "copyright", "credits" or "license" for more information.  
> \>\>\> quit  
> \>\>\> 'Use Ctrl-D (i.e. EOF) to exit.'  
> \>\>\>  
> %
> 
> Man, seriously. That's so fucking funny. Can't we make irb do  
> something similar? I really hate that irb quits on me when I write  
> "quit" at the prompt. I'd much rather have it exit on me on ^D only. I  
> especially like how they take the time to explain that ^D is EOF,

Just put "def exit() 'Use Ctrl-D (i.e. EOF) to exit.' end" in your  
..irbrc file. Then you'll never have to worry about it again.  
Personally, I don't have a problem with involuntarily typing "exit"  
into IRB. Anyway, the exit method is part of the standard library, not  
a function of IRB. I don't think changing it by default in IRB would be  
a good thing.

---

<div class="post-metadata">

**Author:** ![John\_Carter](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@John\_Carter](https://rubytalk.org/u/John_Carter)\
**Post date:** [16 June 2005 02:52 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/4 "2005-06-16T02:52:26Z")

</div>

Decades back I wrote a Lisa-like psycho-analysis program in an early version of M$ Basic. While using it I noticed a small bug in it and said "list" to list the program.

I had forgotten I was still talking to the program so my train of thought was totally derailed when the computer replied...

Really?

Why?

John Carter Phone : (64)(3) 358 6639  
Tait Electronics Fax : (64)(3) 359 4632  
PO Box 1645 Christchurch Email : john.carter@tait.co.nz  
New Zealand

Carter's Clarification of Murphy's Law.

"Things only ever go right so that they may go more spectacularly wrong later."

From this principle, all of life and physics may be deduced.

> **···**
>
> On Thu, 16 Jun 2005, Nikolai Weibull wrote:
> 
> > % python
> > 
> > > > > quit  
> > > > > 'Use Ctrl-D (i.e. EOF) to exit.'
> > 
> > %
> > 
> > Man, seriously. That’s so fucking funny. Can’t we make irb do  
> > something similar?

---

<div class="post-metadata">

**Author:** ![David\_Mitchell](https://avatars.discourse-cdn.com/v4/letter/d/2bfe46/32.png) [@David\_Mitchell](https://rubytalk.org/u/David_Mitchell)\
**Post date:** [15 June 2005 23:53 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/5 "2005-06-15T23:53:23Z")

</div>

How about this for an explanation:

$ irb  
\> def quit  
\> puts 'No way'  
\> end  
=\> nil  
\> quit

Quits IRB. (So does calling quit())

$ python  
\>\>\> def quit():  
... print "No way"  
...  
\>\>\> quit()  
No way  
\>\>\>

Small, and pointless reason, but perhaps this has something to do with it.

David Mitchell  
(Solidly on the ruby side of the fence).

Bill Kelly wrote:

> **···**
>
> > From: "Nikolai Weibull" \<mailing-lists.ruby-talk@rawuncut.elitemail.org\>
> > 
> > > % python  
> > > Python 2.3.5 (#1, Apr 28 2005, 14:11:32)  
> > > [GCC 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1,  
> > > ssp-3.3.5.20050130-1, pie- on linux2  
> > > Type "help", "copyright", "credits" or "license" for more information.
> > > 
> > > > > > quit  
> > > > > > 'Use Ctrl-D (i.e. EOF) to exit.'
> > > 
> > > %
> > > 
> > > Man, seriously. That’s so fucking funny. Can’t we make irb do  
> > > something similar? I really hate that irb quits on me when I write  
> > > “quit” at the prompt. I’d much rather have it exit on me on ^D only. I  
> > > especially like how they take the time to explain that ^D is EOF,
> > 
> > I never understood that. 🙂 Let's find out what a lot of users naturally  
> > want to do, and add code to inform them they're wrong, rather than  
> > do what the user wanted.
> > 
> > That was one of my very first experiences with Python a few years  
> > back, and I quickly concluded the culture of There Really Is Only One  
> > Way To Do It was probably not for me... \<grin\>
> > 
> > Regards,
> > 
> > Bill

---

<div class="post-metadata">

**Author:** ![Nikolai\_Weibull](https://avatars.discourse-cdn.com/v4/letter/n/ce7236/32.png) [@Nikolai\_Weibull](https://rubytalk.org/u/Nikolai_Weibull)\
**Post date:** [16 June 2005 09:54 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/6 "2005-06-16T09:54:00Z")

</div>

Charles Steinman wrote:

> Nikolai Weibull wrote:

> \> % python  
> \> Python 2.3.5 (#1, Apr 28 2005, 14:11:32)  
> \> [GCC 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1,  
> \> ssp-3.3.5.20050130-1, pie- on linux2  
> \> Type "help", "copyright", "credits" or "license" for more information.  
> \> \>\>\> quit  
> \> \>\>\> 'Use Ctrl-D (i.e. EOF) to exit.'  
> \> \>\>\>  
> \> %

> \> Man, seriously. That's so fucking funny. Can't we make irb do  
> \> something similar? I really hate that irb quits on me when I write  
> \> "quit" at the prompt. I'd much rather have it exit on me on ^D only. I  
> \> especially like how they take the time to explain that ^D is EOF,

> Just put "def exit() 'Use Ctrl-D (i.e. EOF) to exit.' end" in your  
> ..irbrc file. Then you'll never have to worry about it again.

The problem isn’t exit, but quit.

> Personally, I don't have a problem with involuntarily typing "exit"  
> into IRB. Anyway, the exit method is part of the standard library, not  
> a function of IRB. I don't think changing it by default in IRB would be  
> a good thing.

Hm, perhaps not. One could give it a counter, so that if I type quit  
twice in a row it’ll first warn me that I should be uisng ^D, and then  
the next time it’ll actually quit,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nikolai

> **···**
>
> --  
> Nikolai Weibull: now available free of charge at [http://bitwi.se/\](http://bitwi.se/%5C)!  
> Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.  
> main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

---

<div class="post-metadata">

**Author:** ![Charles\_Steinman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@Charles\_Steinman](https://rubytalk.org/u/Charles_Steinman)\
**Post date:** [16 June 2005 00:05 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/7 "2005-06-16T00:05:32Z")

</div>

David Mitchell wrote:

> How about this for an explanation:
> 
> $ irb  
> \> def quit  
> \> puts 'No way'  
> \> end  
> =\> nil  
> \> quit
> 
> Quits IRB. (So does calling quit())

If you make it def self.quit, it'll work.

---

<div class="post-metadata">

**Author:** ![Charles\_Steinman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@Charles\_Steinman](https://rubytalk.org/u/Charles_Steinman)\
**Post date:** [16 June 2005 13:50 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/8 "2005-06-16T13:50:33Z")

</div>

Nikolai Weibull wrote:

> Charles Steinman wrote:
> 
> \> Nikolai Weibull wrote:
> 
> \> \> % python  
> \> \> Python 2.3.5 (#1, Apr 28 2005, 14:11:32)  
> \> \> [GCC 3.3.5-20050130 (Gentoo Linux 3.3.5.20050130-r1,  
> \> \> ssp-3.3.5.20050130-1, pie- on linux2  
> \> \> Type "help", "copyright", "credits" or "license" for more information.  
> \> \> \>\>\> quit  
> \> \> \>\>\> 'Use Ctrl-D (i.e. EOF) to exit.'  
> \> \> \>\>\>  
> \> \> %
> 
> \> \> Man, seriously. That's so fucking funny. Can't we make irb do  
> \> \> something similar? I really hate that irb quits on me when I write  
> \> \> "quit" at the prompt. I'd much rather have it exit on me on ^D only. I  
> \> \> especially like how they take the time to explain that ^D is EOF,
> 
> \> Just put "def exit() 'Use Ctrl-D (i.e. EOF) to exit.' end" in your  
> \> ..irbrc file. Then you'll never have to worry about it again.
> 
> The problem isn't exit, but quit.

My bad. The "exit" in the Python response threw me off. You can do the  
same with quit, though.

> \> Personally, I don't have a problem with involuntarily typing "exit"  
> \> into IRB. Anyway, the exit method is part of the standard library, not  
> \> a function of IRB. I don't think changing it by default in IRB would be  
> \> a good thing.
> 
> Hm, perhaps not. One could give it a counter, so that if I type quit  
> twice in a row it'll first warn me that I should be uisng ^D, and then  
> the next time it'll actually quit,

I still don't understand why quit should be an exception to every other  
method, including the functionally identical exit. And isn't  
accidentally typing ^D about as easy as accidentally typing "quit"? It  
seems actually easier to me, since it's only one off from a normal  
capital D whereas "quit" is four letters long.

---

<div class="post-metadata">

**Author:** ![Nikolai\_Weibull](https://avatars.discourse-cdn.com/v4/letter/n/ce7236/32.png) [@Nikolai\_Weibull](https://rubytalk.org/u/Nikolai_Weibull)\
**Post date:** [16 June 2005 14:18 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/9 "2005-06-16T14:18:49Z")

</div>

Charles Steinman wrote:

> \> \> Just put "def exit() 'Use Ctrl-D (i.e. EOF) to exit.' end" in your  
> \> \> ..irbrc file. Then you'll never have to worry about it again.

> \> The problem isn't exit, but quit.

> My bad. The "exit" in the Python response threw me off. You can do the  
> same with quit, though.

Yes. It seems they were in such a hurry to add that message that they  
never considered that not all people draw a mental parallel between  
“quit” and “exit”. Also, they forgot a comma efter the “i.e.” (yes, I  
am \_that\_ anal retentive).

> \> \> Personally, I don't have a problem with involuntarily typing  
> \> \> "exit" into IRB. Anyway, the exit method is part of the standard  
> \> \> library, not a function of IRB. I don't think changing it by  
> \> \> default in IRB would be a good thing.

Man, I thought you were playing along here (see below).

> \> Hm, perhaps not. One could give it a counter, so that if I type  
> \> quit twice in a row it'll first warn me that I should be uisng ^D,  
> \> and then the next time it'll actually quit,

> I still don't understand why quit should be an exception to every  
> other method, including the functionally identical exit. And isn't  
> accidentally typing ^D about as easy as accidentally typing "quit"? It  
> seems actually easier to me, since it's only one off from a normal  
> capital D whereas "quit" is four letters long.

Didn’t you read the subject? I’m being very sarcastic actually. My  
intent was to point out that instead of simply adding a hook for quiting  
the interpreter when the user types “quit”, the Python people added a  
message that says how you should exit properly instead.

If I type “quit” or “exit” in a TUI, I expect the application to exit,  
returning me to the terminal. Instead of doing that they force me to  
use ^D, which one has to be a pretty advanced UNIX user to know about (I  
do, but I can see how many new users won’t),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nikolai

> **···**
>
> --  
> Nikolai Weibull: now available free of charge at [http://bitwi.se/\](http://bitwi.se/%5C)!  
> Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.  
> main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

---

<div class="post-metadata">

**Author:** ![Charles\_Steinman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@Charles\_Steinman](https://rubytalk.org/u/Charles_Steinman)\
**Post date:** [16 June 2005 17:20 UTC](https://rubytalk.org/t/funniest-thing-evar/18994/10 "2005-06-16T17:20:33Z")

</div>

Nikolai Weibull wrote:

> Man, I thought you were playing along here (see below).

Oh. Heh. After a full day of working tech support, I think my  
sarcasm-o-meter is kind of dulled. D'oh.
