Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

yow

40 views
Skip to first unread message

Phil Carmody

unread,
Oct 23, 2008, 6:26:37 PM10/23/08
to
Not that it's really important, but I notice that M-x yow
always returns the same quotation. Is that a bug, or am
I doing it wrong?

Phil
--
The fact that a believer is happier than a sceptic is no more to the
point than the fact that a drunken man is happier than a sober one.
The happiness of credulity is a cheap and dangerous quality.
-- George Bernard Shaw (1856-1950), Preface to Androcles and the Lion

TheFlyingDutchman

unread,
Oct 23, 2008, 7:53:33 PM10/23/08
to
I have the same problem with Emacs 22.1.1 on windows. It looks like
the problem is that the file yow.lines (stored in the directory
pointed to by variable data-directory) only has one entry. When I
copied yow.lines from my Unix system to my Windows machine, yow gives
a different result each time.

Here is what file yow.lines should contain (with the question marks
all being replaced by ASCII 00 ( displays as ^@ in Emacs) ).

http://olympus.het.brown.edu/cgi-bin/dwww?type=file&location=/usr/share/doc/emacs21-common/etc/yow.lines

TheFlyingDutchman

unread,
Oct 23, 2008, 7:58:33 PM10/23/08
to

>
> Here is what file yow.lines should contain (with the question marks
> all being replaced by ASCII 00 ( displays as ^@ in Emacs) ).

Well I see the <?> with Firefox but not with IE. Each quotation should
be delimited by the Ascii 00 character.

Phil Carmody

unread,
Oct 23, 2008, 8:18:48 PM10/23/08
to
TheFlyingDutchman <zzbb...@aol.com> writes:
> I have the same problem with Emacs 22.1.1 on windows. It looks like
> the problem is that the file yow.lines (stored in the directory
> pointed to by variable data-directory) only has one entry. When I
> copied yow.lines from my Unix system to my Windows machine, yow gives
> a different result each time.
>
> Here is what file yow.lines should contain (with the question marks
> all being replaced by ASCII 00 ( displays as ^@ in Emacs) ).
>
> http://olympus.het.brown.edu/cgi-bin/dwww?type=file&location=/usr/share/doc/emacs21-common/etc/yow.lines


Eeep, I just did a wget of that file, and now it's worse:

"""
Loading yow...done
Am I CONSING yet?...
cookie-snarf: Search failed: "
%%
\\|
%
\\|^@"

Drew Adams

unread,
Oct 23, 2008, 8:20:01 PM10/23/08
to Phil Carmody, help-gn...@gnu.org
> Not that it's really important, but I notice that M-x yow
> always returns the same quotation. Is that a bug, or am
> I doing it wrong?

I believe there was some licensing/copyright issue involved in using the set of
Zippy quotes, and GNU decided to forego it. You can probably find the full set
on the Web somewhere.

Googling comes up with this reference to the change (see end of page):
http://www.red-bean.com/pipermail/arcana/2007-July/000017.html

TheFlyingDutchman

unread,
Oct 23, 2008, 8:41:02 PM10/23/08
to

>
> Eeep, I just did a wget of that file, and now it's worse:
>
> """
> Loading yow...done
> Am I CONSING yet?...
> cookie-snarf: Search failed: "
> %%
> \\|
> %
> \\|^@"
> """

I don't think you can use that web page verbatim for yow.lines. It has
to be modified to have ASCII 00 delimiting the quotes.
If there isn't a ftp'able regular file somewhere, you would have to
edit the original one-line file to have the extra quotes, making sure
to add the terminators as well.

If you edit (data-directory)/yow.lines in Emacs you should see the
delimiters represented by ^@:
_____________________________________________________________________
Zippy the pinhead data base.
Everything up to the first ascii \000 (`null') character is a comment.
The file consists of Zippy quotations (from various comic books and
strips by Bill Griffith) followed by a null character.
Newline characters following a quotation are ignored and are present
only for readability.
Have FUN!
This file is currently used by:
* the FORTUNE program on OZ.AI.MIT.EDU
* the M-x yow command in GNU Emacs.
* NIL (MIT Common Lisp)'s debugger
* something Bandy wrote at LLL-CRG.ARPA (fucking death labs).
* Henry's Zippy proxy (http://www.metahtml.com/apps/zippy/)
^@
A can of ASPARAGUS, 73 pigeons, some LIVE ammo, and a FROZEN DAQUIRI!!
^@
A dwarf is passing out somewhere in Detroit!^@
A GRAM?? A BRAM... A GROOM... A BROOM... Oh, Yeh!! Wash the
ROOM!!^@
....
...
...
OFFICE!! An OCEAN LINER!! No, I think it's a CAFETERIA!!!^@
Zippy's brain cells are straining to bridge synapses...^@
_____________________________________________________________________________


TheFlyingDutchman

unread,
Oct 24, 2008, 3:53:06 AM10/24/08
to

>
> Eeep, I just did a wget of that file, and now it's worse:

I don't know Emacs Lisp so I wrote this little program in Python to
convert the HTML from that page into an Emacs yow.lines. You have to
save the page into a text file with Internet Explorer (not Firefox)
and then run this program to produce yow.lines.
__________________________________________________________________________________________________________________________

# convert HTML page source representing "yow.lines" to an Emacs
usable format
# --------------------------------------------------------------
# save (File-Save As...)
# http://olympus.het.brown.edu/cgi-bin/dwww?type=file&location=/usr/share/doc/emacs21-common/etc/yow.lines
# to a html or text file using Internet Explorer 6 (not Firefox which
requires slightly different processing for
# what it saves)
# Use that file as input to this program. This program will output a
file called yow.lines.
# Copy yow.lines to the directory referenced in the Emacs variable ->
data-directory <- . (eg: "c:/Program Files/Emacs/etc")
import sys
import os

if __name__ == "__main__":

if len(sys.argv) == 1:
print "ERROR: You must input the name of the file to convert
to yow.lines"
exit(1)
if os.path.exists(sys.argv[1]):
f_input = open( sys.argv[1] )
f_output = open( "yow.lines",'w')
else:
print "ERROR: File " + sys.argv[1] + " not found"
exit(2)
print "will convert html page source to usable yow.lines"
dataHit = False
finished = False
f_output.write("Zippy the pinhead data base.\n")
for line in f_input.readlines():
if line[0] != '<' and not finished:
outputLine = line.rstrip("\n\r")
outputLine = outputLine.replace("&amp;","&")
if outputLine.startswith("A can of ASPARAGUS"):
dataHit = True
f_output.write( chr(0) + "\n")
if len(outputLine) > 0:
lastChar = outputLine[-1]
if lastChar in ['!', '?', '.'] and dataHit:
outputLine = outputLine + chr(0) + "\n"
else:
outputLine = outputLine + "\n"
f_output.write(outputLine)
if outputLine.startswith("Zippy's brain cells are
straining to bridge synapses..."):
finished = True
f_input.close()
f_output.close()
print "program %s ended successfully" % (sys.argv[0])

TheFlyingDutchman

unread,
Oct 24, 2008, 4:10:46 AM10/24/08
to

> I don't know Emacs Lisp so I wrote this little program in Python to

4 of the comment lines and 2 code lines got wrapped when they posted
so they need to be adjusted.

0 new messages